diff --git a/src/views/home/device/device/components/addDialog.vue b/src/views/home/device/device/components/addDialog.vue index d721d6b..d37cc37 100644 --- a/src/views/home/device/device/components/addDialog.vue +++ b/src/views/home/device/device/components/addDialog.vue @@ -200,9 +200,13 @@ // 燃气监测桩 指示带长度字段为必填 const deviceTypeName = deviceTypeList.value.filter((item: any) => item.id === dataForm.value.deviceType)[0].typeName + console.log(deviceTypeName, 'deviceTypeName') if (deviceTypeName === '燃气监测桩' || deviceTypeName === '智能警示桩') { isGaspile.value = true } + else { + isGaspile.value = false + } } }, { deep: true, @@ -329,7 +333,7 @@ - + diff --git a/src/views/home/device/device/components/addDialog.vue b/src/views/home/device/device/components/addDialog.vue index d721d6b..d37cc37 100644 --- a/src/views/home/device/device/components/addDialog.vue +++ b/src/views/home/device/device/components/addDialog.vue @@ -200,9 +200,13 @@ // 燃气监测桩 指示带长度字段为必填 const deviceTypeName = deviceTypeList.value.filter((item: any) => item.id === dataForm.value.deviceType)[0].typeName + console.log(deviceTypeName, 'deviceTypeName') if (deviceTypeName === '燃气监测桩' || deviceTypeName === '智能警示桩') { isGaspile.value = true } + else { + isGaspile.value = false + } } }, { deep: true, @@ -329,7 +333,7 @@ - + diff --git a/src/views/home/device/device/components/localtionForPieple.vue b/src/views/home/device/device/components/localtionForPieple.vue index 789f1f9..9c55873 100644 --- a/src/views/home/device/device/components/localtionForPieple.vue +++ b/src/views/home/device/device/components/localtionForPieple.vue @@ -227,7 +227,7 @@ - + diff --git a/src/views/home/device/device/components/addDialog.vue b/src/views/home/device/device/components/addDialog.vue index d721d6b..d37cc37 100644 --- a/src/views/home/device/device/components/addDialog.vue +++ b/src/views/home/device/device/components/addDialog.vue @@ -200,9 +200,13 @@ // 燃气监测桩 指示带长度字段为必填 const deviceTypeName = deviceTypeList.value.filter((item: any) => item.id === dataForm.value.deviceType)[0].typeName + console.log(deviceTypeName, 'deviceTypeName') if (deviceTypeName === '燃气监测桩' || deviceTypeName === '智能警示桩') { isGaspile.value = true } + else { + isGaspile.value = false + } } }, { deep: true, @@ -329,7 +333,7 @@ - + diff --git a/src/views/home/device/device/components/localtionForPieple.vue b/src/views/home/device/device/components/localtionForPieple.vue index 789f1f9..9c55873 100644 --- a/src/views/home/device/device/components/localtionForPieple.vue +++ b/src/views/home/device/device/components/localtionForPieple.vue @@ -227,7 +227,7 @@ - + diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue index a88f6c7..40825a5 100644 --- a/src/views/home/device/device/index.vue +++ b/src/views/home/device/device/index.vue @@ -23,8 +23,8 @@ // 初始展示列 const columns = ref([ { text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' }, - { text: '设备编号', value: 'devcode', align: 'center', isRequired: true }, - { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true }, + { text: '设备编号', value: 'devcode', align: 'center', isRequired: true, width: '150' }, + { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true, width: '220' }, { text: '监测对象', value: 'watchObject', align: 'center', width: '85' }, { text: '设备型号', value: 'deviceModel', align: 'center' }, { text: '厂商', value: 'manufactureName', align: 'center', isRequired: true }, @@ -34,7 +34,7 @@ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' }, { text: '布防状态', value: 'bfztName', align: 'center', isRequired: true }, { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' }, - { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' }, + { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '120' }, { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '120' }, ]) // 最终展示列 @@ -76,7 +76,7 @@ const fetchData = () => { loadingTable.value = true getDeviceListPage(listQuery.value).then((res) => { - console.log(res.data, '数据列表') + // console.log(res.data, '数据列表') list.value = res.data.rows.map((item: any) => ({ ...item, validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '', @@ -171,6 +171,7 @@ bfDevice({ bfcf: row.bfcf === '1' ? '0' : '1', id: row.id, + devcode: row.devcode, }).then((res) => { ElMessage.success('操作成功') fetchData() @@ -244,7 +245,7 @@ background: 'rgba(255, 255, 255, 0.8)', }) templateDevice().then((res) => { - console.log(res.data, '123123') + // console.log(res.data, '123123') if (res.data) { downloadFile(res.data, '设备导入模板.xlsx') } @@ -421,7 +422,7 @@ @change="changePage" >