diff --git a/src/api/cs-device-boot/EquipmentDelivery.ts b/src/api/cs-device-boot/EquipmentDelivery.ts
index 4b6512f..904182f 100644
--- a/src/api/cs-device-boot/EquipmentDelivery.ts
+++ b/src/api/cs-device-boot/EquipmentDelivery.ts
@@ -103,11 +103,10 @@ export function getDeviceHarmonicSpectrumData(data: any) {
})
}
//获取指标类型-谐波频谱
-export function queryDictType() {
+export function queryDictType(data?: any) {
return createAxios({
url: '/system-boot/dictTree/queryDictType',
method: 'GET',
-
+ params: data
})
}
-
diff --git a/src/views/govern/device/control/index.vue b/src/views/govern/device/control/index.vue
index 35c4df1..616a3bf 100644
--- a/src/views/govern/device/control/index.vue
+++ b/src/views/govern/device/control/index.vue
@@ -149,8 +149,7 @@
统计时间:{{ tableData[0]?.time || '' }}
-
+
@@ -328,6 +327,11 @@
v-loading="tableLoading">
+
+
+
+
@@ -563,6 +567,12 @@ const deviceId: any = ref('')
const lineId: any = ref('')
const dataLevel: any = ref('')
const nodeClick = async (e: anyObj) => {
+ await queryDictType({
+ lineId: e?.id
+ }).then(res => {
+ queryList.value = res.data
+ formInline.targetType = res.data[0].id
+ })
// console.log("🚀 ~ nodeClick ~ e:", e)
if (e.level == 2) return
deviceId.value = e?.pid
@@ -607,6 +617,9 @@ const nodeClick = async (e: anyObj) => {
if (item.type === 'event') {
item.id = item.id + '_event'
}
+ if (item.type === 'items') {
+ item.id = item.id + '_items'
+ }
})
res.data.dataSetList = res.data.dataSetList.filter((item: any) => item.name != '历史统计数据')
//便携式设备默认二次值
@@ -933,11 +946,9 @@ const handleClick = async (tab?: any) => {
tableLoading.value = false
}, 1500)
}
- //查询当前指标
- if (!dataSet.value.includes('_')) {
+ //测试项记录
+ if (dataSet.value.includes('_items')) {
formInline.id = dataSet.value
- console.log("🚀 ~ handleClick ~ formInline:", formInline)
-
// await deviceRtData(formInline)
await realTimeData(formInline)
.then((res: any) => {
@@ -945,7 +956,7 @@ const handleClick = async (tab?: any) => {
formInline.total = res.data.total
tableLoading.value = false
setTimeout(() => { //targetType
- nearRealTimeDataRef.value.setData(res.data, queryList.value.filter((item: any) => item.id == formInline.targetType))
+ nearRealTimeDataRef.value?.setData(res.data, queryList.value.filter((item: any) => item.id == formInline.targetType))
}, 500)
setTimeout(() => {
@@ -958,6 +969,32 @@ const handleClick = async (tab?: any) => {
}, 1500)
})
}
+
+
+ //查询当前指标
+ if (!dataSet.value.includes('_')) {
+ formInline.id = dataSet.value
+ // await deviceRtData(formInline)
+ await realTimeData(formInline)
+ .then((res: any) => {
+ tableData.value = res.data
+ formInline.total = res.data.total
+ tableLoading.value = false
+ setTimeout(() => { //targetType
+ nearRealTimeDataRef.value?.setData(res.data, queryList.value.filter((item: any) => item.id == formInline.targetType))
+ }, 500)
+ setTimeout(() => {
+
+ loading.value = false
+ }, 1500)
+ })
+ .catch(e => {
+ setTimeout(() => {
+ tableLoading.value = false
+ }, 1500)
+ })
+ }
+
if (!dataSet.value.includes('_realtimedata')) {
if (realDataTimer.value) {
window.clearInterval(realDataTimer.value)
@@ -1009,10 +1046,7 @@ queryByCode('Device_Type').then(res => {
})
})
const queryList: any = ref([])
-queryDictType().then(res => {
- queryList.value = res.data
- formInline.targetType = res.data[0].id
-})
+
const echoName = (value: any, arr: any[]) => {
return value ? arr.find(item => item.value == value)?.label : '/'
}
diff --git a/src/views/govern/device/control/nearRealTimeData.vue b/src/views/govern/device/control/nearRealTimeData.vue
index a69b6fc..008f5b8 100644
--- a/src/views/govern/device/control/nearRealTimeData.vue
+++ b/src/views/govern/device/control/nearRealTimeData.vue
@@ -2,8 +2,9 @@
-
- <
+
+
@@ -22,12 +23,13 @@ const setData = (data: any, targetType: any) => {
dataList.value = JSON.parse(JSON.stringify(data))
console.log("🚀 ~ setData ~ targetType:", targetType[0].code)
- if (targetType[0].code == 'base_data') {
+ if (targetType[0].code == 'base_data' || targetType[0].code == '1') {
column.value = [
{ field: 'otherName', title: '名称', },
{ field: 'valueA', title: 'A相', },
{ field: 'valueB', title: 'B相', },
{ field: 'valueC', title: 'C相', },
+ { field: 'valueM', title: '', },
]
} else if (targetType[0].code == 'other_data') {
let list: any = []
@@ -59,7 +61,9 @@ const setData = (data: any, targetType: any) => {
}
key.value += 1
}
-
+const formatter = (row: any) => {
+ return row.cellValue || '/'
+}
defineExpose({ setData })
diff --git a/src/views/govern/manage/factory.vue b/src/views/govern/manage/factory.vue
index 968b35d..12ba146 100644
--- a/src/views/govern/manage/factory.vue
+++ b/src/views/govern/manage/factory.vue
@@ -255,23 +255,23 @@ const tableStore = new TableStore({
{ title: '录入时间', field: 'createTime' },
{ title: '网络设备ID', field: 'ndid' },
{
- title: '状态',
- field: 'status',
+ title: '通讯状态',
+ field: 'runStatus',
width: 100,
render: 'tag',
custom: {
- 1: 'warning',
+ 1: 'primary',
2: 'success',
- 3: 'primary',
- 4: 'primary',
- 5: 'warning'
+ // 3: 'primary',
+ // 4: 'primary',
+ // 5: 'warning'
},
replaceValue: {
- 1: '未注册',
- 2: '注册',
- 3: '接入',
- 4: '已取消',
- 5: '未接入'
+ 1: '离线',
+ 2: '在线',
+ // 3: '接入',
+ // 4: '已取消',
+ // 5: '未接入'
}
// formatter: row => {
// return row.cellValue == 1 ? '未注册' : row.cellValue == 2 ? '注册' : '接入'
diff --git a/src/views/govern/reportCore/statisticsWx/index.vue b/src/views/govern/reportCore/statisticsWx/index.vue
index 45a0275..d3c6aa9 100644
--- a/src/views/govern/reportCore/statisticsWx/index.vue
+++ b/src/views/govern/reportCore/statisticsWx/index.vue
@@ -9,7 +9,7 @@
-
+