+
-
+
diff --git a/src/views/count/table.vue b/src/views/count/table.vue
index 6399a44..bf9761d 100644
--- a/src/views/count/table.vue
+++ b/src/views/count/table.vue
@@ -5,6 +5,72 @@
import Purchaseofheat from './components/Purchaseofheat.vue'
import Purchaseofelectricity from './components/Purchaseofelectricity.vue'
import photovoltaic from './components/photovoltaic.vue'
+const fixRef = ref()
+const mobileRef = ref()
+const energyRef = ref()
+const heatRef = ref()
+const electricityRef = ref()
+const photovoltaicRef = ref()
+// 获取子组件数据
+const getData = () => {
+ // 固定燃烧数据
+ const fixData = fixRef.value.sumArr
+ const value1 = {
+ name: '固定燃烧',
+ co: fixData[2],
+ ch: fixData[4],
+ no: fixData[6],
+ }
+ sessionStorage.setItem('固定燃烧', JSON.stringify(value1))
+ // 移动燃烧数据
+ const mobileData = mobileRef.value.sumArr
+ const value2 = {
+ name: '移动燃烧',
+ co: mobileData[2],
+ ch: mobileData[4],
+ no: mobileData[6],
+ }
+ sessionStorage.setItem('移动燃烧', JSON.stringify(value2))
+ // 能源加工转换
+ const energyData = energyRef.value.sumArr
+ const value3 = {
+ name: '能源加工转换',
+ co: 0,
+ ch: 0,
+ no: 0,
+ }
+ sessionStorage.setItem('能源加工转换', JSON.stringify(value3))
+ // 购入热力
+ const heatData = heatRef.value.sumArr
+ const value4 = {
+ name: '购入热力',
+ co: heatData[2] ? heatData[2] : 0,
+ ch: heatData[4] ? heatData[4] : 0,
+ no: heatData[6] ? heatData[6] : 0,
+ }
+ sessionStorage.setItem('购入热力', JSON.stringify(value4))
+ // 购入电力
+ const electricityData = electricityRef.value.sumArr
+ const value5 = {
+ name: '购入电力',
+ co: electricityData[2] ? electricityData[2] : 0,
+ ch: electricityData[4] ? electricityData[4] : 0,
+ no: electricityData[6] ? electricityData[6] : 0,
+ }
+ sessionStorage.setItem('购入电力', JSON.stringify(value5))
+ // 光伏
+ const photovoltaicData = photovoltaicRef.value.sumArr
+ const value6 = {
+ name: '光伏',
+ co: photovoltaicData[4],
+ ch: 0,
+ no: 0,
+ }
+ sessionStorage.setItem('光伏', JSON.stringify(value6))
+}
+defineExpose({
+ getData,
+})
diff --git a/src/views/data/collect/collect.vue b/src/views/data/collect/collect.vue
index 65db991..30c8404 100644
--- a/src/views/data/collect/collect.vue
+++ b/src/views/data/collect/collect.vue
@@ -1,88 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data/consumption/index.vue b/src/views/data/consumption/index.vue
index 852076a..ab3b507 100644
--- a/src/views/data/consumption/index.vue
+++ b/src/views/data/consumption/index.vue
@@ -4,13 +4,13 @@
import tab from '@/views/data/collect/tab.vue'
const tablistData = ref([
{
- id: '1',
+ id: '2',
title: '家用燃气监测',
},
])
const select = ref('')
const confirm = (selectp: string) => {
- select.value = selectp
+ select.value = tablistData.value.filter(item => item.title === selectp)[0].id
}
diff --git a/src/views/data/device/pageAdd.vue b/src/views/data/device/pageAdd.vue
index 747db38..1bfb359 100644
--- a/src/views/data/device/pageAdd.vue
+++ b/src/views/data/device/pageAdd.vue
@@ -18,16 +18,6 @@
stat: '', // 状态
}) // 表单
-const statList = ref([
- {
- name: '在线',
- value: '1',
- },
- {
- name: '离线',
- value: '0',
- },
-])
const textMap: { [key: string]: string } = {
update: '编辑',
create: '新增',
@@ -40,7 +30,7 @@
deviceNo: [{ required: true, message: '设备编号为空', trigger: ['blur', 'change'] }],
installTime: [{ required: true, message: '安装时间不能为空', trigger: ['blur', 'change'] }],
ptn: [{ required: true, message: '所属分区不能为空', trigger: ['blur', 'change'] }],
- // statusName: [{ required: true, message: '状态不能为空', trigger: ['blur', 'change'] }],
+ status: [{ required: true, message: '状态不能为空', trigger: ['blur', 'change'] }],
} // 前端校验规则
// 重置表单
@@ -71,7 +61,15 @@
console.log(res, 'res')
})
}
+const deviceStatusList = ref([])
+// 获取设备状态列表
+const fetchDeviceStatus = () => {
+ getDictByCode('stat_type').then((res) => {
+ deviceStatusList.value = res.data
+ })
+}
fetchDeviceType()
+fetchDeviceStatus()
// 初始化对话框
const initDialog = (dialogStatusValue: string, row: any) => {
dialogStatus.value = dialogStatusValue
@@ -222,10 +220,10 @@
-
+
import type { FormRules } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
+import dayjs from 'dayjs'
import showPhoto from './showPhoto.vue'
import { addElectricityList, updateElectricityList, uploadApi } from '@/api/api/index'
+import { getUserList } from '@/api/system/user'
const emits = defineEmits(['refresh'])
const dataFormRef = ref()
const dialogFormVisible = ref(false) // 对话框是否显示
@@ -12,6 +14,7 @@
electricityName: '', // 配电网名称
electricityArea: '', // 配电网区域
uploaderName: '', // 上传人
+ uploader: '',
uploadTime: '', // 上传时间
electricityDetail: '', // 详情图片
}) // 表单
@@ -23,17 +26,28 @@
const rules: FormRules = {
electricityName: [{ required: true, message: '请输入配电网名称', trigger: ['blur', 'change'] }],
electricityArea: [{ required: true, message: '请输入配电网区域', trigger: ['blur', 'change'] }],
- uploaderName: [{ required: true, message: '请输入上传人', trigger: ['blur', 'change'] }],
+ uploader: [{ required: true, message: '请选择上传人', trigger: ['blur', 'change'] }],
uploadTime: [{ required: true, message: '请选择上传时间', trigger: ['blur', 'change'] }],
electricityDetail: [{ required: true, message: '请上传附件', trigger: ['blur', 'change'] }],
} // 前端校验规则
-
+// 获取用户列表
+const userList = ref([])
+const fetchUserList = () => {
+ getUserList({ limit: 9999, offset: 1 }).then((res) => {
+ userList.value = res.data.rows
+ })
+}
+watch(() => areaForm.value.uploader, (newVal) => {
+ areaForm.value.uploaderName = userList.value.filter(item => item.id === newVal)[0].name
+})
+fetchUserList()
// 重置表单
const resetForm = () => {
areaForm.value = {
electricityName: '', // 配电网名称
electricityArea: '', // 配电网区域
- uploaderName: '', // 上传人
+ uploaderName: '', // 上传人+
+ uploader: '',
uploadTime: '', // 上传时间
electricityDetail: '',
}
@@ -64,6 +78,7 @@
const createData = () => {
dataFormRef.value.validate((valid: any) => {
if (valid) {
+ areaForm.value.uploadTime = dayjs().format('YYYY-MM-DD')
btnLoading.value = true
addElectricityList(areaForm.value).then((response) => {
if (response.code === 200) {
@@ -89,6 +104,7 @@
const updateData = () => {
dataFormRef.value.validate((valid: any) => {
if (valid) {
+ areaForm.value.uploadTime = dayjs().format('YYYY-MM-DD')
btnLoading.value = true
updateElectricityList(areaForm.value).then((response) => {
if (response.code === 200) {
@@ -165,15 +181,22 @@
-
-
+
+
+
+
+
-
+
-
+ -->
diff --git a/src/views/data/electricity/pageAdd.vue b/src/views/data/electricity/pageAdd.vue
index c03f0cf..3b313e7 100644
--- a/src/views/data/electricity/pageAdd.vue
+++ b/src/views/data/electricity/pageAdd.vue
@@ -1,6 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data/useHeat/index.vue b/src/views/data/useHeat/index.vue
index 88db305..154eb09 100644
--- a/src/views/data/useHeat/index.vue
+++ b/src/views/data/useHeat/index.vue
@@ -4,17 +4,17 @@
import tab from '@/views/data/collect/tab.vue'
const tablistData = ref([
{
- id: '1',
+ id: '0',
title: '供暖监测',
},
{
- id: '2',
+ id: '1',
title: '热水监测',
},
])
const select = ref('')
const confirm = (selectp: string) => {
- select.value = selectp
+ select.value = tablistData.value.filter(item => item.title === selectp)[0].id
}
@@ -22,7 +22,7 @@
diff --git a/src/api/api/index.ts b/src/api/api/index.ts
index ea695c1..b56e534 100644
--- a/src/api/api/index.ts
+++ b/src/api/api/index.ts
@@ -2,6 +2,11 @@
enum api {
// 上传
upload = 'file/upload',
+ // 采集参数
+ collect = '/collectionConfig/listPage',
+ collectAdd = '/collectionConfig/add',
+ collectUpdate = '/collectionConfig/update',
+ collectDelete = '/collectionConfig/delete',
// 配电网列表
electricity = 'carbonElectricity/listPage',
electricityAdd = 'carbonElectricity/add',
@@ -17,6 +22,16 @@
deviceAdd = '/carbonDevice/add',
deviceUpdate = '/carbonDevice/update',
deviceDelete = '/carbonDevice/delete',
+ // 环境参数
+ environment = '/environmentInfo/listPage',
+ environmentAdd = '/environmentInfo/add',
+ environmentUpdate = '/environmentInfo/update',
+ environmentDelete = '/environmentInfo/delete',
+ // 用热监测/用气监测
+ carbonOtherMonitorAdd = '/carbonOtherMonitor/add',
+ carbonOtherMonitorUpdate = '/carbonOtherMonitor/update',
+ carbonOtherMonitorDelete = '/carbonOtherMonitor/delete',
+ carbonOtherMonitor = '/carbonOtherMonitor/listPage',
}
// 上传
export function uploadApi(data: FormData) {
@@ -26,6 +41,37 @@
data,
})
}
+// 采集参数列表
+export function getCollectList(params: any) {
+ return request({
+ url: `${api.collect}`,
+ method: 'get',
+ params,
+ })
+}
+// 添加 采集参数
+export function addCollectList(data: any) {
+ return request({
+ url: `${api.collectAdd}`,
+ method: 'post',
+ data,
+ })
+}
+// 修改 采集参数
+export function updateCollectList(data: any) {
+ return request({
+ url: `${api.collectUpdate}`,
+ method: 'post',
+ data,
+ })
+}
+// 删除 采集参数
+export function deleteCollectList(id: any) {
+ return request({
+ url: `${api.collectDelete}?id=${id}`,
+ method: 'post',
+ })
+}
// 配电网列表
export function getElectricityList(params: any) {
return request({
@@ -119,3 +165,65 @@
method: 'post',
})
}
+// 环境参数列表
+export function getEnvironmentList(params: any) {
+ return request({
+ url: `${api.environment}`,
+ method: 'get',
+ params,
+ })
+}
+// 修改 环境参数
+export function updateEnvironmentList(data: any) {
+ return request({
+ url: `${api.environmentUpdate}`,
+ method: 'post',
+ data,
+ })
+}
+// 增加 环境参数
+export function addEnvironmentList(data: any) {
+ return request({
+ url: `${api.environmentAdd}`,
+ method: 'post',
+ data,
+ })
+}
+// 删除 环境参数
+export function deleteEnvironmentList(id: any) {
+ return request({
+ url: `${api.environmentDelete}?id=${id}`,
+ method: 'post',
+ })
+}
+// 用热监测/用气监测列表
+export function getCarbonOtherMonitor(params: any) {
+ return request({
+ url: `${api.carbonOtherMonitor}`,
+ method: 'get',
+ params,
+ })
+}
+// 增加 用热监测/用气监测
+export function addCarbonOtherMonitor(data: any) {
+ return request({
+ url: `${api.carbonOtherMonitorAdd}`,
+ method: 'post',
+ data,
+ })
+}
+// 修改 用热监测/用气监测
+export function updateCarbonOtherMonitor(data: any) {
+ return request({
+ url: `${api.carbonOtherMonitorUpdate}`,
+ method: 'post',
+ data,
+ })
+}
+// 删除 用热监测/用气监测
+export function deleteCarbonOtherMonitor(id: any) {
+ return request({
+ url: `${api.carbonOtherMonitorDelete}?id=${id}`,
+ method: 'post',
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 402fbd5..29c1f82 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -26,7 +26,6 @@
CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default']
CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue
index 44e8fd5..9a37cf4 100644
--- a/src/views/count/components/Purchaseofelectricity.vue
+++ b/src/views/count/components/Purchaseofelectricity.vue
@@ -62,13 +62,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '购入电力',
- co: sumArr.value[2],
- ch: sumArr.value[4],
- no: sumArr.value[6],
- }
- sessionStorage.setItem('购入电力', JSON.stringify(value))
+ // const value = {
+ // name: '购入电力',
+ // co: sumArr.value[2],
+ // ch: sumArr.value[4],
+ // no: sumArr.value[6],
+ // }
+ // sessionStorage.setItem('购入电力', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue
index f26a2c1..25dfdca 100644
--- a/src/views/count/components/Purchaseofheat.vue
+++ b/src/views/count/components/Purchaseofheat.vue
@@ -62,13 +62,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '购入热力',
- co: sumArr.value[2] ? sumArr.value[2] : 0,
- ch: sumArr.value[4] ? sumArr.value[4] : 0,
- no: sumArr.value[6] ? sumArr.value[6] : 0,
- }
- sessionStorage.setItem('购入热力', JSON.stringify(value))
+ // const value = {
+ // name: '购入热力',
+ // co: sumArr.value[2] ? sumArr.value[2] : 0,
+ // ch: sumArr.value[4] ? sumArr.value[4] : 0,
+ // no: sumArr.value[6] ? sumArr.value[6] : 0,
+ // }
+ // sessionStorage.setItem('购入热力', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue
index 02b6427..dcac1ab 100644
--- a/src/views/count/components/energyProcessing.vue
+++ b/src/views/count/components/energyProcessing.vue
@@ -39,13 +39,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '能源加工转换',
- co: 0,
- ch: 0,
- no: 0,
- }
- sessionStorage.setItem('能源加工转换', JSON.stringify(value))
+ // const value = {
+ // name: '能源加工转换',
+ // co: 0,
+ // ch: 0,
+ // no: 0,
+ // }
+ // sessionStorage.setItem('能源加工转换', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue
index 0e9b833..b94a1b5 100644
--- a/src/views/count/components/fixedCombustion.vue
+++ b/src/views/count/components/fixedCombustion.vue
@@ -227,13 +227,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '固定燃烧',
- co: sumArr.value[2],
- ch: sumArr.value[4],
- no: sumArr.value[6],
- }
- sessionStorage.setItem('固定燃烧', JSON.stringify(value))
+ // const value = {
+ // name: '固定燃烧',
+ // co: sumArr.value[2],
+ // ch: sumArr.value[4],
+ // no: sumArr.value[6],
+ // }
+ // sessionStorage.setItem('固定燃烧', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue
index 97e361f..bb0d58d 100644
--- a/src/views/count/components/mobileCombustion.vue
+++ b/src/views/count/components/mobileCombustion.vue
@@ -201,13 +201,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '移动燃烧',
- co: sumArr.value[2],
- ch: sumArr.value[4],
- no: sumArr.value[6],
- }
- sessionStorage.setItem('移动燃烧', JSON.stringify(value))
+ // const value = {
+ // name: '移动燃烧',
+ // co: sumArr.value[2],
+ // ch: sumArr.value[4],
+ // no: sumArr.value[6],
+ // }
+ // sessionStorage.setItem('移动燃烧', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue
index 2229a5c..52f8130 100644
--- a/src/views/count/components/photovoltaic.vue
+++ b/src/views/count/components/photovoltaic.vue
@@ -67,13 +67,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '光伏',
- co: sumArr.value[4],
- ch: 0,
- no: 0,
- }
- sessionStorage.setItem('光伏', JSON.stringify(value))
+ // const value = {
+ // name: '光伏',
+ // co: sumArr.value[4],
+ // ch: 0,
+ // no: 0,
+ // }
+ // sessionStorage.setItem('光伏', JSON.stringify(value))
return sums
}
const watchCapacity = (event: any, index: number) => {
diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue
index 9d7eba9..28d63eb 100644
--- a/src/views/count/components/result.vue
+++ b/src/views/count/components/result.vue
@@ -7,12 +7,6 @@
onMounted(() => {
carbonData.value = JSON.parse(sessionStorage.getItem('计算结果') as string) || []
})
-const requestData = (data: any) => {
- carbonData.value = []
- // 接收父组件传来的数据
- // carbonData.value = data
-}
-defineExpose({ requestData })
// 总排放量
const totalCarbon = computed(() => {
return carbonData.value.reduce((pre, target: any) => {
diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue
index ec4f110..5c05abb 100644
--- a/src/views/count/electric.vue
+++ b/src/views/count/electric.vue
@@ -2,12 +2,11 @@
-
+
-
+
diff --git a/src/views/count/table.vue b/src/views/count/table.vue
index 6399a44..bf9761d 100644
--- a/src/views/count/table.vue
+++ b/src/views/count/table.vue
@@ -5,6 +5,72 @@
import Purchaseofheat from './components/Purchaseofheat.vue'
import Purchaseofelectricity from './components/Purchaseofelectricity.vue'
import photovoltaic from './components/photovoltaic.vue'
+const fixRef = ref()
+const mobileRef = ref()
+const energyRef = ref()
+const heatRef = ref()
+const electricityRef = ref()
+const photovoltaicRef = ref()
+// 获取子组件数据
+const getData = () => {
+ // 固定燃烧数据
+ const fixData = fixRef.value.sumArr
+ const value1 = {
+ name: '固定燃烧',
+ co: fixData[2],
+ ch: fixData[4],
+ no: fixData[6],
+ }
+ sessionStorage.setItem('固定燃烧', JSON.stringify(value1))
+ // 移动燃烧数据
+ const mobileData = mobileRef.value.sumArr
+ const value2 = {
+ name: '移动燃烧',
+ co: mobileData[2],
+ ch: mobileData[4],
+ no: mobileData[6],
+ }
+ sessionStorage.setItem('移动燃烧', JSON.stringify(value2))
+ // 能源加工转换
+ const energyData = energyRef.value.sumArr
+ const value3 = {
+ name: '能源加工转换',
+ co: 0,
+ ch: 0,
+ no: 0,
+ }
+ sessionStorage.setItem('能源加工转换', JSON.stringify(value3))
+ // 购入热力
+ const heatData = heatRef.value.sumArr
+ const value4 = {
+ name: '购入热力',
+ co: heatData[2] ? heatData[2] : 0,
+ ch: heatData[4] ? heatData[4] : 0,
+ no: heatData[6] ? heatData[6] : 0,
+ }
+ sessionStorage.setItem('购入热力', JSON.stringify(value4))
+ // 购入电力
+ const electricityData = electricityRef.value.sumArr
+ const value5 = {
+ name: '购入电力',
+ co: electricityData[2] ? electricityData[2] : 0,
+ ch: electricityData[4] ? electricityData[4] : 0,
+ no: electricityData[6] ? electricityData[6] : 0,
+ }
+ sessionStorage.setItem('购入电力', JSON.stringify(value5))
+ // 光伏
+ const photovoltaicData = photovoltaicRef.value.sumArr
+ const value6 = {
+ name: '光伏',
+ co: photovoltaicData[4],
+ ch: 0,
+ no: 0,
+ }
+ sessionStorage.setItem('光伏', JSON.stringify(value6))
+}
+defineExpose({
+ getData,
+})
diff --git a/src/views/data/collect/collect.vue b/src/views/data/collect/collect.vue
index 65db991..30c8404 100644
--- a/src/views/data/collect/collect.vue
+++ b/src/views/data/collect/collect.vue
@@ -1,88 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data/consumption/index.vue b/src/views/data/consumption/index.vue
index 852076a..ab3b507 100644
--- a/src/views/data/consumption/index.vue
+++ b/src/views/data/consumption/index.vue
@@ -4,13 +4,13 @@
import tab from '@/views/data/collect/tab.vue'
const tablistData = ref([
{
- id: '1',
+ id: '2',
title: '家用燃气监测',
},
])
const select = ref('')
const confirm = (selectp: string) => {
- select.value = selectp
+ select.value = tablistData.value.filter(item => item.title === selectp)[0].id
}
diff --git a/src/views/data/device/pageAdd.vue b/src/views/data/device/pageAdd.vue
index 747db38..1bfb359 100644
--- a/src/views/data/device/pageAdd.vue
+++ b/src/views/data/device/pageAdd.vue
@@ -18,16 +18,6 @@
stat: '', // 状态
}) // 表单
-const statList = ref([
- {
- name: '在线',
- value: '1',
- },
- {
- name: '离线',
- value: '0',
- },
-])
const textMap: { [key: string]: string } = {
update: '编辑',
create: '新增',
@@ -40,7 +30,7 @@
deviceNo: [{ required: true, message: '设备编号为空', trigger: ['blur', 'change'] }],
installTime: [{ required: true, message: '安装时间不能为空', trigger: ['blur', 'change'] }],
ptn: [{ required: true, message: '所属分区不能为空', trigger: ['blur', 'change'] }],
- // statusName: [{ required: true, message: '状态不能为空', trigger: ['blur', 'change'] }],
+ status: [{ required: true, message: '状态不能为空', trigger: ['blur', 'change'] }],
} // 前端校验规则
// 重置表单
@@ -71,7 +61,15 @@
console.log(res, 'res')
})
}
+const deviceStatusList = ref([])
+// 获取设备状态列表
+const fetchDeviceStatus = () => {
+ getDictByCode('stat_type').then((res) => {
+ deviceStatusList.value = res.data
+ })
+}
fetchDeviceType()
+fetchDeviceStatus()
// 初始化对话框
const initDialog = (dialogStatusValue: string, row: any) => {
dialogStatus.value = dialogStatusValue
@@ -222,10 +220,10 @@
-
+
import type { FormRules } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
+import dayjs from 'dayjs'
import showPhoto from './showPhoto.vue'
import { addElectricityList, updateElectricityList, uploadApi } from '@/api/api/index'
+import { getUserList } from '@/api/system/user'
const emits = defineEmits(['refresh'])
const dataFormRef = ref()
const dialogFormVisible = ref(false) // 对话框是否显示
@@ -12,6 +14,7 @@
electricityName: '', // 配电网名称
electricityArea: '', // 配电网区域
uploaderName: '', // 上传人
+ uploader: '',
uploadTime: '', // 上传时间
electricityDetail: '', // 详情图片
}) // 表单
@@ -23,17 +26,28 @@
const rules: FormRules = {
electricityName: [{ required: true, message: '请输入配电网名称', trigger: ['blur', 'change'] }],
electricityArea: [{ required: true, message: '请输入配电网区域', trigger: ['blur', 'change'] }],
- uploaderName: [{ required: true, message: '请输入上传人', trigger: ['blur', 'change'] }],
+ uploader: [{ required: true, message: '请选择上传人', trigger: ['blur', 'change'] }],
uploadTime: [{ required: true, message: '请选择上传时间', trigger: ['blur', 'change'] }],
electricityDetail: [{ required: true, message: '请上传附件', trigger: ['blur', 'change'] }],
} // 前端校验规则
-
+// 获取用户列表
+const userList = ref([])
+const fetchUserList = () => {
+ getUserList({ limit: 9999, offset: 1 }).then((res) => {
+ userList.value = res.data.rows
+ })
+}
+watch(() => areaForm.value.uploader, (newVal) => {
+ areaForm.value.uploaderName = userList.value.filter(item => item.id === newVal)[0].name
+})
+fetchUserList()
// 重置表单
const resetForm = () => {
areaForm.value = {
electricityName: '', // 配电网名称
electricityArea: '', // 配电网区域
- uploaderName: '', // 上传人
+ uploaderName: '', // 上传人+
+ uploader: '',
uploadTime: '', // 上传时间
electricityDetail: '',
}
@@ -64,6 +78,7 @@
const createData = () => {
dataFormRef.value.validate((valid: any) => {
if (valid) {
+ areaForm.value.uploadTime = dayjs().format('YYYY-MM-DD')
btnLoading.value = true
addElectricityList(areaForm.value).then((response) => {
if (response.code === 200) {
@@ -89,6 +104,7 @@
const updateData = () => {
dataFormRef.value.validate((valid: any) => {
if (valid) {
+ areaForm.value.uploadTime = dayjs().format('YYYY-MM-DD')
btnLoading.value = true
updateElectricityList(areaForm.value).then((response) => {
if (response.code === 200) {
@@ -165,15 +181,22 @@
-
-
+
+
+
+
+
-
+
-
+ -->
diff --git a/src/views/data/electricity/pageAdd.vue b/src/views/data/electricity/pageAdd.vue
index c03f0cf..3b313e7 100644
--- a/src/views/data/electricity/pageAdd.vue
+++ b/src/views/data/electricity/pageAdd.vue
@@ -1,6 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data/useHeat/index.vue b/src/views/data/useHeat/index.vue
index 88db305..154eb09 100644
--- a/src/views/data/useHeat/index.vue
+++ b/src/views/data/useHeat/index.vue
@@ -4,17 +4,17 @@
import tab from '@/views/data/collect/tab.vue'
const tablistData = ref([
{
- id: '1',
+ id: '0',
title: '供暖监测',
},
{
- id: '2',
+ id: '1',
title: '热水监测',
},
])
const select = ref('')
const confirm = (selectp: string) => {
- select.value = selectp
+ select.value = tablistData.value.filter(item => item.title === selectp)[0].id
}
@@ -22,7 +22,7 @@
diff --git a/src/views/data/useHeat/page.vue b/src/views/data/useHeat/page.vue
index ab6e4d9..aca8f03 100644
--- a/src/views/data/useHeat/page.vue
+++ b/src/views/data/useHeat/page.vue
@@ -1,5 +1,9 @@
+
-
+
-
-
+
+
+
+
+
+
+
+
+ 修改
+
+
+ 删除
+
+
+
+
diff --git a/src/api/api/index.ts b/src/api/api/index.ts
index ea695c1..b56e534 100644
--- a/src/api/api/index.ts
+++ b/src/api/api/index.ts
@@ -2,6 +2,11 @@
enum api {
// 上传
upload = 'file/upload',
+ // 采集参数
+ collect = '/collectionConfig/listPage',
+ collectAdd = '/collectionConfig/add',
+ collectUpdate = '/collectionConfig/update',
+ collectDelete = '/collectionConfig/delete',
// 配电网列表
electricity = 'carbonElectricity/listPage',
electricityAdd = 'carbonElectricity/add',
@@ -17,6 +22,16 @@
deviceAdd = '/carbonDevice/add',
deviceUpdate = '/carbonDevice/update',
deviceDelete = '/carbonDevice/delete',
+ // 环境参数
+ environment = '/environmentInfo/listPage',
+ environmentAdd = '/environmentInfo/add',
+ environmentUpdate = '/environmentInfo/update',
+ environmentDelete = '/environmentInfo/delete',
+ // 用热监测/用气监测
+ carbonOtherMonitorAdd = '/carbonOtherMonitor/add',
+ carbonOtherMonitorUpdate = '/carbonOtherMonitor/update',
+ carbonOtherMonitorDelete = '/carbonOtherMonitor/delete',
+ carbonOtherMonitor = '/carbonOtherMonitor/listPage',
}
// 上传
export function uploadApi(data: FormData) {
@@ -26,6 +41,37 @@
data,
})
}
+// 采集参数列表
+export function getCollectList(params: any) {
+ return request({
+ url: `${api.collect}`,
+ method: 'get',
+ params,
+ })
+}
+// 添加 采集参数
+export function addCollectList(data: any) {
+ return request({
+ url: `${api.collectAdd}`,
+ method: 'post',
+ data,
+ })
+}
+// 修改 采集参数
+export function updateCollectList(data: any) {
+ return request({
+ url: `${api.collectUpdate}`,
+ method: 'post',
+ data,
+ })
+}
+// 删除 采集参数
+export function deleteCollectList(id: any) {
+ return request({
+ url: `${api.collectDelete}?id=${id}`,
+ method: 'post',
+ })
+}
// 配电网列表
export function getElectricityList(params: any) {
return request({
@@ -119,3 +165,65 @@
method: 'post',
})
}
+// 环境参数列表
+export function getEnvironmentList(params: any) {
+ return request({
+ url: `${api.environment}`,
+ method: 'get',
+ params,
+ })
+}
+// 修改 环境参数
+export function updateEnvironmentList(data: any) {
+ return request({
+ url: `${api.environmentUpdate}`,
+ method: 'post',
+ data,
+ })
+}
+// 增加 环境参数
+export function addEnvironmentList(data: any) {
+ return request({
+ url: `${api.environmentAdd}`,
+ method: 'post',
+ data,
+ })
+}
+// 删除 环境参数
+export function deleteEnvironmentList(id: any) {
+ return request({
+ url: `${api.environmentDelete}?id=${id}`,
+ method: 'post',
+ })
+}
+// 用热监测/用气监测列表
+export function getCarbonOtherMonitor(params: any) {
+ return request({
+ url: `${api.carbonOtherMonitor}`,
+ method: 'get',
+ params,
+ })
+}
+// 增加 用热监测/用气监测
+export function addCarbonOtherMonitor(data: any) {
+ return request({
+ url: `${api.carbonOtherMonitorAdd}`,
+ method: 'post',
+ data,
+ })
+}
+// 修改 用热监测/用气监测
+export function updateCarbonOtherMonitor(data: any) {
+ return request({
+ url: `${api.carbonOtherMonitorUpdate}`,
+ method: 'post',
+ data,
+ })
+}
+// 删除 用热监测/用气监测
+export function deleteCarbonOtherMonitor(id: any) {
+ return request({
+ url: `${api.carbonOtherMonitorDelete}?id=${id}`,
+ method: 'post',
+ })
+}
diff --git a/src/components.d.ts b/src/components.d.ts
index 402fbd5..29c1f82 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -26,7 +26,6 @@
CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default']
CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default']
ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default']
- copy: typeof import('./components/Echart/BarChartHorizontal copy.vue')['default']
CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
DeptSelect: typeof import('./components/DeptSelect/index.vue')['default']
diff --git a/src/views/count/components/Purchaseofelectricity.vue b/src/views/count/components/Purchaseofelectricity.vue
index 44e8fd5..9a37cf4 100644
--- a/src/views/count/components/Purchaseofelectricity.vue
+++ b/src/views/count/components/Purchaseofelectricity.vue
@@ -62,13 +62,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '购入电力',
- co: sumArr.value[2],
- ch: sumArr.value[4],
- no: sumArr.value[6],
- }
- sessionStorage.setItem('购入电力', JSON.stringify(value))
+ // const value = {
+ // name: '购入电力',
+ // co: sumArr.value[2],
+ // ch: sumArr.value[4],
+ // no: sumArr.value[6],
+ // }
+ // sessionStorage.setItem('购入电力', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/Purchaseofheat.vue b/src/views/count/components/Purchaseofheat.vue
index f26a2c1..25dfdca 100644
--- a/src/views/count/components/Purchaseofheat.vue
+++ b/src/views/count/components/Purchaseofheat.vue
@@ -62,13 +62,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '购入热力',
- co: sumArr.value[2] ? sumArr.value[2] : 0,
- ch: sumArr.value[4] ? sumArr.value[4] : 0,
- no: sumArr.value[6] ? sumArr.value[6] : 0,
- }
- sessionStorage.setItem('购入热力', JSON.stringify(value))
+ // const value = {
+ // name: '购入热力',
+ // co: sumArr.value[2] ? sumArr.value[2] : 0,
+ // ch: sumArr.value[4] ? sumArr.value[4] : 0,
+ // no: sumArr.value[6] ? sumArr.value[6] : 0,
+ // }
+ // sessionStorage.setItem('购入热力', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/energyProcessing.vue b/src/views/count/components/energyProcessing.vue
index 02b6427..dcac1ab 100644
--- a/src/views/count/components/energyProcessing.vue
+++ b/src/views/count/components/energyProcessing.vue
@@ -39,13 +39,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '能源加工转换',
- co: 0,
- ch: 0,
- no: 0,
- }
- sessionStorage.setItem('能源加工转换', JSON.stringify(value))
+ // const value = {
+ // name: '能源加工转换',
+ // co: 0,
+ // ch: 0,
+ // no: 0,
+ // }
+ // sessionStorage.setItem('能源加工转换', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/fixedCombustion.vue b/src/views/count/components/fixedCombustion.vue
index 0e9b833..b94a1b5 100644
--- a/src/views/count/components/fixedCombustion.vue
+++ b/src/views/count/components/fixedCombustion.vue
@@ -227,13 +227,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '固定燃烧',
- co: sumArr.value[2],
- ch: sumArr.value[4],
- no: sumArr.value[6],
- }
- sessionStorage.setItem('固定燃烧', JSON.stringify(value))
+ // const value = {
+ // name: '固定燃烧',
+ // co: sumArr.value[2],
+ // ch: sumArr.value[4],
+ // no: sumArr.value[6],
+ // }
+ // sessionStorage.setItem('固定燃烧', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/mobileCombustion.vue b/src/views/count/components/mobileCombustion.vue
index 97e361f..bb0d58d 100644
--- a/src/views/count/components/mobileCombustion.vue
+++ b/src/views/count/components/mobileCombustion.vue
@@ -201,13 +201,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '移动燃烧',
- co: sumArr.value[2],
- ch: sumArr.value[4],
- no: sumArr.value[6],
- }
- sessionStorage.setItem('移动燃烧', JSON.stringify(value))
+ // const value = {
+ // name: '移动燃烧',
+ // co: sumArr.value[2],
+ // ch: sumArr.value[4],
+ // no: sumArr.value[6],
+ // }
+ // sessionStorage.setItem('移动燃烧', JSON.stringify(value))
return sums
}
// 排放量变化
diff --git a/src/views/count/components/photovoltaic.vue b/src/views/count/components/photovoltaic.vue
index 2229a5c..52f8130 100644
--- a/src/views/count/components/photovoltaic.vue
+++ b/src/views/count/components/photovoltaic.vue
@@ -67,13 +67,13 @@
}
})
sumArr.value = sums
- const value = {
- name: '光伏',
- co: sumArr.value[4],
- ch: 0,
- no: 0,
- }
- sessionStorage.setItem('光伏', JSON.stringify(value))
+ // const value = {
+ // name: '光伏',
+ // co: sumArr.value[4],
+ // ch: 0,
+ // no: 0,
+ // }
+ // sessionStorage.setItem('光伏', JSON.stringify(value))
return sums
}
const watchCapacity = (event: any, index: number) => {
diff --git a/src/views/count/components/result.vue b/src/views/count/components/result.vue
index 9d7eba9..28d63eb 100644
--- a/src/views/count/components/result.vue
+++ b/src/views/count/components/result.vue
@@ -7,12 +7,6 @@
onMounted(() => {
carbonData.value = JSON.parse(sessionStorage.getItem('计算结果') as string) || []
})
-const requestData = (data: any) => {
- carbonData.value = []
- // 接收父组件传来的数据
- // carbonData.value = data
-}
-defineExpose({ requestData })
// 总排放量
const totalCarbon = computed(() => {
return carbonData.value.reduce((pre, target: any) => {
diff --git a/src/views/count/electric.vue b/src/views/count/electric.vue
index ec4f110..5c05abb 100644
--- a/src/views/count/electric.vue
+++ b/src/views/count/electric.vue
@@ -2,12 +2,11 @@
-
+
-
+
diff --git a/src/views/count/table.vue b/src/views/count/table.vue
index 6399a44..bf9761d 100644
--- a/src/views/count/table.vue
+++ b/src/views/count/table.vue
@@ -5,6 +5,72 @@
import Purchaseofheat from './components/Purchaseofheat.vue'
import Purchaseofelectricity from './components/Purchaseofelectricity.vue'
import photovoltaic from './components/photovoltaic.vue'
+const fixRef = ref()
+const mobileRef = ref()
+const energyRef = ref()
+const heatRef = ref()
+const electricityRef = ref()
+const photovoltaicRef = ref()
+// 获取子组件数据
+const getData = () => {
+ // 固定燃烧数据
+ const fixData = fixRef.value.sumArr
+ const value1 = {
+ name: '固定燃烧',
+ co: fixData[2],
+ ch: fixData[4],
+ no: fixData[6],
+ }
+ sessionStorage.setItem('固定燃烧', JSON.stringify(value1))
+ // 移动燃烧数据
+ const mobileData = mobileRef.value.sumArr
+ const value2 = {
+ name: '移动燃烧',
+ co: mobileData[2],
+ ch: mobileData[4],
+ no: mobileData[6],
+ }
+ sessionStorage.setItem('移动燃烧', JSON.stringify(value2))
+ // 能源加工转换
+ const energyData = energyRef.value.sumArr
+ const value3 = {
+ name: '能源加工转换',
+ co: 0,
+ ch: 0,
+ no: 0,
+ }
+ sessionStorage.setItem('能源加工转换', JSON.stringify(value3))
+ // 购入热力
+ const heatData = heatRef.value.sumArr
+ const value4 = {
+ name: '购入热力',
+ co: heatData[2] ? heatData[2] : 0,
+ ch: heatData[4] ? heatData[4] : 0,
+ no: heatData[6] ? heatData[6] : 0,
+ }
+ sessionStorage.setItem('购入热力', JSON.stringify(value4))
+ // 购入电力
+ const electricityData = electricityRef.value.sumArr
+ const value5 = {
+ name: '购入电力',
+ co: electricityData[2] ? electricityData[2] : 0,
+ ch: electricityData[4] ? electricityData[4] : 0,
+ no: electricityData[6] ? electricityData[6] : 0,
+ }
+ sessionStorage.setItem('购入电力', JSON.stringify(value5))
+ // 光伏
+ const photovoltaicData = photovoltaicRef.value.sumArr
+ const value6 = {
+ name: '光伏',
+ co: photovoltaicData[4],
+ ch: 0,
+ no: 0,
+ }
+ sessionStorage.setItem('光伏', JSON.stringify(value6))
+}
+defineExpose({
+ getData,
+})
diff --git a/src/views/data/collect/collect.vue b/src/views/data/collect/collect.vue
index 65db991..30c8404 100644
--- a/src/views/data/collect/collect.vue
+++ b/src/views/data/collect/collect.vue
@@ -1,88 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data/consumption/index.vue b/src/views/data/consumption/index.vue
index 852076a..ab3b507 100644
--- a/src/views/data/consumption/index.vue
+++ b/src/views/data/consumption/index.vue
@@ -4,13 +4,13 @@
import tab from '@/views/data/collect/tab.vue'
const tablistData = ref([
{
- id: '1',
+ id: '2',
title: '家用燃气监测',
},
])
const select = ref('')
const confirm = (selectp: string) => {
- select.value = selectp
+ select.value = tablistData.value.filter(item => item.title === selectp)[0].id
}
diff --git a/src/views/data/device/pageAdd.vue b/src/views/data/device/pageAdd.vue
index 747db38..1bfb359 100644
--- a/src/views/data/device/pageAdd.vue
+++ b/src/views/data/device/pageAdd.vue
@@ -18,16 +18,6 @@
stat: '', // 状态
}) // 表单
-const statList = ref([
- {
- name: '在线',
- value: '1',
- },
- {
- name: '离线',
- value: '0',
- },
-])
const textMap: { [key: string]: string } = {
update: '编辑',
create: '新增',
@@ -40,7 +30,7 @@
deviceNo: [{ required: true, message: '设备编号为空', trigger: ['blur', 'change'] }],
installTime: [{ required: true, message: '安装时间不能为空', trigger: ['blur', 'change'] }],
ptn: [{ required: true, message: '所属分区不能为空', trigger: ['blur', 'change'] }],
- // statusName: [{ required: true, message: '状态不能为空', trigger: ['blur', 'change'] }],
+ status: [{ required: true, message: '状态不能为空', trigger: ['blur', 'change'] }],
} // 前端校验规则
// 重置表单
@@ -71,7 +61,15 @@
console.log(res, 'res')
})
}
+const deviceStatusList = ref([])
+// 获取设备状态列表
+const fetchDeviceStatus = () => {
+ getDictByCode('stat_type').then((res) => {
+ deviceStatusList.value = res.data
+ })
+}
fetchDeviceType()
+fetchDeviceStatus()
// 初始化对话框
const initDialog = (dialogStatusValue: string, row: any) => {
dialogStatus.value = dialogStatusValue
@@ -222,10 +220,10 @@
-
+
import type { FormRules } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
+import dayjs from 'dayjs'
import showPhoto from './showPhoto.vue'
import { addElectricityList, updateElectricityList, uploadApi } from '@/api/api/index'
+import { getUserList } from '@/api/system/user'
const emits = defineEmits(['refresh'])
const dataFormRef = ref()
const dialogFormVisible = ref(false) // 对话框是否显示
@@ -12,6 +14,7 @@
electricityName: '', // 配电网名称
electricityArea: '', // 配电网区域
uploaderName: '', // 上传人
+ uploader: '',
uploadTime: '', // 上传时间
electricityDetail: '', // 详情图片
}) // 表单
@@ -23,17 +26,28 @@
const rules: FormRules = {
electricityName: [{ required: true, message: '请输入配电网名称', trigger: ['blur', 'change'] }],
electricityArea: [{ required: true, message: '请输入配电网区域', trigger: ['blur', 'change'] }],
- uploaderName: [{ required: true, message: '请输入上传人', trigger: ['blur', 'change'] }],
+ uploader: [{ required: true, message: '请选择上传人', trigger: ['blur', 'change'] }],
uploadTime: [{ required: true, message: '请选择上传时间', trigger: ['blur', 'change'] }],
electricityDetail: [{ required: true, message: '请上传附件', trigger: ['blur', 'change'] }],
} // 前端校验规则
-
+// 获取用户列表
+const userList = ref([])
+const fetchUserList = () => {
+ getUserList({ limit: 9999, offset: 1 }).then((res) => {
+ userList.value = res.data.rows
+ })
+}
+watch(() => areaForm.value.uploader, (newVal) => {
+ areaForm.value.uploaderName = userList.value.filter(item => item.id === newVal)[0].name
+})
+fetchUserList()
// 重置表单
const resetForm = () => {
areaForm.value = {
electricityName: '', // 配电网名称
electricityArea: '', // 配电网区域
- uploaderName: '', // 上传人
+ uploaderName: '', // 上传人+
+ uploader: '',
uploadTime: '', // 上传时间
electricityDetail: '',
}
@@ -64,6 +78,7 @@
const createData = () => {
dataFormRef.value.validate((valid: any) => {
if (valid) {
+ areaForm.value.uploadTime = dayjs().format('YYYY-MM-DD')
btnLoading.value = true
addElectricityList(areaForm.value).then((response) => {
if (response.code === 200) {
@@ -89,6 +104,7 @@
const updateData = () => {
dataFormRef.value.validate((valid: any) => {
if (valid) {
+ areaForm.value.uploadTime = dayjs().format('YYYY-MM-DD')
btnLoading.value = true
updateElectricityList(areaForm.value).then((response) => {
if (response.code === 200) {
@@ -165,15 +181,22 @@
-
-
+
+
+
+
+
-
+
-
+ -->
diff --git a/src/views/data/electricity/pageAdd.vue b/src/views/data/electricity/pageAdd.vue
index c03f0cf..3b313e7 100644
--- a/src/views/data/electricity/pageAdd.vue
+++ b/src/views/data/electricity/pageAdd.vue
@@ -1,6 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/data/useHeat/index.vue b/src/views/data/useHeat/index.vue
index 88db305..154eb09 100644
--- a/src/views/data/useHeat/index.vue
+++ b/src/views/data/useHeat/index.vue
@@ -4,17 +4,17 @@
import tab from '@/views/data/collect/tab.vue'
const tablistData = ref([
{
- id: '1',
+ id: '0',
title: '供暖监测',
},
{
- id: '2',
+ id: '1',
title: '热水监测',
},
])
const select = ref('')
const confirm = (selectp: string) => {
- select.value = selectp
+ select.value = tablistData.value.filter(item => item.title === selectp)[0].id
}
@@ -22,7 +22,7 @@
diff --git a/src/views/data/useHeat/page.vue b/src/views/data/useHeat/page.vue
index ab6e4d9..aca8f03 100644
--- a/src/views/data/useHeat/page.vue
+++ b/src/views/data/useHeat/page.vue
@@ -1,5 +1,9 @@
+
-
+
-
-
+
+
+
+
+
+
+
+
+ 修改
+
+
+ 删除
+
+
+
+
diff --git a/src/views/data/useHeat/pageAdd.vue b/src/views/data/useHeat/pageAdd.vue
new file mode 100644
index 0000000..a0af188
--- /dev/null
+++ b/src/views/data/useHeat/pageAdd.vue
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+