diff --git a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts index c9b0f97..2fbfe1b 100644 --- a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts +++ b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts @@ -8,6 +8,8 @@ export enum carbonEmissionFactorLibrary { getCarbonFactorTree = '/carbon-smart/api/carbon/emission/type/getCarbonFactorTree', creat = '/carbon-smart/api/carbon/emission/type/creatOrUpdate', delTreeNode = '/carbon-smart/api/carbon/emission/type/del', + move = '/carbon-smart/api/carbon/emission/type/move', + excel = '/carbon-smart/api/carbon/emission/factor/excel', // 单位管理 dictionaryUnitManagement = '/carbon-smart/client/dict/dictionaryUnitManagement', findOutermost = '/carbon-smart/client/dict/findOutermost', @@ -15,7 +17,7 @@ export enum carbonEmissionFactorLibrary { updateDictionary = '/carbon-smart/client/dict/updateDictionary', delDictionary = '/carbon-smart/client/dict/delDictionary', } -// 碳排管理-碳排统计接口 +// 碳排管理-能耗统计接口 export enum energyConsumption { getDicList = '/carbon-smart/client/dict/list', pageList = '/carbon-smart/api/carbon/stats/pageList', @@ -23,6 +25,7 @@ export enum energyConsumption { creat = '/carbon-smart/api/carbon/stats/creat', update = '/carbon-smart/api/carbon/stats/update', del = '/carbon-smart/api/carbon/stats/del', + voucherDownloadList = '/carbon-smart/api/carbon/stats/voucherDownloadList', } // 碳排管理-碳排速算接口 export enum quickCalculation { @@ -55,6 +58,7 @@ export enum carbonInventoryCheck { findUnitById = '/carbon-smart/api/carbon/inventory/findById', getDetailsList = '/carbon-smart/api/carbon/inventory/details/getDetailsList', updateTable = '/carbon-smart/api/carbon/inventory/details/update', + voucherDownloadList = '/carbon-smart/api/carbon/inventory/details/voucherDownloadList', // 排放统计接口 emissionStatistic = '/carbon-smart/api/carbon/inventory/emissionStatistic', // 碳排流向 @@ -75,6 +79,8 @@ export enum uploadPic { uploadfiles = '/carbon-smart/api/common/file/uploadfiles', select = '/carbon-smart/api/common/file/select', uploadfile = '/carbon-smart/api/common/file/uploadfile', + download = '/carbon-smart/api/common/file/download', + downloadZip = '/carbon-smart/api/common/file/downloadZip', } // 碳规划 export enum carbonPlanning { @@ -90,4 +96,6 @@ export enum carbonPlanning { detailedStatisticalDataChart = '/carbon-smart/api/carbon/planning/detailedStatisticalDataChart', batchOrUpdate = '/carbon-smart/api/carbon/planning/batchOrUpdate', addNodes = '/carbon-smart/api/carbon/planning/addNodes', + benchmarkSetting = '/carbon-smart/api/carbon/planning/benchmarkSetting', + benchmarkSubmit = '/carbon-smart/api/carbon/planning/benchmarkSubmit', } diff --git a/hx-ai-intelligent/src/router/carbonEmissionManage.ts b/hx-ai-intelligent/src/router/carbonEmissionManage.ts index 9adcfc0..b0034fa 100644 --- a/hx-ai-intelligent/src/router/carbonEmissionManage.ts +++ b/hx-ai-intelligent/src/router/carbonEmissionManage.ts @@ -40,6 +40,9 @@ const equipment = { meta: { title: '碳排因子库', keepAlive: false, + operates: [ + { title: '碳排因子库导入', code: 'carbonEmissionFactorLibraryImport' }, + ], // backApi: [], }, }, diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue index 1a63a0c..c99a2f6 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue @@ -290,11 +290,12 @@ getDictList(); visible.value = true; formState.value.id = record.id; - fetch(uploadPic.select, { bizId: record.id, bizTpye: 1 }).then((res) => { + fetch(uploadPic.select, { bizId: record.id, bizType: 1 }).then((res) => { fileList.value = res.data.map((item) => ({ uid: item.id.toString(), // 使用文件的id作为唯一标识 name: item.fileName, // 文件名 status: 'done', // 设置默认状态为已完成 + type: 'done', url: item.filePath, // 文件的URL,这里假设用示例的URL格式 })); }); @@ -415,7 +416,9 @@ message.error(`${info.file.name} 文件上传失败`); } }; + const delIds = ref([]); const handleFileRemove = (file) => { + delIds.value.push(file.uid); const newFileList = []; fileList.value.forEach((item) => { if (item.uid !== file.uid) { @@ -424,9 +427,6 @@ }); fileList.value = newFileList; }; - const uploadQuery = ref({ - bizTpye: 1, - }); const onSubmit = () => { formRef.value .validate() @@ -443,14 +443,20 @@ // uploadQuery.value.bizId = res.data.id; const formData = ref(new FormData()); fileList.value.forEach((file) => { - formData.value.append('files', file.originFileObj); + if (file.type !== 'done') { + formData.value.append('files', file.originFileObj); + } }); - formData.value.append('bizTpye', 1); + formData.value.append('bizType', 1); formData.value.append('bizId', res.data.id); + delIds.value.forEach((item) => { + formData.value.append('deleteList', item); + }); fetch(uploadPic.uploadfiles, formData.value) .then((res) => { message.success('操作成功!'); visible.value = false; + delIds.value = []; getDetailList(); }) .catch((error) => { @@ -459,6 +465,7 @@ } else { message.success('操作成功!'); visible.value = false; + delIds.value = []; getDetailList(); } }); @@ -479,6 +486,7 @@ // 关闭新增抽屉 const onClose = () => { visible.value = false; + delIds.value = []; formState.value = {}; fileList.value = []; formRef.value.resetFields(); diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue index ba32d72..9be85b4 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue @@ -62,9 +62,17 @@ 编辑 新增子节点 - 上移 - 下移 - 删除 + 上移 + 下移 + 删除 @@ -228,6 +236,7 @@ TreeProps, } from 'ant-design-vue/es/tree'; import { log } from 'node:console'; + import { or } from '@vueuse/core'; defineOptions({ name: 'OrderListIndex' }); const orgId = ref(''); @@ -253,7 +262,7 @@ const disabled = ref(false); const treeNodeAdd = ref(false); const operationTree = ref('新增'); - const showOperation = ref(false); + // const showOperation = ref(false); const opMap: any = ref({ type: 'add', @@ -442,8 +451,15 @@ editTreeNode.value.type = 'update'; addTreeNode.value = data.emissionName; }; + const moveNode = (data, type: opType) => { + const flag = type === 'up'; + http.post(carbonEmissionFactorLibrary.move, { ...data, isUp: flag }).then(() => { + getOrgTree(); + NsMessage.success('操作成功'); + }); + }; // 删除树节点 - const deleteTreeNode = () => { + const deleteTreeNode = (data) => { Modal.confirm({ title: '警告', icon: createVNode(ExclamationCircleOutlined), @@ -452,10 +468,12 @@ okType: 'primary', cancelText: '取消', onOk() { - http.post(carbonEmissionFactorLibrary.delTreeNode, editTreeNode.value).then(() => { - getOrgTree(); - NsMessage.success('操作成功'); - }); + http + .post(carbonEmissionFactorLibrary.delTreeNode, { orgId: orgId.value, id: data.id }) + .then(() => { + getOrgTree(); + NsMessage.success('操作成功'); + }); }, onCancel() { console.log('Cancel'); @@ -511,7 +529,7 @@ const editTreeNode = ref({}); const onSelect = (selectedKeys: string[], info: any) => { if (info.selected) { - showOperation.value = true; + // showOperation.value = true; editTreeNode.value = { id: info.selectedNodes[0].id, level: info.selectedNodes[0].level, @@ -519,6 +537,8 @@ sortNumber: info.selectedNodes[0].sortNumber, parentEmissionId: info.selectedNodes[0].parentEmissionId, }; + } else { + editTreeNode.value = {}; } }; @@ -573,6 +593,15 @@ opMap.value.fuc && opMap.value.fuc({ ...formData.value }); }); }; + const doWnload = (url: any) => { + const a = document.createElement('a'); + document.body.appendChild(a); + a.href = encodeURI(url); + //设置下载的文件名 + // a.download = fileName.value; + //触发a标签的点击事件,进行下载 + a.click(); + }; const tableConfig = ref({ title: '数据库', api: carbonEmissionFactorLibrary.getTableList, @@ -609,13 +638,29 @@ { label: '导入', type: 'primary', - name: 'userImport', - handle: () => {}, + name: 'carbonEmissionFactorLibraryImport', + extra: { + api: carbonEmissionFactorLibrary.excel, // 导入接口名 + params: { + orgId, + }, + title: '设备信息', // 弹窗title + templateName: 'whiteListUser', // 所使用的文件名称 + indexName: '设备id', // 匹配类型字段 + message: [ + { label: '1、若必填项未填写,则不能进行导入操作' }, + { label: `2、当重复时,则更新数据。` }, + { label: '3、数据将从模版的第五行进行导入。' }, + { label: '4、文件导入勿超过5MB。' }, + ], + }, }, { label: '导出', type: 'primary', - name: 'userExports', + handle: () => { + doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx'); + }, }, { label: '批量删除', @@ -687,6 +732,7 @@ { title: '参考文献', dataIndex: 'bibliography', + ellipsis: true, }, { title: '引用数量', @@ -917,7 +963,7 @@ } else { canSelect.value = false; } - fetch(carbonEmissionFactorLibrary.findOutermost).then((res) => { + fetch(carbonEmissionFactorLibrary.findOutermost, { grp: 'MEASUREMENT_UNIT' }).then((res) => { groupData.value = res.data; }); addUnitTitle.value = '新增单位'; @@ -992,10 +1038,18 @@ onOk() { fetch(carbonEmissionFactorLibrary.delDictionary, formState.value).then((res) => { message.success('操作成功!'); + formState.value = { + grp: 'MEASUREMENT_UNIT', + grpDesc: '计量单位', + }; getUnitTree(); }); }, onCancel() { + formState.value = { + grp: 'MEASUREMENT_UNIT', + grpDesc: '计量单位', + }; console.log('Cancel'); }, }); diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue index 210669c..3b2bc53 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue @@ -27,7 +27,11 @@ --> - + - - + + + + + + + + + 下载 + + + + + + 取消 + 确定 + + \ No newline at end of file + diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue index f49bd40..a39353a 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue @@ -102,7 +102,7 @@ - + @@ -281,7 +281,7 @@ type: 'primary', handle: () => { visible.value = true; - getNewTable(); + // getNewTable(); }, }, ], @@ -384,7 +384,7 @@ // 点击新增按钮 const addNewData = () => { visible.value = true; - getNewTable(); + // getNewTable(); }; // 获取新增页面的列表 const selectedRowKeys = ref([]); @@ -404,6 +404,11 @@ newTableData.value = res.data.records; }); }; + const selectData = ref(); + const keyChange = () => { + queryData.value.emissionSources = selectData.value; + getNewTable(); + }; // 点击编辑按钮 const editData = (record) => { selectedRowKeys.value = [record.factorId]; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts index f396774..3574b58 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts @@ -8,13 +8,14 @@ export const voucherColumns = [ }, { title: '日期', - dataIndex: 'age', - key: 'age', + dataIndex: 'updateTime', + key: 'updateTime', + ellipsis: true, }, { title: '文件名称', - dataIndex: 'address', - key: 'address 1', + dataIndex: 'fileName', + key: 'fileName', ellipsis: true, }, ]; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue index 151d401..c85cfb3 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue @@ -275,6 +275,7 @@ @@ -290,6 +291,7 @@ @@ -320,8 +322,9 @@ @@ -353,6 +356,7 @@ energyConsumption, carbonEmissionFactorLibrary, carbonInventoryCheck, + uploadPic, } from '/@/api/carbonEmissionFactorLibrary'; import { group } from '/@/api/deviceManage'; import { debug, log } from 'node:console'; @@ -844,6 +848,9 @@ // 点击凭证弹出框 const openVoucher = ref(false); const downLoadVoucher = () => { + fetch(carbonInventoryCheck.voucherDownloadList, { bizType: 2 }).then((res) => { + voucherData.value = res.data; + }); openVoucher.value = true; }; const selectedRowKeys = ref([]); @@ -851,29 +858,7 @@ selectedRowKeys.value = selectedKeys; }; - const voucherData = [ - { - key: '1', - name: 'John Brown', - age: 32, - address: 'New York No. 1 Lake Park, New York No. 1 Lake Park', - tags: ['nice', 'developer'], - }, - { - key: '2', - name: 'Jim Green', - age: 42, - address: 'London No. 2 Lake Park, London No. 2 Lake Park', - tags: ['loser'], - }, - { - key: '3', - name: 'Joe Black', - age: 32, - address: 'Sidney No. 1 Lake Park, Sidney No. 1 Lake Park', - tags: ['cool', 'teacher'], - }, - ]; + const voucherData = ref([]); const onCloseVoucher = () => { openVoucher.value = false; }; @@ -909,6 +894,15 @@ editFormState.value.collectionNode = record.carbonSource; editFormState.value.factorId = record.factorId; selectedRowKeysEdit.value = [record.factorId]; + fetch(uploadPic.select, { bizId: record.id, bizType: 2 }).then((res) => { + fileList.value = res.data.map((item) => ({ + uid: item.id.toString(), // 使用文件的id作为唯一标识 + name: item.fileName, // 文件名 + status: 'done', // 设置默认状态为已完成 + type: 'done', + url: item.filePath, // 文件的URL,这里假设用示例的URL格式 + })); + }); editData.value = true; }; const getNewTable = () => { @@ -917,6 +911,10 @@ total.value = res.data.total; }); }; + const searchKey = () => { + queryData.value.emissionSources = editFormState.value.emissionFactors; + getNewTable(); + }; // 数据来源选择框改变 const canEdit = ref(false); const automatic = ref(false); @@ -946,23 +944,37 @@ }, ); }; + const selectNode = (value) => { + debugger; + }; // 上传附件 + const fileList = ref([]); + const beforeUpload: UploadProps['beforeUpload'] = (file) => { + return false; + }; const handleChange = (info: UploadChangeParam) => { + fileList.value = [...info.fileList]; if (info.file.status !== 'uploading') { console.log(info.file, info.fileList); } if (info.file.status === 'done') { - message.success(`${info.file.name} file uploaded successfully`); + message.success(`${info.file.name} 文件上传成功`); } else if (info.file.status === 'error') { - message.error(`${info.file.name} file upload failed.`); + message.error(`${info.file.name} 文件上传失败`); } }; - - const fileList = ref([]); - const headers = { - authorization: 'authorization-text', + const delIds = ref([]); + const handleFileRemove = (file) => { + delIds.value.push(file.uid); + const newFileList = []; + fileList.value.forEach((item) => { + if (item.uid !== file.uid) { + newFileList.push(item); + } + }); + fileList.value = newFileList; }; - // 编辑数据提交 + // 数据提交; const submitEditData = () => { editFormRef.value .validate() @@ -978,8 +990,33 @@ editFormState.value.collectionNode = editFormState.value.collectionNode.value; } fetch(carbonInventoryCheck.updateTable, editFormState.value).then((res) => { - editData.value = false; - getPFYTableList(getTableId.value); + if (fileList.value.length !== 0) { + const formData = ref(new FormData()); + fileList.value.forEach((file) => { + if (file.type !== 'done') { + formData.value.append('files', file.originFileObj); + } + }); + formData.value.append('bizType', 2); + formData.value.append('bizId', editFormState.value.id); + delIds.value.forEach((item) => { + formData.value.append('deleteList', item); + }); + fetch(uploadPic.uploadfiles, formData.value) + .then((res) => { + message.success('操作成功!'); + editData.value = false; + delIds.value = []; + getPFYTableList(getTableId.value); + }) + .catch((error) => { + console.log('error', error); + }); + } else { + editData.value = false; + delIds.value = []; + getPFYTableList(getTableId.value); + } }); }) .catch((error) => { @@ -988,6 +1025,7 @@ }; const onCloseEditData = () => { editData.value = false; + delIds.value = []; editFormState.value = { orgId: orgId.value, }; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue index ef39680..a8e3dd6 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue @@ -5,7 +5,12 @@ - + 年度 月度 @@ -81,7 +86,9 @@ return year === Number(formState.value.reportYear) ? false : true; } }; - const selectChange = (value) => {}; + const selectChange = (value) => { + formState.value.reportScope = ''; + }; // 定义form表单的必填 const rules: Record = { reportName: [{ required: true, message: '请输入报告名称', trigger: 'change' }], diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue index 234403e..05e7b7c 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue @@ -74,9 +74,7 @@ - - 批量设置 - + 批量设置 基准值设置 @@ -137,20 +135,13 @@ :columns="drawerColumns" :data-source="newTableData" bordered - rowKey="id" + :rowKey="(record, index) => index" :rowSelection="{ selectedRowKeys: selectedRowKeysSet, onChange: onSelectionChangeSet, type: 'radio', }" :pagination="false"> - - - - 设为基准值 - - - 取消 @@ -206,9 +197,11 @@ itemizeId: props.parentId, type: props.type, }); + const ids = ref([]); const getTableData = () => { fetch(carbonPlanning.detailedStatisticalDataTable, queryParams.value).then((res) => { data.value = res.data; + ids.value = data.value.map((item) => item.id); }); }; getTableData(); @@ -261,7 +254,7 @@ const wrapperCol = { span: 18 }; const editData = (record) => { open.value = true; - if (record) { + if (record.isLastYear) { formState.value.ids = [record.id]; if (record.lastYear === '是') { formState.value.isLastYear = 1; @@ -285,6 +278,9 @@ .validate() .then(() => { console.log('values', formState, toRaw(formState)); + if (formState.value.ids[0] === undefined) { + formState.value.ids = ids.value; + } fetch(carbonPlanning.batchOrUpdate, formState.value).then((res) => { open.value = false; formState.value = {}; @@ -301,27 +297,38 @@ }; const visible = ref(false); const selectedRowKeysSet = ref([]); + const referenceQuery = ref(); const onSelectionChangeSet = (selectedKeys, selectedRows) => { selectedRowKeysSet.value = selectedKeys; + referenceQuery.value = selectedRows[0].referenceValue; }; const drawerColumns = [ { title: '年份', - dataIndex: 'emissionSources', + dataIndex: 'year', }, { title: '用电量', - dataIndex: 'emissionFactors', - }, - { - title: '操作', - key: 'action', + dataIndex: 'referenceValue', }, ]; const newTableData = ref([]); const setBasicData = () => { + fetch(carbonPlanning.benchmarkSetting, { orgId: orgId.value }).then((res) => { + newTableData.value = res.data; + }); visible.value = true; }; + const onSubmit = () => { + fetch(carbonPlanning.benchmarkSubmit, { + ids: ids.value, + referenceValue: referenceQuery.value, + }).then((res) => { + visible.value = false; + selectedRowKeysSet.value = []; + getTableData(); + }); + }; const onClose = () => { visible.value = false; }; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue index efa4496..6d2d2d1 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue @@ -48,7 +48,12 @@ - + @@ -159,7 +164,7 @@ }; const getMonthPillarData = () => { fetch(carbonPlanning.electricityUsageBackThen, getPillarQuery.value).then((res) => { - xAxisData.value = res.data.year; + xAxisData.value = res.data.yearMonth; referenceValue.value = res.data.referenceValue; budget.value = res.data.budget; actualUsage.value = res.data.actualUsage; @@ -286,6 +291,7 @@ type: props.tabId, year: selectYearValue.value.format('YYYY'), yearAndMonth: 'year', + yearMonth: selectMonthValue.value.format('YYYY-DD'), }); const ballValue = ref(); const getBallData = () => { @@ -447,7 +453,7 @@ fetch(carbonPlanning.searchListByYear, yearQueryParams.value).then((res) => { data.value = res.data; res.data.forEach((item) => { - treeCheckedKeys.value.push((item.itemizeId).toString()); + treeCheckedKeys.value.push(item.itemizeId.toString()); }); }); }; @@ -460,7 +466,9 @@ }); const changeMonth = () => { monthQueryParams.value.yearMonth = selectMonthValue.value; + getBallQuery.value.yearMonth = selectMonthValue.value; getMonthData(); + getBallData(); }; const getMonthData = () => { fetch(carbonPlanning.searchListByMonth, monthQueryParams.value).then((res) => { diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/dialogStyle.less b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/dialogStyle.less index 3d550c5..40319ec 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/dialogStyle.less +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/dialogStyle.less @@ -39,7 +39,6 @@ .journal { padding: 1% 3%; width: 100%; - height: 150px; background-color: rgba(0, 0, 0); border-radius: 12px; border: 2px solid transparent; diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less index ae84fcd..396321e 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.less @@ -16,26 +16,30 @@ perspective-origin: 850px -160px; // 左上角区域切换功能 .btn-box { - width: 120px; + width: 100px; position: sticky; - top: 10px; - left: 10px; + top: 15px; + margin-left: 10px; display: flex; flex-direction: column; gap: 8px; .btn-item { cursor: pointer; width: 100%; - height: 40px; + height: 35px; border-radius: 4px; - background: rgba(39, 120, 255, 1); + // background: rgba(39, 120, 255, 1); + background: rgb(7, 72, 116); border: 1px solid rgba(51, 199, 255, 1); box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3); - font-size: 18px; + font-size: 16px; color: white; } + .btnActive { + background: rgba(39, 120, 255, 1); + } .btn-item:hover { - color: black; + color: white; } } // 大区分区 @@ -128,7 +132,10 @@ justify-content: center; align-items: center; cursor: pointer; - } + } +} +.drawer-item { + position: relative; // 抽屉关闭按钮 .drawer-box-out { width: 30px; @@ -145,5 +152,4 @@ align-items: center; cursor: pointer; } - } diff --git a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue index 449e1d7..d7ddabc 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/index.vue @@ -7,7 +7,7 @@ v-for="(item, index) in floorData" :key="index" class="btn-item" - :style="{ color: item.dataCode == thisFloor ? 'black' : 'white' }" + :class="{ btnActive: item.dataCode == thisFloor }" @click="changeFloor(item.childList, item.dataCode)" >{{ item.name }} @@ -36,14 +36,6 @@ :visible="item.visible" /> - - - - - - - - + + + + - - - - - - 空调区域 - - - - - - {{ button.name }} - - - 展开 - - - - - {{ button.name }} - - - 回缩 - - - + + + + + 空调区域 - - - - - 空调分组 - + + + + + {{ button.name }} + + + 展开 + + + + + {{ button.name }} + + + 回缩 + + + + + + + + + 空调分组 + + {{ isPlanEnabled2 ? '启用开关' : '禁用开关' }} - - 全选 - - {{ singleSelection ? '多选' : '单选' }} - - - - - - - - {{ button.name }} - - - 展开 - - - - - - {{ button.name }} - - - 回缩 - - + + + 全选 + + {{ singleSelection ? '多选' : '单选' }} + - - - - - 控制模式 - - - + + - {{ button3.name }} + :class="{ btn: true, selected: button.selected }" + class="zmhlbtn" + @click="changeLine(button)"> + + + + {{ button.name }} - - - - - - - 启动模式 - 多选模式下会修改当前选中的所有回路 - - - + + 展开 + + + - {{ button4.name }} + :class="{ btn: true, selected: button.selected }" + class="zmhlbtn" + @click="changeLine(button)"> + + + + {{ button.name }} - + + 回缩 + + - - - - - 刷新 - - - - - 执行 - + + + + + + 控制模式 + + + + + {{ button3.name }} + + + + + + + + 启动模式 + 多选模式下会修改当前选中的所有回路 + + + + {{ button4.name }} + + + + + + + + 刷新 + + + 执行 + - - - - - - 变更内容 - - - - - - - {{ item.regionName + ' > ' + item.deviceGroupName }} + + + + + + 变更内容 + + + + + + + {{ item.regionName + ' > ' + item.deviceGroupName }} + + + 撤销 + + + + + 控制模式 + + 手动 + + 自动 - - 撤销 - - - - 控制模式 - - 手动 - - 自动 - + + 亮度 + + + {{ + item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--' + }} + + {{ + item?.stateAfter?.brightness != undefined ? item.stateAfter.brightness : '--' + }} - - 亮度 - - - {{ - item?.stateBefore?.brightness != undefined ? item.stateBefore.brightness : '--' - }} - - {{ - item?.stateAfter?.brightness != undefined ? item.stateAfter.brightness : '--' - }} - + + + 控制场景 + + {{ + item?.stateBefore?.scene?.label ? item.stateBefore.scene.label : '--' + }} + + {{ + item?.stateAfter?.scene?.label ? item.stateAfter.scene.label : '--' + }} - - 控制场景 - - {{ - item?.stateBefore?.scene?.label ? item.stateBefore.scene.label : '--' - }} - - {{ - item?.stateAfter?.scene?.label ? item.stateAfter.scene.label : '--' - }} - + + + 色温 + + {{ + item?.stateBefore?.color != undefined ? item.stateBefore.color : '--' + }} + + + {{ item?.stateAfter?.color != undefined ? item.stateAfter.color : '--' }} + - - 色温 - - {{ - item?.stateBefore?.color != undefined ? item.stateBefore.color : '--' - }} - - - {{ item?.stateAfter?.color != undefined ? item.stateAfter.color : '--' }} - - + + + 启用状态 + + {{ + item?.stateBefore?.lockStatus != undefined + ? item.stateBefore.lockStatus + ? '禁用' + : '启用' + : '--' + }} + + + {{ + item?.stateAfter?.lockStatus != undefined + ? item.stateAfter.lockStatus + ? '禁用' + : '启用' + : '--' + }} + - - - 取消 - - 执行 - - - + + + 取消 + + 执行 + + +