diff --git a/src/views/home/device/device/components/addDialog.vue b/src/views/home/device/device/components/addDialog.vue
index c54230d..4ba7b87 100644
--- a/src/views/home/device/device/components/addDialog.vue
+++ b/src/views/home/device/device/components/addDialog.vue
@@ -169,7 +169,10 @@
// 获取字典
const fetchDict = async () => {
getProductListPage({ limit: 9999, offset: 1 }).then((res) => {
- productList.value = res.data.rows
+ productList.value = res.data.rows.map((item: any) => ({
+ ...item,
+ productName: `${item.deviceTypeName}-${item.deviceModel}/${item.manufacturerName}`,
+ }))
})
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue
index 3776281..3247ac8 100644
--- a/src/views/home/device/device/components/detail.vue
+++ b/src/views/home/device/device/components/detail.vue
@@ -142,6 +142,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 9e2e166..2b228a0 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -229,7 +229,7 @@
})
// 厂商
getManufacturerListPage().then((res) => {
- manufacturerList.value = res.data.map((item: any) => ({
+ manufacturerList.value = res.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/components/editDialog.vue b/src/views/home/device/product/components/editDialog.vue
index 93a7363..b59c84b 100644
--- a/src/views/home/device/product/components/editDialog.vue
+++ b/src/views/home/device/product/components/editDialog.vue
@@ -149,7 +149,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/index.vue b/src/views/home/device/product/index.vue
index 2300270..52e035f 100644
--- a/src/views/home/device/product/index.vue
+++ b/src/views/home/device/product/index.vue
@@ -118,7 +118,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
@@ -141,17 +141,17 @@
-
+
-
+
-
+
diff --git a/src/views/home/pipeline/components/detail.vue b/src/views/home/pipeline/components/detail.vue
index fb0cc5b..6a751bf 100644
--- a/src/views/home/pipeline/components/detail.vue
+++ b/src/views/home/pipeline/components/detail.vue
@@ -132,7 +132,6 @@
}).then((res) => {
detailInfo.value = res.data
loading.value = false
- console.log(res.data, '123123123')
if (res.data.typeName === '智能警示桩' || res.data.typeName === '燃气监测桩') {
descriptionsList.value.push({
text: '左侧指示带长度',
@@ -205,6 +204,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 7eb2f1d..a975599 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -392,11 +392,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index 3bd2958..6b79e30 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -189,9 +189,9 @@
const fetchAlarmEvent = (id: string) => {
getEventList(id).then((res) => {
alarmEventList.value = res.data.map((item: any) => ({
- name: item.name,
- id: item.code,
- value: item.code,
+ name: item.eventName,
+ id: item.eventCode,
+ value: item.eventCode,
}))
})
}
diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue
index 75027cf..6fb5e3e 100644
--- a/src/views/home/station/station/components/detail.vue
+++ b/src/views/home/station/station/components/detail.vue
@@ -99,17 +99,6 @@
value: 'position',
align: 'center',
},
- // {
- // text: '经度',
- // value: 'lngGaode',
- // align: 'center',
- // },
- // {
- // text: '纬度',
- // value: 'latGaode',
- // align: 'center',
- // },
-
])
// 页面loading
@@ -185,9 +174,17 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+
+.seat {
+ display: none;
+}
diff --git a/src/api/home/device/product.ts b/src/api/home/device/product.ts
index 80292cb..391fda5 100644
--- a/src/api/home/device/product.ts
+++ b/src/api/home/device/product.ts
@@ -41,8 +41,12 @@
// 厂商列表
export function getManufacturerListPage() {
return request({
- url: `/system/busManufacturer/listPage?limit=${1}&offset=${99999}`,
+ url: `/system/busManufacturer/listPage?limit=${9999}&offset=${1}`,
method: 'post',
+ data: {
+ offset: 1,
+ limit: 99999,
+ },
})
}
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index f3edac9..ed722fb 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -146,7 +146,7 @@
},
},
{
- path: '/well/:type',
+ path: '/well/detail',
component: () => import('@/views/home/well/components/detail.vue'),
name: 'WellMonitorDetail',
meta: {
@@ -185,7 +185,7 @@
},
},
{
- path: '/station/:type',
+ path: '/station/:type?',
component: () => import('@/views/home/station/station/components/detail.vue'),
name: 'StationMonitorDetail',
meta: {
diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts
index bc8a4b1..35cf60f 100644
--- a/src/utils/dayjs.ts
+++ b/src/utils/dayjs.ts
@@ -18,7 +18,6 @@
// 提取差异的时间单位
const duration = dayjs.duration(diff)
- console.log(duration, 'duration')
const years = duration.years()
const months = duration.months()
const days = duration.days()
diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue
index e200fe3..787bb07 100644
--- a/src/views/home/alarm/current/components/detail.vue
+++ b/src/views/home/alarm/current/components/detail.vue
@@ -60,7 +60,7 @@
},
{
text: '位置',
- value: 'tagNumber',
+ value: 'ledgerNumber',
align: 'center',
},
{
@@ -115,6 +115,7 @@
detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || ''
detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || ''
detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : ''
+ console.log(detailInfo.value, 'detailInfo.value')
loading.value = false
}).catch(() => {
loading.value = false
@@ -139,6 +140,31 @@
// 点击经纬度展示地图
const mapRef = ref()
const showMap = (data: any) => {
+ console.log(data, 'data')
+ if (data.text === '位置') {
+ if (detailInfo.value.watchObject && detailInfo.value.devcode && detailInfo.value.ledgerId) {
+ const watchObject = {
+ 1: 'WellMonitorDetail',
+ 2: 'StationMonitorDetail',
+ 3: 'PipelineMonitorDetail',
+ } as { [key: string]: string }
+ $router.push({
+ name: watchObject[detailInfo.value.watchObject],
+ query: {
+ id: detailInfo.value.ledgerId,
+ deviceCode: detailInfo.value.devcode,
+ typeName: detailInfo.value.devTypeName,
+ row: JSON.stringify({
+ id: detailInfo.value.ledgerId,
+ typeName: detailInfo.value.devTypeName,
+ deviceCode: detailInfo.value.devcode,
+ }),
+ },
+ })
+ // $router
+ }
+ return
+ }
if (data.text !== '详细地址' || !detailInfo.value[data.value]) {
return
}
@@ -172,7 +198,10 @@
{{ item.text }}
-
+
{{ detailInfo[item.value] || '' }}
@@ -204,12 +233,24 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+.link {
+ color: #3d7eff;
+
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
.bottom {
--el-descriptions-table-border-top: none;
diff --git a/src/views/home/alarm/current/components/map.vue b/src/views/home/alarm/current/components/map.vue
index 53fd910..6e1b260 100644
--- a/src/views/home/alarm/current/components/map.vue
+++ b/src/views/home/alarm/current/components/map.vue
@@ -47,10 +47,13 @@
info: $props.data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // mapRef.value.map.setCenter(data.data.position)
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.data.position)
+ const center = JSON.parse(JSON.stringify(data.data.position))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
}
// 打开信息窗体
@@ -73,9 +76,12 @@
info: data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
// mapRef.value.map.setCenter(data.lnglat)
})
}
diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue
index 3676f4e..c65a637 100644
--- a/src/views/home/alarm/current/index.vue
+++ b/src/views/home/alarm/current/index.vue
@@ -141,8 +141,8 @@
const detail = (row: any) => {
mapData.value = row
switchMode('map')
- // row.lngGaode = '116.398043'
- // row.latGaode = '39.901552'
+ row.lngGaode = '116.398043'
+ row.latGaode = '39.901552'
// 绘制点
const draw = () => {
mapRef.value.mapRef.removeMarker()
diff --git a/src/views/home/device/count/components/middle.vue b/src/views/home/device/count/components/middle.vue
index 9a32cfe..df5c5a6 100644
--- a/src/views/home/device/count/components/middle.vue
+++ b/src/views/home/device/count/components/middle.vue
@@ -13,6 +13,7 @@
// 设备离线数据
const offLoading = ref(true)
const pieData = ref([])
+const colors = ref([])
const xAxisDataOff = ref([])
const dataOff = ref([])
// setTimeout(() => {
@@ -44,15 +45,29 @@
})
offLoading.value = true
getOffline().then((res) => {
- pieData.value = res.data
+ pieData.value = [
+ {
+ name: '在线',
+ value: res.data.map((item: any) => Number(item.deviceCount || '0') - Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ {
+ name: '离线',
+ value: res.data.map((item: any) => Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ ]
xAxisDataOff.value = res.data.map((item: any) => item.name)
dataOff.value = [
{
name: '设备离线数量',
- data: res.data.map((item: any) => item.value),
+ data: res.data.map((item: any) => item.offCount),
color: '#ccc',
},
]
+ colors.value = res.map.map(() => (['#ccc', '#ccc']))
offLoading.value = false
}).catch(() => {
offLoading.value = false
@@ -86,7 +101,8 @@
@@ -94,7 +110,8 @@
diff --git a/src/views/home/device/device/components/addDialog.vue b/src/views/home/device/device/components/addDialog.vue
index c54230d..4ba7b87 100644
--- a/src/views/home/device/device/components/addDialog.vue
+++ b/src/views/home/device/device/components/addDialog.vue
@@ -169,7 +169,10 @@
// 获取字典
const fetchDict = async () => {
getProductListPage({ limit: 9999, offset: 1 }).then((res) => {
- productList.value = res.data.rows
+ productList.value = res.data.rows.map((item: any) => ({
+ ...item,
+ productName: `${item.deviceTypeName}-${item.deviceModel}/${item.manufacturerName}`,
+ }))
})
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue
index 3776281..3247ac8 100644
--- a/src/views/home/device/device/components/detail.vue
+++ b/src/views/home/device/device/components/detail.vue
@@ -142,6 +142,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 9e2e166..2b228a0 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -229,7 +229,7 @@
})
// 厂商
getManufacturerListPage().then((res) => {
- manufacturerList.value = res.data.map((item: any) => ({
+ manufacturerList.value = res.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/components/editDialog.vue b/src/views/home/device/product/components/editDialog.vue
index 93a7363..b59c84b 100644
--- a/src/views/home/device/product/components/editDialog.vue
+++ b/src/views/home/device/product/components/editDialog.vue
@@ -149,7 +149,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/index.vue b/src/views/home/device/product/index.vue
index 2300270..52e035f 100644
--- a/src/views/home/device/product/index.vue
+++ b/src/views/home/device/product/index.vue
@@ -118,7 +118,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
@@ -141,17 +141,17 @@
-
+
-
+
-
+
diff --git a/src/views/home/pipeline/components/detail.vue b/src/views/home/pipeline/components/detail.vue
index fb0cc5b..6a751bf 100644
--- a/src/views/home/pipeline/components/detail.vue
+++ b/src/views/home/pipeline/components/detail.vue
@@ -132,7 +132,6 @@
}).then((res) => {
detailInfo.value = res.data
loading.value = false
- console.log(res.data, '123123123')
if (res.data.typeName === '智能警示桩' || res.data.typeName === '燃气监测桩') {
descriptionsList.value.push({
text: '左侧指示带长度',
@@ -205,6 +204,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 7eb2f1d..a975599 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -392,11 +392,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index 3bd2958..6b79e30 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -189,9 +189,9 @@
const fetchAlarmEvent = (id: string) => {
getEventList(id).then((res) => {
alarmEventList.value = res.data.map((item: any) => ({
- name: item.name,
- id: item.code,
- value: item.code,
+ name: item.eventName,
+ id: item.eventCode,
+ value: item.eventCode,
}))
})
}
diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue
index 75027cf..6fb5e3e 100644
--- a/src/views/home/station/station/components/detail.vue
+++ b/src/views/home/station/station/components/detail.vue
@@ -99,17 +99,6 @@
value: 'position',
align: 'center',
},
- // {
- // text: '经度',
- // value: 'lngGaode',
- // align: 'center',
- // },
- // {
- // text: '纬度',
- // value: 'latGaode',
- // align: 'center',
- // },
-
])
// 页面loading
@@ -185,9 +174,17 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+
+.seat {
+ display: none;
+}
diff --git a/src/views/home/station/station/components/monitorData.vue b/src/views/home/station/station/components/monitorData.vue
index c1cdbc9..557b566 100644
--- a/src/views/home/station/station/components/monitorData.vue
+++ b/src/views/home/station/station/components/monitorData.vue
@@ -15,21 +15,21 @@
const showVideo1 = ref(false) // 是否展示1号云台
const showVideo2 = ref(false) // 是否展示2号云台
const NoAllData = ref(false)
-getMonitorData({ wellId: $route.query.id as string }).then((res) => {
- console.log(res.data)
- if (res.data['1号云台']) {
- showVideo1.value = true
- activeName.value = '1号云台'
- }
- if (res.data['2号云台']) {
- showVideo2.value = true
- activeName.value = '2号云台'
- }
- if (!showVideo1.value && !showVideo2.value) {
- // 三者都为空
- NoAllData.value = true
- }
-})
+// getMonitorData({ wellId: $route.query.id as string }).then((res) => {
+// console.log(res.data)
+// if (res.data['1号云台']) {
+showVideo1.value = true
+activeName.value = '1号云台'
+// }
+// if (res.data['2号云台']) {
+// showVideo2.value = true
+// activeName.value = '2号云台'
+// }
+// if (!showVideo1.value && !showVideo2.value) {
+// // 三者都为空
+// NoAllData.value = true
+// }
+// })
diff --git a/src/api/home/device/product.ts b/src/api/home/device/product.ts
index 80292cb..391fda5 100644
--- a/src/api/home/device/product.ts
+++ b/src/api/home/device/product.ts
@@ -41,8 +41,12 @@
// 厂商列表
export function getManufacturerListPage() {
return request({
- url: `/system/busManufacturer/listPage?limit=${1}&offset=${99999}`,
+ url: `/system/busManufacturer/listPage?limit=${9999}&offset=${1}`,
method: 'post',
+ data: {
+ offset: 1,
+ limit: 99999,
+ },
})
}
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index f3edac9..ed722fb 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -146,7 +146,7 @@
},
},
{
- path: '/well/:type',
+ path: '/well/detail',
component: () => import('@/views/home/well/components/detail.vue'),
name: 'WellMonitorDetail',
meta: {
@@ -185,7 +185,7 @@
},
},
{
- path: '/station/:type',
+ path: '/station/:type?',
component: () => import('@/views/home/station/station/components/detail.vue'),
name: 'StationMonitorDetail',
meta: {
diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts
index bc8a4b1..35cf60f 100644
--- a/src/utils/dayjs.ts
+++ b/src/utils/dayjs.ts
@@ -18,7 +18,6 @@
// 提取差异的时间单位
const duration = dayjs.duration(diff)
- console.log(duration, 'duration')
const years = duration.years()
const months = duration.months()
const days = duration.days()
diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue
index e200fe3..787bb07 100644
--- a/src/views/home/alarm/current/components/detail.vue
+++ b/src/views/home/alarm/current/components/detail.vue
@@ -60,7 +60,7 @@
},
{
text: '位置',
- value: 'tagNumber',
+ value: 'ledgerNumber',
align: 'center',
},
{
@@ -115,6 +115,7 @@
detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || ''
detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || ''
detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : ''
+ console.log(detailInfo.value, 'detailInfo.value')
loading.value = false
}).catch(() => {
loading.value = false
@@ -139,6 +140,31 @@
// 点击经纬度展示地图
const mapRef = ref()
const showMap = (data: any) => {
+ console.log(data, 'data')
+ if (data.text === '位置') {
+ if (detailInfo.value.watchObject && detailInfo.value.devcode && detailInfo.value.ledgerId) {
+ const watchObject = {
+ 1: 'WellMonitorDetail',
+ 2: 'StationMonitorDetail',
+ 3: 'PipelineMonitorDetail',
+ } as { [key: string]: string }
+ $router.push({
+ name: watchObject[detailInfo.value.watchObject],
+ query: {
+ id: detailInfo.value.ledgerId,
+ deviceCode: detailInfo.value.devcode,
+ typeName: detailInfo.value.devTypeName,
+ row: JSON.stringify({
+ id: detailInfo.value.ledgerId,
+ typeName: detailInfo.value.devTypeName,
+ deviceCode: detailInfo.value.devcode,
+ }),
+ },
+ })
+ // $router
+ }
+ return
+ }
if (data.text !== '详细地址' || !detailInfo.value[data.value]) {
return
}
@@ -172,7 +198,10 @@
{{ item.text }}
-
+
{{ detailInfo[item.value] || '' }}
@@ -204,12 +233,24 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+.link {
+ color: #3d7eff;
+
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
.bottom {
--el-descriptions-table-border-top: none;
diff --git a/src/views/home/alarm/current/components/map.vue b/src/views/home/alarm/current/components/map.vue
index 53fd910..6e1b260 100644
--- a/src/views/home/alarm/current/components/map.vue
+++ b/src/views/home/alarm/current/components/map.vue
@@ -47,10 +47,13 @@
info: $props.data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // mapRef.value.map.setCenter(data.data.position)
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.data.position)
+ const center = JSON.parse(JSON.stringify(data.data.position))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
}
// 打开信息窗体
@@ -73,9 +76,12 @@
info: data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
// mapRef.value.map.setCenter(data.lnglat)
})
}
diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue
index 3676f4e..c65a637 100644
--- a/src/views/home/alarm/current/index.vue
+++ b/src/views/home/alarm/current/index.vue
@@ -141,8 +141,8 @@
const detail = (row: any) => {
mapData.value = row
switchMode('map')
- // row.lngGaode = '116.398043'
- // row.latGaode = '39.901552'
+ row.lngGaode = '116.398043'
+ row.latGaode = '39.901552'
// 绘制点
const draw = () => {
mapRef.value.mapRef.removeMarker()
diff --git a/src/views/home/device/count/components/middle.vue b/src/views/home/device/count/components/middle.vue
index 9a32cfe..df5c5a6 100644
--- a/src/views/home/device/count/components/middle.vue
+++ b/src/views/home/device/count/components/middle.vue
@@ -13,6 +13,7 @@
// 设备离线数据
const offLoading = ref(true)
const pieData = ref([])
+const colors = ref([])
const xAxisDataOff = ref([])
const dataOff = ref([])
// setTimeout(() => {
@@ -44,15 +45,29 @@
})
offLoading.value = true
getOffline().then((res) => {
- pieData.value = res.data
+ pieData.value = [
+ {
+ name: '在线',
+ value: res.data.map((item: any) => Number(item.deviceCount || '0') - Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ {
+ name: '离线',
+ value: res.data.map((item: any) => Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ ]
xAxisDataOff.value = res.data.map((item: any) => item.name)
dataOff.value = [
{
name: '设备离线数量',
- data: res.data.map((item: any) => item.value),
+ data: res.data.map((item: any) => item.offCount),
color: '#ccc',
},
]
+ colors.value = res.map.map(() => (['#ccc', '#ccc']))
offLoading.value = false
}).catch(() => {
offLoading.value = false
@@ -86,7 +101,8 @@
@@ -94,7 +110,8 @@
diff --git a/src/views/home/device/device/components/addDialog.vue b/src/views/home/device/device/components/addDialog.vue
index c54230d..4ba7b87 100644
--- a/src/views/home/device/device/components/addDialog.vue
+++ b/src/views/home/device/device/components/addDialog.vue
@@ -169,7 +169,10 @@
// 获取字典
const fetchDict = async () => {
getProductListPage({ limit: 9999, offset: 1 }).then((res) => {
- productList.value = res.data.rows
+ productList.value = res.data.rows.map((item: any) => ({
+ ...item,
+ productName: `${item.deviceTypeName}-${item.deviceModel}/${item.manufacturerName}`,
+ }))
})
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue
index 3776281..3247ac8 100644
--- a/src/views/home/device/device/components/detail.vue
+++ b/src/views/home/device/device/components/detail.vue
@@ -142,6 +142,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 9e2e166..2b228a0 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -229,7 +229,7 @@
})
// 厂商
getManufacturerListPage().then((res) => {
- manufacturerList.value = res.data.map((item: any) => ({
+ manufacturerList.value = res.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/components/editDialog.vue b/src/views/home/device/product/components/editDialog.vue
index 93a7363..b59c84b 100644
--- a/src/views/home/device/product/components/editDialog.vue
+++ b/src/views/home/device/product/components/editDialog.vue
@@ -149,7 +149,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/index.vue b/src/views/home/device/product/index.vue
index 2300270..52e035f 100644
--- a/src/views/home/device/product/index.vue
+++ b/src/views/home/device/product/index.vue
@@ -118,7 +118,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
@@ -141,17 +141,17 @@
-
+
-
+
-
+
diff --git a/src/views/home/pipeline/components/detail.vue b/src/views/home/pipeline/components/detail.vue
index fb0cc5b..6a751bf 100644
--- a/src/views/home/pipeline/components/detail.vue
+++ b/src/views/home/pipeline/components/detail.vue
@@ -132,7 +132,6 @@
}).then((res) => {
detailInfo.value = res.data
loading.value = false
- console.log(res.data, '123123123')
if (res.data.typeName === '智能警示桩' || res.data.typeName === '燃气监测桩') {
descriptionsList.value.push({
text: '左侧指示带长度',
@@ -205,6 +204,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 7eb2f1d..a975599 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -392,11 +392,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index 3bd2958..6b79e30 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -189,9 +189,9 @@
const fetchAlarmEvent = (id: string) => {
getEventList(id).then((res) => {
alarmEventList.value = res.data.map((item: any) => ({
- name: item.name,
- id: item.code,
- value: item.code,
+ name: item.eventName,
+ id: item.eventCode,
+ value: item.eventCode,
}))
})
}
diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue
index 75027cf..6fb5e3e 100644
--- a/src/views/home/station/station/components/detail.vue
+++ b/src/views/home/station/station/components/detail.vue
@@ -99,17 +99,6 @@
value: 'position',
align: 'center',
},
- // {
- // text: '经度',
- // value: 'lngGaode',
- // align: 'center',
- // },
- // {
- // text: '纬度',
- // value: 'latGaode',
- // align: 'center',
- // },
-
])
// 页面loading
@@ -185,9 +174,17 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+
+.seat {
+ display: none;
+}
diff --git a/src/views/home/station/station/components/monitorData.vue b/src/views/home/station/station/components/monitorData.vue
index c1cdbc9..557b566 100644
--- a/src/views/home/station/station/components/monitorData.vue
+++ b/src/views/home/station/station/components/monitorData.vue
@@ -15,21 +15,21 @@
const showVideo1 = ref(false) // 是否展示1号云台
const showVideo2 = ref(false) // 是否展示2号云台
const NoAllData = ref(false)
-getMonitorData({ wellId: $route.query.id as string }).then((res) => {
- console.log(res.data)
- if (res.data['1号云台']) {
- showVideo1.value = true
- activeName.value = '1号云台'
- }
- if (res.data['2号云台']) {
- showVideo2.value = true
- activeName.value = '2号云台'
- }
- if (!showVideo1.value && !showVideo2.value) {
- // 三者都为空
- NoAllData.value = true
- }
-})
+// getMonitorData({ wellId: $route.query.id as string }).then((res) => {
+// console.log(res.data)
+// if (res.data['1号云台']) {
+showVideo1.value = true
+activeName.value = '1号云台'
+// }
+// if (res.data['2号云台']) {
+// showVideo2.value = true
+// activeName.value = '2号云台'
+// }
+// if (!showVideo1.value && !showVideo2.value) {
+// // 三者都为空
+// NoAllData.value = true
+// }
+// })
diff --git a/src/views/home/station/station/index.vue b/src/views/home/station/station/index.vue
index 0b2599e..bcc5039 100644
--- a/src/views/home/station/station/index.vue
+++ b/src/views/home/station/station/index.vue
@@ -301,11 +301,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/api/home/device/product.ts b/src/api/home/device/product.ts
index 80292cb..391fda5 100644
--- a/src/api/home/device/product.ts
+++ b/src/api/home/device/product.ts
@@ -41,8 +41,12 @@
// 厂商列表
export function getManufacturerListPage() {
return request({
- url: `/system/busManufacturer/listPage?limit=${1}&offset=${99999}`,
+ url: `/system/busManufacturer/listPage?limit=${9999}&offset=${1}`,
method: 'post',
+ data: {
+ offset: 1,
+ limit: 99999,
+ },
})
}
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index f3edac9..ed722fb 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -146,7 +146,7 @@
},
},
{
- path: '/well/:type',
+ path: '/well/detail',
component: () => import('@/views/home/well/components/detail.vue'),
name: 'WellMonitorDetail',
meta: {
@@ -185,7 +185,7 @@
},
},
{
- path: '/station/:type',
+ path: '/station/:type?',
component: () => import('@/views/home/station/station/components/detail.vue'),
name: 'StationMonitorDetail',
meta: {
diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts
index bc8a4b1..35cf60f 100644
--- a/src/utils/dayjs.ts
+++ b/src/utils/dayjs.ts
@@ -18,7 +18,6 @@
// 提取差异的时间单位
const duration = dayjs.duration(diff)
- console.log(duration, 'duration')
const years = duration.years()
const months = duration.months()
const days = duration.days()
diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue
index e200fe3..787bb07 100644
--- a/src/views/home/alarm/current/components/detail.vue
+++ b/src/views/home/alarm/current/components/detail.vue
@@ -60,7 +60,7 @@
},
{
text: '位置',
- value: 'tagNumber',
+ value: 'ledgerNumber',
align: 'center',
},
{
@@ -115,6 +115,7 @@
detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || ''
detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || ''
detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : ''
+ console.log(detailInfo.value, 'detailInfo.value')
loading.value = false
}).catch(() => {
loading.value = false
@@ -139,6 +140,31 @@
// 点击经纬度展示地图
const mapRef = ref()
const showMap = (data: any) => {
+ console.log(data, 'data')
+ if (data.text === '位置') {
+ if (detailInfo.value.watchObject && detailInfo.value.devcode && detailInfo.value.ledgerId) {
+ const watchObject = {
+ 1: 'WellMonitorDetail',
+ 2: 'StationMonitorDetail',
+ 3: 'PipelineMonitorDetail',
+ } as { [key: string]: string }
+ $router.push({
+ name: watchObject[detailInfo.value.watchObject],
+ query: {
+ id: detailInfo.value.ledgerId,
+ deviceCode: detailInfo.value.devcode,
+ typeName: detailInfo.value.devTypeName,
+ row: JSON.stringify({
+ id: detailInfo.value.ledgerId,
+ typeName: detailInfo.value.devTypeName,
+ deviceCode: detailInfo.value.devcode,
+ }),
+ },
+ })
+ // $router
+ }
+ return
+ }
if (data.text !== '详细地址' || !detailInfo.value[data.value]) {
return
}
@@ -172,7 +198,10 @@
{{ item.text }}
-
+
{{ detailInfo[item.value] || '' }}
@@ -204,12 +233,24 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+.link {
+ color: #3d7eff;
+
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
.bottom {
--el-descriptions-table-border-top: none;
diff --git a/src/views/home/alarm/current/components/map.vue b/src/views/home/alarm/current/components/map.vue
index 53fd910..6e1b260 100644
--- a/src/views/home/alarm/current/components/map.vue
+++ b/src/views/home/alarm/current/components/map.vue
@@ -47,10 +47,13 @@
info: $props.data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // mapRef.value.map.setCenter(data.data.position)
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.data.position)
+ const center = JSON.parse(JSON.stringify(data.data.position))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
}
// 打开信息窗体
@@ -73,9 +76,12 @@
info: data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
// mapRef.value.map.setCenter(data.lnglat)
})
}
diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue
index 3676f4e..c65a637 100644
--- a/src/views/home/alarm/current/index.vue
+++ b/src/views/home/alarm/current/index.vue
@@ -141,8 +141,8 @@
const detail = (row: any) => {
mapData.value = row
switchMode('map')
- // row.lngGaode = '116.398043'
- // row.latGaode = '39.901552'
+ row.lngGaode = '116.398043'
+ row.latGaode = '39.901552'
// 绘制点
const draw = () => {
mapRef.value.mapRef.removeMarker()
diff --git a/src/views/home/device/count/components/middle.vue b/src/views/home/device/count/components/middle.vue
index 9a32cfe..df5c5a6 100644
--- a/src/views/home/device/count/components/middle.vue
+++ b/src/views/home/device/count/components/middle.vue
@@ -13,6 +13,7 @@
// 设备离线数据
const offLoading = ref(true)
const pieData = ref([])
+const colors = ref([])
const xAxisDataOff = ref([])
const dataOff = ref([])
// setTimeout(() => {
@@ -44,15 +45,29 @@
})
offLoading.value = true
getOffline().then((res) => {
- pieData.value = res.data
+ pieData.value = [
+ {
+ name: '在线',
+ value: res.data.map((item: any) => Number(item.deviceCount || '0') - Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ {
+ name: '离线',
+ value: res.data.map((item: any) => Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ ]
xAxisDataOff.value = res.data.map((item: any) => item.name)
dataOff.value = [
{
name: '设备离线数量',
- data: res.data.map((item: any) => item.value),
+ data: res.data.map((item: any) => item.offCount),
color: '#ccc',
},
]
+ colors.value = res.map.map(() => (['#ccc', '#ccc']))
offLoading.value = false
}).catch(() => {
offLoading.value = false
@@ -86,7 +101,8 @@
@@ -94,7 +110,8 @@
diff --git a/src/views/home/device/device/components/addDialog.vue b/src/views/home/device/device/components/addDialog.vue
index c54230d..4ba7b87 100644
--- a/src/views/home/device/device/components/addDialog.vue
+++ b/src/views/home/device/device/components/addDialog.vue
@@ -169,7 +169,10 @@
// 获取字典
const fetchDict = async () => {
getProductListPage({ limit: 9999, offset: 1 }).then((res) => {
- productList.value = res.data.rows
+ productList.value = res.data.rows.map((item: any) => ({
+ ...item,
+ productName: `${item.deviceTypeName}-${item.deviceModel}/${item.manufacturerName}`,
+ }))
})
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue
index 3776281..3247ac8 100644
--- a/src/views/home/device/device/components/detail.vue
+++ b/src/views/home/device/device/components/detail.vue
@@ -142,6 +142,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 9e2e166..2b228a0 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -229,7 +229,7 @@
})
// 厂商
getManufacturerListPage().then((res) => {
- manufacturerList.value = res.data.map((item: any) => ({
+ manufacturerList.value = res.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/components/editDialog.vue b/src/views/home/device/product/components/editDialog.vue
index 93a7363..b59c84b 100644
--- a/src/views/home/device/product/components/editDialog.vue
+++ b/src/views/home/device/product/components/editDialog.vue
@@ -149,7 +149,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/index.vue b/src/views/home/device/product/index.vue
index 2300270..52e035f 100644
--- a/src/views/home/device/product/index.vue
+++ b/src/views/home/device/product/index.vue
@@ -118,7 +118,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
@@ -141,17 +141,17 @@
-
+
-
+
-
+
diff --git a/src/views/home/pipeline/components/detail.vue b/src/views/home/pipeline/components/detail.vue
index fb0cc5b..6a751bf 100644
--- a/src/views/home/pipeline/components/detail.vue
+++ b/src/views/home/pipeline/components/detail.vue
@@ -132,7 +132,6 @@
}).then((res) => {
detailInfo.value = res.data
loading.value = false
- console.log(res.data, '123123123')
if (res.data.typeName === '智能警示桩' || res.data.typeName === '燃气监测桩') {
descriptionsList.value.push({
text: '左侧指示带长度',
@@ -205,6 +204,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 7eb2f1d..a975599 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -392,11 +392,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index 3bd2958..6b79e30 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -189,9 +189,9 @@
const fetchAlarmEvent = (id: string) => {
getEventList(id).then((res) => {
alarmEventList.value = res.data.map((item: any) => ({
- name: item.name,
- id: item.code,
- value: item.code,
+ name: item.eventName,
+ id: item.eventCode,
+ value: item.eventCode,
}))
})
}
diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue
index 75027cf..6fb5e3e 100644
--- a/src/views/home/station/station/components/detail.vue
+++ b/src/views/home/station/station/components/detail.vue
@@ -99,17 +99,6 @@
value: 'position',
align: 'center',
},
- // {
- // text: '经度',
- // value: 'lngGaode',
- // align: 'center',
- // },
- // {
- // text: '纬度',
- // value: 'latGaode',
- // align: 'center',
- // },
-
])
// 页面loading
@@ -185,9 +174,17 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+
+.seat {
+ display: none;
+}
diff --git a/src/views/home/station/station/components/monitorData.vue b/src/views/home/station/station/components/monitorData.vue
index c1cdbc9..557b566 100644
--- a/src/views/home/station/station/components/monitorData.vue
+++ b/src/views/home/station/station/components/monitorData.vue
@@ -15,21 +15,21 @@
const showVideo1 = ref(false) // 是否展示1号云台
const showVideo2 = ref(false) // 是否展示2号云台
const NoAllData = ref(false)
-getMonitorData({ wellId: $route.query.id as string }).then((res) => {
- console.log(res.data)
- if (res.data['1号云台']) {
- showVideo1.value = true
- activeName.value = '1号云台'
- }
- if (res.data['2号云台']) {
- showVideo2.value = true
- activeName.value = '2号云台'
- }
- if (!showVideo1.value && !showVideo2.value) {
- // 三者都为空
- NoAllData.value = true
- }
-})
+// getMonitorData({ wellId: $route.query.id as string }).then((res) => {
+// console.log(res.data)
+// if (res.data['1号云台']) {
+showVideo1.value = true
+activeName.value = '1号云台'
+// }
+// if (res.data['2号云台']) {
+// showVideo2.value = true
+// activeName.value = '2号云台'
+// }
+// if (!showVideo1.value && !showVideo2.value) {
+// // 三者都为空
+// NoAllData.value = true
+// }
+// })
diff --git a/src/views/home/station/station/index.vue b/src/views/home/station/station/index.vue
index 0b2599e..bcc5039 100644
--- a/src/views/home/station/station/index.vue
+++ b/src/views/home/station/station/index.vue
@@ -301,11 +301,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/views/home/well/components/detail.vue b/src/views/home/well/components/detail.vue
index 6ae2646..eda3b06 100644
--- a/src/views/home/well/components/detail.vue
+++ b/src/views/home/well/components/detail.vue
@@ -185,6 +185,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/api/home/device/product.ts b/src/api/home/device/product.ts
index 80292cb..391fda5 100644
--- a/src/api/home/device/product.ts
+++ b/src/api/home/device/product.ts
@@ -41,8 +41,12 @@
// 厂商列表
export function getManufacturerListPage() {
return request({
- url: `/system/busManufacturer/listPage?limit=${1}&offset=${99999}`,
+ url: `/system/busManufacturer/listPage?limit=${9999}&offset=${1}`,
method: 'post',
+ data: {
+ offset: 1,
+ limit: 99999,
+ },
})
}
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index f3edac9..ed722fb 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -146,7 +146,7 @@
},
},
{
- path: '/well/:type',
+ path: '/well/detail',
component: () => import('@/views/home/well/components/detail.vue'),
name: 'WellMonitorDetail',
meta: {
@@ -185,7 +185,7 @@
},
},
{
- path: '/station/:type',
+ path: '/station/:type?',
component: () => import('@/views/home/station/station/components/detail.vue'),
name: 'StationMonitorDetail',
meta: {
diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts
index bc8a4b1..35cf60f 100644
--- a/src/utils/dayjs.ts
+++ b/src/utils/dayjs.ts
@@ -18,7 +18,6 @@
// 提取差异的时间单位
const duration = dayjs.duration(diff)
- console.log(duration, 'duration')
const years = duration.years()
const months = duration.months()
const days = duration.days()
diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue
index e200fe3..787bb07 100644
--- a/src/views/home/alarm/current/components/detail.vue
+++ b/src/views/home/alarm/current/components/detail.vue
@@ -60,7 +60,7 @@
},
{
text: '位置',
- value: 'tagNumber',
+ value: 'ledgerNumber',
align: 'center',
},
{
@@ -115,6 +115,7 @@
detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || ''
detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || ''
detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : ''
+ console.log(detailInfo.value, 'detailInfo.value')
loading.value = false
}).catch(() => {
loading.value = false
@@ -139,6 +140,31 @@
// 点击经纬度展示地图
const mapRef = ref()
const showMap = (data: any) => {
+ console.log(data, 'data')
+ if (data.text === '位置') {
+ if (detailInfo.value.watchObject && detailInfo.value.devcode && detailInfo.value.ledgerId) {
+ const watchObject = {
+ 1: 'WellMonitorDetail',
+ 2: 'StationMonitorDetail',
+ 3: 'PipelineMonitorDetail',
+ } as { [key: string]: string }
+ $router.push({
+ name: watchObject[detailInfo.value.watchObject],
+ query: {
+ id: detailInfo.value.ledgerId,
+ deviceCode: detailInfo.value.devcode,
+ typeName: detailInfo.value.devTypeName,
+ row: JSON.stringify({
+ id: detailInfo.value.ledgerId,
+ typeName: detailInfo.value.devTypeName,
+ deviceCode: detailInfo.value.devcode,
+ }),
+ },
+ })
+ // $router
+ }
+ return
+ }
if (data.text !== '详细地址' || !detailInfo.value[data.value]) {
return
}
@@ -172,7 +198,10 @@
{{ item.text }}
-
+
{{ detailInfo[item.value] || '' }}
@@ -204,12 +233,24 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+.link {
+ color: #3d7eff;
+
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
.bottom {
--el-descriptions-table-border-top: none;
diff --git a/src/views/home/alarm/current/components/map.vue b/src/views/home/alarm/current/components/map.vue
index 53fd910..6e1b260 100644
--- a/src/views/home/alarm/current/components/map.vue
+++ b/src/views/home/alarm/current/components/map.vue
@@ -47,10 +47,13 @@
info: $props.data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // mapRef.value.map.setCenter(data.data.position)
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.data.position)
+ const center = JSON.parse(JSON.stringify(data.data.position))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
}
// 打开信息窗体
@@ -73,9 +76,12 @@
info: data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
// mapRef.value.map.setCenter(data.lnglat)
})
}
diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue
index 3676f4e..c65a637 100644
--- a/src/views/home/alarm/current/index.vue
+++ b/src/views/home/alarm/current/index.vue
@@ -141,8 +141,8 @@
const detail = (row: any) => {
mapData.value = row
switchMode('map')
- // row.lngGaode = '116.398043'
- // row.latGaode = '39.901552'
+ row.lngGaode = '116.398043'
+ row.latGaode = '39.901552'
// 绘制点
const draw = () => {
mapRef.value.mapRef.removeMarker()
diff --git a/src/views/home/device/count/components/middle.vue b/src/views/home/device/count/components/middle.vue
index 9a32cfe..df5c5a6 100644
--- a/src/views/home/device/count/components/middle.vue
+++ b/src/views/home/device/count/components/middle.vue
@@ -13,6 +13,7 @@
// 设备离线数据
const offLoading = ref(true)
const pieData = ref([])
+const colors = ref([])
const xAxisDataOff = ref([])
const dataOff = ref([])
// setTimeout(() => {
@@ -44,15 +45,29 @@
})
offLoading.value = true
getOffline().then((res) => {
- pieData.value = res.data
+ pieData.value = [
+ {
+ name: '在线',
+ value: res.data.map((item: any) => Number(item.deviceCount || '0') - Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ {
+ name: '离线',
+ value: res.data.map((item: any) => Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ ]
xAxisDataOff.value = res.data.map((item: any) => item.name)
dataOff.value = [
{
name: '设备离线数量',
- data: res.data.map((item: any) => item.value),
+ data: res.data.map((item: any) => item.offCount),
color: '#ccc',
},
]
+ colors.value = res.map.map(() => (['#ccc', '#ccc']))
offLoading.value = false
}).catch(() => {
offLoading.value = false
@@ -86,7 +101,8 @@
@@ -94,7 +110,8 @@
diff --git a/src/views/home/device/device/components/addDialog.vue b/src/views/home/device/device/components/addDialog.vue
index c54230d..4ba7b87 100644
--- a/src/views/home/device/device/components/addDialog.vue
+++ b/src/views/home/device/device/components/addDialog.vue
@@ -169,7 +169,10 @@
// 获取字典
const fetchDict = async () => {
getProductListPage({ limit: 9999, offset: 1 }).then((res) => {
- productList.value = res.data.rows
+ productList.value = res.data.rows.map((item: any) => ({
+ ...item,
+ productName: `${item.deviceTypeName}-${item.deviceModel}/${item.manufacturerName}`,
+ }))
})
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue
index 3776281..3247ac8 100644
--- a/src/views/home/device/device/components/detail.vue
+++ b/src/views/home/device/device/components/detail.vue
@@ -142,6 +142,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 9e2e166..2b228a0 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -229,7 +229,7 @@
})
// 厂商
getManufacturerListPage().then((res) => {
- manufacturerList.value = res.data.map((item: any) => ({
+ manufacturerList.value = res.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/components/editDialog.vue b/src/views/home/device/product/components/editDialog.vue
index 93a7363..b59c84b 100644
--- a/src/views/home/device/product/components/editDialog.vue
+++ b/src/views/home/device/product/components/editDialog.vue
@@ -149,7 +149,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/index.vue b/src/views/home/device/product/index.vue
index 2300270..52e035f 100644
--- a/src/views/home/device/product/index.vue
+++ b/src/views/home/device/product/index.vue
@@ -118,7 +118,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
@@ -141,17 +141,17 @@
-
+
-
+
-
+
diff --git a/src/views/home/pipeline/components/detail.vue b/src/views/home/pipeline/components/detail.vue
index fb0cc5b..6a751bf 100644
--- a/src/views/home/pipeline/components/detail.vue
+++ b/src/views/home/pipeline/components/detail.vue
@@ -132,7 +132,6 @@
}).then((res) => {
detailInfo.value = res.data
loading.value = false
- console.log(res.data, '123123123')
if (res.data.typeName === '智能警示桩' || res.data.typeName === '燃气监测桩') {
descriptionsList.value.push({
text: '左侧指示带长度',
@@ -205,6 +204,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 7eb2f1d..a975599 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -392,11 +392,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index 3bd2958..6b79e30 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -189,9 +189,9 @@
const fetchAlarmEvent = (id: string) => {
getEventList(id).then((res) => {
alarmEventList.value = res.data.map((item: any) => ({
- name: item.name,
- id: item.code,
- value: item.code,
+ name: item.eventName,
+ id: item.eventCode,
+ value: item.eventCode,
}))
})
}
diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue
index 75027cf..6fb5e3e 100644
--- a/src/views/home/station/station/components/detail.vue
+++ b/src/views/home/station/station/components/detail.vue
@@ -99,17 +99,6 @@
value: 'position',
align: 'center',
},
- // {
- // text: '经度',
- // value: 'lngGaode',
- // align: 'center',
- // },
- // {
- // text: '纬度',
- // value: 'latGaode',
- // align: 'center',
- // },
-
])
// 页面loading
@@ -185,9 +174,17 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+
+.seat {
+ display: none;
+}
diff --git a/src/views/home/station/station/components/monitorData.vue b/src/views/home/station/station/components/monitorData.vue
index c1cdbc9..557b566 100644
--- a/src/views/home/station/station/components/monitorData.vue
+++ b/src/views/home/station/station/components/monitorData.vue
@@ -15,21 +15,21 @@
const showVideo1 = ref(false) // 是否展示1号云台
const showVideo2 = ref(false) // 是否展示2号云台
const NoAllData = ref(false)
-getMonitorData({ wellId: $route.query.id as string }).then((res) => {
- console.log(res.data)
- if (res.data['1号云台']) {
- showVideo1.value = true
- activeName.value = '1号云台'
- }
- if (res.data['2号云台']) {
- showVideo2.value = true
- activeName.value = '2号云台'
- }
- if (!showVideo1.value && !showVideo2.value) {
- // 三者都为空
- NoAllData.value = true
- }
-})
+// getMonitorData({ wellId: $route.query.id as string }).then((res) => {
+// console.log(res.data)
+// if (res.data['1号云台']) {
+showVideo1.value = true
+activeName.value = '1号云台'
+// }
+// if (res.data['2号云台']) {
+// showVideo2.value = true
+// activeName.value = '2号云台'
+// }
+// if (!showVideo1.value && !showVideo2.value) {
+// // 三者都为空
+// NoAllData.value = true
+// }
+// })
diff --git a/src/views/home/station/station/index.vue b/src/views/home/station/station/index.vue
index 0b2599e..bcc5039 100644
--- a/src/views/home/station/station/index.vue
+++ b/src/views/home/station/station/index.vue
@@ -301,11 +301,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/views/home/well/components/detail.vue b/src/views/home/well/components/detail.vue
index 6ae2646..eda3b06 100644
--- a/src/views/home/well/components/detail.vue
+++ b/src/views/home/well/components/detail.vue
@@ -185,6 +185,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/well/components/monitorData.vue b/src/views/home/well/components/monitorData.vue
index 14ca0f0..d0c5527 100644
--- a/src/views/home/well/components/monitorData.vue
+++ b/src/views/home/well/components/monitorData.vue
@@ -16,24 +16,25 @@
const showLiquid = ref(false) // 是否展示井下水位
const showWell = ref(false) // 是否展示井盖
const NoAllData = ref(false)
-getMonitorData({ wellId: $route.query.id as string }).then((res) => {
- console.log()
- if (res.data['燃气智能监测终端']) {
- showGas.value = true
- activeName.value = '燃气浓度'
- }
- if (res.data['液位检测仪']) {
- showLiquid.value = true
- activeName.value = '井下水位'
- }
- if (res.data['井盖监测仪']) {
- showWell.value = true
- activeName.value = '井盖'
- }
- if (!showGas.value && !showLiquid.value && !showWell.value) {
- // 三者都为空
- NoAllData.value = true
- }
+onMounted(() => {
+ getMonitorData({ wellId: $route.query.id as string }).then((res) => {
+ if (res.data['燃气智能监测终端']) {
+ showGas.value = true
+ activeName.value = '燃气浓度'
+ }
+ if (res.data['液位检测仪']) {
+ showLiquid.value = true
+ activeName.value = '井下水位'
+ }
+ if (res.data['井盖监测仪']) {
+ showWell.value = true
+ activeName.value = '井盖'
+ }
+ if (!showGas.value && !showLiquid.value && !showWell.value) {
+ // 三者都为空
+ NoAllData.value = true
+ }
+ })
})
diff --git a/src/api/home/device/product.ts b/src/api/home/device/product.ts
index 80292cb..391fda5 100644
--- a/src/api/home/device/product.ts
+++ b/src/api/home/device/product.ts
@@ -41,8 +41,12 @@
// 厂商列表
export function getManufacturerListPage() {
return request({
- url: `/system/busManufacturer/listPage?limit=${1}&offset=${99999}`,
+ url: `/system/busManufacturer/listPage?limit=${9999}&offset=${1}`,
method: 'post',
+ data: {
+ offset: 1,
+ limit: 99999,
+ },
})
}
diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts
index f3edac9..ed722fb 100644
--- a/src/router/modules/pc.ts
+++ b/src/router/modules/pc.ts
@@ -146,7 +146,7 @@
},
},
{
- path: '/well/:type',
+ path: '/well/detail',
component: () => import('@/views/home/well/components/detail.vue'),
name: 'WellMonitorDetail',
meta: {
@@ -185,7 +185,7 @@
},
},
{
- path: '/station/:type',
+ path: '/station/:type?',
component: () => import('@/views/home/station/station/components/detail.vue'),
name: 'StationMonitorDetail',
meta: {
diff --git a/src/utils/dayjs.ts b/src/utils/dayjs.ts
index bc8a4b1..35cf60f 100644
--- a/src/utils/dayjs.ts
+++ b/src/utils/dayjs.ts
@@ -18,7 +18,6 @@
// 提取差异的时间单位
const duration = dayjs.duration(diff)
- console.log(duration, 'duration')
const years = duration.years()
const months = duration.months()
const days = duration.days()
diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue
index e200fe3..787bb07 100644
--- a/src/views/home/alarm/current/components/detail.vue
+++ b/src/views/home/alarm/current/components/detail.vue
@@ -60,7 +60,7 @@
},
{
text: '位置',
- value: 'tagNumber',
+ value: 'ledgerNumber',
align: 'center',
},
{
@@ -115,6 +115,7 @@
detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || ''
detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || ''
detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : ''
+ console.log(detailInfo.value, 'detailInfo.value')
loading.value = false
}).catch(() => {
loading.value = false
@@ -139,6 +140,31 @@
// 点击经纬度展示地图
const mapRef = ref()
const showMap = (data: any) => {
+ console.log(data, 'data')
+ if (data.text === '位置') {
+ if (detailInfo.value.watchObject && detailInfo.value.devcode && detailInfo.value.ledgerId) {
+ const watchObject = {
+ 1: 'WellMonitorDetail',
+ 2: 'StationMonitorDetail',
+ 3: 'PipelineMonitorDetail',
+ } as { [key: string]: string }
+ $router.push({
+ name: watchObject[detailInfo.value.watchObject],
+ query: {
+ id: detailInfo.value.ledgerId,
+ deviceCode: detailInfo.value.devcode,
+ typeName: detailInfo.value.devTypeName,
+ row: JSON.stringify({
+ id: detailInfo.value.ledgerId,
+ typeName: detailInfo.value.devTypeName,
+ deviceCode: detailInfo.value.devcode,
+ }),
+ },
+ })
+ // $router
+ }
+ return
+ }
if (data.text !== '详细地址' || !detailInfo.value[data.value]) {
return
}
@@ -172,7 +198,10 @@
{{ item.text }}
-
+
{{ detailInfo[item.value] || '' }}
@@ -204,12 +233,24 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+.link {
+ color: #3d7eff;
+
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
.bottom {
--el-descriptions-table-border-top: none;
diff --git a/src/views/home/alarm/current/components/map.vue b/src/views/home/alarm/current/components/map.vue
index 53fd910..6e1b260 100644
--- a/src/views/home/alarm/current/components/map.vue
+++ b/src/views/home/alarm/current/components/map.vue
@@ -47,10 +47,13 @@
info: $props.data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // mapRef.value.map.setCenter(data.data.position)
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.data.position)
+ const center = JSON.parse(JSON.stringify(data.data.position))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
}
// 打开信息窗体
@@ -73,9 +76,12 @@
info: data,
map: mapRef.value.map,
})
- // setTimeout(() => {
- // mapRef.value.map.setFitView()
- // })
+ setTimeout(() => {
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
+ })
// mapRef.value.map.setCenter(data.lnglat)
})
}
diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue
index 3676f4e..c65a637 100644
--- a/src/views/home/alarm/current/index.vue
+++ b/src/views/home/alarm/current/index.vue
@@ -141,8 +141,8 @@
const detail = (row: any) => {
mapData.value = row
switchMode('map')
- // row.lngGaode = '116.398043'
- // row.latGaode = '39.901552'
+ row.lngGaode = '116.398043'
+ row.latGaode = '39.901552'
// 绘制点
const draw = () => {
mapRef.value.mapRef.removeMarker()
diff --git a/src/views/home/device/count/components/middle.vue b/src/views/home/device/count/components/middle.vue
index 9a32cfe..df5c5a6 100644
--- a/src/views/home/device/count/components/middle.vue
+++ b/src/views/home/device/count/components/middle.vue
@@ -13,6 +13,7 @@
// 设备离线数据
const offLoading = ref(true)
const pieData = ref([])
+const colors = ref([])
const xAxisDataOff = ref([])
const dataOff = ref([])
// setTimeout(() => {
@@ -44,15 +45,29 @@
})
offLoading.value = true
getOffline().then((res) => {
- pieData.value = res.data
+ pieData.value = [
+ {
+ name: '在线',
+ value: res.data.map((item: any) => Number(item.deviceCount || '0') - Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ {
+ name: '离线',
+ value: res.data.map((item: any) => Number(item.offCount || '0')).reduce((pre: number, cur: number) => {
+ return pre + cur
+ }),
+ },
+ ]
xAxisDataOff.value = res.data.map((item: any) => item.name)
dataOff.value = [
{
name: '设备离线数量',
- data: res.data.map((item: any) => item.value),
+ data: res.data.map((item: any) => item.offCount),
color: '#ccc',
},
]
+ colors.value = res.map.map(() => (['#ccc', '#ccc']))
offLoading.value = false
}).catch(() => {
offLoading.value = false
@@ -86,7 +101,8 @@
@@ -94,7 +110,8 @@
diff --git a/src/views/home/device/device/components/addDialog.vue b/src/views/home/device/device/components/addDialog.vue
index c54230d..4ba7b87 100644
--- a/src/views/home/device/device/components/addDialog.vue
+++ b/src/views/home/device/device/components/addDialog.vue
@@ -169,7 +169,10 @@
// 获取字典
const fetchDict = async () => {
getProductListPage({ limit: 9999, offset: 1 }).then((res) => {
- productList.value = res.data.rows
+ productList.value = res.data.rows.map((item: any) => ({
+ ...item,
+ productName: `${item.deviceTypeName}-${item.deviceModel}/${item.manufacturerName}`,
+ }))
})
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows
diff --git a/src/views/home/device/device/components/detail.vue b/src/views/home/device/device/components/detail.vue
index 3776281..3247ac8 100644
--- a/src/views/home/device/device/components/detail.vue
+++ b/src/views/home/device/device/components/detail.vue
@@ -142,6 +142,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 9e2e166..2b228a0 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -229,7 +229,7 @@
})
// 厂商
getManufacturerListPage().then((res) => {
- manufacturerList.value = res.data.map((item: any) => ({
+ manufacturerList.value = res.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/components/editDialog.vue b/src/views/home/device/product/components/editDialog.vue
index 93a7363..b59c84b 100644
--- a/src/views/home/device/product/components/editDialog.vue
+++ b/src/views/home/device/product/components/editDialog.vue
@@ -149,7 +149,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
diff --git a/src/views/home/device/product/index.vue b/src/views/home/device/product/index.vue
index 2300270..52e035f 100644
--- a/src/views/home/device/product/index.vue
+++ b/src/views/home/device/product/index.vue
@@ -118,7 +118,7 @@
accessMethodList.value = res1.data
// 厂商列表
const res2 = await getManufacturerListPage()
- manufacturerList.value = res2.data.map((item: any) => ({
+ manufacturerList.value = res2.data.rows.map((item: any) => ({
name: item.name || '',
id: item.id,
value: item.id,
@@ -141,17 +141,17 @@
-
+
-
+
-
+
diff --git a/src/views/home/pipeline/components/detail.vue b/src/views/home/pipeline/components/detail.vue
index fb0cc5b..6a751bf 100644
--- a/src/views/home/pipeline/components/detail.vue
+++ b/src/views/home/pipeline/components/detail.vue
@@ -132,7 +132,6 @@
}).then((res) => {
detailInfo.value = res.data
loading.value = false
- console.log(res.data, '123123123')
if (res.data.typeName === '智能警示桩' || res.data.typeName === '燃气监测桩') {
descriptionsList.value.push({
text: '左侧指示带长度',
@@ -205,6 +204,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 7eb2f1d..a975599 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -392,11 +392,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index 3bd2958..6b79e30 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -189,9 +189,9 @@
const fetchAlarmEvent = (id: string) => {
getEventList(id).then((res) => {
alarmEventList.value = res.data.map((item: any) => ({
- name: item.name,
- id: item.code,
- value: item.code,
+ name: item.eventName,
+ id: item.eventCode,
+ value: item.eventCode,
}))
})
}
diff --git a/src/views/home/station/station/components/detail.vue b/src/views/home/station/station/components/detail.vue
index 75027cf..6fb5e3e 100644
--- a/src/views/home/station/station/components/detail.vue
+++ b/src/views/home/station/station/components/detail.vue
@@ -99,17 +99,6 @@
value: 'position',
align: 'center',
},
- // {
- // text: '经度',
- // value: 'lngGaode',
- // align: 'center',
- // },
- // {
- // text: '纬度',
- // value: 'latGaode',
- // align: 'center',
- // },
-
])
// 页面loading
@@ -185,9 +174,17 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
}
}
+
+.seat {
+ display: none;
+}
diff --git a/src/views/home/station/station/components/monitorData.vue b/src/views/home/station/station/components/monitorData.vue
index c1cdbc9..557b566 100644
--- a/src/views/home/station/station/components/monitorData.vue
+++ b/src/views/home/station/station/components/monitorData.vue
@@ -15,21 +15,21 @@
const showVideo1 = ref(false) // 是否展示1号云台
const showVideo2 = ref(false) // 是否展示2号云台
const NoAllData = ref(false)
-getMonitorData({ wellId: $route.query.id as string }).then((res) => {
- console.log(res.data)
- if (res.data['1号云台']) {
- showVideo1.value = true
- activeName.value = '1号云台'
- }
- if (res.data['2号云台']) {
- showVideo2.value = true
- activeName.value = '2号云台'
- }
- if (!showVideo1.value && !showVideo2.value) {
- // 三者都为空
- NoAllData.value = true
- }
-})
+// getMonitorData({ wellId: $route.query.id as string }).then((res) => {
+// console.log(res.data)
+// if (res.data['1号云台']) {
+showVideo1.value = true
+activeName.value = '1号云台'
+// }
+// if (res.data['2号云台']) {
+// showVideo2.value = true
+// activeName.value = '2号云台'
+// }
+// if (!showVideo1.value && !showVideo2.value) {
+// // 三者都为空
+// NoAllData.value = true
+// }
+// })
diff --git a/src/views/home/station/station/index.vue b/src/views/home/station/station/index.vue
index 0b2599e..bcc5039 100644
--- a/src/views/home/station/station/index.vue
+++ b/src/views/home/station/station/index.vue
@@ -301,11 +301,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;
diff --git a/src/views/home/well/components/detail.vue b/src/views/home/well/components/detail.vue
index 6ae2646..eda3b06 100644
--- a/src/views/home/well/components/detail.vue
+++ b/src/views/home/well/components/detail.vue
@@ -185,6 +185,10 @@
width: 15%;
}
+::v-deep(.el-descriptions__content) {
+ width: 35%;
+}
+
.pointer {
&:hover {
cursor: pointer;
diff --git a/src/views/home/well/components/monitorData.vue b/src/views/home/well/components/monitorData.vue
index 14ca0f0..d0c5527 100644
--- a/src/views/home/well/components/monitorData.vue
+++ b/src/views/home/well/components/monitorData.vue
@@ -16,24 +16,25 @@
const showLiquid = ref(false) // 是否展示井下水位
const showWell = ref(false) // 是否展示井盖
const NoAllData = ref(false)
-getMonitorData({ wellId: $route.query.id as string }).then((res) => {
- console.log()
- if (res.data['燃气智能监测终端']) {
- showGas.value = true
- activeName.value = '燃气浓度'
- }
- if (res.data['液位检测仪']) {
- showLiquid.value = true
- activeName.value = '井下水位'
- }
- if (res.data['井盖监测仪']) {
- showWell.value = true
- activeName.value = '井盖'
- }
- if (!showGas.value && !showLiquid.value && !showWell.value) {
- // 三者都为空
- NoAllData.value = true
- }
+onMounted(() => {
+ getMonitorData({ wellId: $route.query.id as string }).then((res) => {
+ if (res.data['燃气智能监测终端']) {
+ showGas.value = true
+ activeName.value = '燃气浓度'
+ }
+ if (res.data['液位检测仪']) {
+ showLiquid.value = true
+ activeName.value = '井下水位'
+ }
+ if (res.data['井盖监测仪']) {
+ showWell.value = true
+ activeName.value = '井盖'
+ }
+ if (!showGas.value && !showLiquid.value && !showWell.value) {
+ // 三者都为空
+ NoAllData.value = true
+ }
+ })
})
diff --git a/src/views/home/well/index.vue b/src/views/home/well/index.vue
index 30163be..fca97d7 100644
--- a/src/views/home/well/index.vue
+++ b/src/views/home/well/index.vue
@@ -352,11 +352,11 @@
}
.icon {
- position: fixed;
- top: 450px;
+ position: absolute;
+ top: 345px;
left: 50%;
- // transform: translateX(-50%);
- z-index: 901;
+ transform: translateX(-50%);
+ z-index: 9;
&:hover {
cursor: pointer;