diff --git a/ant-vue/.env.docker b/ant-vue/.env.docker new file mode 100644 index 0000000000000000000000000000000000000000..cbec913acdefc42f3f0cc3c5ce467199bbfb7ba1 --- /dev/null +++ b/ant-vue/.env.docker @@ -0,0 +1,6 @@ +NODE_ENV=docker +# 静态文件路径 +VITE_BASE_URL=/ +VITE_APP_ENV_NAME=docker环境 +VITE_APP_API_URL=http://172.17.0.1:8005 +VITE_LOGIN=some diff --git a/ant-vue/nginx.conf b/ant-vue/nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..875771ba7b76b5b1703083c9a6629cfced063956 --- /dev/null +++ b/ant-vue/nginx.conf @@ -0,0 +1,109 @@ + +user root; +worker_processes 1; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + +error_log /var/log/nginx/error.log error; + + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + + #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + # '$status $body_bytes_sent "$http_referer" ' + # '"$http_user_agent" "$http_x_forwarded_for"'; + + #access_log logs/access.log main; + + sendfile on; + #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout 65; + + #gzip on; + + log_format main escape=json + '{"timestamp":"$time_iso8601",' + '"host":"$hostname",' + '"server_ip":"$server_addr",' + '"client_ip":"$remote_addr",' + '"xff":"$http_x_forwarded_for",' + '"domain":"$host",' + '"url":"$uri",' + '"referer":"$http_referer",' + '"args":"$args",' + '"upstreamtime":"$upstream_response_time",' + '"responsetime":"$request_time",' + '"request_method":"$request_method",' + '"request_body":"$request_body",' + '"status":"$status",' + '"size":"$body_bytes_sent",' + '"request_length":"$request_length",' + '"protocol":"$server_protocol",' + '"upstreamhost":"$upstream_addr",' + '"http_user_agent":"$http_user_agent",' + '"http_token":"$http_token"' + '}'; + + access_log /var/log/nginx/access.log main; + + gzip on; + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + gzip_proxied any; + gzip_min_length 1024; + gzip_comp_level 4; + gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + #客户端请求头部的缓冲区大小,这个可以根据系统分页大小来设置, + #由于一般系统分页都要大于1k,所以这里设置为系统分页大小。查看系统分页可以使用 getconf PAGESIZE命令 + client_header_buffer_size 64k; + large_client_header_buffers 4 64k; + #为打开文件指定缓存,默认是没有启用的,max指定缓存最大数量,建议和打开文件数一致, + #inactive是指经过多长时间文件没被请求后删除缓存 打开文件最大数量为我们再main配置的worker_rlimit_nofile参数 + open_file_cache max=2000 inactive=60s; + #这个是指多长时间检查一次缓存的有效信息。如果有一个文件在inactive时间内一次没被使用,它将被移除 + open_file_cache_valid 60s; + #open_file_cache指令中的inactive参数时间内文件的最少使用次数,如果超过这个数字, + #文件描述符一直是在缓存中打开的,如果有一个文件在inactive时间内一次没被使用,它将被移除。 + open_file_cache_min_uses 5; + + #代理 请求头设置 + proxy_set_header Host $host; # 全局上会导致代理域名有误 代理域名需要单独配置 proxy_set_header Host $proxy_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header REMOTE-HOST $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_intercept_errors on; + recursive_error_pages on; + +# include ./conf.d/*.conf; +# include ./conf.d/**/*.conf; + + server { + listen 80; + + access_log /var/log/nginx/iot/80.access.log main; + error_log /var/log/nginx/iot/80.error.log ; + + error_page 500 502 503 504 /50x.html; + + location / { + root /app/iot/project/html; + try_files $uri $uri/ /index.html; + } + + } + +} diff --git a/ant-vue/package.json b/ant-vue/package.json index bd5238b0a9bb679a56222aeb9d8a8d3cea201f7c..2dac31cef305b5ae9d6e8f2b4da2ca949bea13e5 100644 --- a/ant-vue/package.json +++ b/ant-vue/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "vite build", + "build-docker": "vite build --mode docker", "lint": "eslint . --ext .cjs,.ts,.vue --fix", "svgo:simple": "svgo -f src/icons/simple --config=src/icons/simple.config.cjs", "svgo:complex": "svgo -f src/icons/complex --config=src/icons/complex.config.cjs" diff --git a/ant-vue/src/api/index.ts b/ant-vue/src/api/index.ts index 105aa304f330c06f9e35db7ca3a69f184595f059..e21d3061475226527be6ecdc0989f8249a5b5bc7 100644 --- a/ant-vue/src/api/index.ts +++ b/ant-vue/src/api/index.ts @@ -96,7 +96,7 @@ export async function DashboardDelete(id: string) { return await axios.post(`${url}/dashboard/delete/${id}`); } -export async function DashboardId(id: any ) { +export async function DashboardId(id: any) { return await axios.get(`${url}/dashboard/${id}`); } @@ -204,28 +204,178 @@ export async function DeptSubs(params: any) { return await axios.get(`${url}/Dept/subs`, { params }); } //设备详情 +export const DEVICEINFO_PAGE = "/DeviceInfo/page"; +export const DEVICEINFO_CREATE = "/DeviceInfo/create"; +export const DEVICEINFO_DELETE = "/DeviceInfo/delete"; export async function DeviceInfoPage(params: any) { - return await axios.get(`${url}/DeviceInfo/page`, { params }); + return await axios.get(`${url}${DEVICEINFO_PAGE}`, { params }); } export async function DeviceInfoCreate(data: any) { - return await axios.post(`${url}/DeviceInfo/create`, data); + return await axios.post(`${url}${DEVICEINFO_CREATE}`, data); } export async function DeviceInfoDelete(id: any) { - return await axios.post(`${url}/DeviceInfo/delete/${id}`); + return await axios.post(`${url}${DEVICEINFO_DELETE}/${id}`); } export async function DeviceInfoBindMqtt(data: any) { return await axios.post(`${url}/DeviceInfo/BindMqtt`, data); } export async function DeviceInfoQueryBindMqtt(params: any) { - return await axios.get(`${url}/DeviceInfo/QueryBindMqtt`, {params}); + return await axios.get(`${url}/DeviceInfo/QueryBindMqtt`, { params }); } export async function DeviceInfoUpdate(data: any) { - return await axios.post(`${url}/DeviceInfo/Update`, data); + return await axios.post(`${url}/DeviceInfo/update`, data); } -//消息 +// 设备组 +export const DEVICE_GROUP_PAGE = "/device_group/page"; +export const DEVICE_GROUP_CREATE = "/device_group/create"; +export const DEVICE_GROUP_UPDATE = "/device_group/update"; +export const DEVICE_GROUP_DELETE = "/device_group/delete"; +export const DEVICE_GROUP_BIND_DEVICE = "/device_group/bind_device"; +export const DEVICE_GROUP_QUERY_BIND_DEVICE = "/device_group/query_bind_device"; export async function MessageListPage(params: any) { - return await axios.get(`${url}/MessageList/page`, { params }); + return await axios.get(`${url}${DEVICE_GROUP_PAGE}`, { params }); +} +export async function DeviceGroupsCreate(data: any) { + return await axios.post(`${url}${DEVICE_GROUP_CREATE}`, data); +} +export async function DeviceGroupsUpdate(data: any) { + return await axios.post(`${url}${DEVICE_GROUP_UPDATE}`, data); +} +export async function DeviceGroupsDelete(id: any) { + return await axios.post(`${url}${DEVICE_GROUP_DELETE}/${id}`); +} +export async function DeviceGroupsBindDevice(data: any) { + return await axios.post(`${url}${DEVICE_GROUP_BIND_DEVICE}`, data); +} +export async function DeviceGroupsQueryBindDevice(params: any) { + return await axios.get(`${url}${DEVICE_GROUP_QUERY_BIND_DEVICE}`, { params }); +} + +// 飞书机器人 +export const FEISHU_ID_PAGE = "/FeiShuId/page"; +export const FEISHU_ID_CREATE = "/FeiShuId/create"; +export const FEISHU_ID_UPDATE = "/FeiShuId/update"; +export const FEISHU_ID_DELETE = "/FeiShuId/delete"; +export async function FeiShuPage(params: any) { + return await axios.get(`${url}${FEISHU_ID_PAGE}`, { params }); +} +export async function FeiShuCreate(data: any) { + return await axios.post(`${url}${FEISHU_ID_CREATE}`, data); +} +export async function FeiShuUpdate(data: any) { + return await axios.post(`${url}${FEISHU_ID_UPDATE}`, data); +} +export async function FeiShuDelete(id: any) { + return await axios.post(`${url}${FEISHU_ID_DELETE}/${id}`); +} + +// 钉钉机器人 +export const DingDing_PAGE = "/DingDing/page"; +export const DingDing_CREATE = "/DingDing/create"; +export const DingDing_UPDATE = "/DingDing/update"; +export const DingDing_DELETE = "/DingDing/delete"; +export async function DingDingPage(params: any) { + return await axios.get(`${url}${DingDing_PAGE}`, { params }); +} +export async function DingDingCreate(data: any) { + return await axios.post(`${url}${DingDing_CREATE}`, data); +} +export async function DingDingUpdate(data: any) { + return await axios.post(`${url}${DingDing_UPDATE}`, data); +} +export async function DingDingDelete(id: any) { + return await axios.post(`${url}${DingDing_DELETE}/${id}`); +} + +// CassandraTransmit +export const CASSANDRA_PAGE = "/CassandraTransmit/page"; +export const CASSANDRA_CREATE = "/CassandraTransmit/create"; +export const CASSANDRA_UPDATE = "/CassandraTransmit/update"; +export const CASSANDRA_DELETE = "/CassandraTransmit/delete"; +export async function CassandraTransmitPage(params: any) { + return await axios.get(`${url}${CASSANDRA_PAGE}`, { params }); +} +export async function CassandraTransmitCreate(data: any) { + return await axios.post(`${url}${CASSANDRA_CREATE}`, data); +} +export async function CassandraTransmitUpdate(data: any) { + return await axios.post(`${url}${CASSANDRA_UPDATE}`, data); +} +export async function CassandraTransmitDelete(id: any) { + return await axios.post(`${url}${CASSANDRA_DELETE}/${id}`); +} + +// ClickhouseTransmit +export const CLICK_HOUSE_PAGE = "/ClickhouseTransmit/page"; +export const CLICK_HOUSE_CREATE = "/ClickhouseTransmit/create"; +export const CLICK_HOUSE_UPDATE = "/ClickhouseTransmit/update"; +export const CLICK_HOUSE_DELETE = "/ClickhouseTransmit/delete"; +export async function ClickhouseTransmitPage(params: any) { + return await axios.get(`${url}${CLICK_HOUSE_PAGE}`, { params }); +} +export async function ClickhouseTransmitCreate(data: any) { + return await axios.post(`${url}${CLICK_HOUSE_CREATE}`, data); +} +export async function ClickhouseTransmitUpdate(data: any) { + return await axios.post(`${url}${CLICK_HOUSE_UPDATE}`, data); +} +export async function ClickhouseTransmitDelete(id: any) { + return await axios.post(`${url}${CLICK_HOUSE_DELETE}/${id}`); +} + +// InfluxdbTransmit +export const INFLUXDB_PAGE = "/InfluxdbTransmit/page"; +export const INFLUXDB_CREATE = "/InfluxdbTransmit/create"; +export const INFLUXDB_UPDATE = "/InfluxdbTransmit/update"; +export const INFLUXDB_DELETE = "/InfluxdbTransmit/delete"; +export async function InfluxdbTransmitPage(params: any) { + return await axios.get(`${url}${INFLUXDB_PAGE}`, { params }); +} +export async function InfluxdbTransmitCreate(data: any) { + return await axios.post(`${url}${INFLUXDB_CREATE}`, data); +} +export async function InfluxdbTransmitUpdate(data: any) { + return await axios.post(`${url}${INFLUXDB_UPDATE}`, data); +} +export async function InfluxdbTransmitDelete(id: any) { + return await axios.post(`${url}${INFLUXDB_DELETE}/${id}`); +} + +// MongoTransmit +export const MONGO_PAGE = "/MongoTransmit/page"; +export const MONGO_CREATE = "/MongoTransmit/create"; +export const MONGO_UPDATE = "/MongoTransmit/update"; +export const MONGO_DELETE = "/MongoTransmit/delete"; +export async function MongoTransmitPage(params: any) { + return await axios.get(`${url}${MONGO_PAGE}`, { params }); +} +export async function MongoTransmitCreate(data: any) { + return await axios.post(`${url}${MONGO_CREATE}`, data); +} +export async function MongoTransmitUpdate(data: any) { + return await axios.post(`${url}${MONGO_UPDATE}`, data); +} +export async function MongoTransmitDelete(id: any) { + return await axios.post(`${url}${MONGO_DELETE}/${id}`); +} + +// MySQLTransmit +export const MYSQL_PAGE = "/MySQLTransmit/page"; +export const MYSQL_CREATE = "/MySQLTransmit/create"; +export const MYSQL_UPDATE = "/MySQLTransmit/update"; +export const MYSQL_DELETE = "/MySQLTransmit/delete"; +export async function MySQLTransmitPage(params: any) { + return await axios.get(`${url}${MYSQL_PAGE}`, { params }); +} +export async function MySQLTransmitCreate(data: any) { + return await axios.post(`${url}${MYSQL_CREATE}`, data); +} +export async function MySQLTransmitUpdate(data: any) { + return await axios.post(`${url}${MYSQL_UPDATE}`, data); +} +export async function MySQLTransmitDelete(id: any) { + return await axios.post(`${url}${MYSQL_DELETE}/${id}`); } //角色 @@ -261,8 +411,14 @@ export async function UserDelete(id: any) { export async function UserBindRole(data: any) { return await axios.post(`${url}/User/BindRole`, data); } +export async function UserBindDept(data: any) { + return await axios.post(`${url}/User/BindDept`, data); +} export async function UserQueryBindRole(params: any) { - return await axios.get(`${url}/User/QueryBindRole?user_id=${params}`, ); + return await axios.get(`${url}/User/QueryBindRole?user_id=${params}`); +} +export async function UserQueryBindDept(params: any) { + return await axios.get(`${url}/User/QueryBindDept?user_id=${params}`, ); } //产品 @@ -292,5 +448,19 @@ export async function SimCardDelete(id: any) { return await axios.post(`${url}/SimCard/delete/${id}`); } - - +//生产计划 +export async function ProductionPlanPage(params: any) { + return await axios.get(`${url}/ProductionPlan/page`, { params }); +} +export async function ProductionPlanCreate(data: any) { + return await axios.post(`${url}/ProductionPlan/create`, data); +} +export async function ProductionPlanUpdate(data: any) { + return await axios.post(`${url}/ProductionPlan/update`, data); +} +export async function ProductionPlanDelete(id: any) { + return await axios.post(`${url}/ProductionPlan/delete/${id}`); +} +export async function ProductionPlanDetail(id: any) { + return await axios.get(`${url}/ProductionPlan/${id}`); +} \ No newline at end of file diff --git a/ant-vue/src/components/select/DeptSelect.vue b/ant-vue/src/components/select/DeptSelect.vue index 147d6a3b5b6f9ac5d313ae7723e6789f7e7dd199..1653ebfe3068f0d51e89a69e53e56390abaa0e94 100644 --- a/ant-vue/src/components/select/DeptSelect.vue +++ b/ant-vue/src/components/select/DeptSelect.vue @@ -1,15 +1,15 @@ + diff --git a/ant-vue/src/views/clickhouse/index.vue b/ant-vue/src/views/clickhouse/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..7269f5c1ffc047c67b4e2e897cd8aab125e71660 --- /dev/null +++ b/ant-vue/src/views/clickhouse/index.vue @@ -0,0 +1,153 @@ + + + diff --git a/ant-vue/src/views/coap/index.vue b/ant-vue/src/views/coap/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..8b80e99aa43f4110e33e6be3b8dedda4267eb5b8 --- /dev/null +++ b/ant-vue/src/views/coap/index.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/ant-vue/src/views/dept/index.vue b/ant-vue/src/views/dept/index.vue index 2c92da7e540cb6e171c5afec39d2fb1c1e14717e..eb97229ec6aa6df00dbfec2bc90a1f7da4cf008b 100644 --- a/ant-vue/src/views/dept/index.vue +++ b/ant-vue/src/views/dept/index.vue @@ -16,7 +16,7 @@ - + @@ -138,6 +138,9 @@ const setRoleFun = (key: any,index: any,value: any)=>{ editableData[key]['parent_id'] = value; } +const handleCancel = ()=> { + formRef.value?.resetFields(); +} const onAddData = () => { (formRef.value as HTMLFormElement) .validate() diff --git a/ant-vue/src/views/deviceGroup/index.vue b/ant-vue/src/views/deviceGroup/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..8e471b25b19fbbe697682b50860304bc5bf0243c --- /dev/null +++ b/ant-vue/src/views/deviceGroup/index.vue @@ -0,0 +1,155 @@ + + + diff --git a/ant-vue/src/views/deviceGroup/modal/bindDevice.vue b/ant-vue/src/views/deviceGroup/modal/bindDevice.vue new file mode 100644 index 0000000000000000000000000000000000000000..be73d27dd50abe0d5822bfc21384a7bfc5b649a7 --- /dev/null +++ b/ant-vue/src/views/deviceGroup/modal/bindDevice.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/ant-vue/src/views/deviceInfos/index.vue b/ant-vue/src/views/deviceInfos/index.vue index 1000c29b8279be8c871c05c69336ceafc970e19b..754c56b8bd9377c61ff29d1a4019546add93b2e8 100644 --- a/ant-vue/src/views/deviceInfos/index.vue +++ b/ant-vue/src/views/deviceInfos/index.vue @@ -1,81 +1,111 @@ - + @@ -172,6 +172,11 @@ const confirm = async (id: string) => { }); }; +const handleCancel = ()=>{ + formRef.value?.resetFields(); +} + + const onAddData = async() => { (formRef.value as HTMLFormElement) .validate() diff --git a/ant-vue/src/views/script-alarm-parameters/index.vue b/ant-vue/src/views/script-alarm-parameters/index.vue index beba2ac96eeb483384b51dfc25b3f46d027ef6db..f970fb48360258aa445bfcd98cc0b4163a8844eb 100644 --- a/ant-vue/src/views/script-alarm-parameters/index.vue +++ b/ant-vue/src/views/script-alarm-parameters/index.vue @@ -13,24 +13,24 @@