diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@ - + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
+ + diff --git a/src/components/VirtualTable/index.vue b/src/components/VirtualTable/index.vue new file mode 100644 index 0000000..a7a15cf --- /dev/null +++ b/src/components/VirtualTable/index.vue @@ -0,0 +1,74 @@ + + + + + + diff --git a/src/components/map/index.vue b/src/components/map/index.vue index 8007858..7dfd02d 100644 --- a/src/components/map/index.vue +++ b/src/components/map/index.vue @@ -111,7 +111,7 @@ map.value = new AMap1.Map('map', { viewMode: '3D', // 是否为3D地图模式 zoom: $props.zoom, // 初始化地图级别 - zooms: [8, 18], + zooms: [8, $props.showPiepleLayer ? 18 : 20], resizeEnable: true, center: $props.center && $props.center?.length === 2 && !isNaN($props.center[0]) && !isNaN($props.center[1]) ? $props.center : [116.397428, 39.90923], }) @@ -493,7 +493,7 @@ style: data.style.map((item: any) => ({ ...item, anchor: new AMap.value.Pixel(0, 0), - size: new AMap.value.Size(25, 25) + size: new AMap.value.Size(data.size ? data.size : 25, data.size ? data.size : 25) })), // 设置样式对象 }) massMarksAllList.value.push(massMarks) @@ -548,7 +548,7 @@ // -------------------------------------- 点聚合---------------------------------------------- const MarkerAllCluster = ref([]) // 点聚合数组 -const cluster = ref() +const cluster = ref([]) // 添加点聚合(距离聚合) const addCluster = (points, styleList, clusterOptions = {}) => { // console.log(points.map((item: any) => ({ ...item, city: '北京' })), 'points') @@ -612,23 +612,30 @@ $emits('massMarksClick', { event: { ...e, data: context.data[0] }, map: map.value, points, data, type: 'cluster' }) }) } - cluster.value = new AMap.value.MarkerCluster(map.value, points, { + + const cluster1 = new AMap.value.MarkerCluster(map.value, points, { gridSize: clusterOptions.gridSize || 100, // 设置网格像素大小 // maxZoom: false, // 最大的聚合级别,大于该级别就不进行相应的聚合 默认值为 18 clusterByZoomChange: false, // 地图缩放过程中是否聚合。默认值 false renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 renderMarker: _renderMarker, // 自定义非聚合点样式 }) + cluster.value.push(cluster1) // 聚合点小于11时不聚合 - cluster.value.setMinClusterSize(clusterOptions.setMinClusterSize || 40) + cluster1.setMinClusterSize(clusterOptions.setMinClusterSize || 40) } const removeCluster = () => { - if (cluster.value) { + if (cluster.value.length) { // console.log('清除点聚合') - map.value.remove(cluster.value) - cluster.value.setMap(null) - cluster.value = '' + // map.value.remove(cluster.value) + // cluster.value.setMap(null) + // cluster.value = '' + cluster.value.forEach((item: any) => { + map.value.remove(item) + item.setMap(null) + }) + cluster.value = [] } } // 点聚合(行政区) diff --git a/src/directives/table-scroll/index.ts b/src/directives/table-scroll/index.ts index 84fdce7..40042d2 100644 --- a/src/directives/table-scroll/index.ts +++ b/src/directives/table-scroll/index.ts @@ -68,8 +68,8 @@ const tableDom = el.getElementsByClassName('el-scrollbar__wrap')[0] as HTMLElement const container = document.getElementsByClassName('table-container')[0] as HTMLElement || document.getElementsByClassName('list-container')[0] as HTMLElement - container.removeEventListener('mouseover', () => (el.isScroll = false)) - container.removeEventListener('mouseout', () => { + container?.removeEventListener('mouseover', () => (el.isScroll = false)) + container?.removeEventListener('mouseout', () => { el.curTableTopValue = tableDom.scrollTop el.isScroll = true }) diff --git a/src/layouts/components/Tools/alarmList.vue b/src/layouts/components/Tools/alarmList.vue index 3073c2e..e1ba9fd 100644 --- a/src/layouts/components/Tools/alarmList.vue +++ b/src/layouts/components/Tools/alarmList.vue @@ -192,7 +192,7 @@ }).catch(() => { loading.value = false }) - }, 1000* 40); + }, 1000* 60 * 2); }) // onUnmounted(() => { // socket.destroyWebSocket() diff --git a/src/main.ts b/src/main.ts index d27386a..5fa903b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,10 +36,19 @@ // import TDesign from 'tdesign-mobile-vue' // // 引入组件库的少量全局样式变量 // import 'tdesign-mobile-vue/es/style/index.css' + + +// vxe -table 虚拟滚动列表 +import VxeUIAll from 'vxe-pc-ui' +import 'vxe-pc-ui/lib/style.css' +import VxeUITable from 'vxe-table' +import 'vxe-table/lib/style.css' + if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } + axios.get('./config/config.json', { headers: { 'Cache-Control': 'no-cache', @@ -118,6 +127,8 @@ app.use(Vant) app.use(pinia) app.use(router) + app.use(VxeUIAll) + app.use(VxeUITable) app.use(Lazyload, { lazyComponent: true, }) diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts index ff2eb12..4a010ed 100644 --- a/src/utils/dayjs.ts +++ b/src/utils/dayjs.ts @@ -24,6 +24,7 @@ const hours = duration.hours() const minutes = duration.minutes() const seconds = duration.seconds() + console.log(seconds, 'seconds') // 格式化为字符串 const formattedDiff = `${years > 0 ? years : ''}${years > 0 ? '年' : ''}${months > 0 ? months : ''}${months > 0 ? '个月' : ''}${days > 0 ? days : ''}${days > 0 ? '天' : ''}${hours > 0 ? hours : ''}${hours > 0 ? '小时' : ''}${minutes > 0 ? minutes : ''}${minutes > 0 ? '分' : ''}${seconds > 0 ? seconds : ''}${seconds > 0 ? '秒' : ''}` console.log(formattedDiff, 'formattedDiff') diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue index 68729d3..71eb41d 100644 --- a/src/views/home/alarm/count/components/alarmStatistics.vue +++ b/src/views/home/alarm/count/components/alarmStatistics.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -84,7 +84,7 @@ }, ] list.value = res.data - resizePage + resizePage() loading.value = false }).catch(() => { loading.value = false @@ -100,36 +100,26 @@ diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index e8ccfea..989ea9d 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -196,7 +196,36 @@ diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue index 648f13c..2138898 100644 --- a/src/views/home/alarm/count/components/trendAnalysis.vue +++ b/src/views/home/alarm/count/components/trendAnalysis.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -123,6 +123,7 @@ columns.value = objArr.map((item: any) => ({ text: item, value: item, + width: 120 })) list.value = res.data resizePage() @@ -189,13 +190,25 @@ />
- + + + +
diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
+ + diff --git a/src/components/VirtualTable/index.vue b/src/components/VirtualTable/index.vue new file mode 100644 index 0000000..a7a15cf --- /dev/null +++ b/src/components/VirtualTable/index.vue @@ -0,0 +1,74 @@ + + + + + + diff --git a/src/components/map/index.vue b/src/components/map/index.vue index 8007858..7dfd02d 100644 --- a/src/components/map/index.vue +++ b/src/components/map/index.vue @@ -111,7 +111,7 @@ map.value = new AMap1.Map('map', { viewMode: '3D', // 是否为3D地图模式 zoom: $props.zoom, // 初始化地图级别 - zooms: [8, 18], + zooms: [8, $props.showPiepleLayer ? 18 : 20], resizeEnable: true, center: $props.center && $props.center?.length === 2 && !isNaN($props.center[0]) && !isNaN($props.center[1]) ? $props.center : [116.397428, 39.90923], }) @@ -493,7 +493,7 @@ style: data.style.map((item: any) => ({ ...item, anchor: new AMap.value.Pixel(0, 0), - size: new AMap.value.Size(25, 25) + size: new AMap.value.Size(data.size ? data.size : 25, data.size ? data.size : 25) })), // 设置样式对象 }) massMarksAllList.value.push(massMarks) @@ -548,7 +548,7 @@ // -------------------------------------- 点聚合---------------------------------------------- const MarkerAllCluster = ref([]) // 点聚合数组 -const cluster = ref() +const cluster = ref([]) // 添加点聚合(距离聚合) const addCluster = (points, styleList, clusterOptions = {}) => { // console.log(points.map((item: any) => ({ ...item, city: '北京' })), 'points') @@ -612,23 +612,30 @@ $emits('massMarksClick', { event: { ...e, data: context.data[0] }, map: map.value, points, data, type: 'cluster' }) }) } - cluster.value = new AMap.value.MarkerCluster(map.value, points, { + + const cluster1 = new AMap.value.MarkerCluster(map.value, points, { gridSize: clusterOptions.gridSize || 100, // 设置网格像素大小 // maxZoom: false, // 最大的聚合级别,大于该级别就不进行相应的聚合 默认值为 18 clusterByZoomChange: false, // 地图缩放过程中是否聚合。默认值 false renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 renderMarker: _renderMarker, // 自定义非聚合点样式 }) + cluster.value.push(cluster1) // 聚合点小于11时不聚合 - cluster.value.setMinClusterSize(clusterOptions.setMinClusterSize || 40) + cluster1.setMinClusterSize(clusterOptions.setMinClusterSize || 40) } const removeCluster = () => { - if (cluster.value) { + if (cluster.value.length) { // console.log('清除点聚合') - map.value.remove(cluster.value) - cluster.value.setMap(null) - cluster.value = '' + // map.value.remove(cluster.value) + // cluster.value.setMap(null) + // cluster.value = '' + cluster.value.forEach((item: any) => { + map.value.remove(item) + item.setMap(null) + }) + cluster.value = [] } } // 点聚合(行政区) diff --git a/src/directives/table-scroll/index.ts b/src/directives/table-scroll/index.ts index 84fdce7..40042d2 100644 --- a/src/directives/table-scroll/index.ts +++ b/src/directives/table-scroll/index.ts @@ -68,8 +68,8 @@ const tableDom = el.getElementsByClassName('el-scrollbar__wrap')[0] as HTMLElement const container = document.getElementsByClassName('table-container')[0] as HTMLElement || document.getElementsByClassName('list-container')[0] as HTMLElement - container.removeEventListener('mouseover', () => (el.isScroll = false)) - container.removeEventListener('mouseout', () => { + container?.removeEventListener('mouseover', () => (el.isScroll = false)) + container?.removeEventListener('mouseout', () => { el.curTableTopValue = tableDom.scrollTop el.isScroll = true }) diff --git a/src/layouts/components/Tools/alarmList.vue b/src/layouts/components/Tools/alarmList.vue index 3073c2e..e1ba9fd 100644 --- a/src/layouts/components/Tools/alarmList.vue +++ b/src/layouts/components/Tools/alarmList.vue @@ -192,7 +192,7 @@ }).catch(() => { loading.value = false }) - }, 1000* 40); + }, 1000* 60 * 2); }) // onUnmounted(() => { // socket.destroyWebSocket() diff --git a/src/main.ts b/src/main.ts index d27386a..5fa903b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,10 +36,19 @@ // import TDesign from 'tdesign-mobile-vue' // // 引入组件库的少量全局样式变量 // import 'tdesign-mobile-vue/es/style/index.css' + + +// vxe -table 虚拟滚动列表 +import VxeUIAll from 'vxe-pc-ui' +import 'vxe-pc-ui/lib/style.css' +import VxeUITable from 'vxe-table' +import 'vxe-table/lib/style.css' + if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } + axios.get('./config/config.json', { headers: { 'Cache-Control': 'no-cache', @@ -118,6 +127,8 @@ app.use(Vant) app.use(pinia) app.use(router) + app.use(VxeUIAll) + app.use(VxeUITable) app.use(Lazyload, { lazyComponent: true, }) diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts index ff2eb12..4a010ed 100644 --- a/src/utils/dayjs.ts +++ b/src/utils/dayjs.ts @@ -24,6 +24,7 @@ const hours = duration.hours() const minutes = duration.minutes() const seconds = duration.seconds() + console.log(seconds, 'seconds') // 格式化为字符串 const formattedDiff = `${years > 0 ? years : ''}${years > 0 ? '年' : ''}${months > 0 ? months : ''}${months > 0 ? '个月' : ''}${days > 0 ? days : ''}${days > 0 ? '天' : ''}${hours > 0 ? hours : ''}${hours > 0 ? '小时' : ''}${minutes > 0 ? minutes : ''}${minutes > 0 ? '分' : ''}${seconds > 0 ? seconds : ''}${seconds > 0 ? '秒' : ''}` console.log(formattedDiff, 'formattedDiff') diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue index 68729d3..71eb41d 100644 --- a/src/views/home/alarm/count/components/alarmStatistics.vue +++ b/src/views/home/alarm/count/components/alarmStatistics.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -84,7 +84,7 @@ }, ] list.value = res.data - resizePage + resizePage() loading.value = false }).catch(() => { loading.value = false @@ -100,36 +100,26 @@ diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index e8ccfea..989ea9d 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -196,7 +196,36 @@ diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue index 648f13c..2138898 100644 --- a/src/views/home/alarm/count/components/trendAnalysis.vue +++ b/src/views/home/alarm/count/components/trendAnalysis.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -123,6 +123,7 @@ columns.value = objArr.map((item: any) => ({ text: item, value: item, + width: 120 })) list.value = res.data resizePage() @@ -189,13 +190,25 @@ />
- + + + +
diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
+ + diff --git a/src/components/VirtualTable/index.vue b/src/components/VirtualTable/index.vue new file mode 100644 index 0000000..a7a15cf --- /dev/null +++ b/src/components/VirtualTable/index.vue @@ -0,0 +1,74 @@ + + + + + + diff --git a/src/components/map/index.vue b/src/components/map/index.vue index 8007858..7dfd02d 100644 --- a/src/components/map/index.vue +++ b/src/components/map/index.vue @@ -111,7 +111,7 @@ map.value = new AMap1.Map('map', { viewMode: '3D', // 是否为3D地图模式 zoom: $props.zoom, // 初始化地图级别 - zooms: [8, 18], + zooms: [8, $props.showPiepleLayer ? 18 : 20], resizeEnable: true, center: $props.center && $props.center?.length === 2 && !isNaN($props.center[0]) && !isNaN($props.center[1]) ? $props.center : [116.397428, 39.90923], }) @@ -493,7 +493,7 @@ style: data.style.map((item: any) => ({ ...item, anchor: new AMap.value.Pixel(0, 0), - size: new AMap.value.Size(25, 25) + size: new AMap.value.Size(data.size ? data.size : 25, data.size ? data.size : 25) })), // 设置样式对象 }) massMarksAllList.value.push(massMarks) @@ -548,7 +548,7 @@ // -------------------------------------- 点聚合---------------------------------------------- const MarkerAllCluster = ref([]) // 点聚合数组 -const cluster = ref() +const cluster = ref([]) // 添加点聚合(距离聚合) const addCluster = (points, styleList, clusterOptions = {}) => { // console.log(points.map((item: any) => ({ ...item, city: '北京' })), 'points') @@ -612,23 +612,30 @@ $emits('massMarksClick', { event: { ...e, data: context.data[0] }, map: map.value, points, data, type: 'cluster' }) }) } - cluster.value = new AMap.value.MarkerCluster(map.value, points, { + + const cluster1 = new AMap.value.MarkerCluster(map.value, points, { gridSize: clusterOptions.gridSize || 100, // 设置网格像素大小 // maxZoom: false, // 最大的聚合级别,大于该级别就不进行相应的聚合 默认值为 18 clusterByZoomChange: false, // 地图缩放过程中是否聚合。默认值 false renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 renderMarker: _renderMarker, // 自定义非聚合点样式 }) + cluster.value.push(cluster1) // 聚合点小于11时不聚合 - cluster.value.setMinClusterSize(clusterOptions.setMinClusterSize || 40) + cluster1.setMinClusterSize(clusterOptions.setMinClusterSize || 40) } const removeCluster = () => { - if (cluster.value) { + if (cluster.value.length) { // console.log('清除点聚合') - map.value.remove(cluster.value) - cluster.value.setMap(null) - cluster.value = '' + // map.value.remove(cluster.value) + // cluster.value.setMap(null) + // cluster.value = '' + cluster.value.forEach((item: any) => { + map.value.remove(item) + item.setMap(null) + }) + cluster.value = [] } } // 点聚合(行政区) diff --git a/src/directives/table-scroll/index.ts b/src/directives/table-scroll/index.ts index 84fdce7..40042d2 100644 --- a/src/directives/table-scroll/index.ts +++ b/src/directives/table-scroll/index.ts @@ -68,8 +68,8 @@ const tableDom = el.getElementsByClassName('el-scrollbar__wrap')[0] as HTMLElement const container = document.getElementsByClassName('table-container')[0] as HTMLElement || document.getElementsByClassName('list-container')[0] as HTMLElement - container.removeEventListener('mouseover', () => (el.isScroll = false)) - container.removeEventListener('mouseout', () => { + container?.removeEventListener('mouseover', () => (el.isScroll = false)) + container?.removeEventListener('mouseout', () => { el.curTableTopValue = tableDom.scrollTop el.isScroll = true }) diff --git a/src/layouts/components/Tools/alarmList.vue b/src/layouts/components/Tools/alarmList.vue index 3073c2e..e1ba9fd 100644 --- a/src/layouts/components/Tools/alarmList.vue +++ b/src/layouts/components/Tools/alarmList.vue @@ -192,7 +192,7 @@ }).catch(() => { loading.value = false }) - }, 1000* 40); + }, 1000* 60 * 2); }) // onUnmounted(() => { // socket.destroyWebSocket() diff --git a/src/main.ts b/src/main.ts index d27386a..5fa903b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,10 +36,19 @@ // import TDesign from 'tdesign-mobile-vue' // // 引入组件库的少量全局样式变量 // import 'tdesign-mobile-vue/es/style/index.css' + + +// vxe -table 虚拟滚动列表 +import VxeUIAll from 'vxe-pc-ui' +import 'vxe-pc-ui/lib/style.css' +import VxeUITable from 'vxe-table' +import 'vxe-table/lib/style.css' + if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } + axios.get('./config/config.json', { headers: { 'Cache-Control': 'no-cache', @@ -118,6 +127,8 @@ app.use(Vant) app.use(pinia) app.use(router) + app.use(VxeUIAll) + app.use(VxeUITable) app.use(Lazyload, { lazyComponent: true, }) diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts index ff2eb12..4a010ed 100644 --- a/src/utils/dayjs.ts +++ b/src/utils/dayjs.ts @@ -24,6 +24,7 @@ const hours = duration.hours() const minutes = duration.minutes() const seconds = duration.seconds() + console.log(seconds, 'seconds') // 格式化为字符串 const formattedDiff = `${years > 0 ? years : ''}${years > 0 ? '年' : ''}${months > 0 ? months : ''}${months > 0 ? '个月' : ''}${days > 0 ? days : ''}${days > 0 ? '天' : ''}${hours > 0 ? hours : ''}${hours > 0 ? '小时' : ''}${minutes > 0 ? minutes : ''}${minutes > 0 ? '分' : ''}${seconds > 0 ? seconds : ''}${seconds > 0 ? '秒' : ''}` console.log(formattedDiff, 'formattedDiff') diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue index 68729d3..71eb41d 100644 --- a/src/views/home/alarm/count/components/alarmStatistics.vue +++ b/src/views/home/alarm/count/components/alarmStatistics.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -84,7 +84,7 @@ }, ] list.value = res.data - resizePage + resizePage() loading.value = false }).catch(() => { loading.value = false @@ -100,36 +100,26 @@ diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index e8ccfea..989ea9d 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -196,7 +196,36 @@ diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue index 648f13c..2138898 100644 --- a/src/views/home/alarm/count/components/trendAnalysis.vue +++ b/src/views/home/alarm/count/components/trendAnalysis.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -123,6 +123,7 @@ columns.value = objArr.map((item: any) => ({ text: item, value: item, + width: 120 })) list.value = res.data resizePage() @@ -189,13 +190,25 @@ />
- + + + +
diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
+ + diff --git a/src/components/VirtualTable/index.vue b/src/components/VirtualTable/index.vue new file mode 100644 index 0000000..a7a15cf --- /dev/null +++ b/src/components/VirtualTable/index.vue @@ -0,0 +1,74 @@ + + + + + + diff --git a/src/components/map/index.vue b/src/components/map/index.vue index 8007858..7dfd02d 100644 --- a/src/components/map/index.vue +++ b/src/components/map/index.vue @@ -111,7 +111,7 @@ map.value = new AMap1.Map('map', { viewMode: '3D', // 是否为3D地图模式 zoom: $props.zoom, // 初始化地图级别 - zooms: [8, 18], + zooms: [8, $props.showPiepleLayer ? 18 : 20], resizeEnable: true, center: $props.center && $props.center?.length === 2 && !isNaN($props.center[0]) && !isNaN($props.center[1]) ? $props.center : [116.397428, 39.90923], }) @@ -493,7 +493,7 @@ style: data.style.map((item: any) => ({ ...item, anchor: new AMap.value.Pixel(0, 0), - size: new AMap.value.Size(25, 25) + size: new AMap.value.Size(data.size ? data.size : 25, data.size ? data.size : 25) })), // 设置样式对象 }) massMarksAllList.value.push(massMarks) @@ -548,7 +548,7 @@ // -------------------------------------- 点聚合---------------------------------------------- const MarkerAllCluster = ref([]) // 点聚合数组 -const cluster = ref() +const cluster = ref([]) // 添加点聚合(距离聚合) const addCluster = (points, styleList, clusterOptions = {}) => { // console.log(points.map((item: any) => ({ ...item, city: '北京' })), 'points') @@ -612,23 +612,30 @@ $emits('massMarksClick', { event: { ...e, data: context.data[0] }, map: map.value, points, data, type: 'cluster' }) }) } - cluster.value = new AMap.value.MarkerCluster(map.value, points, { + + const cluster1 = new AMap.value.MarkerCluster(map.value, points, { gridSize: clusterOptions.gridSize || 100, // 设置网格像素大小 // maxZoom: false, // 最大的聚合级别,大于该级别就不进行相应的聚合 默认值为 18 clusterByZoomChange: false, // 地图缩放过程中是否聚合。默认值 false renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 renderMarker: _renderMarker, // 自定义非聚合点样式 }) + cluster.value.push(cluster1) // 聚合点小于11时不聚合 - cluster.value.setMinClusterSize(clusterOptions.setMinClusterSize || 40) + cluster1.setMinClusterSize(clusterOptions.setMinClusterSize || 40) } const removeCluster = () => { - if (cluster.value) { + if (cluster.value.length) { // console.log('清除点聚合') - map.value.remove(cluster.value) - cluster.value.setMap(null) - cluster.value = '' + // map.value.remove(cluster.value) + // cluster.value.setMap(null) + // cluster.value = '' + cluster.value.forEach((item: any) => { + map.value.remove(item) + item.setMap(null) + }) + cluster.value = [] } } // 点聚合(行政区) diff --git a/src/directives/table-scroll/index.ts b/src/directives/table-scroll/index.ts index 84fdce7..40042d2 100644 --- a/src/directives/table-scroll/index.ts +++ b/src/directives/table-scroll/index.ts @@ -68,8 +68,8 @@ const tableDom = el.getElementsByClassName('el-scrollbar__wrap')[0] as HTMLElement const container = document.getElementsByClassName('table-container')[0] as HTMLElement || document.getElementsByClassName('list-container')[0] as HTMLElement - container.removeEventListener('mouseover', () => (el.isScroll = false)) - container.removeEventListener('mouseout', () => { + container?.removeEventListener('mouseover', () => (el.isScroll = false)) + container?.removeEventListener('mouseout', () => { el.curTableTopValue = tableDom.scrollTop el.isScroll = true }) diff --git a/src/layouts/components/Tools/alarmList.vue b/src/layouts/components/Tools/alarmList.vue index 3073c2e..e1ba9fd 100644 --- a/src/layouts/components/Tools/alarmList.vue +++ b/src/layouts/components/Tools/alarmList.vue @@ -192,7 +192,7 @@ }).catch(() => { loading.value = false }) - }, 1000* 40); + }, 1000* 60 * 2); }) // onUnmounted(() => { // socket.destroyWebSocket() diff --git a/src/main.ts b/src/main.ts index d27386a..5fa903b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,10 +36,19 @@ // import TDesign from 'tdesign-mobile-vue' // // 引入组件库的少量全局样式变量 // import 'tdesign-mobile-vue/es/style/index.css' + + +// vxe -table 虚拟滚动列表 +import VxeUIAll from 'vxe-pc-ui' +import 'vxe-pc-ui/lib/style.css' +import VxeUITable from 'vxe-table' +import 'vxe-table/lib/style.css' + if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } + axios.get('./config/config.json', { headers: { 'Cache-Control': 'no-cache', @@ -118,6 +127,8 @@ app.use(Vant) app.use(pinia) app.use(router) + app.use(VxeUIAll) + app.use(VxeUITable) app.use(Lazyload, { lazyComponent: true, }) diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts index ff2eb12..4a010ed 100644 --- a/src/utils/dayjs.ts +++ b/src/utils/dayjs.ts @@ -24,6 +24,7 @@ const hours = duration.hours() const minutes = duration.minutes() const seconds = duration.seconds() + console.log(seconds, 'seconds') // 格式化为字符串 const formattedDiff = `${years > 0 ? years : ''}${years > 0 ? '年' : ''}${months > 0 ? months : ''}${months > 0 ? '个月' : ''}${days > 0 ? days : ''}${days > 0 ? '天' : ''}${hours > 0 ? hours : ''}${hours > 0 ? '小时' : ''}${minutes > 0 ? minutes : ''}${minutes > 0 ? '分' : ''}${seconds > 0 ? seconds : ''}${seconds > 0 ? '秒' : ''}` console.log(formattedDiff, 'formattedDiff') diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue index 68729d3..71eb41d 100644 --- a/src/views/home/alarm/count/components/alarmStatistics.vue +++ b/src/views/home/alarm/count/components/alarmStatistics.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -84,7 +84,7 @@ }, ] list.value = res.data - resizePage + resizePage() loading.value = false }).catch(() => { loading.value = false @@ -100,36 +100,26 @@ diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index e8ccfea..989ea9d 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -196,7 +196,36 @@ diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue index 648f13c..2138898 100644 --- a/src/views/home/alarm/count/components/trendAnalysis.vue +++ b/src/views/home/alarm/count/components/trendAnalysis.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -123,6 +123,7 @@ columns.value = objArr.map((item: any) => ({ text: item, value: item, + width: 120 })) list.value = res.data resizePage() @@ -189,13 +190,25 @@ />
- + + + +
diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
+ + diff --git a/src/components/VirtualTable/index.vue b/src/components/VirtualTable/index.vue new file mode 100644 index 0000000..a7a15cf --- /dev/null +++ b/src/components/VirtualTable/index.vue @@ -0,0 +1,74 @@ + + + + + + diff --git a/src/components/map/index.vue b/src/components/map/index.vue index 8007858..7dfd02d 100644 --- a/src/components/map/index.vue +++ b/src/components/map/index.vue @@ -111,7 +111,7 @@ map.value = new AMap1.Map('map', { viewMode: '3D', // 是否为3D地图模式 zoom: $props.zoom, // 初始化地图级别 - zooms: [8, 18], + zooms: [8, $props.showPiepleLayer ? 18 : 20], resizeEnable: true, center: $props.center && $props.center?.length === 2 && !isNaN($props.center[0]) && !isNaN($props.center[1]) ? $props.center : [116.397428, 39.90923], }) @@ -493,7 +493,7 @@ style: data.style.map((item: any) => ({ ...item, anchor: new AMap.value.Pixel(0, 0), - size: new AMap.value.Size(25, 25) + size: new AMap.value.Size(data.size ? data.size : 25, data.size ? data.size : 25) })), // 设置样式对象 }) massMarksAllList.value.push(massMarks) @@ -548,7 +548,7 @@ // -------------------------------------- 点聚合---------------------------------------------- const MarkerAllCluster = ref([]) // 点聚合数组 -const cluster = ref() +const cluster = ref([]) // 添加点聚合(距离聚合) const addCluster = (points, styleList, clusterOptions = {}) => { // console.log(points.map((item: any) => ({ ...item, city: '北京' })), 'points') @@ -612,23 +612,30 @@ $emits('massMarksClick', { event: { ...e, data: context.data[0] }, map: map.value, points, data, type: 'cluster' }) }) } - cluster.value = new AMap.value.MarkerCluster(map.value, points, { + + const cluster1 = new AMap.value.MarkerCluster(map.value, points, { gridSize: clusterOptions.gridSize || 100, // 设置网格像素大小 // maxZoom: false, // 最大的聚合级别,大于该级别就不进行相应的聚合 默认值为 18 clusterByZoomChange: false, // 地图缩放过程中是否聚合。默认值 false renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 renderMarker: _renderMarker, // 自定义非聚合点样式 }) + cluster.value.push(cluster1) // 聚合点小于11时不聚合 - cluster.value.setMinClusterSize(clusterOptions.setMinClusterSize || 40) + cluster1.setMinClusterSize(clusterOptions.setMinClusterSize || 40) } const removeCluster = () => { - if (cluster.value) { + if (cluster.value.length) { // console.log('清除点聚合') - map.value.remove(cluster.value) - cluster.value.setMap(null) - cluster.value = '' + // map.value.remove(cluster.value) + // cluster.value.setMap(null) + // cluster.value = '' + cluster.value.forEach((item: any) => { + map.value.remove(item) + item.setMap(null) + }) + cluster.value = [] } } // 点聚合(行政区) diff --git a/src/directives/table-scroll/index.ts b/src/directives/table-scroll/index.ts index 84fdce7..40042d2 100644 --- a/src/directives/table-scroll/index.ts +++ b/src/directives/table-scroll/index.ts @@ -68,8 +68,8 @@ const tableDom = el.getElementsByClassName('el-scrollbar__wrap')[0] as HTMLElement const container = document.getElementsByClassName('table-container')[0] as HTMLElement || document.getElementsByClassName('list-container')[0] as HTMLElement - container.removeEventListener('mouseover', () => (el.isScroll = false)) - container.removeEventListener('mouseout', () => { + container?.removeEventListener('mouseover', () => (el.isScroll = false)) + container?.removeEventListener('mouseout', () => { el.curTableTopValue = tableDom.scrollTop el.isScroll = true }) diff --git a/src/layouts/components/Tools/alarmList.vue b/src/layouts/components/Tools/alarmList.vue index 3073c2e..e1ba9fd 100644 --- a/src/layouts/components/Tools/alarmList.vue +++ b/src/layouts/components/Tools/alarmList.vue @@ -192,7 +192,7 @@ }).catch(() => { loading.value = false }) - }, 1000* 40); + }, 1000* 60 * 2); }) // onUnmounted(() => { // socket.destroyWebSocket() diff --git a/src/main.ts b/src/main.ts index d27386a..5fa903b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,10 +36,19 @@ // import TDesign from 'tdesign-mobile-vue' // // 引入组件库的少量全局样式变量 // import 'tdesign-mobile-vue/es/style/index.css' + + +// vxe -table 虚拟滚动列表 +import VxeUIAll from 'vxe-pc-ui' +import 'vxe-pc-ui/lib/style.css' +import VxeUITable from 'vxe-table' +import 'vxe-table/lib/style.css' + if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } + axios.get('./config/config.json', { headers: { 'Cache-Control': 'no-cache', @@ -118,6 +127,8 @@ app.use(Vant) app.use(pinia) app.use(router) + app.use(VxeUIAll) + app.use(VxeUITable) app.use(Lazyload, { lazyComponent: true, }) diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts index ff2eb12..4a010ed 100644 --- a/src/utils/dayjs.ts +++ b/src/utils/dayjs.ts @@ -24,6 +24,7 @@ const hours = duration.hours() const minutes = duration.minutes() const seconds = duration.seconds() + console.log(seconds, 'seconds') // 格式化为字符串 const formattedDiff = `${years > 0 ? years : ''}${years > 0 ? '年' : ''}${months > 0 ? months : ''}${months > 0 ? '个月' : ''}${days > 0 ? days : ''}${days > 0 ? '天' : ''}${hours > 0 ? hours : ''}${hours > 0 ? '小时' : ''}${minutes > 0 ? minutes : ''}${minutes > 0 ? '分' : ''}${seconds > 0 ? seconds : ''}${seconds > 0 ? '秒' : ''}` console.log(formattedDiff, 'formattedDiff') diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue index 68729d3..71eb41d 100644 --- a/src/views/home/alarm/count/components/alarmStatistics.vue +++ b/src/views/home/alarm/count/components/alarmStatistics.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -84,7 +84,7 @@ }, ] list.value = res.data - resizePage + resizePage() loading.value = false }).catch(() => { loading.value = false @@ -100,36 +100,26 @@ diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index e8ccfea..989ea9d 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -196,7 +196,36 @@ diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue index 648f13c..2138898 100644 --- a/src/views/home/alarm/count/components/trendAnalysis.vue +++ b/src/views/home/alarm/count/components/trendAnalysis.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -123,6 +123,7 @@ columns.value = objArr.map((item: any) => ({ text: item, value: item, + width: 120 })) list.value = res.data resizePage() @@ -189,13 +190,25 @@ />
- + + + +
diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
+ + diff --git a/src/components/VirtualTable/index.vue b/src/components/VirtualTable/index.vue new file mode 100644 index 0000000..a7a15cf --- /dev/null +++ b/src/components/VirtualTable/index.vue @@ -0,0 +1,74 @@ + + + + + + diff --git a/src/components/map/index.vue b/src/components/map/index.vue index 8007858..7dfd02d 100644 --- a/src/components/map/index.vue +++ b/src/components/map/index.vue @@ -111,7 +111,7 @@ map.value = new AMap1.Map('map', { viewMode: '3D', // 是否为3D地图模式 zoom: $props.zoom, // 初始化地图级别 - zooms: [8, 18], + zooms: [8, $props.showPiepleLayer ? 18 : 20], resizeEnable: true, center: $props.center && $props.center?.length === 2 && !isNaN($props.center[0]) && !isNaN($props.center[1]) ? $props.center : [116.397428, 39.90923], }) @@ -493,7 +493,7 @@ style: data.style.map((item: any) => ({ ...item, anchor: new AMap.value.Pixel(0, 0), - size: new AMap.value.Size(25, 25) + size: new AMap.value.Size(data.size ? data.size : 25, data.size ? data.size : 25) })), // 设置样式对象 }) massMarksAllList.value.push(massMarks) @@ -548,7 +548,7 @@ // -------------------------------------- 点聚合---------------------------------------------- const MarkerAllCluster = ref([]) // 点聚合数组 -const cluster = ref() +const cluster = ref([]) // 添加点聚合(距离聚合) const addCluster = (points, styleList, clusterOptions = {}) => { // console.log(points.map((item: any) => ({ ...item, city: '北京' })), 'points') @@ -612,23 +612,30 @@ $emits('massMarksClick', { event: { ...e, data: context.data[0] }, map: map.value, points, data, type: 'cluster' }) }) } - cluster.value = new AMap.value.MarkerCluster(map.value, points, { + + const cluster1 = new AMap.value.MarkerCluster(map.value, points, { gridSize: clusterOptions.gridSize || 100, // 设置网格像素大小 // maxZoom: false, // 最大的聚合级别,大于该级别就不进行相应的聚合 默认值为 18 clusterByZoomChange: false, // 地图缩放过程中是否聚合。默认值 false renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 renderMarker: _renderMarker, // 自定义非聚合点样式 }) + cluster.value.push(cluster1) // 聚合点小于11时不聚合 - cluster.value.setMinClusterSize(clusterOptions.setMinClusterSize || 40) + cluster1.setMinClusterSize(clusterOptions.setMinClusterSize || 40) } const removeCluster = () => { - if (cluster.value) { + if (cluster.value.length) { // console.log('清除点聚合') - map.value.remove(cluster.value) - cluster.value.setMap(null) - cluster.value = '' + // map.value.remove(cluster.value) + // cluster.value.setMap(null) + // cluster.value = '' + cluster.value.forEach((item: any) => { + map.value.remove(item) + item.setMap(null) + }) + cluster.value = [] } } // 点聚合(行政区) diff --git a/src/directives/table-scroll/index.ts b/src/directives/table-scroll/index.ts index 84fdce7..40042d2 100644 --- a/src/directives/table-scroll/index.ts +++ b/src/directives/table-scroll/index.ts @@ -68,8 +68,8 @@ const tableDom = el.getElementsByClassName('el-scrollbar__wrap')[0] as HTMLElement const container = document.getElementsByClassName('table-container')[0] as HTMLElement || document.getElementsByClassName('list-container')[0] as HTMLElement - container.removeEventListener('mouseover', () => (el.isScroll = false)) - container.removeEventListener('mouseout', () => { + container?.removeEventListener('mouseover', () => (el.isScroll = false)) + container?.removeEventListener('mouseout', () => { el.curTableTopValue = tableDom.scrollTop el.isScroll = true }) diff --git a/src/layouts/components/Tools/alarmList.vue b/src/layouts/components/Tools/alarmList.vue index 3073c2e..e1ba9fd 100644 --- a/src/layouts/components/Tools/alarmList.vue +++ b/src/layouts/components/Tools/alarmList.vue @@ -192,7 +192,7 @@ }).catch(() => { loading.value = false }) - }, 1000* 40); + }, 1000* 60 * 2); }) // onUnmounted(() => { // socket.destroyWebSocket() diff --git a/src/main.ts b/src/main.ts index d27386a..5fa903b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -36,10 +36,19 @@ // import TDesign from 'tdesign-mobile-vue' // // 引入组件库的少量全局样式变量 // import 'tdesign-mobile-vue/es/style/index.css' + + +// vxe -table 虚拟滚动列表 +import VxeUIAll from 'vxe-pc-ui' +import 'vxe-pc-ui/lib/style.css' +import VxeUITable from 'vxe-table' +import 'vxe-table/lib/style.css' + if (useSettingsStore().app.iconifyOfflineUse) { downloadAndInstall() } + axios.get('./config/config.json', { headers: { 'Cache-Control': 'no-cache', @@ -118,6 +127,8 @@ app.use(Vant) app.use(pinia) app.use(router) + app.use(VxeUIAll) + app.use(VxeUITable) app.use(Lazyload, { lazyComponent: true, }) diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts index ff2eb12..4a010ed 100644 --- a/src/utils/dayjs.ts +++ b/src/utils/dayjs.ts @@ -24,6 +24,7 @@ const hours = duration.hours() const minutes = duration.minutes() const seconds = duration.seconds() + console.log(seconds, 'seconds') // 格式化为字符串 const formattedDiff = `${years > 0 ? years : ''}${years > 0 ? '年' : ''}${months > 0 ? months : ''}${months > 0 ? '个月' : ''}${days > 0 ? days : ''}${days > 0 ? '天' : ''}${hours > 0 ? hours : ''}${hours > 0 ? '小时' : ''}${minutes > 0 ? minutes : ''}${minutes > 0 ? '分' : ''}${seconds > 0 ? seconds : ''}${seconds > 0 ? '秒' : ''}` console.log(formattedDiff, 'formattedDiff') diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue index 68729d3..71eb41d 100644 --- a/src/views/home/alarm/count/components/alarmStatistics.vue +++ b/src/views/home/alarm/count/components/alarmStatistics.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -84,7 +84,7 @@ }, ] list.value = res.data - resizePage + resizePage() loading.value = false }).catch(() => { loading.value = false @@ -100,36 +100,26 @@ diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index e8ccfea..989ea9d 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -196,7 +196,36 @@ diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue index 648f13c..2138898 100644 --- a/src/views/home/alarm/count/components/trendAnalysis.vue +++ b/src/views/home/alarm/count/components/trendAnalysis.vue @@ -70,7 +70,7 @@ setTimeout(() => { const resize = new Event('resize') window.dispatchEvent(resize) - }, 500) + }) } const fetchData = () => { loading.value = true @@ -123,6 +123,7 @@ columns.value = objArr.map((item: any) => ({ text: item, value: item, + width: 120 })) list.value = res.data resizePage() @@ -189,13 +190,25 @@ />
- + + + +
diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + - + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+ --> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+ --> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + - + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + - + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/src/views/home/temporary/components/gasDataDialog copy.vue b/src/views/home/temporary/components/gasDataDialog copy.vue index c8ed6a2..ac3f714 100644 --- a/src/views/home/temporary/components/gasDataDialog copy.vue +++ b/src/views/home/temporary/components/gasDataDialog copy.vue @@ -107,44 +107,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -213,7 +213,8 @@ if(listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item:any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) } if (listQuery.value.typeName.includes('管网哨兵')) { @@ -426,11 +427,11 @@ diff --git a/package.json b/package.json index 8c33be7..9892360 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,9 @@ "vue-router": "^4.1.6", "vue3-print-nb": "^0.1.4", "vuedraggable": "^4.1.0", + "vxe-pc-ui": "^4.5.23", + "vxe-table": "^4.13.2", + "xe-utils": "^3.7.4", "xlsx": "^0.18.5" }, "devDependencies": { diff --git a/public/config/config.json b/public/config/config.json index b7ba181..d60ba89 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"感知数据汇聚平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://111.198.10.15:11643", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -27,5 +27,5 @@ }, "version": "1.0.1", "node": "16.18.1", - "mode": "mobile" + "mode": "windows" } diff --git a/src/api/home/dashboard/index.ts b/src/api/home/dashboard/index.ts index fad9ea8..e849a23 100644 --- a/src/api/home/dashboard/index.ts +++ b/src/api/home/dashboard/index.ts @@ -47,7 +47,7 @@ // 报警消息通知 export function getAlarmList(data: any) { return request({ - url: '/homePage/apis/pop', + url: `/homePage/apis/pop?offset=1&limit=999`, method: 'post', data, }) diff --git a/src/api/index.ts b/src/api/index.ts index 637d02f..c44d085 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -131,10 +131,12 @@ else if (message.includes('Request failed with status code')) { message = `接口${message.substr(message.length - 3)}异常` } - ElMessage({ - message, - type: 'error', - }) + if(!message.includes('timeout')) { + ElMessage({ + message, + type: 'error', + }) + } } return Promise.reject(error) diff --git a/src/assets/icons/reset.svg b/src/assets/icons/reset.svg new file mode 100644 index 0000000..dede826 --- /dev/null +++ b/src/assets/icons/reset.svg @@ -0,0 +1 @@ + diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/src/views/home/temporary/components/gasDataDialog copy.vue b/src/views/home/temporary/components/gasDataDialog copy.vue index c8ed6a2..ac3f714 100644 --- a/src/views/home/temporary/components/gasDataDialog copy.vue +++ b/src/views/home/temporary/components/gasDataDialog copy.vue @@ -107,44 +107,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -213,7 +213,8 @@ if(listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item:any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) } if (listQuery.value.typeName.includes('管网哨兵')) { @@ -426,11 +427,11 @@ diff --git a/src/views/home/temporary/components/gasDataDialog.vue b/src/views/home/temporary/components/gasDataDialog.vue index 543e8c4..d3b10f7 100644 --- a/src/views/home/temporary/components/gasDataDialog.vue +++ b/src/views/home/temporary/components/gasDataDialog.vue @@ -73,7 +73,7 @@ // 燃气智能监测终端 const columns1 = ref([ { text: '设备编号', value: 'devcode', align: 'center' }, - { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center', isCustom: true }, { text: '电量(%)', value: 'cell', align: 'center' }, { text: '信号强度', value: 'rsrp', align: 'center' }, { text: '信号质量', value: 'rsrpName', align: 'center' }, @@ -114,44 +114,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -220,7 +220,8 @@ if (listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item: any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) if (list.value.length) { xAxisData.value = list.value.slice().reverse().map(item => item.logtime) @@ -621,7 +622,7 @@
- - +
--> + + + +
diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/src/views/home/temporary/components/gasDataDialog copy.vue b/src/views/home/temporary/components/gasDataDialog copy.vue index c8ed6a2..ac3f714 100644 --- a/src/views/home/temporary/components/gasDataDialog copy.vue +++ b/src/views/home/temporary/components/gasDataDialog copy.vue @@ -107,44 +107,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -213,7 +213,8 @@ if(listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item:any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) } if (listQuery.value.typeName.includes('管网哨兵')) { @@ -426,11 +427,11 @@ diff --git a/src/views/home/temporary/components/gasDataDialog.vue b/src/views/home/temporary/components/gasDataDialog.vue index 543e8c4..d3b10f7 100644 --- a/src/views/home/temporary/components/gasDataDialog.vue +++ b/src/views/home/temporary/components/gasDataDialog.vue @@ -73,7 +73,7 @@ // 燃气智能监测终端 const columns1 = ref([ { text: '设备编号', value: 'devcode', align: 'center' }, - { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center', isCustom: true }, { text: '电量(%)', value: 'cell', align: 'center' }, { text: '信号强度', value: 'rsrp', align: 'center' }, { text: '信号质量', value: 'rsrpName', align: 'center' }, @@ -114,44 +114,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -220,7 +220,8 @@ if (listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item: any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) if (list.value.length) { xAxisData.value = list.value.slice().reverse().map(item => item.logtime) @@ -621,7 +622,7 @@
- - +
--> + + + +
+ + + + - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-'}} - - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-' }} - + -->
diff --git a/src/components.d.ts b/src/components.d.ts index 9ecab5e..e1cc6fe 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,7 +54,6 @@ NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] - offline: typeof import('./components/map/index offline.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] @@ -90,5 +89,6 @@ VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanTextEllipsis: typeof import('vant/es')['TextEllipsis'] + VirtualTable: typeof import('./components/VirtualTable/index.vue')['default'] } } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 9a3bc91..8daa41a 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -367,7 +367,7 @@ :fixed="column.fixed" :sortable="column.sortable"> - - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/src/views/home/temporary/components/gasDataDialog copy.vue b/src/views/home/temporary/components/gasDataDialog copy.vue index c8ed6a2..ac3f714 100644 --- a/src/views/home/temporary/components/gasDataDialog copy.vue +++ b/src/views/home/temporary/components/gasDataDialog copy.vue @@ -107,44 +107,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -213,7 +213,8 @@ if(listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item:any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) } if (listQuery.value.typeName.includes('管网哨兵')) { @@ -426,11 +427,11 @@ diff --git a/src/views/home/temporary/components/gasDataDialog.vue b/src/views/home/temporary/components/gasDataDialog.vue index 543e8c4..d3b10f7 100644 --- a/src/views/home/temporary/components/gasDataDialog.vue +++ b/src/views/home/temporary/components/gasDataDialog.vue @@ -73,7 +73,7 @@ // 燃气智能监测终端 const columns1 = ref([ { text: '设备编号', value: 'devcode', align: 'center' }, - { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center', isCustom: true }, { text: '电量(%)', value: 'cell', align: 'center' }, { text: '信号强度', value: 'rsrp', align: 'center' }, { text: '信号质量', value: 'rsrpName', align: 'center' }, @@ -114,44 +114,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -220,7 +220,8 @@ if (listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item: any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) if (list.value.length) { xAxisData.value = list.value.slice().reverse().map(item => item.logtime) @@ -621,7 +622,7 @@
- - +
--> + + + +
+ + + + - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-'}} - - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-' }} - + -->
+ {{ scope.row.onlineStateName }} + {{ scope.row.onlineStateName }} + diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/src/views/home/temporary/components/gasDataDialog copy.vue b/src/views/home/temporary/components/gasDataDialog copy.vue index c8ed6a2..ac3f714 100644 --- a/src/views/home/temporary/components/gasDataDialog copy.vue +++ b/src/views/home/temporary/components/gasDataDialog copy.vue @@ -107,44 +107,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -213,7 +213,8 @@ if(listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item:any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) } if (listQuery.value.typeName.includes('管网哨兵')) { @@ -426,11 +427,11 @@ diff --git a/src/views/home/temporary/components/gasDataDialog.vue b/src/views/home/temporary/components/gasDataDialog.vue index 543e8c4..d3b10f7 100644 --- a/src/views/home/temporary/components/gasDataDialog.vue +++ b/src/views/home/temporary/components/gasDataDialog.vue @@ -73,7 +73,7 @@ // 燃气智能监测终端 const columns1 = ref([ { text: '设备编号', value: 'devcode', align: 'center' }, - { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center', isCustom: true }, { text: '电量(%)', value: 'cell', align: 'center' }, { text: '信号强度', value: 'rsrp', align: 'center' }, { text: '信号质量', value: 'rsrpName', align: 'center' }, @@ -114,44 +114,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -220,7 +220,8 @@ if (listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item: any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) if (list.value.length) { xAxisData.value = list.value.slice().reverse().map(item => item.logtime) @@ -621,7 +622,7 @@
- - +
--> + + + +
+ + + + - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-'}} - - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-' }} - + -->
+ {{ scope.row.onlineStateName }} + {{ scope.row.onlineStateName }} + diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/src/views/home/temporary/components/gasDataDialog copy.vue b/src/views/home/temporary/components/gasDataDialog copy.vue index c8ed6a2..ac3f714 100644 --- a/src/views/home/temporary/components/gasDataDialog copy.vue +++ b/src/views/home/temporary/components/gasDataDialog copy.vue @@ -107,44 +107,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -213,7 +213,8 @@ if(listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item:any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) } if (listQuery.value.typeName.includes('管网哨兵')) { @@ -426,11 +427,11 @@ diff --git a/src/views/home/temporary/components/gasDataDialog.vue b/src/views/home/temporary/components/gasDataDialog.vue index 543e8c4..d3b10f7 100644 --- a/src/views/home/temporary/components/gasDataDialog.vue +++ b/src/views/home/temporary/components/gasDataDialog.vue @@ -73,7 +73,7 @@ // 燃气智能监测终端 const columns1 = ref([ { text: '设备编号', value: 'devcode', align: 'center' }, - { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center', isCustom: true }, { text: '电量(%)', value: 'cell', align: 'center' }, { text: '信号强度', value: 'rsrp', align: 'center' }, { text: '信号质量', value: 'rsrpName', align: 'center' }, @@ -114,44 +114,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -220,7 +220,8 @@ if (listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item: any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) if (list.value.length) { xAxisData.value = list.value.slice().reverse().map(item => item.logtime) @@ -621,7 +622,7 @@
- - +
--> + + + +
+ + + + - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-'}} - - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-' }} - + -->
+ {{ scope.row.onlineStateName }} + {{ scope.row.onlineStateName }} + diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/src/views/home/temporary/components/gasDataDialog copy.vue b/src/views/home/temporary/components/gasDataDialog copy.vue index c8ed6a2..ac3f714 100644 --- a/src/views/home/temporary/components/gasDataDialog copy.vue +++ b/src/views/home/temporary/components/gasDataDialog copy.vue @@ -107,44 +107,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -213,7 +213,8 @@ if(listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item:any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) } if (listQuery.value.typeName.includes('管网哨兵')) { @@ -426,11 +427,11 @@ diff --git a/src/views/home/temporary/components/gasDataDialog.vue b/src/views/home/temporary/components/gasDataDialog.vue index 543e8c4..d3b10f7 100644 --- a/src/views/home/temporary/components/gasDataDialog.vue +++ b/src/views/home/temporary/components/gasDataDialog.vue @@ -73,7 +73,7 @@ // 燃气智能监测终端 const columns1 = ref([ { text: '设备编号', value: 'devcode', align: 'center' }, - { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center', isCustom: true }, { text: '电量(%)', value: 'cell', align: 'center' }, { text: '信号强度', value: 'rsrp', align: 'center' }, { text: '信号质量', value: 'rsrpName', align: 'center' }, @@ -114,44 +114,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -220,7 +220,8 @@ if (listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item: any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) if (list.value.length) { xAxisData.value = list.value.slice().reverse().map(item => item.logtime) @@ -621,7 +622,7 @@
- - +
--> + + + +
+ + + + - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-'}} - - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-' }} - + -->
+ {{ scope.row.onlineStateName }} + {{ scope.row.onlineStateName }} + diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/src/views/home/temporary/components/gasDataDialog copy.vue b/src/views/home/temporary/components/gasDataDialog copy.vue index c8ed6a2..ac3f714 100644 --- a/src/views/home/temporary/components/gasDataDialog copy.vue +++ b/src/views/home/temporary/components/gasDataDialog copy.vue @@ -107,44 +107,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -213,7 +213,8 @@ if(listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item:any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) } if (listQuery.value.typeName.includes('管网哨兵')) { @@ -426,11 +427,11 @@ diff --git a/src/views/home/temporary/components/gasDataDialog.vue b/src/views/home/temporary/components/gasDataDialog.vue index 543e8c4..d3b10f7 100644 --- a/src/views/home/temporary/components/gasDataDialog.vue +++ b/src/views/home/temporary/components/gasDataDialog.vue @@ -73,7 +73,7 @@ // 燃气智能监测终端 const columns1 = ref([ { text: '设备编号', value: 'devcode', align: 'center' }, - { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center', isCustom: true }, { text: '电量(%)', value: 'cell', align: 'center' }, { text: '信号强度', value: 'rsrp', align: 'center' }, { text: '信号质量', value: 'rsrpName', align: 'center' }, @@ -114,44 +114,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -220,7 +220,8 @@ if (listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item: any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) if (list.value.length) { xAxisData.value = list.value.slice().reverse().map(item => item.logtime) @@ -621,7 +622,7 @@
- - +
--> + + + +
+ + + + - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-'}} - - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-' }} - + -->
+ {{ scope.row.onlineStateName }} + {{ scope.row.onlineStateName }} + diff --git a/src/views/home/alarm/current/components/confirmSituation.vue b/src/views/home/alarm/current/components/confirmSituation.vue index 1e8118d..dfe3a07 100644 --- a/src/views/home/alarm/current/components/confirmSituation.vue +++ b/src/views/home/alarm/current/components/confirmSituation.vue @@ -10,11 +10,13 @@ import pendingDialog from './pendingDialog.vue' import type { FormRules } from 'element-plus' import { ElMessage } from 'element-plus' +const $route = useRoute() const emits = defineEmits(['refresh']) const dialogFormVisible = ref(false) const loading = ref(false) const info = ref({}) const isFirstFill = ref(true) +const alarmCategoryName = ref('') const confirmSituationList = ref<{ id: string; name: string; value: string }[]>([]) const confirmSituationAllList = ref<{ id: string; name: string; value: string }[]>([]) const approvalStatusList = ref<{ id: string; name: string; value: string }[]>([ @@ -52,7 +54,7 @@ }) // 表单 const rules: FormRules = { confirmValue: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], - approvalStatus: [{ required: true, message: '现场浓度值不能为空', trigger: ['blur', 'change'] }], + approvalStatus: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], descn: [{ required: true, message: '现场确认情况不能为空', trigger: ['blur', 'change'] }], @@ -71,7 +73,7 @@ watch(() => dataForm.value.confirmValue, (newVal) => { // if () { return } if (newVal && info.value.alarmCategory.includes('浓度')) { - if(!isFirstLoading.value) { + if (!isFirstLoading.value) { dataForm.value.approvalStatus = '' } if (newVal === '0') { @@ -110,12 +112,21 @@ dialogFormVisible.value = true loading.value = true info.value = row + alarmCategoryName.value = row.alarmCategory if (row.alarmCategory.includes('浓度')) { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '0') } else { confirmSituationList.value = confirmSituationAllList.value.filter((item) => item.value.split('-')[1] === '3') + // console.log(row.alarmCategory, 'row.alarmCategory') + if($route.fullPath.includes('operation')) { + confirmSituationList.value.shift() + if(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) { + confirmSituationList.value.unshift(confirmSituationAllList.value.filter((item) => item.value.includes('5'))[0]) + } + + } } getHandlerAlarmRecord({ alarmId: row.id, flowStatus: '5' }).then(res => { record.value = res.data || [] @@ -128,6 +139,13 @@ dataForm.value.descn = record.value[0].descn dataForm.value.approvalPerson = record.value[0].approvalPerson dataForm.value.approvalTime = record.value[0].approvalTime + if (record.value[0].flowStatus === '5') { + dataForm.value.flowStatus = '10' + } + if (record.value[0].flowStatus === '6') { + dataForm.value.flowStatus = '6' + } + } else { isFirstFill.value = true @@ -236,7 +254,7 @@ - + - %LEL @@ -263,17 +281,19 @@ - + - + - + @@ -299,14 +319,15 @@ - + - + diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index f9a2be7..87324cb 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -11,6 +11,7 @@ import processDialog from './processDialog.vue' import handlerDialog from './handlerDialog.vue' import confirmDialog from './confirmSituation.vue' +import deviceDialog from './deviceSituation.vue' import { detailAlarm, getPrincipals } from '@/api/home/alarm/current' import { deviceAlarmView } from '@/api/home/operation/alarm' import { toHumpObject } from '@/utils/String' @@ -19,6 +20,7 @@ import { ElMessage } from 'element-plus' import { alarmValue } from './dict' const emits = defineEmits(['refresh']) +const $route = useRoute() const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -191,8 +193,16 @@ } // 确认/处置记录 const confirmRef = ref() +const deviceRef = ref() const handlerAlarm = () => { - confirmRef.value.initDialog(info.value) + if($route.fullPath.includes('operation')) { + // 设备报警处置 + deviceRef.value.initDialog(info.value) + } + else { + // 数据报警处置 + confirmRef.value.initDialog(info.value) + } } const refresh = () => { emits('refresh'); @@ -260,6 +270,8 @@ + +
{{ info.alarmType }} @@ -316,13 +328,12 @@ {{ info.ts }}
-
+ {{ info?.address }} -
+
-->
位置: @@ -330,7 +341,7 @@
-
+
详细地址: {{ info.position }} @@ -404,7 +415,7 @@ - 确认/处置记录 + {{ $route.fullPath.includes('operation') ? '报警处置' : '确认/处置记录' }} + + + + + + diff --git a/src/views/home/alarm/current/components/dict.ts b/src/views/home/alarm/current/components/dict.ts index 11ad58c..32c418e 100644 --- a/src/views/home/alarm/current/components/dict.ts +++ b/src/views/home/alarm/current/components/dict.ts @@ -7,4 +7,5 @@ DiscR: '右侧断线报警', VibL: '左侧震动报警', VibR: '右侧震动报警', + WaterImmersionAlarm: '水浸报警' } as { [key: string]: string } diff --git a/src/views/home/alarm/current/components/gasDataDialog.vue b/src/views/home/alarm/current/components/gasDataDialog.vue index b4cd67e..9b67b54 100644 --- a/src/views/home/alarm/current/components/gasDataDialog.vue +++ b/src/views/home/alarm/current/components/gasDataDialog.vue @@ -121,44 +121,44 @@ // DATA_PAN_GAS("场站监测云台", "data_pan_gas", "DEVICE_CODE,,logtime", "ID,LEDGER_NUMBER,DEVICE_CODE设备编号,CONCENTRATION浓度,LOGTIME,DIRCETION水平位置,PITCH垂直位置", "LOGTIME采集时间"); // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' } @@ -252,12 +252,13 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' }) as any) data.value = [ { name: '燃气浓度', - data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.snr || '0'), + data: JSON.parse(JSON.stringify(list.value)).slice().reverse().map(item => item.strength || '0'), symbol: list.value.length > 1 ? 'none' : 'circle', markLine: { data: markLineData, @@ -586,7 +587,7 @@
- - + --> + + + +
- + --> + + + +
diff --git a/src/views/home/alarm/report/components/list.vue b/src/views/home/alarm/report/components/list.vue index 8396607..a438afd 100644 --- a/src/views/home/alarm/report/components/list.vue +++ b/src/views/home/alarm/report/components/list.vue @@ -10,6 +10,8 @@ import { exportFile } from '@/utils/exportUtils' import { exportExcel } from '@/utils/exportXlsx' import { getReportList } from '@/api/home/alarm/report' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() const listQuery = ref({ begTime: '', endTime: '', @@ -34,7 +36,8 @@ const fetchData = () => { loading.value = true getReportList(listQuery.value).then((res) => { - // console.log(res.data, '111') + + const deptList = [ '高压管网', '第一分公司', @@ -53,17 +56,23 @@ ...item, alarmCount: Number(item.alarmSum) + Number(item.noAlarmSum), })) - // 过滤 - tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) - // 排序 - const arr = [] as any[] - deptList.forEach((item: string) => { - const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) - if (data.length) { - arr.push(data[0]) - } - }) - tableData.value = arr + if (!userStore.roleTips.join().includes('admin')) { + + } + else { + // 过滤 + tableData.value = tableData.value.filter((item: any) => deptList.filter(citem => item.dept.includes(citem)).length) + // 排序 + const arr = [] as any[] + deptList.forEach((item: string) => { + const data = tableData.value.filter((citem: any) => citem.dept.includes(item)) + if (data.length) { + arr.push(data[0]) + } + }) + tableData.value = arr + } + if (tableData.value.length) { const data = tableData.value[0] @@ -135,7 +144,7 @@ //选择今天以及今天之后的日期 // return time.getTime() < Date.now() - 8.64e7;//如果没有后面的-8.64e7就是不可以选择 //选择今天以及今天之前的日期 - return time.getTime() > Date.now() - 1000 * 60 *60 *24 *2 ; //如果没有后面的-8.64e7就是不可以选择今天的 + return time.getTime() > Date.now() - 1000 * 60 * 60 * 24 * 2; //如果没有后面的-8.64e7就是不可以选择今天的 } @@ -144,9 +153,9 @@
- + 生成报表 diff --git a/src/views/home/dashboard/deviceMonitor.vue b/src/views/home/dashboard/deviceMonitor.vue index 863d853..79856f1 100644 --- a/src/views/home/dashboard/deviceMonitor.vue +++ b/src/views/home/dashboard/deviceMonitor.vue @@ -17,6 +17,7 @@ import piepleInfo from '@/views/home/pipeline/components/detailInfoDialog.vue' import hiddenInfo from '@/views/home/temporary/components/detailInfoDialog.vue' import { ElMessage } from 'element-plus' +import { uniqueArray } from '@/utils/Array' const { proxy } = getCurrentInstance() as any // /dashboard/district const pageHeight = ref(0) // 液面高度 @@ -79,7 +80,7 @@ ]) const tableRowClassName = ({ row }) => { // console.log(row, '111') - if (row.onlineState !== '1') { + if (row.onlineState === '2') { return 'alarm-row-device-monitor' } else { @@ -447,6 +448,7 @@ zIndex: 111, zooms: [3, 20], style: getIconStyle(), + size: 20 }) } else { @@ -543,8 +545,8 @@ label: 'label', } const clusterOptions = { - clusterOptions: 1000, - setMinClusterSize: 100 + clusterOptions: 100, + setMinClusterSize: 40 } // 点位数据 const pointData = ref([]) @@ -674,7 +676,14 @@ if (pointData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + + // 数据根据value分类 + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -682,6 +691,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -731,11 +741,18 @@ pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } else { const data = selectTree.value.filter((item: string) => !item.includes('-')) - pointData.value = pointAllData.value.filter((item: any) => data.includes(item.value)) - pointData.value = pointData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + console.log(data, '树形选择') + + pointData.value = pointAllData.value.filter((item: any) => legendShowData.value.includes(item.onlineState)) + pointData.value = pointData.value.filter((item: any) => data.includes(item.value)) } if (pointData.value.length > 400) { - mapRef.value.addCluster(pointData.value, style, clusterOptions) + // mapRef.value.addCluster(pointData.value, style, clusterOptions) + const allValue = uniqueArray(pointData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, style, clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -743,6 +760,7 @@ zIndex: 111, zooms: [3, 20], style: style, + size: 20 }) } } @@ -936,11 +954,16 @@ // 如果点 大于200 聚合 否则不聚合 if (pointAllData.value.length > 400) { // if (selectTree.value.includes('1') || selectTree.value.includes('2') || selectTree.value.includes('3')) { - mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ - ...item, - // anchor: new mapRef.value.AMap.Pixel(4, 4), - // size: new mapRef.value.AMap.Size(20, 20), - })), clusterOptions) + // mapRef.value.addCluster(pointAllData.value, getIconStyle().map((item: any) => ({ + // ...item, + // // anchor: new mapRef.value.AMap.Pixel(4, 4), + // // size: new mapRef.value.AMap.Size(20, 20), + // })), clusterOptions) + const allValue = uniqueArray(pointAllData.value.map((item: any) => item.value)) + allValue.forEach((item: any) => { + const data = pointAllData.value.filter((i: any) => i.value === item) + mapRef.value.addCluster(data, getIconStyle(), clusterOptions) + }) } else { mapRef.value.addMassMarks({ @@ -952,6 +975,7 @@ // anchor: new mapRef.value.AMap.Pixel(4, 4), // size: new mapRef.value.AMap.Size(20, 20), })), + size: 20 }) } @@ -1099,8 +1123,8 @@ {{ scope.row[column.value] }} --> - {{ scope.row.monitorValue }} - {{ scope.row.monitorValue }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} + {{ scope.row.monitorValue ? scope.row.monitorValue : '-' }} {{ scope.row.watchObjectName === @@ -1126,20 +1150,20 @@ diff --git a/src/views/home/dashboard/ponitMapStyle.ts b/src/views/home/dashboard/ponitMapStyle.ts index f59f7f9..501b64f 100644 --- a/src/views/home/dashboard/ponitMapStyle.ts +++ b/src/views/home/dashboard/ponitMapStyle.ts @@ -5,19 +5,19 @@ url: `${publicPath}/image/well/well-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/well/well-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 111, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -25,38 +25,38 @@ url: `${publicPath}/image/station/station-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/station/station-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 102, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/pipeline/pieple-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 103, // 每种样式图标的叠加顺序,数字越大越靠前 }, @@ -65,19 +65,19 @@ url: `${publicPath}/image/force/force-normal.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-stop.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, { url: `${publicPath}/image/force/force-error.png`, // 图标地址 // anchor: map.Pixel(4, 4), // 图标显示位置偏移量,基准点为图标左上角 // size: map.Size(20, 20), // 图标的尺寸 - zIndex: 99, // 每种样式图标的叠加顺序,数字越大越靠前 + zIndex: 104, // 每种样式图标的叠加顺序,数字越大越靠前 }, diff --git a/src/views/home/device/count/components/bottom.vue b/src/views/home/device/count/components/bottom.vue index 700880f..f569ed9 100644 --- a/src/views/home/device/count/components/bottom.vue +++ b/src/views/home/device/count/components/bottom.vue @@ -10,30 +10,16 @@ import { exportOffDevice, getDeptDevice, getOfflineDevice } from '@/api/home/device/count' import { exportFile } from '@/utils/exportUtils' import layout from '@/views/home/alarm/count/components/layout.vue' +import useUserStore from '@/store/modules/user' +const userStore = useUserStore() // 管理单位设备统计 const deptLoading = ref(true) const xAxisData = ref([]) const data = ref([]) -// setTimeout(() => { -// xAxisData.value = [ -// '第一分公司', '第二分公司', '第三分公司', '第四分公司', '第五分公司', -// ] -// data.value = [ -// { -// name: '燃气智能终端', -// data: [1, 8, 5, 8, 4], -// }, -// { -// name: '管盯', -// data: [2, 4, 1, 8, 1], -// }, -// ] -// }, 1000) // 获取数据 const fetchData = () => { deptLoading.value = true getDeptDevice().then((res) => { - // console.log(res.data, '111111111111111') const deptList = [ '高压管网', '第一分公司', @@ -48,15 +34,23 @@ '昌平有限公司', '房山有限公司', ] - // - const arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) - const data1 = [] as any[] - deptList.forEach((item: string) => { - const data = arr.filter((citem: any )=> citem.name.includes(item)) - if(data.length) { - data1.push(data[0]) - } - }) + let arr = [] as any[] + let data1 = [] + if (!userStore.roleTips.join().includes('admin')) { + arr = res.data + data1 = arr + } + else { + arr = res.data.filter((item: any) => deptList.filter(citem => item.name.includes(citem)).length) + data1 = [] as any[] + deptList.forEach((item: string) => { + const data = arr.filter((citem: any) => citem.name.includes(item)) + if (data.length) { + data1.push(data[0]) + } + }) + } + xAxisData.value = data1.filter((item: any) => Number(item.value)).map((item: any) => item.name) data.value = [ { @@ -164,10 +158,8 @@ @@ -199,10 +191,8 @@
- + diff --git a/src/views/home/device/device/components/controlRecord.vue b/src/views/home/device/device/components/controlRecord.vue index 9dd99b6..343d179 100644 --- a/src/views/home/device/device/components/controlRecord.vue +++ b/src/views/home/device/device/components/controlRecord.vue @@ -120,8 +120,8 @@ // 列表展示列 const columns = ref([ { text: '配置内容', value: 'framecontentDesc', align: 'center' }, - { text: '下发状态', value: 'statusName', align: 'center' }, - { text: '操作时间', value: 'writetime', align: 'center' }, + { text: '下发状态', value: 'statusName', align: 'center', width: '200' }, + { text: '操作时间', value: 'writetime', align: 'center', width: '260' }, ]) const statusList = ref<{ id: string; name: string; value: string }[]>([]) // 下发状态 const fetchData = () => { @@ -219,15 +219,24 @@ 新建 - - + --> + + + diff --git a/src/views/home/device/device/components/dataSearch.vue b/src/views/home/device/device/components/dataSearch.vue index ac80dbe..9740f68 100644 --- a/src/views/home/device/device/components/dataSearch.vue +++ b/src/views/home/device/device/components/dataSearch.vue @@ -110,15 +110,15 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, - { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '110' }, - { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '110' }, - { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '110' }, - { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '110' }, - { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '110' }, - { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, + { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', width: '95' }, + { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', width: '95' }, + { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', width: '95' }, + { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', width: '95' }, + { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', width: '95' }, + { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', width: '95' }, { text: '采集时间', value: 'uptime', align: 'center' }, { text: '上传时间', value: 'logtime', align: 'center' }, ]) @@ -299,7 +299,8 @@ list.value = list.value.map((item: any) => ({ ...item, status: handlerthresholdFun(item.strength, handlerthreshold.value.map((item: any) => item.alarmThreshold)), - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) chartData.value = [ { @@ -392,7 +393,8 @@ } const tableHeight = ref(0) const calcHeight = () => { - tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 - 40 + tableHeight.value = window.innerHeight - 60 - 50 - 10 - 40 - 20 - 20 - 32 - 40 + // console.log(tableHeight.value, 'tableHeight.value') } onMounted(() => { calcHeight() @@ -533,18 +535,18 @@ 采集时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - 上传时间: + 上传时间: + value-format="YYYY-MM-DD HH:mm:ss" style="width: 360px" /> - - -
- - -
+
--> + + + + +
+ + +
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue index 044deda..6201ec4 100644 --- a/src/views/home/device/device/components/detail.vue +++ b/src/views/home/device/device/components/detail.vue @@ -37,6 +37,16 @@ align: 'center', }, { + text: 'SIM卡号', + value: 'simId', + align: 'center', + }, + { + text: '运营商', + value: 'communicationType', + align: 'center', + }, + { text: '安装位号', value: 'tagNumber', align: 'center', @@ -137,10 +147,10 @@
-
+
-
+
diff --git a/src/views/home/ledger/location/components/addDialog.vue b/src/views/home/ledger/location/components/addDialog.vue index 88c23c8..a0a6963 100644 --- a/src/views/home/ledger/location/components/addDialog.vue +++ b/src/views/home/ledger/location/components/addDialog.vue @@ -40,7 +40,7 @@ position: [{ required: true, message: '详细位置不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], // pipeCode: [{ required: true, message: '关联管线不能为空', trigger: ['blur', 'change'] }], - ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], + // ledgerName: [{ required: true, message: '闸井名称不能为空', trigger: ['blur', 'change'] }], type: [{ required: true, message: '位置类别不能为空', trigger: ['blur', 'change'] }], } // 前端校验规则 diff --git a/src/views/home/ledger/location/index.vue b/src/views/home/ledger/location/index.vue index 1467965..e24bfee 100644 --- a/src/views/home/ledger/location/index.vue +++ b/src/views/home/ledger/location/index.vue @@ -21,7 +21,7 @@ { text: '安装位号', value: 'tagNumber', align: 'center' }, { text: '位置类别', value: 'locationCategoryName', align: 'center' }, { text: '详细位置', value: 'position', align: 'center' }, - { text: '关联管线', value: 'pipeCode', align: 'center' }, + // { text: '关联管线', value: 'pipeCode', align: 'center' }, { text: '经度', value: 'lngGaode', align: 'center' }, { text: '纬度', value: 'latGaode', align: 'center' }, { text: '管理单位', value: 'deptName', align: 'center' }, @@ -76,9 +76,9 @@ } // 删除 const removeRow = (row: any) => { - console.log(row, '111') + // console.log(row, '111') ElMessageBox.confirm( - '确定要删除该数据吗?', + '该点位有可能绑定设备,确定删除?', '确认操作', { confirmButtonText: '确定', diff --git a/src/views/home/ledger/pipeline/components/editDialog.vue b/src/views/home/ledger/pipeline/components/editDialog.vue index e2dea8d..851c4c5 100644 --- a/src/views/home/ledger/pipeline/components/editDialog.vue +++ b/src/views/home/ledger/pipeline/components/editDialog.vue @@ -37,7 +37,7 @@ const rules: FormRules = { pipeCode: [{ required: true, message: '管线编号不能为空', trigger: ['blur', 'change'] }], position: [{ required: true, message: '管线位置不能为空', trigger: ['blur', 'change'] }], - pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], + // pressType: [{ required: true, message: '压力级制不能为空', trigger: ['blur', 'change'] }], deptid: [{ required: true, message: '管理单位不能为空', trigger: ['blur', 'change'] }], propertyOwner: [{ required: true, message: '产权不能为空', trigger: ['blur', 'change'] }], manageType: [{ required: true, message: '管理方式不能为空', trigger: ['blur', 'change'] }], @@ -253,13 +253,13 @@ - + @@ -268,6 +268,13 @@ + + + + + + + @@ -297,15 +304,9 @@ - - - - - - - - - + + @@ -154,11 +156,13 @@ width: 100%; } -.header-container{ +.header-container { display: flex; align-items: center; + .icon { margin-left: 10px; + &:hover { cursor: pointer; color: #0d76d4; diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue index 2ca625d..bb769c0 100644 --- a/src/views/home/station/station/components/detail.vue +++ b/src/views/home/station/station/components/detail.vue @@ -30,11 +30,11 @@ value: 'ledgerName', align: 'center', }, - { - text: '场站类型', - value: 'wellTypeName', - align: 'center', - }, + // { + // text: '场站类型', + // value: 'wellTypeName', + // align: 'center', + // }, { text: '使用状态', value: 'onStateName', @@ -99,6 +99,11 @@ value: 'position', align: 'center', }, + { + text: '', + value: '', + align: '', + }, ]) // // 页面loading diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue index 86d4698..7a09173 100644 --- a/src/views/home/station/station/components/detailInfoDialog.vue +++ b/src/views/home/station/station/components/detailInfoDialog.vue @@ -42,8 +42,8 @@ align: 'center', }, { - text: '场站类型', - value: 'wellTypeName', + text: '场站状态', + value: 'onStateName', align: 'center', }, { @@ -51,11 +51,7 @@ value: 'position', align: 'center', }, - { - text: '场站状态', - value: 'onStateName', - align: 'center', - }, + { text: '负责人', value: 'personName', diff --git a/src/views/home/station/station/components/monitorDataGasList.vue b/src/views/home/station/station/components/monitorDataGasList.vue index 819624a..b973e0a 100644 --- a/src/views/home/station/station/components/monitorDataGasList.vue +++ b/src/views/home/station/station/components/monitorDataGasList.vue @@ -250,7 +250,25 @@ 切换视图 - + + + +
- + - + diff --git a/src/views/home/temporary/components/detail.vue b/src/views/home/temporary/components/detail.vue index 9800853..e267f28 100644 --- a/src/views/home/temporary/components/detail.vue +++ b/src/views/home/temporary/components/detail.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' import showPosition from '@/views/home/device/device/components/showPosition.vue' import { getTemporaryDetail } from '@/api/home/temporary/temporary' +import dayjs from 'dayjs' const $router = useRouter() const $route = useRoute() // 页面详情数据 @@ -143,6 +144,9 @@ if(res.data.locationCategory) { detailInfo.value.locationCategoryName = locationTypeList.filter(citem => citem.value === res.data.locationCategory)[0]?.name || '' } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } }).catch(() => { loading.value = false }) diff --git a/src/views/home/temporary/components/detailInfoDialog.vue b/src/views/home/temporary/components/detailInfoDialog.vue index ab13fda..8b4c2a1 100644 --- a/src/views/home/temporary/components/detailInfoDialog.vue +++ b/src/views/home/temporary/components/detailInfoDialog.vue @@ -9,6 +9,7 @@ import { getDictByCode } from '@/api/system/dict' // import gasDialog from '@/views/home/well/components/gasDialog.vue' import gasDialog from './gasDataDialog.vue' +import dayjs from 'dayjs' const dialogFormVisible = ref(false) const overlay = ref() const infoWindow = ref() @@ -154,6 +155,9 @@ if (!(rowData.value.deviceTypeName.includes('燃气智能监测终端') || rowData.value.deviceTypeName.includes('管网哨兵') || rowData.value.deviceTypeName.includes('智能警示桩'))) { return } + if(res.data.installDate) { + detailInfo.value.installDate = dayjs(res.data.installDate).format('YYYY-MM-DD') + } // if (detailInfo.value.onlineState) { detailInfo.value.onlineState = detailInfo.value.onlineState === '0' ? '3' : detailInfo.value.onlineState diff --git a/src/views/home/temporary/components/gasDataDialog copy.vue b/src/views/home/temporary/components/gasDataDialog copy.vue index c8ed6a2..ac3f714 100644 --- a/src/views/home/temporary/components/gasDataDialog copy.vue +++ b/src/views/home/temporary/components/gasDataDialog copy.vue @@ -107,44 +107,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -213,7 +213,8 @@ if(listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item:any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) } if (listQuery.value.typeName.includes('管网哨兵')) { @@ -426,11 +427,11 @@ diff --git a/src/views/home/temporary/components/gasDataDialog.vue b/src/views/home/temporary/components/gasDataDialog.vue index 543e8c4..d3b10f7 100644 --- a/src/views/home/temporary/components/gasDataDialog.vue +++ b/src/views/home/temporary/components/gasDataDialog.vue @@ -73,7 +73,7 @@ // 燃气智能监测终端 const columns1 = ref([ { text: '设备编号', value: 'devcode', align: 'center' }, - { text: '燃气浓度(%LEL)', value: 'strength', align: 'center' }, + { text: '燃气浓度(%LEL)', value: 'strength', align: 'center', isCustom: true }, { text: '电量(%)', value: 'cell', align: 'center' }, { text: '信号强度', value: 'rsrp', align: 'center' }, { text: '信号质量', value: 'rsrpName', align: 'center' }, @@ -114,44 +114,44 @@ ]) // 智能警示桩 const columns3 = ref([ - { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '110' }, - { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '110' }, - { text: '电池电压(V)', value: 'vbat', align: 'center', width: '110' }, + { text: '左侧甲烷值', value: 'leftGas', align: 'center', width: '95' }, + { text: '右侧甲烷值', value: 'rightGas', align: 'center', width: '95' }, + { text: '电池电压(V)', value: 'vbat', align: 'center', width: '100' }, { text: '桩倾斜报警', value: 'pipeInclineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '桩拆卸报警', value: 'pipeBreakAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左断线报警', value: 'leftOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '左振动报警', value: 'leftVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右断线报警', value: 'rightOffLineAlarm', align: 'center', - width: '110' + width: '95' }, { text: '右振动报警', value: 'rightVibrateAlarm', align: 'center', - width: '110' + width: '95' }, { text: '采集时间', value: 'uptime', align: 'center', width: '180' }, { text: '上传时间', value: 'logtime', align: 'center', width: '180' } @@ -220,7 +220,8 @@ if (listQuery.value.typeName.includes('燃气智能监测终端')) { list.value = list.value.map((item: any) => ({ ...item, - rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '' + rsrpName: item.rsrp ? handlerSignalStrength(Number(item.rsrp)) : '-', + rsrp: item.rsrp ? item.rsrp : '-' })) if (list.value.length) { xAxisData.value = list.value.slice().reverse().map(item => item.logtime) @@ -621,7 +622,7 @@
- - +
--> + + + +
+ + + + - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-'}} - - {{ scope.row[column.value] }} + {{ scope.row[column.value] ? scope.row[column.value] : '-' }} - + -->
+ {{ scope.row.onlineStateName }} + {{ scope.row.onlineStateName }} +