Browse Source

fix: 代码逻辑调整

temp
xuziqiang 5 months ago
parent
commit
4526da936e
  1. 7
      hx-ai-intelligent/src/view/equipmentManage/group/config.ts
  2. 5
      hx-ai-intelligent/src/view/equipmentManage/group/edit.vue
  3. 5
      hx-ai-intelligent/src/view/equipmentManage/group/editCal.vue
  4. 121
      hx-ai-intelligent/src/view/equipmentManage/group/mock.json

7
hx-ai-intelligent/src/view/equipmentManage/group/config.ts

@ -21,6 +21,7 @@ const tableCalKeyMap = [
{ {
title: '设备编号', title: '设备编号',
dataIndex: 'deviceNum', dataIndex: 'deviceNum',
textNumber: 10,
}, },
{ {
textNumber: 10, textNumber: 10,
@ -35,7 +36,10 @@ const tableCalKeyMap = [
{ {
textNumber: 10, textNumber: 10,
title: '设备状态', title: '设备状态',
dataIndex: 'position', dataIndex: 'deviceStatus',
customRender: ({ value }) => {
return value === '0' ? '启用' : '停用';
},
}, },
]; ];
const tableKeyMap = [ const tableKeyMap = [
@ -62,7 +66,6 @@ const doWnload = (url) => {
a.click(); a.click();
}; };
const mockData = ref(data.listData);
export const formSchema = [ export const formSchema = [
{ {
field: 'isCreate', field: 'isCreate',

5
hx-ai-intelligent/src/view/equipmentManage/group/edit.vue

@ -49,12 +49,9 @@
const toggle = () => { const toggle = () => {
visible.value = !visible.value; visible.value = !visible.value;
clearData(); clearData();
visible.value && getData(currentId.value);
}; };
onMounted(() => {
getData(currentId.value);
});
const filterOption = (inputValue: string, option: any) => { const filterOption = (inputValue: string, option: any) => {
return option?.title.toLowerCase().indexOf(inputValue.toLowerCase()) > -1; return option?.title.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
}; };

5
hx-ai-intelligent/src/view/equipmentManage/group/editCal.vue

@ -49,11 +49,10 @@
const toggle = () => { const toggle = () => {
visible.value = !visible.value; visible.value = !visible.value;
clearData(); clearData();
visible.value && getData(currentId.value);
}; };
onMounted(() => { onMounted(() => {});
getData(currentId.value);
});
const filterOption = (inputValue: string, option: any) => { const filterOption = (inputValue: string, option: any) => {
return option?.title.toLowerCase().indexOf(inputValue.toLowerCase()) > -1; return option?.title.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;

121
hx-ai-intelligent/src/view/equipmentManage/group/mock.json

@ -1,121 +0,0 @@
{
"data":[
{
"title": "1号楼",
"key": "A001",
"children": [
{
"title": "1号楼空调用电",
"key": "A002"
},
{
"title": "1号楼照明用电",
"key": "A003"
}
]
},
{
"title": "2号楼(A005)",
"key": "A004",
"children": [
{
"title": "2号楼空调用电(A007)",
"key": "A006"
}
]
},
{
"title": "3号楼",
"key": "A008",
"children": [
{
"title": "3号楼空调用电",
"key": "A009"
},
{
"title": "3号楼照明用电",
"key": "A010"
}
]
}
],
"insertData":[
{
"title": "北京公司",
"key": "A001"
},
{
"title": "广州公司",
"key": "A002"
},
{
"title": "南京公司",
"key": "A004"
},
{
"title": "上海公司",
"key": "A008",
"children": [
{
"title": "上海长宁",
"key": "A009"
},
{
"title": "上海徐汇",
"key": "A010"
},
{
"title": "上海浦东",
"key": "A011"
}
]
}
],
"listData":[
{
"id": "d4",
"isDel": "0",
"officesId": "84",
"deviceCode": "37430200143",
"deviceName": "地听测试电表",
"category": "1",
"type": "1001",
"energyCount": "1",
"serialNumber": "69",
"pidCode": null,
"brand": "",
"types": "",
"manufacturer": "elit non in",
"contacts": "ad reprehenderit",
"phonenumber": "34",
"position": "in esse commodo",
"activeState": "1",
"measurementDirection": "1",
"deviceMagnification": 62,
"deviceAccuracy": "89",
"frequency": "anim consequat irure",
"standardFrequency": "ut elit",
"deviceHead": "pariatur ex velit",
"constructor": "84566",
"voltageType": "cillum aliquip reprehenderit",
"pt": 61,
"ct": 64,
"communicationProtocol": "cupidatat nisi ea ad",
"ip": "",
"port": "",
"com": "",
"slaveAddress": "",
"dlt": "",
"conversionIdentifier": "48",
"multiplicationAdjustment": "1",
"accessMethod": "1",
"replacementFrequency": "0",
"dataDetail": "sit",
"insertTime": null,
"children": null,
"devicePointList": null,
"insertUser": null
}
]
}
Loading…
Cancel
Save