fks-yangshouda 4 weeks ago
parent
commit
6ef4c99920
  1. BIN
      hx-ai-intelligent/public/asset/file/carbonAssets.xlsx
  2. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/fault.png
  3. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/fault1.png
  4. BIN
      hx-ai-intelligent/public/asset/image/bulbLogo/repair.png
  5. 7
      hx-ai-intelligent/src/App.vue
  6. 2
      hx-ai-intelligent/src/api/airConditioningSystem.ts
  7. 322
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue
  8. 181
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index1.vue
  9. 8
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts
  10. 24
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
  11. 7
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts
  12. 18
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
  13. 5
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue
  14. 1
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts
  15. 78
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
  16. 30
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
  17. 17
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue
  18. 33
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue
  19. 108
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue
  20. 57
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/device.vue
  21. 71
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue
  22. 14
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue
  23. 50
      hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue
  24. 4
      hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/floorHeatingModel.vue
  25. 83
      hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/devicePosition.ts
  26. 23
      hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/index.vue
  27. 56
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
  28. 84
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue
  29. 37
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/lightPosition.ts
  30. 78
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue
  31. 14
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue
  32. 49
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs3.vue
  33. 4
      hx-ai-intelligent/src/view/equipmentControl/style/dialogStyle.less
  34. 71
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue
  35. 46
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanLog.vue
  36. 14
      hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanPlant.vue
  37. 14
      lib/component/form/input/input.vue

BIN
hx-ai-intelligent/public/asset/file/carbonAssets.xlsx

Binary file not shown.

BIN
hx-ai-intelligent/public/asset/image/bulbLogo/fault.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
hx-ai-intelligent/public/asset/image/bulbLogo/fault1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
hx-ai-intelligent/public/asset/image/bulbLogo/repair.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

7
hx-ai-intelligent/src/App.vue

@ -1,6 +1,8 @@
<template>
<a-config-provider :locale="locale">
<router-view />
<a-spin :spinning="state.isLoading" size="large">
<router-view />
</a-spin>
</a-config-provider>
</template>
@ -10,6 +12,7 @@
import { useRouter } from 'vue-router';
import Cookies from 'js-cookie';
import { message } from 'ant-design-vue';
import { items } from '/@/store/item';
export default defineComponent({
name: 'App',
@ -37,6 +40,8 @@
return {
cachedViews,
locale: zhCN,
//
state: items(),
};
},
});

2
hx-ai-intelligent/src/api/airConditioningSystem.ts

@ -3,5 +3,5 @@ import { BASE_URL } from './index';
export enum airConditioningSystemApi {
getVentHostCtrlList = `${BASE_URL}/api/ventHostCtrl/getDeviceState`, // 查询新风主机最新状态
getAcBoxCtrlList = `${BASE_URL}/api/acBoxCtrl/getDeviceState`, // 查询空调箱最新状态
getTempSysCtrlList = `${BASE_URL}/tempSysCtrl/getFloorHeatingState`, // 查询地暖最新状态
getTempSysCtrlList = `${BASE_URL}/api/tempSysCtrl/getFloorHeatingState`, // 查询地暖最新状态
}

322
hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index.vue

@ -48,68 +48,27 @@
</div>
<div style="display: flex; margin-top: 20px; height: calc(84% - 20px)">
<div class="detailTable">
<div class="ns-form-title">
<div class="title">交易明细</div>
<div class="operation" style="display: flex">
<a-button type="primary" @click="addDetail">新增</a-button>
<a-upload
v-model:file-list="importFileList"
name="file"
accept=".xlsx"
:showUploadList="false"
:custom-request="importFile">
<a-button type="primary" style="margin-left: 6px">导入</a-button>
</a-upload>
<a-button type="primary" style="margin-left: 6px" @click="exportFile">导出</a-button>
<a-button
type="primary"
style="margin-left: 6px"
:disabled="selectedRowKeys.length === 0"
@click="deleteMore"
>批量删除</a-button
>
</div>
</div>
<a-table
:columns="columns"
:data-source="data"
rowKey="id"
@change="onChange"
:rowSelection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectionChange,
}"
:scroll="{ x: 1500, y: 400 }"
:pagination="false">
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" :scroll="{ x: 2000 }">
<template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex === 'accountType'">
<span v-if="record.accountType">{{ record.accountType.label }}</span>
</template>
<template v-if="column.key === 'action'">
<span>
<a @click="editData(record)">编辑</a>
<a-divider type="vertical" />
<a @click="delData(record)">删除</a>
</span>
</template>
</template>
</a-table>
<a-pagination
:current="queryParams.pageNum"
:total="total"
:page-size="queryParams.pageSize"
style="display: flex; justify-content: center; margin-top: 16px"
:show-size-changer="true"
:show-quick-jumper="true"
@change="onChange" />
</ns-view-list-table>
</div>
<div class="total">
<div class="ns-form-title">
<div class="title">配额统计</div>
<div class="operation" style="display: flex; justify-content: space-around; width: 63%">
<a-button type="primary" @click="getTotalTable(1)">全国配额</a-button>
<a-button type="primary" @click="getTotalTable(2)">地方配额</a-button>
<a-button type="primary" @click="getTotalTable(3)">CCER配额</a-button>
<div class="operation" style="display: flex; justify-content: flex-end; width: 63%">
<a-button type="primary" v-if="parentId === 1" @click="getTotalTable(1)"
>全国配额</a-button
>
<a-button type="primary" v-if="parentId === 2" @click="getTotalTable(2)"
>地方配额</a-button
>
<a-button type="primary" v-if="parentId === 3" @click="getTotalTable(3)"
>CCER配额</a-button
>
</div>
</div>
<a-table :columns="totalColumns" :data-source="totalData" bordered :pagination="false">
@ -155,13 +114,25 @@
<a-date-picker v-model:value="formState.transactionDate" valueFormat="YYYY-MM-DD" />
</a-form-item>
<a-form-item ref="name" label="交易数量" name="transactionQuantity">
<a-input v-model:value="formState.transactionQuantity" placeholder="请输入交易数量" />
<a-input-number
v-model:value="formState.transactionQuantity"
:maxlength="11"
@keydown="handleKeyDown"
placeholder="请输入交易数量" />
</a-form-item>
<a-form-item ref="name" label="发生金额" name="amountIncurred">
<a-input v-model:value="formState.amountIncurred" placeholder="请输入发生金额" />
<a-input-number
v-model:value="formState.amountIncurred"
:maxlength="16"
@keydown="handleKeyDown"
placeholder="请输入发生金额" />
</a-form-item>
<a-form-item ref="name" label="交易对象" name="tradingPartner">
<a-input v-model:value="formState.tradingPartner" placeholder="请输入交易对象" />
<a-input
v-model:value="formState.tradingPartner"
:maxlength="20"
@keydown="handleKeyDown"
placeholder="请输入交易对象" />
</a-form-item>
<a-form-item ref="name" label="交易凭证">
<a-upload
@ -221,16 +192,20 @@
selectedRowKeys.value = selectedKeys;
};
const total = ref<number>();
const thisYear = ref(new Date().getFullYear().toString());
const year = ref(new Date().getFullYear().toString());
const queryParams = ref({
pageNum: 1,
pageSize: 10,
orgId: orgId.value,
accountType: props.parentId,
year: thisYear.value,
year: year.value,
});
const searchTableList = () => {
getDetailList();
year.value = queryParams.value.year;
transactionType.value = queryParams.value.transactionType;
accountType.value = queryParams.value.accountType;
mainRef.value?.nsTableRef.reload();
// getDetailList();
};
//
const getDetailList = () => {
@ -239,10 +214,11 @@
total.value = res.data.total;
});
};
getDetailList();
// getDetailList();
const columns = [
{
title: '序号',
width: 80,
customRender: (text: any) => {
return text.index + 1;
},
@ -298,9 +274,14 @@
pageNum: 1,
pageSize: 10,
orgId: orgId.value,
year: new Date().getFullYear(),
accountType: props.parentId,
year: new Date().getFullYear().toString(),
};
getDetailList();
accountType.value = props.parentId;
year.value = new Date().getFullYear();
transactionType.value = '';
mainRef.value?.nsTableRef.reload();
// getDetailList();
};
const editData = (record) => {
getDictList();
@ -378,6 +359,196 @@
},
});
};
const mainRef = ref();
const transactionType = ref();
const accountType = ref();
accountType.value = props.parentId;
const tableConfig = ref({
title: '数据库',
api: carbonAssets.carbonDetailsList,
params: {
orgId,
accountType,
year,
},
headerActions: [
{
label: '新增',
name: 'userAdd',
type: 'primary',
handle: () => {
text.value = '新增';
visible.value = true;
getDictList();
},
},
{
label: '导入',
type: 'primary',
name: 'carbonAssetsImport',
extra: {
api: carbonAssets.import, //
params: {
orgId,
},
title: '碳资产', // title
templateName: 'carbonAssets', // 使
indexName: '碳资产', //
message: [
{ label: '1、若必填项未填写,则不能进行导入操作' },
{ label: `2、当重复时,则更新数据。` },
{ label: '3、数据将从模版的第五行进行导入。' },
{ label: '4、文件导入勿超过5MB。' },
],
},
},
{
label: '导出',
type: 'primary',
handle: () => {
const exportQuery = ref({
orgId: orgId.value,
pageNum: 1,
pageSize: 999,
year: queryParams.value.year,
ids: selectedRowKeys.value,
});
const config = {
responseType: 'blob',
};
fetch(carbonAssets.export, exportQuery.value, config)
.then((res) => {
// URL blob
const url = window.URL.createObjectURL(new Blob([res]));
// <a>
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'carbonTradeDetails.xlsx'); //
document.body.appendChild(link);
link.click();
// URL
window.URL.revokeObjectURL(url);
selectedRowKeys.value = [];
})
.catch((error) => {
console.error('下载失败:', error);
});
},
},
{
label: '批量删除',
type: 'primary',
name: 'userBatchDel',
dynamicDisabled: (data: any) => {
return data.list.length === 0;
},
confirm: true,
isReload: true,
isClearCheck: true,
api: carbonAssets.delete,
dynamicParams: { ids: 'id[]' },
},
],
columns: [
{
title: '序号',
width: 80,
customRender: (text: any) => {
return text.index + 1;
},
},
{
title: '资产类别',
dataIndex: 'accountType',
},
{
title: '交易方式',
dataIndex: 'transactionTypeName',
},
{
title: '交易日期',
dataIndex: 'transactionDate',
sorter: (a, b) => a.transactionDate - b.transactionDate,
},
{
title: '本期收入(tCO2)',
dataIndex: 'income',
sorter: (a, b) => a.income - b.income,
},
{
title: '本期支出(tCO2)',
dataIndex: 'expenditure',
sorter: (a, b) => a.expenditure - b.expenditure,
},
{
title: '发生金额(¥)',
dataIndex: 'amountIncurredValue',
},
{
title: '交易对象',
dataIndex: 'tradingPartner',
},
{
title: '更新人',
dataIndex: 'updateUser',
},
{
title: '更新时间',
dataIndex: 'updateTime',
},
],
columnActions: {
title: '操作',
actions: [
{
label: '编辑',
name: 'userEdit',
handle: (record: any) => {
getDictList();
text.value = '编辑';
visible.value = true;
formState.value.id = record.id;
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, // URLURL
}));
});
formState.value = JSON.parse(JSON.stringify(record));
if (formState.value.expenditure === 0) {
formState.value.transactionQuantity = formState.value.income;
} else {
formState.value.transactionQuantity = formState.value.expenditure;
}
setTimeout(() => {
let selectDevice = ref([Number(formState.value.transactionType)]);
findParentIds(options.value, formState.value.transactionType, selectDevice.value);
formState.value.transactionType = selectDevice;
formState.value.transactionType = formState.value.transactionType;
}, 500);
},
},
{
label: '删除',
name: 'userDelete',
dynamicParams: { ids: 'id[]' },
confirm: true,
isReload: true,
api: carbonAssets.delete,
},
],
},
formConfig: {
schemas: [],
params: {},
},
rowKey: 'id',
});
//
const onChange = (pageNumber: number, size: number) => {
queryParams.value.pageNum = pageNumber;
@ -492,6 +663,12 @@
});
fileList.value = newFileList;
};
const handleKeyDown = (event: KeyboardEvent) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
const onSubmit = () => {
formRef.value
.validate()
@ -625,7 +802,7 @@
height: 16%;
}
.detailTable {
width: 65%;
width: 70%;
margin-right: 20px;
height: 100%;
background: white;
@ -633,10 +810,27 @@
padding: 16px;
}
.total {
width: calc(35% - 20px);
width: calc(30% - 20px);
height: 100%;
background: white;
border-radius: 12px;
padding: 16px;
}
:deep(.ns-table-search) {
display: none;
}
:deep(.ns-table-header) {
padding-top: unset !important;
align-items: unset !important;
padding-bottom: 10px;
height: unset !important;
}
:deep(.ns-basic-table) {
padding-top: unset !important;
}
:deep(.ns-table-main) {
padding: unset !important;
margin: unset !important;
border-radius: unset !important;
}
</style>

181
hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/indexCopy.vue → hx-ai-intelligent/src/view/carbonEmissionManage/carbonAssets/carbonAssetsDetail/index1.vue

@ -48,8 +48,60 @@
</div>
<div style="display: flex; margin-top: 20px; height: calc(84% - 20px)">
<div class="detailTable">
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" :scroll="{ x: 2000 }">
</ns-view-list-table>
<div class="ns-form-title">
<div class="title">交易明细</div>
<div class="operation" style="display: flex">
<a-button type="primary" @click="addDetail">新增</a-button>
<a-upload
v-model:file-list="importFileList"
name="file"
accept=".xlsx"
:showUploadList="false"
:custom-request="importFile">
<a-button type="primary" style="margin-left: 6px">导入</a-button>
</a-upload>
<a-button type="primary" style="margin-left: 6px" @click="exportFile">导出</a-button>
<a-button
type="primary"
style="margin-left: 6px"
:disabled="selectedRowKeys.length === 0"
@click="deleteMore"
>批量删除</a-button
>
</div>
</div>
<a-table
:columns="columns"
:data-source="data"
rowKey="id"
@change="onChange"
:rowSelection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectionChange,
}"
:scroll="{ x: 1500, y: 400 }"
:pagination="false">
<template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex === 'accountType'">
<span v-if="record.accountType">{{ record.accountType.label }}</span>
</template>
<template v-if="column.key === 'action'">
<span>
<a @click="editData(record)">编辑</a>
<a-divider type="vertical" />
<a @click="delData(record)">删除</a>
</span>
</template>
</template>
</a-table>
<a-pagination
:current="queryParams.pageNum"
:total="total"
:page-size="queryParams.pageSize"
style="display: flex; justify-content: center; margin-top: 16px"
:show-size-changer="true"
:show-quick-jumper="true"
@change="onChange" />
</div>
<div class="total">
<div class="ns-form-title">
@ -187,7 +239,7 @@
total.value = res.data.total;
});
};
// getDetailList();
getDetailList();
const columns = [
{
title: '序号',
@ -326,129 +378,6 @@
},
});
};
const mainRef = ref();
const tableConfig = ref({
title: '数据库',
api: carbonAssets.carbonDetailsList,
params: {
orgId,
},
headerActions: [
{
label: '新增',
name: 'userAdd',
type: 'primary',
handle: () => {
},
},
{
label: '导入',
type: 'primary',
name: 'carbonEmissionFactorLibraryImport',
extra: {
api: carbonEmissionFactorLibrary.import, //
params: {
orgId,
},
title: '排放源', // title
templateName: 'emissionSource', // 使
indexName: '设备id', //
message: [
{ label: '1、若必填项未填写,则不能进行导入操作' },
{ label: `2、当重复时,则更新数据。` },
{ label: '3、数据将从模版的第五行进行导入。' },
{ label: '4、文件导入勿超过5MB。' },
],
},
},
{
label: '导出',
type: 'primary',
handle: () => {
},
},
{
label: '批量删除',
type: 'primary',
name: 'userBatchDel',
dynamicDisabled: (data: any) => {
return data.list.length === 0;
},
confirm: true,
isReload: true,
isClearCheck: true,
api: carbonEmissionFactorLibrary.del,
dynamicParams: { ids: 'id[]' },
},
],
columns: [
{
title: '序号',
customRender: (text: any) => {
return text.index + 1;
},
},
{
title: '资产类别',
dataIndex: 'accountType',
},
{
title: '交易方式',
dataIndex: 'transactionTypeName',
},
{
title: '交易日期',
dataIndex: 'transactionDate',
sorter: (a, b) => a.transactionDate - b.transactionDate,
},
{
title: '本期收入(tCO2)',
dataIndex: 'income',
sorter: (a, b) => a.income - b.income,
},
{
title: '本期支出(tCO2)',
dataIndex: 'expenditure',
sorter: (a, b) => a.expenditure - b.expenditure,
},
{
title: '发生金额(¥)',
dataIndex: 'amountIncurredValue',
},
{
title: '交易对象',
dataIndex: 'tradingPartner',
},
{
title: '更新人',
dataIndex: 'updateUser',
},
{
title: '更新时间',
dataIndex: 'updateTime',
},
],
columnActions: {
title: '操作',
actions: [
{
label: '编辑',
name: 'userEdit',
handle: (record: any) => {},
},
{
label: '删除',
name: 'userDelete',
dynamicParams: { ids: 'id[]' },
confirm: true,
isReload: true,
api: carbonEmissionFactorLibrary.del,
},
],
},
rowKey: 'id',
});
//
const onChange = (pageNumber: number, size: number) => {
queryParams.value.pageNum = pageNumber;

8
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts

@ -15,7 +15,7 @@ export const formConfig = (disabled) => {
component: 'NsInput',
componentProps: {
placeholder: '请输入排放源',
maxLength: 20,
maxLength: 5,
},
rules: [
{
@ -92,7 +92,7 @@ export const formConfig = (disabled) => {
component: 'NsInput',
componentProps: {
placeholder: '请输入排放环节',
maxLength: 20,
maxLength: 5,
},
rules: [
{
@ -107,7 +107,7 @@ export const formConfig = (disabled) => {
component: 'NsInputNumber',
componentProps: {
placeholder: '请输入排放因子值',
maxLength: 20,
maxLength: 5,
},
rules: [
{
@ -154,7 +154,7 @@ export const formConfig = (disabled) => {
component: 'NsInput',
componentProps: {
placeholder: '请输入碳排后缀',
maxLength: 20,
maxLength: 10,
},
rules: [
{

24
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue

@ -27,6 +27,7 @@
:tree-data="gData"
:checkedKeys="checkedTreeNodeKeys"
:selectedKeys="selectedKeys"
:show-line="{ showLeafIcon: false }"
@dragenter="onDragEnter"
@drop="onDrop"
@check="checkTreeNode"
@ -164,6 +165,7 @@
:expanded-keys="unitExpandedKeys"
:selectedKeys="unitSelectedKeys"
:tree-data="unitTreeData"
:show-line="{ showLeafIcon: false }"
v-if="unitTreeData && unitTreeData.length > 0"
class="draggable-tree"
block-node>
@ -198,7 +200,11 @@
</template>
<a-form ref="unitFormRef" :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="分组名称" name="cnValue" :required="true">
<a-input v-model:value="formState.cnValue" placeholder="请输入分组名称" />
<a-input
v-model:value="formState.cnValue"
:maxlength="20"
@keydown="handleKeyDown"
placeholder="请输入分组名称" />
</a-form-item>
</a-form>
</ns-modal>
@ -211,7 +217,11 @@
</template>
<a-form ref="unitFormRef" :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="单位名称" name="cnValue" :required="true">
<a-input v-model:value="formState.cnValue" placeholder="请输入单位名称" />
<a-input
v-model:value="formState.cnValue"
:maxlength="20"
@keydown="handleKeyDown"
placeholder="请输入单位名称" />
</a-form-item>
<a-form-item label="选择分组" name="parentId" :required="true">
<a-select
@ -866,7 +876,7 @@
component: 'NsInput',
componentProps: {
placeholder: '请输入排放源',
maxLength: 30,
maxLength: 20,
},
},
{
@ -930,7 +940,7 @@
component: 'NsInput',
componentProps: {
placeholder: '请输入文献关键字',
maxLength: 30,
maxLength: 20,
},
},
],
@ -1040,6 +1050,12 @@
grpDesc: '计量单位',
};
};
const handleKeyDown = (event: KeyboardEvent) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
const unitOrGroupOk = () => {
unitFormRef.value
.validate()

7
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts

@ -76,7 +76,7 @@ export const tableColumns = [
{
title: '操作',
key: 'action',
width: 130
width: 130,
},
];
// 碳排速算表表头
@ -119,7 +119,7 @@ export const columns = [
{
title: '操作',
key: 'action',
width: 130
width: 130,
},
];
// 碳排速算新增页中表头
@ -131,6 +131,7 @@ export const drawerColumns = [
{
title: '因子值',
dataIndex: 'emissionFactors',
key: 'emissionFactors',
},
{
title: '排放环节',
@ -142,4 +143,4 @@ export const drawerColumns = [
className: 'dataSources',
dataIndex: 'dataSources',
},
];
];

18
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue

@ -22,7 +22,11 @@
:label-col="labelCol"
:wrapper-col="wrapperCol">
<a-form-item ref="name" label="能耗名称" name="energyType">
<a-input v-model:value="formState.energyType" placeholder="请输入能源种类" />
<a-input
v-model:value="formState.energyType"
@keydown="handleKeyDown"
:maxlength="10"
placeholder="请输入能源种类" />
</a-form-item>
<a-form-item label="计量单位" name="unit">
<a-cascader v-model:value="formState.unit" :options="measurementUnit" />
@ -250,6 +254,12 @@
isComputeCarbon: [{ required: true, message: '请选择是否计算碳排', trigger: 'change' }],
unit: [{ required: true, message: '请选择计量单位', trigger: 'change' }],
};
const handleKeyDown = (event: KeyboardEvent) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
//
const emissionTypeDic = ref();
//
@ -259,15 +269,15 @@
//
const changeYearData = () => {
queryParams.value.year = selectYear.value;
getTableList();
// getTableList();
};
const mainRef = ref();
const year = selectYear.value.format('YYYY');
const tableConfig = ref({
title: '能耗统计',
api: energyConsumption.pageList,
rowSelection: null,
params: queryParams.value,
rowSelection: null,
headerActions: [
{
label: '新增',
@ -690,10 +700,10 @@
field: 'year',
label: '年份',
component: 'NsDatePicker',
defaultValue: selectYear.value.format('YYYY'),
componentProps: {
picker: 'year',
valueFormat: 'YYYY',
defaultValue: selectYear.value.format('YYYY'),
},
},
],

5
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue

@ -130,6 +130,11 @@
type: 'radio',
}"
:pagination="false">
<template #bodyCell="{ column, text, record }">
<template v-if="column.key === 'emissionFactors'">
<span>{{ record.emissionFactors + record.emissionFactorUnits }}</span>
</template>
</template>
</a-table>
<template #footer>
<a-button style="margin-right: 8px" @click="onClose">取消</a-button>

1
hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts

@ -29,6 +29,7 @@ export const drawerColumns = [
{
title: '因子值',
dataIndex: 'emissionFactors',
key: 'emissionFactors',
},
{
title: '排放环节',

78
hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue

@ -27,7 +27,7 @@
</div>
</div>
</div>
<div style="display: flex; height: 100%">
<div style="display: flex; height: 90%">
<div class="left">
<div class="top">
<a-form style="width: 100%; margin: 0 auto">
@ -57,6 +57,7 @@
:selectedKeys="selectedKeysL"
:auto-expand-parent="autoExpandParent"
:tree-data="gData"
:show-line="{ showLeafIcon: false }"
v-if="gData && gData.length > 0"
:height="233"
show-line
@ -95,6 +96,7 @@
:expandedKeys="expandedKeysR"
:selectedKeys="selectedKeysR"
:checkedKeys="checkedKeys"
:show-line="{ showLeafIcon: false }"
:tree-data="treeData"
@select="onSelectR"
block-node>
@ -106,16 +108,20 @@
<div class="actionMore">
<EditOutlined @click="editUnit(data)" />
<MinusCircleOutlined style="margin-left: 6px" @click="delUnit(data)" />
<PlusCircleOutlined
v-if="data.emissionSource === '全部'"
style="margin-left: 6px"
@click="addTreeNodeData" />
</div>
</div>
</template>
</a-tree>
<a-empty v-else />
<div class="addTreeNode">
<!-- <div class="addTreeNode">
<a-button type="primary" style="width: 100%" @click="addTreeNodeData">
新增
</a-button>
</div>
</div> -->
</div>
<div class="mainRight">
<a-table
@ -125,7 +131,7 @@
:pagination="false"
bordered
size="middle"
:scroll="{ y: 500 }">
:scroll="{ y: 380 }">
<template #title>
<a-button type="primary" @click="downLoadVoucher">凭证</a-button>
</template>
@ -162,7 +168,7 @@
<a-empty v-else />
</a-tab-pane>
<a-tab-pane key="3" tab="碳排流向">
<div v-if="showChart" ref="tplxChart" style="width: 100%; height: 68vh"></div>
<div v-if="showChart" ref="tplxChart" style="width: 100%; height: 100%"></div>
<a-empty v-else />
</a-tab-pane>
</a-tabs>
@ -193,6 +199,7 @@
:selectedKeys="categorySelectedKeys"
:checkedKeys="categoryCheckedKeys"
:tree-data="categoryTreeData"
:show-line="{ showLeafIcon: false }"
v-if="categoryTreeData && categoryTreeData.length > 0"
class="draggable-tree"
@check="checkTreeNode"
@ -230,7 +237,11 @@
:label-col="labelCol"
:wrapper-col="wrapperCol">
<a-form-item ref="name" label="排放源" name="emissionSource">
<a-input v-model:value="formState.emissionSource" placeholder="请输入排放源" />
<a-input
v-model:value="formState.emissionSource"
:maxlength="20"
@keydown="handleKeyDown"
placeholder="请输入排放源" />
</a-form-item>
<a-form-item ref="name" label="计量单位" name="unitId">
<a-cascader v-model:value="formState.unitId" :options="measurementUnit" />
@ -317,7 +328,11 @@
</a-col>
<a-col :span="24">
<a-form-item ref="name" label="消耗量" name="consumption">
<ns-input v-model:value="editFormState.consumption" :disabled="canEdit" />
<ns-input
v-model:value="editFormState.consumption"
:maxlength="20"
@keydown="handleKeyDown"
:disabled="canEdit" />
</a-form-item>
</a-col>
</a-row>
@ -351,7 +366,10 @@
<a-row>
<a-col :span="24">
<a-form-item ref="name" label="因子值" name="emissionFactors">
<ns-input v-model:value="editFormState.emissionFactors" />
<ns-input
v-model:value="editFormState.emissionFactors"
:maxlength="20"
@keydown="handleKeyDown" />
</a-form-item>
</a-col>
<a-col :span="24">
@ -381,6 +399,11 @@
type: 'radio',
}"
:pagination="false">
<template #bodyCell="{ column, text, record }">
<template v-if="column.key === 'emissionFactors'">
<span>{{ record.emissionFactors + record.emissionFactorUnits }}</span>
</template>
</template>
</a-table>
<a-pagination
:current="queryData.pageNum"
@ -603,9 +626,10 @@
fetch(carbonInventoryCheck.getInventoryTree, { categoryId: categoryId.value }).then((res) => {
treeData.value = res.data;
if (changeSelectedKeys.value) {
selectedKeysR.value = [`0-${treeData.value.length - 1}`];
selectedKeysR.value = [`0-0-${treeData.value[0].children.length - 1}`];
changeSelectedKeys.value = false;
getTableId.value = res.data[res.data.length - 1].id;
getTableId.value = res.data[0].children[res.data[0].children.length - 1].id;
bizId.value = res.data[0].children[res.data[0].children.length - 1].id;
if (res.data.length != 0) {
getPFYTableList(getTableId.value);
getTableHeardUnit(getTableId.value);
@ -616,8 +640,9 @@
columns.value[3].title = '排放量';
}
} else {
selectedKeysR.value = ['0-0'];
getTableId.value = res.data[0].id;
selectedKeysR.value = ['0-0-0'];
getTableId.value = res.data[0].children[0].id;
bizId.value = res.data[0].children[0].id;
if (res.data.length != 0) {
getPFYTableList(getTableId.value);
getTableHeardUnit(getTableId.value);
@ -634,6 +659,7 @@
const onSelectR = (selectedKey: string[], info: any) => {
selectedKeysR.value = selectedKey;
getTableId.value = info.selectedNodes[0].id;
bizId.value = info.selectedNodes[0].id;
getPFYTableList(getTableId.value);
getTableHeardUnit(getTableId.value);
};
@ -647,8 +673,8 @@
}
});
};
const expandedKeysR = ref<string[]>([]);
const selectedKeysR = ref<string[]>(['0-0']);
const expandedKeysR = ref<string[]>(['0-0']);
const selectedKeysR = ref<string[]>(['0-0-0']);
const checkedKeys = ref<string[]>([]);
watch(expandedKeysR, () => {
console.log('expandedKeysR', expandedKeysR);
@ -778,6 +804,12 @@
groupData.value = res.data;
});
};
const handleKeyDown = (event: KeyboardEvent) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
const onSubmit = () => {
formRef.value
.validate()
@ -945,10 +977,13 @@
};
//
const openVoucher = ref(false);
const bizId = ref();
const downLoadVoucher = () => {
fetch(carbonInventoryCheck.voucherDownloadList, { bizType: 2 }).then((res) => {
voucherData.value = res.data;
});
fetch(carbonInventoryCheck.voucherDownloadList, { bizType: 2, bizId: bizId.value }).then(
(res) => {
voucherData.value = res.data;
},
);
openVoucher.value = true;
};
const selectedRowKeys = ref([]);
@ -1061,6 +1096,7 @@
canEdit.value = true;
automatic.value = true;
} else {
canEdit.value = false;
automatic.value = false;
}
};
@ -1220,6 +1256,8 @@
reportId: props.reportId,
year: props.year,
categoryId: categoryId.value,
startTime: props.startTime,
endTime: props.endTime,
});
const linksData = ref([]);
const datalist = ref([]);
@ -1243,6 +1281,8 @@
reportId: props.reportId,
year: props.year,
categoryId: categoryId.value,
startTime: props.startTime,
endTime: props.endTime,
});
const tableHeader = ref([]);
const getEmissionStatistic = () => {
@ -1556,7 +1596,7 @@
width: 300px;
margin-right: @ns-gap;
min-width: fit-content;
height: 93%;
height: 100%;
border-radius: 8px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);
@ -1645,7 +1685,7 @@
.right {
flex: 1;
min-width: 0;
height: 93%;
height: 100%;
border-radius: 8px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);

30
hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue

@ -20,7 +20,9 @@
:footer-style="{ textAlign: 'right' }"
destroyOnClose
@close="onClose">
<div class="ns-form-title"><div class="title">{{text}}</div></div>
<div class="ns-form-title"
><div class="title">{{ text }}</div></div
>
<a-form
ref="formRef"
:model="formState"
@ -28,13 +30,21 @@
:label-col="labelCol"
:wrapper-col="wrapperCol">
<a-form-item ref="name" label="报告名称" name="reportName">
<a-input v-model:value="formState.reportName" placeholder="请输入报告名称" />
<a-input
v-model:value="formState.reportName"
:maxlength="15"
@keydown="handleKeyDown"
placeholder="请输入报告名称" />
</a-form-item>
<a-form-item ref="name" label="报告年度" name="reportYear">
<a-date-picker v-model:value="formState.reportYear" picker="year" valueFormat="YYYY" />
</a-form-item>
<a-form-item ref="name" label="适用标准" name="genericStandard">
<a-input v-model:value="formState.genericStandard" placeholder="请输入适用标准" />
<a-input
v-model:value="formState.genericStandard"
:maxlength="20"
@keydown="handleKeyDown"
placeholder="请输入适用标准" />
</a-form-item>
<a-form-item label="报告周期" name="reportPeriod">
<a-select
@ -81,7 +91,7 @@
const formRef = ref();
const labelCol = { span: 4 };
const wrapperCol = { span: 20 };
const text = ref('新增报告')
const text = ref('新增报告');
const disabledDate = (current: moment.Moment | null) => {
if (formState.value.reportPeriod === '2') {
const year = current.year();
@ -105,6 +115,12 @@
formState.value = {};
formRef.value.resetFields();
};
const handleKeyDown = (event: KeyboardEvent) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
//
const onSubmit = () => {
formRef.value
@ -142,7 +158,7 @@
name: 'userAdd',
type: 'primary',
handle: () => {
text.value = '新增报告'
text.value = '新增报告';
visible.value = true;
},
},
@ -186,7 +202,7 @@
label: '编辑',
name: 'userEdit',
handle: (record: any) => {
text.value = '编辑报告'
text.value = '编辑报告';
visible.value = true;
fetch(carbonInventoryCheck.findById, { id: record.id }).then((res) => {
formState.value = res.data;
@ -252,7 +268,7 @@
component: 'NsInput',
componentProps: {
placeholder: '请输入报告名称',
maxLength: 30,
maxLength: 20,
},
},
{

17
hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/all/index.vue

@ -15,7 +15,13 @@
margin-bottom: 1%;
">
<div>
<a-button v-if="selectedTime" type="primary" @click="changeYear(-1)">上一年</a-button>
<a-button
v-if="selectedTime"
type="primary"
style="border-radius: 5px 0 0 5px; border-right: none"
@click="changeYear(-1)"
>上一年</a-button
>
<a-date-picker
v-if="selectedTime"
valueFormat="YYYY"
@ -23,7 +29,13 @@
v-model:value="selectYear"
@change="changeYear"
picker="year" />
<a-button v-if="selectedTime" type="primary" @click="changeYear(1)">下一年</a-button>
<a-button
v-if="selectedTime"
type="primary"
style="border-radius: 0 5px 5px 0; border-left: none"
@click="changeYear(1)"
>下一年</a-button
>
<a-date-picker
v-else
valueFormat="YYYY-MM"
@ -344,7 +356,6 @@
border: 1px solid rgba(39, 120, 255, 1);
}
:deep(.ant-btn-primary) {
border-radius: unset !important;
border-color: #d7d7d7 !important;
background: #f2f2f2 !important;
color: black !important;

33
hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/categoryDeatil.vue

@ -102,17 +102,27 @@
<!-- 批量设置 -->
<a-modal :visible="open" title="批量设置" @ok="handleOk" @cancel="onCancel">
<a-form ref="formRef" :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="是否按去年折算">
<a-form-item label="是否按去年折算" :required="true">
<a-select ref="select" v-model:value="formState.isLastYear" @change="selectChange">
<a-select-option :value="1"></a-select-option>
<a-select-option :value="0"></a-select-option>
</a-select>
</a-form-item>
<a-form-item label="折算率">
<a-input v-model:value="formState.conversionRate" suffix="%" :disabled="disabled" />
<a-form-item label="折算率" :required="true">
<a-input-number
v-model:value="formState.conversionRate"
:maxlength="15"
@keydown="handleKeyDown"
suffix="%"
:disabled="disabled" />
</a-form-item>
<a-form-item label="预算值">
<a-input v-model:value="formState.budget" suffix="kWh" :disabled="!disabled" />
<a-form-item label="预算值" :required="true">
<a-input-number
v-model:value="formState.budget"
:maxlength="15"
@keydown="handleKeyDown"
suffix="kWh"
:disabled="!disabled" />
</a-form-item>
</a-form>
</a-modal>
@ -336,6 +346,12 @@
disabled.value = true;
}
};
const handleKeyDown = (event: KeyboardEvent) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
const handleOk = () => {
formRef.value
.validate()
@ -710,6 +726,7 @@
<style lang="less" scoped>
.detailContant {
height: 100%;
margin: 12px;
}
.ns-form-title {
font-weight: bold;
@ -855,6 +872,12 @@
height: 100%;
width: 100%;
}
:deep(
.ant-form-item-label
> label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before
) {
display: none !important;
}
</style>
<style scoped>
.editable-row-operations a {

108
hx-ai-intelligent/src/view/carbonEmissionManage/carbonPlanning/category/index.vue

@ -1,39 +1,40 @@
<template>
<div class="totalContant" v-if="electricTotal">
<div class="ns-form-title">
<div class="title">
<span>统计数据</span>
<a-button style="margin-left: 5%" type="primary" @click="addNode">新增节点</a-button>
</div>
</div>
<div
style="
display: flex;
width: 100%;
height: 5%;
align-items: center;
justify-content: space-between;
margin-bottom: 1%;
">
<a-date-picker
v-if="selectedTime"
v-model:value="selectYearValue"
:disabled-date="disabledDate"
valueFormat="YYYY"
@change="changeYear"
picker="year" />
<a-date-picker
v-else
v-model:value="selectMonthValue"
valueFormat="YYYY-MM"
@change="changeMonth"
picker="month" />
<div class="operation">
<div class="month" :style="monthStyles" @click="changeToMonth">
<span :style="monthText">本月</span>
<div style="padding: 12px">
<div class="ns-form-title">
<div class="title">
<span>统计数据</span>
<a-button style="margin-left: 5%" type="primary" @click="addNode">新增节点</a-button>
</div>
<div class="year" :style="yearStyles" @click="changeToYear">
<span :style="yearText">本年</span>
</div>
<div
style="
display: flex;
width: 100%;
height: 5%;
align-items: center;
justify-content: space-between;
">
<a-date-picker
v-if="selectedTime"
v-model:value="selectYearValue"
:disabled-date="disabledDate"
valueFormat="YYYY"
@change="changeYear"
picker="year" />
<a-date-picker
v-else
v-model:value="selectMonthValue"
valueFormat="YYYY-MM"
@change="changeMonth"
picker="month" />
<div class="operation">
<div class="month" :style="monthStyles" @click="changeToMonth">
<span :style="monthText">本月</span>
</div>
<div class="year" :style="yearStyles" @click="changeToYear">
<span :style="yearText">本年</span>
</div>
</div>
</div>
</div>
@ -80,6 +81,7 @@
:selectedKeys="selectedKeys"
:checkedKeys="treeCheckedKeys"
:tree-data="treeData"
:show-line="{ showLeafIcon: false }"
v-if="treeData && treeData.length > 0"
class="draggable-tree"
@check="checkTreeNode"
@ -206,6 +208,14 @@
chartInstance = echarts.init(pillarChartRef.value);
const option = {
backgroundColor: 'transparent',
title: {
text: '历年用电量分析',
x: '0',
textStyle: {
color: 'rgba(51, 51, 51, 1)',
fontSize: '16',
},
},
tooltip: {
trigger: 'axis',
axisPointer: {
@ -217,14 +227,14 @@
},
grid: {
left: '4%',
top: '18%',
right: '5%',
top: '20%',
right: '3%',
bottom: '10%',
},
legend: {
data: ['实际用量', '预算量', '基准线'],
top: '0',
left: '0',
right: '3%', //
textStyle: {
color: '#666',
fontSize: 12,
@ -361,7 +371,7 @@
type: 'liquidFill',
radius: '78.1%',
center: ['50%', '50%'],
color: selectedTime.value
color: !selectedTime.value
? ['#ecf3fe', '#c8dcfe', '#5594fa']
: ['rgba(12, 168, 126, 0.5)', 'rgba(12, 168, 126, 0.1)', 'rgba(12, 168, 126, 1)'],
data: [ballData, ballData, ballData], // data
@ -374,7 +384,7 @@
label: {
show: true,
textStyle: {
color: selectedTime.value ? 'rgba(68, 197, 253,1)' : 'rgba(12, 168, 126, 1)',
color: !selectedTime.value ? 'rgba(68, 197, 253,1)' : 'rgba(12, 168, 126, 1)',
insideColor: '#12786f',
fontSize: 40,
},
@ -390,7 +400,7 @@
show: true,
borderDistance: 5,
itemStyle: {
borderColor: selectedTime.value ? 'rgba(68, 197, 253,1)' : 'rgba(12, 168, 126, 1)',
borderColor: !selectedTime.value ? 'rgba(68, 197, 253,1)' : 'rgba(12, 168, 126, 1)',
borderWidth: 2,
},
},
@ -572,7 +582,6 @@
<style lang="less" scoped>
.totalContant {
height: 100%;
padding: 12px;
}
:deep(.ant-tabs-content) {
padding: 16px;
@ -612,7 +621,6 @@
}
.operation {
display: flex;
margin-right: 10px;
font-weight: 400;
height: 90%;
cursor: pointer;
@ -636,21 +644,29 @@
width: 100%;
height: calc(94% - 5vh);
overflow-y: auto;
padding: 12px;
.chartsPart {
width: 99%;
height: 40%;
width: 100%;
height: 45%;
display: flex;
justify-content: space-between;
.ballChart {
width: 25%;
width: 20%;
margin-right: 12px;
background: #ffffff;
box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);
border-radius: 8px;
}
.pillarChart {
width: calc(75% - 12px);
width: calc(80% - 12px);
background: #ffffff;
box-shadow: 0px 2px 20px rgb(69 123 234 / 20%);
border-radius: 8px;
padding: 5px;
}
}
.tablePart {
height: calc(60% - 20px);
height: calc(55% - 20px);
margin-top: 20px;
}
}

57
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/device.vue

@ -9,29 +9,29 @@
device.regionName + ' > ' + device.deviceGroupName
}}</span></div
>
<button class="right-button">{{
record?.runStatus?.label ? record.runStatus.label : '--'
<button class="right-button" :class="getClass(record)">{{
record.runStatus.value != 0 ? record.runStatus.label : record.switchStatus.label
}}</button>
</div>
<div class="light-tag-box">
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制模式</span>
<span class="title-text">控制模式</span>
<span class="result">{{ record.autoStatus.label }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">温度</span>
<span class="title-text">温度</span>
<span class="result">{{ record.temp + record.tempUnit }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制场景</span>
<span class="title-text">控制场景</span>
<span class="result">{{ device.scene.label }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">风速</span>
<span class="title-text">风速</span>
<span class="result">{{ record.windSpeed + record.windSpeedUnit }}</span>
</div>
</div>
@ -75,6 +75,23 @@
const device = computed(() => props.device);
//
const record = computed(() => props.device.record);
const getClass = (data: any) => {
let state = data.runStatus.value;
let isOpen = data.switchStatus.value;
//
if (state == 1) {
return 'button-fault';
} else if (state == 2) {
return 'button-repair';
} else if (state == 3) {
return 'button-alarm';
} else if (state == 0 && isOpen == 1) {
return 'button-on';
} else if (state == 0 && isOpen == 0) {
return 'button-off';
}
};
</script>
<style lang="less" scoped>
.icon-box {
@ -116,9 +133,29 @@
width: 5em;
height: 26px;
background: rgba(57, 215, 187, 0.1);
border: 1px solid rgba(57, 215, 187, 1);
border-width: 1px;
border-style: solid;
font-size: 12px;
color: rgba(57, 215, 187, 1);
}
.button-on {
color: #0dffa4;
border-color: #0dffa4;
}
.button-off {
color: #bfcde2;
border-color: #bfcde2;
}
.button-repair {
color: #ffbc46;
border-color: #ffbc46;
}
.button-alarm {
color: #f36163;
border-color: #f36163;
}
.button-fault {
color: #ff7636;
border-color: #ff7636;
}
}
}
@ -140,9 +177,9 @@
vertical-align: middle;
}
.title {
.title-text {
position: absolute;
left: 60px;
left: 53px;
top: 13px;
color: rgba(64, 255, 252, 1);
}

71
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs1.vue

@ -269,7 +269,7 @@
<script setup lang="ts">
import { ref, computed, onMounted } from 'vue';
import { DownOutlined, UpOutlined, StopOutlined } from '@ant-design/icons-vue';
import { message } from 'ant-design-vue';
import { message, Modal } from 'ant-design-vue';
//
import { http } from '/nerv-lib/util/http';
import { airConditionControl } from '/@/api/airConditionControlSystem';
@ -736,47 +736,47 @@
if (!changeList.value.length && !lockList.value.length) {
return message.info('未产生任何修改');
}
state.setLoading(true);
http
.get(planManage.getRunningPlan, {
deviceType: 2,
ctrlType: 2,
projectId: state.projectId,
siteId: state.siteId,
})
.then((res) => {
//
if (res.data && res.data.length) {
state.setLoading(false);
// 使confirm
// Modal.confirm({
// title: '',
// content: '""',
// onOk() {
// return new Promise((resolve, reject) => {
// });
// },
// onCancel() { },
// });
let flag = window.confirm('有计划正在执行,点击"确定"将暂停当前计划');
if (flag) {
//
http
.post(airConditionControl.submitChangeList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
console.log(res, '成功');
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
message.error('关闭进行中的任务操作失败,请重新尝试');
}
});
}
Modal.confirm({
title: '提示信息',
content: '有计划正在执行,点击"确定"将暂停当前计划',
onOk() {
state.setLoading(true);
//
http
.post(airConditionControl.submitChangeList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
state.setLoading(false);
message.error('关闭进行中的任务操作失败,请重新尝试');
}
})
.catch(() => {
state.setLoading(false);
});
},
onCancel() {},
});
//
} else {
sendChangeList();
@ -793,6 +793,7 @@
siteId: state.siteId,
})
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
diffList.value = res.data;
executeVisible.value = true;
@ -800,7 +801,9 @@
message.warning('获取修改内容失败');
}
})
.catch(() => {});
.catch(() => {
state.setLoading(false);
});
};
//
const changeCancel = () => {};

14
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs2.vue

@ -30,7 +30,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(row, index) in dataSource" :key="index">
<tr v-for="(row, index) in dataSource" v-show="row.executeStatus.value != 0" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ row.startTime }}</td>
<td>{{ row.planName }}</td>
@ -162,7 +162,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: 2,
ctrlType: 2,
})
.then((res) => {
dataSource.value = res.data;
@ -184,6 +184,10 @@
};
//
const sendTable = () => {
if (!dataSource.value.length) {
return message.info('没有任何数据可以提交');
}
state.setLoading(true);
http
.post(
airConditionControl.submitTableData +
@ -191,6 +195,7 @@
dataSource.value,
)
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
message.success('操作成功');
//
@ -198,6 +203,9 @@
} else {
message.info(res.msg);
}
})
.catch(() => {
state.setLoading(false);
});
};
@ -228,7 +236,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: 2,
ctrlType: 2,
})
.then((res) => {
let arr: Array<Object> = [];

50
hx-ai-intelligent/src/view/equipmentControl/airConditionControlSystem/tabs3.vue

@ -55,16 +55,10 @@
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>{{
item.autoStatusBefore.label.indexOf('模式') != -1
? item.autoStatusBefore.label.replace('模式', '')
: item.autoStatusBefore.label
}}</span>
<span>{{ item.autoStatusBefore.label ? item.autoStatusBefore.label : '--' }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item.autoStatusAfter.label.indexOf('模式') != -1
? item.autoStatusAfter.label.replace('模式', '')
: item.autoStatusAfter.label
item.autoStatusAfter.label ? item.autoStatusAfter.label : '--'
}}</span></div
>
</div>
@ -110,7 +104,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 80px"></div>
<div style="width: 100%; height: 160px"></div>
<div class="button-box">
<button class="cancel" @click="logModalVisible = false">关闭</button>
</div>
@ -126,7 +120,8 @@
import { Pagination } from 'ant-design-vue';
import { http } from '/nerv-lib/util/http';
import { airConditionControl } from '/@/api/airConditionControlSystem';
//
import { items } from '/@/store/item';
// =======================================================
//
@ -140,6 +135,9 @@
getTable();
});
//
const state = items();
// ======================================================
//
@ -154,6 +152,7 @@
let trIndex = ref(-1);
//
const getTable = (changePage = false) => {
state.setLoading(true);
//
if (changePage) {
trIndex.value = -1;
@ -166,9 +165,13 @@
pageNum: pagination.value.pageNum,
})
.then((res) => {
state.setLoading(false);
let data = res.data;
dataSource.value = data.records;
pagination.value.total = data.total;
})
.catch(() => {
state.setLoading(false);
});
};
//
@ -193,16 +196,23 @@
//
const logModalVisible = ref(false);
const getLogDetail = (id: any) => {
http.get(airConditionControl.getLogDetail, { logId: id }).then((res) => {
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
});
state.setLoading(true);
http
.get(airConditionControl.getLogDetail, { logId: id })
.then((res) => {
const data = res.data;
state.setLoading(false);
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
})
.catch(() => {
state.setLoading(false);
});
};
//
const cxList = ref([]);

4
hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/components/floorHeatingModel.vue

@ -16,7 +16,9 @@
<div class="box-bottom-item-line">
温度
<div class="box-bottom-item-line-value">
<span style="color: #00ffd2">{{ item.temp }}{{ item.tempUnit }}</span>
<span style="color: #00ffd2"
>{{ item.currentTemp }}{{ item.currentTempUnit }}</span
>
</div>
</div>
<div class="box-bottom-item-line">

83
hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/devicePosition.ts

@ -28,10 +28,81 @@ export const airConditioningPosition = [
];
//地暖
export const floorHeatingPosition = [
{ styleText: { left: '13%', bottom: '44%' }, lineType: '' },
{ styleText: { left: '22%', bottom: '48%' }, lineType: 1 },
{ styleText: { left: '34%', bottom: '53%' }, lineType: 1 },
{ styleText: { left: '49%', bottom: '59%' }, lineType: 1 },
{ styleText: { left: '60.5%', bottom: '65.5%' }, lineType: 1 },
{ styleText: { left: '72%', bottom: '72%' }, lineType: 1 },
{
styleText: {
left: '13%',
bottom: '44%',
width: '150px',
height: '255px',
lineLeft: '220px',
lineBottom: '110px',
color: 'rgba(242, 209, 156, 0.5)',
},
lineType: '',
},
{
styleText: {
left: '21%',
bottom: '48%',
width: '130px',
height: '325px',
lineLeft: '370px',
lineBottom: '110px',
color: 'rgba(224, 244, 102,0.5)',
transform: 'rotateX(43deg) rotateZ(-19deg) skew(12deg) rotateY(-1deg)',
},
lineType: 1,
},
{
styleText: {
left: '34.5%',
bottom: '53.5%',
width: '350px',
height: '300px',
lineLeft: '492px',
lineBottom: '190px',
color: 'rgba(167, 128, 244, 0.5)',
transform: 'rotateX(42deg) rotateZ(-20deg) skew(17deg) rotateY(0deg)',
},
lineType: 1,
},
{
styleText: {
left: '47.5%',
bottom: '60.3%',
width: '100px',
height: '306px',
lineLeft: '840px',
lineBottom: '238px',
color: 'rgba(155, 216, 224, 0.5)',
transform: 'rotateX(51deg) rotateZ(-21deg) skew(17deg) rotateY(-2deg)',
},
lineType: 1,
},
{
styleText: {
left: '60.5%',
bottom: '65.5%',
width: '300px',
height: '300px',
lineLeft: '930px',
lineBottom: '290px',
color: 'rgba(222, 111, 141, 0.5)',
transform: 'rotateX(49deg) rotateZ(-24deg) skew(18deg) rotateY(3deg)',
},
lineType: 1,
},
{
styleText: {
left: '73%',
bottom: '72%',
width: '150px',
height: '320px',
lineLeft: '1218px',
lineBottom: '335px',
color: 'rgba(152, 190, 162, 0.5)',
transform: 'rotateX(50deg) rotateZ(-28deg) skew(17deg) rotateY(3deg)',
},
lineType: 1,
},
];

23
hx-ai-intelligent/src/view/equipmentControl/airConditioningSystem/index.vue

@ -149,6 +149,17 @@
style="width: 42px; height: 42px; position: absolute; z-index: 1"
:style="{ left: item.styleText.left, bottom: item.styleText.bottom }"
src="../image/airConditioningSystem/floorHeatingIcon.png" />
<div
class="shape"
:style="{
width: item.styleText.width,
height: item.styleText.height,
background: item.styleText.color,
left: item.styleText.lineLeft,
bottom: item.styleText.lineBottom,
transform: item.styleText.transform,
}">
</div>
</template>
</div>
<!-- 地暖详情 -->
@ -511,7 +522,6 @@
siteId: state.siteId,
})
.then((res) => {
console.log(res, '地暖');
if (res.msg === 'success') {
res.data.forEach((item: any, index: number) => {
floorHeatingData.value.push({
@ -538,12 +548,12 @@
getTempSysCtrlList();
};
//
const intervalId = setInterval(fetchData, 60000);
// const intervalId = setInterval(fetchData, 60000);
onMounted(() => {
fetchData();
});
onUnmounted(() => {
clearInterval(intervalId);
// clearInterval(intervalId);
});
</script>
<style lang="less">
@ -675,4 +685,11 @@
opacity: 0; /* 结束时完全透明 */
}
}
.shape {
background-color: #36d792;
transform: rotateX(23deg) rotateZ(-13deg) skew(17deg) rotateY(-7deg);
position: absolute;
perspective: 900px;
perspective-origin: 900px -120px;
}
</style>

56
hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue

@ -3,18 +3,14 @@
<div class="lighting-img-box" :class="{ lightingImgBox1: thisFloor == '2' }">
<!-- 左上角区域切换 -->
<div class="btn-box">
<a-popconfirm
<button
v-for="(item, index) in floorData"
:key="index"
title="切换楼层将取消当前的所有修改项"
ok-text="确定"
cancel-text="取消"
placement="bottomLeft"
@confirm="changeFloor(item.childList, item.dataCode)">
<button class="btn-item" :class="{ btnActive: item.dataCode == thisFloor }">{{
item.name
}}</button>
</a-popconfirm>
class="btn-item"
:class="{ btnActive: item.dataCode == thisFloor }"
@click="changeFloor(item.childList, item.dataCode)"
>{{ item.name }}</button
>
</div>
<!-- 楼层区域 -->
<div class="area">
@ -84,6 +80,7 @@
import { lightingManage } from '/@/api/IlluminationInfo';
// ICON
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons-vue';
import { message, Modal } from 'ant-design-vue';
//
import { items } from '/@/store/item';
@ -110,23 +107,30 @@
//
const changeFloor = (area: any, floor: string) => {
if (floor == thisFloor.value) {
return;
return message.info('已选择此楼层');
}
//
tabs1Ref.value.refresh(false);
//
bulbs.value = [];
thisFloor.value = floor;
getBulbs();
//
reset();
//
changeArea(['1']);
//
treeData.value = area;
//
treeData.value[0].selected = true;
tabs1Ref.value.changeArea(treeData.value[0]);
Modal.confirm({
title: '提示信息',
content: '切换楼层会放弃已保存的修改内容',
onOk() {
//
tabs1Ref.value.refresh(false);
//
bulbs.value = [];
thisFloor.value = floor;
getBulbs();
//
reset();
//
changeArea(['1']);
//
treeData.value = area;
//
treeData.value[0].selected = true;
tabs1Ref.value.changeArea(treeData.value[0]);
},
onCancel() {},
});
};
// =====================================================

84
hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue

@ -7,59 +7,65 @@
<img src="/asset/image//bulbLogo/21962.png" alt="" />
<span class="tag-text">{{ blub.regionName + ' > ' + blub.deviceGroupName }}</span></div
>
<button class="right-button">{{
record?.runStatus?.label ? record.runStatus.label : '--'
<button class="right-button" :class="getClass(record)">{{
record.runStatus.value != 0 ? record.runStatus.label : record.switchStatus.label
}}</button>
</div>
<div class="light-tag-box">
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制模式</span>
<span class="title-text">控制模式</span>
<span class="result">{{ record.autoStatus.label }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">亮度</span>
<span class="title-text">亮度</span>
<span class="result">{{ record.brightness + record.brightnessUnit }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制场景</span>
<span class="title-text">控制场景</span>
<span class="result">{{ blub.scene.label }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">色温</span>
<span class="title-text">色温</span>
<span class="result">{{ record.LwctemC + record.LwctemCUnit }}</span>
</div>
</div>
</div>
</template>
<div class="icon-box" :style="props.blub.styleText">
<!-- 正常=0 -->
<img
v-if="record?.runStatus?.value == 0"
class="icon-item"
src="/asset/image/bulbLogo/on.png"
alt="" />
<!-- 故障=1 -->
<img
v-if="record?.runStatus?.value == 1"
v-if="record.runStatus.value == 1"
class="icon-item"
src="/asset/image/bulbLogo/off.png"
src="/asset/image/bulbLogo/fault.png"
alt="" />
<!-- 维修=2 -->
<img
v-if="record?.runStatus?.value == 2"
v-if="record.runStatus.value == 2"
class="icon-item"
src="/asset/image/bulbLogo/repair.png"
alt="" />
<!-- 警告=3 -->
<img
v-if="record?.runStatus?.value == 3"
v-if="record.runStatus.value == 3"
class="icon-item"
src="/asset/image/bulbLogo/alarm.png"
alt="" />
<!-- 开启 -->
<img
v-if="record.runStatus.value == 0 && record.switchStatus.value == 1"
class="icon-item"
src="/asset/image/bulbLogo/on.png"
alt="" />
<!-- 关闭 -->
<img
v-if="record.runStatus.value == 0 && record.switchStatus.value == 0"
class="icon-item"
src="/asset/image/bulbLogo/off.png"
alt="" />
</div>
</a-popover>
</template>
@ -73,13 +79,29 @@
const blub = computed(() => props.blub);
//
const record = computed(() => props.blub.record);
const getClass = (data: any) => {
let state = data.runStatus.value;
let isOpen = data.switchStatus.value;
//
if (state == 1) {
return 'button-fault';
} else if (state == 2) {
return 'button-repair';
} else if (state == 3) {
return 'button-alarm';
} else if (state == 0 && isOpen == 1) {
return 'button-on';
} else if (state == 0 && isOpen == 0) {
return 'button-off';
}
};
</script>
<style lang="less" scoped>
.icon-box {
width: 28px;
height: 40px;
position: absolute;
.icon-item {
width: 25px;
cursor: pointer;
@ -115,9 +137,29 @@
width: 5em;
height: 26px;
background: rgba(57, 215, 187, 0.1);
border: 1px solid rgba(57, 215, 187, 1);
border-width: 1px;
border-style: solid;
font-size: 12px;
color: rgba(57, 215, 187, 1);
}
.button-on {
color: #0dffa4;
border-color: #0dffa4;
}
.button-off {
color: #bfcde2;
border-color: #bfcde2;
}
.button-repair {
color: #ffbc46;
border-color: #ffbc46;
}
.button-alarm {
color: #f36163;
border-color: #f36163;
}
.button-fault {
color: #ff7636;
border-color: #ff7636;
}
}
}
@ -139,9 +181,9 @@
vertical-align: middle;
}
.title {
.title-text {
position: absolute;
left: 60px;
left: 53px;
top: 13px;
color: rgba(64, 255, 252, 1);
}

37
hx-ai-intelligent/src/view/equipmentControl/lightingManage/lightPosition.ts

@ -1,51 +1,52 @@
// 此文件只定义light(即俯视图小灯泡)的位置信息
// 与显示状态和分组信息无关
export const lightPosition = [
// 安检区A
// 走廊西
{ left: '160px', bottom: '270px' },
{ left: '185px', bottom: '230px' },
{ left: '220px', bottom: '180px' },
{ left: '250px', bottom: '130px' },
// 站厅区B 1组
// 办公西区 1组
{ left: '240px', bottom: '290px' },
{ left: '260px', bottom: '260px' },
{ left: '280px', bottom: '230px' },
{ left: '310px', bottom: '190px' },
{ left: '330px', bottom: '160px' },
// 站厅区B 2组
// 办公西区 2组
{ left: '300px', bottom: '305px' },
{ left: '325px', bottom: '275px' },
{ left: '350px', bottom: '245px' },
{ left: '375px', bottom: '215px' },
{ left: '400px', bottom: '180px' },
// 站台区A 1组
// 站厅西区 1组
{ left: '370px', bottom: '320px' },
{ left: '470px', bottom: '210px' },
// 站台区A 2组
// 站厅西区 2组
{ left: '425px', bottom: '335px' },
{ left: '530px', bottom: '230px' },
// 站台区A 3组
// 站厅西区 3组
{ left: '475px', bottom: '350px' },
{ left: '590px', bottom: '250px' },
// 站台区A 4组
// 站厅西区 4组
{ left: '530px', bottom: '365px' },
{ left: '640px', bottom: '270px' },
// 一楼办公
// 临检
{ left: '570px', bottom: '390px' },
{ left: '605px', bottom: '365px' },
{ left: '640px', bottom: '340px' },
{ left: '675px', bottom: '315px' },
{ left: '710px', bottom: '290px' },
// 安保区 4 分组
{ left: '670px', bottom: '370px' },
{ left: '720px', bottom: '385px' },
{ left: '770px', bottom: '400px' },
{ left: '820px', bottom: '415px' },
// 一楼男厕A
{ left: '810px', bottom: '455px' },
{ left: '970px', bottom: '370px' },
{ left: '850px', bottom: '465px' },
{ left: '1010px', bottom: '385px' },
// 安检区
{ left: '635px', bottom: '405px' },
{ left: '675px', bottom: '375px' },
{ left: '725px', bottom: '340px' },
{ left: '780px', bottom: '305px' },
// 站厅东区 共4组
{ left: '690px', bottom: '420px' },
{ left: '835px', bottom: '330px' },
{ left: '800px', bottom: '390px' },
{ left: '850px', bottom: '400px' },
{ left: '900px', bottom: '410px' },
];
export const lightPosition1 = [

78
hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue

@ -249,7 +249,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 60px"></div>
<div style="width: 100%; height: 100px"></div>
<div class="button-box">
<button class="cancel" @click="executeVisible = false">取消</button>
<a-popconfirm
@ -736,47 +736,46 @@
if (!changeList.value.length && !lockList.value.length) {
return message.info('未产生任何修改');
}
state.setLoading(true);
http
.get(planManage.getRunningPlan, {
deviceType: 1,
ctrlType: 1,
projectId: state.projectId,
siteId: state.siteId,
})
.then((res) => {
//
if (res.data && res.data.length) {
// 使confirm
// Modal.confirm({
// title: '',
// content: '""',
// onOk() {
// return new Promise((resolve, reject) => {
// });
// },
// onCancel() { },
// });
let flag = window.confirm('有计划正在执行,点击"确定"将暂停当前计划');
if (flag) {
//
http
.post(lightingManage.submitChangeList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
console.log(res, '成功');
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
message.error('关闭进行中的任务操作失败,请重新尝试');
}
});
}
state.setLoading(false);
Modal.confirm({
title: '提示信息',
content: '有计划正在执行,点击"确定"将暂停当前计划',
onOk() {
state.setLoading(true);
//
http
.post(lightingManage.submitChangeList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
state.setLoading(false);
message.error('关闭进行中的任务操作失败,请重新尝试');
}
})
.catch(() => {
state.setLoading(false);
});
},
onCancel() {},
});
//
} else {
sendChangeList();
@ -793,6 +792,7 @@
siteId: state.siteId,
})
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
diffList.value = res.data;
executeVisible.value = true;
@ -800,7 +800,9 @@
message.error('获取修改内容失败');
}
})
.catch(() => {});
.catch(() => {
state.setLoading(false);
});
};
//
const changeCancel = () => {};
@ -838,6 +840,7 @@
};
//
const submitChangeList = () => {
state.setLoading(true);
http
.post(lightingManage.submitChangeList, {
sceneList: changeList.value,
@ -846,6 +849,7 @@
siteId: state.siteId,
})
.then((res) => {
state.setLoading(false);
let data = res.data;
//
if (res.retcode != 0) {
@ -862,7 +866,9 @@
refresh(true);
emit('resetAll');
})
.catch(() => {});
.catch(() => {
state.setLoading(false);
});
};
// ========================================================================

14
hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue

@ -30,7 +30,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(row, index) in dataSource" :key="index">
<tr v-for="(row, index) in dataSource" v-show="row.executeStatus.value != 0" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ row.startTime }}</td>
<td>{{ row.planName }}</td>
@ -163,7 +163,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: 1,
ctrlType: 1,
})
.then((res) => {
dataSource.value = res.data;
@ -185,6 +185,10 @@
};
//
const sendTable = () => {
if (!dataSource.value.length) {
return message.info('没有任何数据可以提交');
}
state.setLoading(true);
http
.post(
lightingManage.submitTableData +
@ -192,6 +196,7 @@
dataSource.value,
)
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
message.success('操作成功');
//
@ -199,6 +204,9 @@
} else {
message.info(res.msg);
}
})
.catch(() => {
state.setLoading(false);
});
};
@ -229,7 +237,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: 1,
ctrlType: 1,
})
.then((res) => {
let arr: Array<Object> = [];

49
hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs3.vue

@ -55,16 +55,10 @@
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>{{
item.autoStatusBefore.label.indexOf('模式') != -1
? item.autoStatusBefore.label.replace('模式', '')
: item.autoStatusBefore.label
}}</span>
<span>{{ item.autoStatusBefore.label ? item.autoStatusBefore.label : '--' }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item.autoStatusAfter.label.indexOf('模式') != -1
? item.autoStatusAfter.label.replace('模式', '')
: item.autoStatusAfter.label
item.autoStatusAfter.label ? item.autoStatusAfter.label : '--'
}}</span></div
>
</div>
@ -109,7 +103,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 80px"></div>
<div style="width: 100%; height: 160px"></div>
<div class="button-box">
<button class="cancel" @click="logModalVisible = false">关闭</button>
</div>
@ -125,6 +119,8 @@
import { Pagination } from 'ant-design-vue';
import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
//
import { items } from '/@/store/item';
// =======================================================
@ -139,6 +135,9 @@
getTable();
});
//
const state = items();
// ======================================================
//
@ -153,6 +152,7 @@
let trIndex = ref(-1);
//
const getTable = (changePage = false) => {
state.setLoading(true);
//
if (changePage) {
trIndex.value = -1;
@ -165,9 +165,13 @@
pageNum: pagination.value.pageNum,
})
.then((res) => {
state.setLoading(false);
let data = res.data;
dataSource.value = data.records;
pagination.value.total = data.total;
})
.catch(() => {
state.setLoading(false);
});
};
//
@ -192,16 +196,23 @@
//
const logModalVisible = ref(false);
const getLogDetail = (id: any) => {
http.get(lightingManage.getLogDetail, { logId: id }).then((res) => {
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
});
state.setLoading(true);
http
.get(lightingManage.getLogDetail, { logId: id })
.then((res) => {
state.setLoading(false);
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
})
.catch(() => {
state.setLoading(false);
});
};
//
const cxList = ref([]);

4
hx-ai-intelligent/src/view/equipmentControl/style/dialogStyle.less

@ -108,7 +108,7 @@
line-height: 35px;
text-align: left;
padding-left: 10px;
font-size: 14px;
font-size: 13px;
:first-child {
color: white;
}
@ -116,7 +116,7 @@
vertical-align: middle;
}
img {
padding: 0 5px;
padding: 0 2px;
}
}
}

71
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanControl.vue

@ -215,7 +215,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 60px"></div>
<div style="width: 100%; height: 100px"></div>
<div class="button-box">
<button class="cancel" @click="executeVisible = false">取消</button>
<a-popconfirm
@ -686,47 +686,47 @@
if (!changeList.value.length && !lockList.value.length) {
return message.info('未产生任何修改');
}
state.setLoading(true);
http
.get(planManage.getRunningPlan, {
deviceType: url.deviceType,
ctrlType: url.deviceType,
projectId: state.projectId,
siteId: state.siteId,
})
.then((res) => {
//
if (res.data && res.data.length) {
// 使confirm
// Modal.confirm({
// title: '',
// content: '""',
// onOk() {
// return new Promise((resolve, reject) => {
// });
// },
// onCancel() { },
// });
state.setLoading(false);
Modal.confirm({
title: '提示信息',
content: '有计划正在执行,点击"确定"将暂停当前计划',
onOk() {
state.setLoading(false);
//
http
.post(url.getList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
state.setLoading(false);
message.error('关闭进行中的任务操作失败,请重新尝试');
}
})
.catch(() => {
state.setLoading(false);
});
},
onCancel() {},
});
let flag = window.confirm('有计划正在执行,点击"确定"将暂停当前计划');
if (flag) {
//
http
.post(url.getList, {
projectId: state.projectId,
siteId: state.siteId,
lockList: [],
sceneList: [],
})
.then((res) => {
console.log(res, '成功');
//
if (res.retcode == 0) {
sendChangeList();
//
} else {
message.error('关闭进行中的任务操作失败,请重新尝试');
}
});
}
//
} else {
sendChangeList();
@ -743,6 +743,7 @@
siteId: state.siteId,
})
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
diffList.value = res.data;
executeVisible.value = true;
@ -750,7 +751,9 @@
message.error('获取修改内容失败');
}
})
.catch(() => {});
.catch(() => {
state.setLoading(false);
});
};
//
const changeCancel = () => {};

46
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanLog.vue

@ -55,16 +55,10 @@
<div class="btn-item">
<div class="left">控制模式</div>
<div class="right">
<span>{{
item.autoStatusBefore.label.indexOf('模式') != -1
? item.autoStatusBefore.label.replace('模式', '')
: item.autoStatusBefore.label
}}</span>
<span>{{ item.autoStatusBefore.label ? item.autoStatusBefore.label : '--' }}</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
<span>{{
item.autoStatusAfter.label.indexOf('模式') != -1
? item.autoStatusAfter.label.replace('模式', '')
: item.autoStatusAfter.label
item.autoStatusAfter.label ? item.autoStatusAfter.label : '--'
}}</span></div
>
</div>
@ -109,7 +103,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 80px"></div>
<div style="width: 100%; height: 160px"></div>
<div class="button-box">
<button class="cancel" @click="logModalVisible = false">关闭</button>
</div>
@ -125,7 +119,6 @@
import { Pagination } from 'ant-design-vue';
import { http } from '/nerv-lib/util/http';
import { ventilating } from '/@/api/ventilatingSystem';
//
import { items } from '/@/store/item';
@ -183,6 +176,7 @@
let trIndex = ref(-1);
//
const getTable = (changePage = false) => {
state.setLoading(true);
//
if (changePage) {
trIndex.value = -1;
@ -195,16 +189,19 @@
pageNum: pagination.value.pageNum,
})
.then((res) => {
state.setLoading(false);
let data = res.data;
dataSource.value = data.records;
pagination.value.total = data.total;
})
.catch(() => {
state.setLoading(false);
});
};
//
const reset = () => {
trIndex.value = -1;
logModalVisible.value = false;
// state.setLoading(true);
pagination.value = {
pageSize: 10,
pageNum: 1,
@ -223,16 +220,23 @@
//
const logModalVisible = ref(false);
const getLogDetail = (id: any) => {
http.get(logDetail, { logId: id }).then((res) => {
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
});
state.setLoading(true);
http
.get(logDetail, { logId: id })
.then((res) => {
state.setLoading(false);
const data = res.data;
if (data && data.length) {
//
logModalVisible.value = true;
cxList.value = res.data;
} else {
return message.info('返回值无效');
}
})
.catch(() => {
state.setLoading(false);
});
};
const cxList = ref([]);

14
hx-ai-intelligent/src/view/equipmentControl/ventilationSystem/components/fanPlant.vue

@ -30,7 +30,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(row, index) in dataSource" :key="index">
<tr v-for="(row, index) in dataSource" v-show="row.executeStatus.value != 0" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ row.startTime }}</td>
<td>{{ row.planName }}</td>
@ -177,7 +177,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: props.type,
ctrlType: props.type,
})
.then((res) => {
dataSource.value = res.data;
@ -199,12 +199,17 @@
};
//
const sendTable = () => {
if (!dataSource.value.length) {
return message.info('没有任何数据可以提交');
}
state.setLoading(true);
http
.post(
url + `?projectId=${state.projectId}${state.siteId ? `&siteId=${state.siteId}` : ''}`,
dataSource.value,
)
.then((res) => {
state.setLoading(false);
if (res.retcode == 0) {
message.success('操作成功');
//
@ -212,6 +217,9 @@
} else {
message.info(res.msg);
}
})
.catch(() => {
state.setLoading(false);
});
};
@ -242,7 +250,7 @@
projectId: state.projectId,
siteId: state.siteId,
// (1,2,3,4,5,6,7)
deviceType: props.type,
ctrlType: props.type,
})
.then((res) => {
let arr: Array<Object> = [];

14
lib/component/form/input/input.vue

@ -1,5 +1,5 @@
<template>
<a-input>
<a-input @keydown="handleKeyDown">
<template #[item]="data" v-for="item in Object.keys($slots)" :key="item">
<slot :name="item" v-bind="data || {}"> </slot>
</template>
@ -10,7 +10,17 @@
export default defineComponent({
name: 'NsInput',
setup() {},
setup() {
const handleKeyDown = (event: KeyboardEvent) => {
// Check if the pressed key is a space
if (event.code === 'Space') {
event.preventDefault();
}
};
return {
handleKeyDown,
};
},
});
</script>
<style lang="less" scoped></style>

Loading…
Cancel
Save