From 1d4b76492d93365763692c9b258ad903e82b589b Mon Sep 17 00:00:00 2001 From: 28723 <2822784518@qq.com> Date: Mon, 8 Jul 2024 09:48:44 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=A2=B3=E6=8E=92=E5=9B=A0=E5=AD=90?= =?UTF-8?q?=E5=BA=93=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/carbonEmissionFactorLibrary.ts | 12 + .../src/router/carbonEmissionManage.ts | 50 ++ .../carbonEmissionFactorLibrary/config.ts | 229 ++++++++ .../carbonEmissionFactorLibrary/index.vue | 620 +++++++++++++++++++++ .../carbonEmissionFactorLibrary/mock.ts | 45 ++ .../carbonEmissionStatistics/config.ts | 105 ++++ .../carbonEmissionStatistics/index.vue | 18 + .../carbonEmissionStatistics/mock.json | 506 +++++++++++++++++ hx-ai-intelligent/vite.config.ts | 4 + 9 files changed, 1589 insertions(+) create mode 100644 hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts create mode 100644 hx-ai-intelligent/src/router/carbonEmissionManage.ts create mode 100644 hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts create mode 100644 hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue create mode 100644 hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/mock.ts create mode 100644 hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts create mode 100644 hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/index.vue create mode 100644 hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/mock.json diff --git a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts new file mode 100644 index 0000000..d3d3043 --- /dev/null +++ b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts @@ -0,0 +1,12 @@ +export enum carbonEmissionFactorLibrary { + getTableList = '/carbon/emission/factor/queryCarbonFactorPage', + addNewData = '/carbon/emission/factor/creatOrUpdate', + editUser = '/carbon-smart/api/user/edit', + frozen = '/carbon-smart/api/user/frozen', + resetPwd = '/carbon-smart/api/user/resetPwd', + del = '/carbon-smart/api/user/del', + batchDel = '/carbon-smart/api/user/batchDel', + getCarbonFactorTree = '/carbon/emission/type/getCarbonFactorTree', + queryDeptTree = '/carbon-smart/api/user/queryDeptTree', + queryUserPerList = '/carbon-smart/api/user/queryUserPerList', +} diff --git a/hx-ai-intelligent/src/router/carbonEmissionManage.ts b/hx-ai-intelligent/src/router/carbonEmissionManage.ts new file mode 100644 index 0000000..8f0e5fe --- /dev/null +++ b/hx-ai-intelligent/src/router/carbonEmissionManage.ts @@ -0,0 +1,50 @@ +const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue'); +const equipment = { + path: '/carbonEmissionManage', + name: 'CarbonEmissionManage', + meta: { title: '碳排管理', icon: 'shebeiguanli', index: 1 }, + redirect: { name: 'CarbonEmissionStatistics' }, + children: [ + { + path: 'carbonEmissionStatistics', + name: 'CarbonEmissionStatistics', + meta: { title: '碳排统计', hideChildren: true, icon: 'shebeiguanli' }, + component: Base, + redirect: { name: 'CarbonEmissionStatisticsIndex' }, + children: [ + { + path: 'index', + name: 'CarbonEmissionStatisticsIndex', + // component: () => import('/nerv-lib/saas/view/menuManage/index.vue'), + component: () => import('/@/view/carbonEmissionManage/carbonEmissionStatistics/index.vue'), + meta: { + title: '碳排统计', + keepAlive: true, + // backApi: [], + }, + }, + ], + }, + { + path: 'carbonEmissionFactorLibrary', + name: 'CarbonEmissionFactorLibrary', + meta: { title: '碳排因子库', hideChildren: true, icon: 'shebeiguanli' }, + component: Base, + redirect: { name: 'CarbonEmissionFactorLibraryIndex' }, + children: [ + { + path: 'index', + name: 'CarbonEmissionFactorLibraryIndex', + // component: () => import('/nerv-lib/saas/view/menuManage/index.vue'), + component: () => import('/@/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue'), + meta: { + title: '碳排因子库', + keepAlive: true, + // backApi: [], + }, + }, + ], + }, + ], +}; +export default equipment; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts new file mode 100644 index 0000000..a8e2083 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts @@ -0,0 +1,229 @@ +import { ref } from 'vue'; +import { http } from '/nerv-lib/util'; +import { origanizemanage } from '/@/api/origanizemanage'; +export const formConfig = (disabled) => { + return ref([ + { + field: 'field111', + component: 'NsChildForm', + componentProps: { + schemas: [ + { + label: '排放源', + field: 'accountNo', + component: 'NsInput', + componentProps: { + placeholder: '请输入排放源', + maxLength: 20, + disabled, + }, + rules: [ + { + required: true, + message: '请输入排放源', + }, + ], + }, + { + field: 'userStatus', + label: '排放气体', + component: 'NsSelect', + componentProps: { + allowClear: true, + placeholder: '请选择排放气体', + options: [ + { + label: '正常', + value: 0, + }, + { + label: '冻结', + value: 1, + }, + ], + }, + rules: [ + { + required: true, + message: '请选择排放气体', + }, + ], + }, + { + field: 'userStatus', + label: '排放环节', + component: 'NsSelect', + componentProps: { + allowClear: true, + placeholder: '请选择排放环节', + options: [ + { + label: '正常', + value: 0, + }, + { + label: '冻结', + value: 1, + }, + ], + }, + }, + { + label: '排放因子', + field: 'accountNo', + component: 'NsInput', + componentProps: { + placeholder: '请输入排放因子值', + maxLength: 20, + disabled, + }, + rules: [ + { + required: true, + message: '请输入排放因子值', + }, + ], + }, + { + field: 'userStatus', + label: '碳排前缀', + component: 'NsSelect', + componentProps: { + allowClear: true, + placeholder: '请选择碳排前缀', + options: [ + { + label: '正常', + value: 0, + }, + { + label: '冻结', + value: 1, + }, + ], + }, + rules: [ + { + required: true, + message: '请选择碳排前缀', + }, + ], + }, + { + label: '碳排后缀', + field: 'accountNo', + component: 'NsInput', + componentProps: { + placeholder: '请输入碳排后缀', + maxLength: 20, + disabled, + }, + rules: [ + { + required: true, + message: '请输入碳排后缀', + }, + ], + }, + { + label: '已引用数', + field: 'accountNo', + component: 'NsInput', + componentProps: { + disabled: true, + maxLength: 20, + }, + }, + { + label: '参考文献', + field: 'accountNo', + component: 'NsTextarea', + componentProps: { + placeholder: '请输入参考文献', + maxLength: 20, + disabled, + }, + }, + ], + }, + }, + ]); +}; +const options = ref([]); + +const getUserPerList = (transform, params = {}) => { + return http.post(origanizemanage.queryUserPerList, { ...params }).then((res) => { + return res.data?.map((item) => { + item = { ...item, ...transform(item) }; + return item; + }); + }); +}; +export const formConfig2 = (casData: any) => { + return ref([ + { + field: 'information', + component: 'NsCascader', + componentProps: { + placeholder: '请选择', + displayRender: ({ labels, selectedOptions }: any) => { + console.log(labels, selectedOptions); + + casData.value = selectedOptions.map(({ label, value }) => { + return { label, value }; + }); + return labels.join('/'); + }, + loadData: (selectedOptions, options) => { + console.log(selectedOptions, options, 'selectedOptions, options'); + + const targetOption = selectedOptions[selectedOptions.length - 1]; + let transForm, params; + // load options lazily + if (!selectedOptions.length) { + transForm = (data) => { + data['label'] = data.orgName; + data['value'] = data.orgId; + data['isLeaf'] = false; + data['level'] = 1; + return data; + }; + getUserPerList(transForm).then((res) => { + options.value = [...res]; + }); + } + const id = targetOption?.value; + const level = targetOption?.level; + if (targetOption) { + targetOption.loading = true; + } + + if (level === 1) { + transForm = (data) => { + data['label'] = data.deptName; + data['value'] = data.deptId; + data['isLeaf'] = false; + data['level'] = 2; + return data; + }; + params = { orgId: id }; + } else if (level === 2) { + transForm = (data) => { + data['label'] = data.roleName; + data['value'] = data.roleId; + data['level'] = 3; + return data; + }; + params = { deptId: id }; + } + if (targetOption) { + getUserPerList(transForm, { ...params }).then((res) => { + targetOption.loading = false; + targetOption.children = [...res]; + }); + } + }, + }, + }, + ]); +}; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue new file mode 100644 index 0000000..11a8100 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue @@ -0,0 +1,620 @@ + + + + + diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/mock.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/mock.ts new file mode 100644 index 0000000..76ff687 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/mock.ts @@ -0,0 +1,45 @@ +import { ref } from 'vue'; +import { origanizemanage } from '/@/api/origanizemanage'; +import { http } from '/nerv-lib/saas'; + +export const mockData = ref([ + { + id: 3, + zhanghao: 'axb', + name: '张三', + sex: '男', + phone: '123456789', + email: '1234567889', + relation: '1', + role: '1', + status: '1', + }, +]); + +export const mockData2 = ref([ + { + information: '铁路局1/产品部1/产品总监1', + }, +]); + +export const treeData = ref([ + { + title: '铁路总局', + key: '0-0', + children: [ + { title: '济阳站', key: '0-0-0' }, + { title: '临沂站', key: '0-0-1' }, + ], + }, +]); + +export const treeData2 = [ + { + title: '全部', + key: '0-0', + children: [ + { title: '产品部', key: '0-0-0' }, + { title: '运维部', key: '0-0-1' }, + ], + }, +]; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts new file mode 100644 index 0000000..ff75929 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts @@ -0,0 +1,105 @@ +import { dateUtil } from '/nerv-lib/util/date-util'; +import data from './mock.json'; +export const tableConfig = { + title: '设备台账', + // api: '/carbon_emission/device/getDeviceList', + value: data.dataSource, + params: { + page: 0, + pageSize: 10, + }, + rowSelection: null, + columns: [ + { + title: '设备名称', + dataIndex: 'id', + }, + { + title: '设备型号', + dataIndex: 'deviceCode', + }, + { + title: 'SN码', + dataIndex: 'deviceName', + textNumber: 8, + textEllipsis: true, + }, + { + title: '设备一级区域', + dataIndex: 'position', + }, + { + title: '设备二级区域', + dataIndex: 'position', + }, + { + title: '设备详细位置', + dataIndex: 'position', + }, + { + title: '设备规格', + dataIndex: 'position', + }, + { + title: '设备厂商纳税人识别号', + dataIndex: 'position', + }, + { + title: '厂商联系人', + dataIndex: 'position', + }, + { + title: '设备描述', + dataIndex: 'position', + }, + { + title: 'IP地址', + dataIndex: 'position', + }, + { + title: '生产日期', + dataIndex: 'position', + }, + { + title: '采购日期', + dataIndex: 'position', + }, + { + title: '启用日期', + dataIndex: 'position', + }, + { + title: '设备成本(元)', + dataIndex: 'position', + }, + { + title: '使用期限', + dataIndex: 'position', + }, + { + title: '额定功率', + dataIndex: 'position', + }, + { + title: '特殊参数', + dataIndex: 'position', + }, + ], + + formConfig: { + schemas: [ + { + field: 'createTime', + label: '生产日期', + component: 'NsRangePicker', + fieldMap: ['queryStartDate', 'queryEndDate'], + componentProps: { + valueFormat: 'YYYY-MM-DD', + }, + }, + ], + params: {}, + }, + // pagination: { pageSizeOptions: false }, + rowKey: 'uuid', +}; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/index.vue new file mode 100644 index 0000000..4cb9985 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/index.vue @@ -0,0 +1,18 @@ + + + diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/mock.json b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/mock.json new file mode 100644 index 0000000..624bb36 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/mock.json @@ -0,0 +1,506 @@ +{ + "data":[ + { + "title": "家居照明", + "key": "1", + "children": [ + { + "title": "灯泡", + "key": "1-1", + "children": [ + { + "title": "LED灯泡", + "key": "1-1-1", + "children": [ + { + "title": "E27 LED灯泡", + "key": "1-1-1-1", + "attr": { + "瓦特": "7W", + "光通量": "500lm", + "色温": "2700K" + } + }, + { + "title": "E14 小灯泡", + "key": "1-1-1-2", + "attr": { + "瓦特": "4W", + "光通量": "250lm", + "色温": "6500K" + } + } + ] + }, + { + "title": "节能灯", + "key": "1-1-2", + "children": [ + { + "title": "E27 节能灯泡", + "key": "1-1-2-1", + "attr": { + "瓦特": "11W", + "光通量": "800lm", + "色温": "6500K" + } + } + ] + } + ] + }, + { + "title": "灯具", + "key": "1-2", + "children": [ + { + "title": "吊灯", + "key": "1-2-1", + "children": [ + { + "title": "水晶吊灯", + "key": "1-2-1-1", + "attr": { + "尺寸": "Φ60cm", + "适用面积": "15-20㎡" + } + }, + { + "title": "现代简约吊灯", + "key": "1-2-1-2", + "attr": { + "尺寸": "Φ52cm", + "适用面积": "10-15㎡" + } + } + ] + }, + { + "title": "台灯", + "key": "1-2-2", + "children": [ + { + "title": "护眼台灯", + "key": "1-2-2-1", + "attr": { + "瓦特": "18W", + "调光调色": "是" + } + }, + { + "title": "折叠臂台灯", + "key": "1-2-2-2", + "attr": { + "瓦特": "14W", + "调光调色": "否" + } + } + ] + } + ] + }, + { + "title": "开关插座", + "key": "1-3", + "children": [ + { + "title": "智能开关", + "key": "1-3-1", + "children": [ + { + "title": "触控式智能开关", + "key": "1-3-1-1", + "attr": { + "控制方式": "触控/远程", + "兼容性": "ZigBee/WiFi" + } + } + ] + }, + { + "title": "插座", + "key": "1-3-2", + "children": [ + { + "title": "多功能插座", + "key": "1-3-2-1", + "attr": { + "插孔类型": "2/3插", + "USB接口": "有" + } + } + ] + } + ] + } + ] + }, + { + "title": "电梯", + "key": "3", + "children": [ + { + "title": "扶梯", + "key": "301" + }, + { + "title": "直梯", + "key": "302" + } + ] + }, + { + "title": "冷源源", + "key": "4", + "children": [ + { + "title": "通风及空调设备", + "key": "5", + "children": [ + { + "title": "组合式空调机组", + "key": "501" + }, + { + "title": "新风机组", + "key": "502" + }, + { + "title": "精密空调", + "key": "503" + }, + { + "title": "风机盘管", + "key": "504" + }, + { + "title": "VAV", + "key": "505" + }, + { + "title": "室外多联机", + "key": "506" + }, + { + "title": "风幕机", + "key": "507" + }, + { + "title": "球喷", + "key": "508" + }, + { + "title": "送风机", + "key": "509" + }, + { + "title": "排风机", + "key": "510" + }, + { + "title": "排风兼排烟机", + "key": "511" + }, + { + "title": "通风机", + "key": "512" + }, + { + "title": "风阀", + "key": "513" + }, + { + "title": "风柱式空调", + "key": "514" + } + ] + } + ] + }, + { + "title": "照明", + "key": "6", + "children": [ + { + "title": "多功能传感器", + "key": "701" + }, + { + "title": "照度传感器", + "key": "702" + }, + { + "title": "噪声传感器", + "key": "703" + } + ] + } + ], + "dataSource":[ + { + "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 + }, + { + "id": "d1", + "isDel": "0", + "officesId": "84", + "deviceCode": "37430200144", + "deviceName": "地听测试2", + "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": "802", + "ip": "10.5.36.0", + "port": "6000", + "com": "", + "slaveAddress": "123测试", + "dlt": "", + "conversionIdentifier": "48", + "multiplicationAdjustment": "1", + "accessMethod": "1", + "replacementFrequency": "0", + "dataDetail": "sit", + "insertTime": "2024-02-28 11:26:58", + "children": null, + "devicePointList": null, + "insertUser": null + }, + { + "id": "d2", + "isDel": "0", + "officesId": "84", + "deviceCode": "1235623", + "deviceName": "测试设备2", + "category": "1", + "type": "1001", + "energyCount": "是", + "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": null, + "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": "2024-02-28 11:31:57", + "children": null, + "devicePointList": null, + "insertUser": null + }, + { + "id": "d7", + "isDel": "0", + "officesId": "", + "deviceCode": "0213", + "deviceName": "测试", + "category": "1", + "type": "1001", + "energyCount": "1", + "serialNumber": "", + "pidCode": null, + "brand": "6da085e5-956d-4000-bd3c-ebb01a9c99a1", + "types": "d7a8aede-b821-4ff2-953d-601a20e5a948", + "manufacturer": "", + "contacts": "", + "phonenumber": null, + "position": "", + "activeState": "", + "measurementDirection": "", + "deviceMagnification": null, + "deviceAccuracy": null, + "frequency": "", + "standardFrequency": "", + "deviceHead": "", + "constructor": "", + "voltageType": "", + "pt": null, + "ct": null, + "communicationProtocol": "", + "ip": "", + "port": "", + "com": "", + "slaveAddress": "", + "dlt": "", + "conversionIdentifier": "1", + "multiplicationAdjustment": "1", + "accessMethod": "", + "replacementFrequency": "0", + "dataDetail": "", + "insertTime": "2024-03-14 20:01:53", + "children": null, + "devicePointList": null, + "insertUser": "" + }, + { + "id": "d3", + "isDel": "0", + "officesId": "84", + "deviceCode": "81", + "deviceName": "设备名称1111", + "category": "1", + "type": "1001", + "energyCount": "1", + "serialNumber": "69", + "pidCode": null, + "brand": "6da085e5-956d-4000-bd3c-ebb01a9c99a1", + "types": "d7a8aede-b821-4ff2-953d-601a20e5a948", + "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": "2024-03-15 17:34:24", + "children": null, + "devicePointList": null, + "insertUser": null + }, + { + "id": "d43fdfff_02_0001", + "isDel": "0", + "officesId": "843fdffff213d2d3", + "deviceCode": "00037430200143", + "deviceName": "应感者酸严", + "category": "1", + "type": "1001", + "energyCount": "esse consequat", + "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": "2024-04-29 11:12:43", + "children": null, + "devicePointList": null, + "insertUser": null + } + ] + +} \ No newline at end of file diff --git a/hx-ai-intelligent/vite.config.ts b/hx-ai-intelligent/vite.config.ts index 2494632..4a477e6 100644 --- a/hx-ai-intelligent/vite.config.ts +++ b/hx-ai-intelligent/vite.config.ts @@ -16,5 +16,9 @@ const proxy = { changeOrigin: true, rewrite: (path) => path.replace(/^\/carbon-smart/, ''), }, + '/carbon': { + target: 'http://192.168.11.169:8224', + changeOrigin: true + }, }; export default configFun({ dirname, proxy, serviceMode: 'saas', baseDir: '../' }); From 9ad9446cae21a29ea575693fa5ffe4f85da3897a Mon Sep 17 00:00:00 2001 From: chenpingsen Date: Mon, 8 Jul 2024 10:02:05 +0800 Subject: [PATCH 2/6] =?UTF-8?q?add:=E7=85=A7=E6=98=8E=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentControl/lightingManage/indexs.less | 159 +++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less new file mode 100644 index 0000000..b9dad0f --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less @@ -0,0 +1,159 @@ +// 页面容器 +.lighting-box { + // width: 100%; + // height: 100%; + position: relative; + // background: linear-gradient(#badaff, #8cabeb, #7095de); + .drawer-box { + width: 30px; + height: 40px; + border-radius: 2px; + position: fixed; + right: 0; + top: 0; + bottom: 0; + margin: auto; + background: rgba(0, 0 ,0 ,0.5); + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + .drawer-icon { + + } + } + // 照明设备功能总容器 + .lighting-img-box { + position: relative; + width: 1280px; + height: 720px; + user-select: none; + background-image: url(../image/bg.jpg); + // 由于背景是俯视图,会产生有交点的透视效果,故使用透视属性 + perspective: 1000px; + perspective-origin: 850px -160px; + // 左上角区域切换功能 + .btn-box { + width: 120px; + position: sticky; + top: 10px; + left: 10px; + display: flex; + flex-direction: column; + gap: 8px; + .btn-item { + cursor: pointer; + width: 100%; + height: 40px; + border-radius: 4px; + background: rgba(39, 120, 255, 1); + border: 1px solid rgba(51, 199, 255, 1); + box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3); + font-size: 18px; + color: white; + } + .btn-item:hover { + color: black; + } + } + // 大区分区 + .area{ + position: absolute; + bottom: 170px; + left: 240px; + width: 780px; + height: 240px; + transform: rotateX(79deg) rotateZ(-22deg) skew(29deg); + display: flex; + gap: 8px; + .area1 { + width: 170px; + background: rgba(0, 251, 91, 0.3); + border: 2px solid rgb(0, 251, 91); + display: flex; + } + .area2 { + width: 240px; + background: rgba(255, 165, 0, 0.3); + border: 2px solid rgb(255, 165, 0); + display: flex; + } + .area3 { + width: 110px; + background: rgba(255, 0, 0, 0.3); + border: 2px solid rgb(255, 0, 0); + } + .area4 { + flex: 1; + background: rgba(80, 236, 244, 0.3); + border: 2px solid rgb(80, 236, 244); + } + .area-item:hover { + border:2px solid white; + } + .area-item { + cursor: pointer; + transition: all ease 0.2s; + >.light-group { + height: 100%; + flex: 1; + display:flex; + justify-content: center; + align-items: center; + .group-shadow1 { + width: 35px; + height: 150px; + border-radius: 20px; + background: rgba(0, 0, 0, 0.1); + } + .group-shadow2 { + width: 35px; + height: 180px; + border-radius: 20px; + background: rgba(0, 0, 0, 0.1); + } + .group-shadow3 { + width: 40px; + height: 180px; + border-radius: 20px; + background: rgba(0, 0, 0, 0.1); + } + .group-shadow4 { + width: 40px; + height: 160px; + border-radius: 20px; + background: rgba(0, 0, 0, 0.1); + } + } + .group-shadow { + transition: all ease 0.2s; + } + .group-shadow:hover { + border: 2px solid white; + } + } + } + } +} +.ns-content-main { + position: relative; + // 抽屉伸缩按钮 + .drawer-box { + width: 30px; + height: 40px; + border-radius: 2px; + position: fixed; + right: 0; + top: 0; + bottom: 0; + margin: auto; + background: rgba(0, 0 ,0 ,0.5); + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + .drawer-icon { + + } + } +} From 796d2fcf6371d615f3f10d5c41a902c681ab23ad Mon Sep 17 00:00:00 2001 From: 28723 <2822784518@qq.com> Date: Mon, 8 Jul 2024 10:04:04 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E7=A2=B3=E6=8E=92=E5=9B=A0=E5=AD=90?= =?UTF-8?q?=E5=BA=93=E9=A1=B5=E9=9D=A2=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue index 11a8100..4778be2 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue @@ -360,7 +360,6 @@ import { log } from 'node:console'; name: 'userAdd', type: 'primary', handle: () => { - debugger opMap.value.type = 'add'; setTimeout(() => { formData.value = { From 64cfd47d50af4995c598d8588dade1faac94afc5 Mon Sep 17 00:00:00 2001 From: 28723 <2822784518@qq.com> Date: Mon, 8 Jul 2024 10:05:22 +0800 Subject: [PATCH 4/6] Merge branch 'temp' of http://123.60.103.97:3000/xuziqiang/SaaS-lib into temp --- hx-ai-intelligent/index.html | 2 +- hx-ai-intelligent/public/projectIcon.svg | 10 ++ hx-ai-intelligent/src/api/deviceManage.ts | 11 +- hx-ai-intelligent/src/api/index.ts | 3 + hx-ai-intelligent/src/api/origanizemanage.ts | 3 +- hx-ai-intelligent/src/components/ns-modal-form.vue | 88 ++++++++++++++ hx-ai-intelligent/src/router/organizationManage.ts | 1 - .../src/view/equipmentManage/group/config.ts | 128 +++++++++++++++------ .../src/view/equipmentManage/group/index.vue | 107 ++++++++++++++++- .../organizationManage/departmentManage/config.ts | 1 + .../organizationManage/departmentManage/index.vue | 93 +++++++-------- .../view/organizationManage/usermanage/config.ts | 1 + .../view/organizationManage/usermanage/index.vue | 71 +++++------- lib/component/form/form/form.vue | 10 +- lib/component/tree/props.ts | 1 + lib/component/tree/tree-api.vue | 23 +++- lib/saas/config/form.config.ts | 11 ++ lib/saas/view/system/login.vue | 123 ++++++++++++-------- 18 files changed, 498 insertions(+), 189 deletions(-) create mode 100644 hx-ai-intelligent/public/projectIcon.svg create mode 100644 hx-ai-intelligent/src/components/ns-modal-form.vue diff --git a/hx-ai-intelligent/index.html b/hx-ai-intelligent/index.html index 420aa9c..5c8b60a 100644 --- a/hx-ai-intelligent/index.html +++ b/hx-ai-intelligent/index.html @@ -2,7 +2,7 @@ - + + +
- + + +
+ \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs1.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs1.vue new file mode 100644 index 0000000..30dea40 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs1.vue @@ -0,0 +1,2197 @@ + + + + diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue new file mode 100644 index 0000000..d26c745 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue @@ -0,0 +1,135 @@ + + + + + \ No newline at end of file