Browse Source

Merge branch 'temp' of http://123.60.103.97:3000/xuziqiang/SaaS-lib into temp

deploy-dev
xuziqiang 2 months ago
parent
commit
82b0f4cf96
  1. 7
      hx-ai-intelligent/src/api/IlluminationInfo.ts
  2. 4
      hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts
  3. 7
      hx-ai-intelligent/src/api/index.ts
  4. 2
      hx-ai-intelligent/src/components/ns-steps.vue
  5. 20
      hx-ai-intelligent/src/router/carbonEmissionManage.ts
  6. 2
      hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue
  7. 2
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue
  8. 17
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue
  9. 102
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue
  10. 2
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue
  11. 29
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue
  12. 92
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue
  13. 37
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts
  14. 38
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts
  15. 37
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts
  16. 4
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue
  17. 75
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue
  18. 78
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts
  19. 55
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue
  20. 83
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts
  21. 23
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue
  22. 46
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts
  23. 2
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/config.ts
  24. 437
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue
  25. 56
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue
  26. 9
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue
  27. 1
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/index.vue
  28. 244
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue
  29. 1021
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue
  30. 61
      hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue
  31. 68
      hx-ai-intelligent/src/view/equipmentControl/liftSystem/index.vue
  32. 171
      hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftInfo.vue
  33. 441
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
  34. 239
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue
  35. 860
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs1.vue
  36. 329
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue
  37. 330
      hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs3.vue

7
hx-ai-intelligent/src/api/IlluminationInfo.ts

@ -9,6 +9,13 @@ export enum lightingManage {
// 修改线路的可用/禁用状态
setDisable = '/carbon-smart/IlluminationInfo/revisePanel',
// 控制面板tab页 ================================================
// 获取当前修改的内容对比数据
getChangeList = '/carbon-smart/IlluminationInfo/getLightSceneChangeInfo',
// 提交当前修改
submitChangeList = '/carbon-smart/IlluminationInfo/changeLightScene',
// 计划列表tab页 ================================================
// 获得计划列表tab页的表格数据

4
hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts

@ -55,4 +55,6 @@ export enum carbonInventoryCheck {
findUnitById = '/carbon-smartapi/carbon/inventory/findById',
getDetailsList = '/carbon-smart/api/carbon/inventory/details/getDetailsList',
updateTable = '/carbon-smart/api/carbon/inventory/details/update',
}
// 排放统计接口
emissionStatistic = '/carbon-smart/api/carbon/inventory/emissionStatistic',
}

7
hx-ai-intelligent/src/api/index.ts

@ -50,14 +50,13 @@ export const getAllEnum = async ({
return Promise.resolve(res);
};
/**
* ( enumType)
* ( enumType)
*/
export const getEnum = async ({
api = `${BASE_URL}/operation/enum/getEnum`,
params = {},
}: dictHttpConfig) => {
const res = await http.post(api, params);
const res = await http.get(api, params);
return Promise.resolve(res);
};
};

2
hx-ai-intelligent/src/components/ns-steps.vue

@ -9,7 +9,7 @@
<div class="card">
<div class="card-title">
<a-tag class="card-title-tag" :color="item.color">{{ item.stateName }}</a-tag>
<div class="name">{{ item.createName }}</div>
<div class="name">{{ item.realName }}</div>
<div class="time">{{ item.createTime }}</div>
</div>
<div style="width: 100%; color: #3a3a3a; height: 25px; overflow: auto">

20
hx-ai-intelligent/src/router/carbonEmissionManage.ts

@ -65,6 +65,26 @@ const equipment = {
},
],
},
{
path: 'carbonInventoryCheck',
name: 'CarbonInventoryCheck',
meta: { title: '碳资产', hideChildren: true, icon: 'tanpaiguanli' },
component: Base,
redirect: { name: 'CarbonInventoryCheckIndex' },
children: [
{
path: 'index',
name: 'CarbonInventoryCheckIndex',
// component: () => import('/nerv-lib/saas/view/menuManage/index.vue'),
component: () => import('/@/view/carbonEmissionManage/carbonInventoryCheck/index.vue'),
meta: {
title: '碳资产',
keepAlive: false,
// backApi: [],
},
},
],
},
],
};
export default equipment;

2
hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue

@ -20,7 +20,7 @@
</div>
</div>
<div class="item-box-right">
<img width="54px" height="54px" src="../../../../src/icon/gaojingtonglan.svg" />
<img width="48px" height="48px" src="../../../../src/icon/gaojingtonglan.svg" />
</div>
</div>
</div>

2
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue

@ -288,7 +288,7 @@
},
],
},
params: { energyConsumptionAlarmId: value.id },
params: { energyConsumptionAlarmId: value.id, orgId: orgId.value },
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};

17
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue

@ -96,7 +96,7 @@
<a-select
v-model:value="infoObject.alarmList[index - 1].logic"
style="width: 70px; margin-left: 12px"
:options="ljOptions" />
:options="logicEnum" />
<span style="line-height: 32px; margin-left: 32px">{{ `数值${index}:` }}</span>
<a-input
style="width: 65px; margin-left: 6px"
@ -139,7 +139,7 @@
import { device, group } from '/@/api/deviceManage';
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
import { http } from '/nerv-lib/util';
import { dict } from '/@/api';
import { dict, getEnum } from '/@/api';
const visible = ref(false);
//
@ -256,13 +256,7 @@
);
};
//
const ljOptions = ref<SelectProps['options']>([
{ value: 0, label: '≥' },
{ value: 1, label: '>' },
{ value: 2, label: '≤' },
{ value: 3, label: '<' },
{ value: 4, label: '=' },
]);
const logicEnum = ref<SelectProps['options']>([]);
//
const clickSwitch = () => {
if (infoObject.value.enableRules === 1) {
@ -273,6 +267,8 @@
};
//
const toggle = async (value: any, info: any) => {
let enumData = await getEnum({ params: { enumType: 'LogicEnum' } });
logicEnum.value = enumData.data;
//
let energyType = await dict({ params: { dicKey: 'ENERGY_TYPE' } });
if (energyType.data.data) {
@ -394,6 +390,9 @@
formRef.value.validate().then(() => {
//
let data = { ...infoObject.value };
if (!data.orgId) {
data.orgId = orgId.value;
}
//id
data.energyConsumptionAlarmId = energyAlarm.value.id;
data.errorCode = energyAlarm.value.errorCode;

102
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue

@ -18,7 +18,7 @@
placeholder="请选择告警频率"
style="width: 100%"
allowClear
:options="alarmFrequencyData"
:options="AlarmFrequencyEnum"
@change="handleChangeAlarmFrequency" />
</a-form-item>
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
@ -45,7 +45,7 @@
placeholder="请选择优先级"
style="width: 100%"
allowClear
:options="priorityData" />
:options="PriorityEnum" />
</a-form-item>
<a-form-item label="监测频率" name="monitorFrequency">
<a-select
@ -53,7 +53,7 @@
placeholder="请选择监测频率"
style="width: 100%"
allowClear
:options="monitorFrequencyData" />
:options="MonitorFrequencyEnumm" />
</a-form-item>
<a-form-item label="启用规则">
<a-switch
@ -79,6 +79,7 @@
import { NsMessage } from '/nerv-lib/component';
import { http } from '/nerv-lib/util';
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
import { getAllEnum } from '/@/api';
const visible = ref(false);
//
@ -87,6 +88,11 @@
infoObject.value.intervalDurationUnit = 1;
}
};
//id
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
//
const infoObject = ref({
alarmTitle: null,
@ -94,74 +100,16 @@
priority: null,
monitorFrequency: null,
createWorkOrder: null,
orgId: null,
enableRules: 0,
});
const formRef = ref();
const emit = defineEmits(['editObject']);
const alarmFrequencyData = ref([
{
label: '单次',
value: 1,
},
{
label: '重复',
value: 2,
},
{
label: '累计',
value: 3,
},
]);
const priorityData = ref([
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
]);
const intervalDurationUnitData = ref([
{
label: '分',
value: 1,
},
{
label: '时',
value: 2,
},
{
label: '天',
value: 3,
},
]);
const monitorFrequencyData = ref([
{
label: '小时',
value: 1,
},
{
label: '每日',
value: 2,
},
{
label: '每周',
value: 3,
},
{
label: '月度',
value: 4,
},
{
label: '年度',
value: 5,
},
]);
//
const AlarmFrequencyEnum = ref([]);
const PriorityEnum = ref([]);
const intervalDurationUnitData = ref([]);
const MonitorFrequencyEnumm = ref([]);
const rules = {
alarmTitle: [
{
@ -214,12 +162,29 @@
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
monitorTimeUnit: [{ required: true, message: '请选择监测时长单位', trigger: 'change' }],
};
const getMenu = async () => {
let enumData = await getAllEnum({
params: [
'PriorityEnum',
'MonitorFrequencyEnumm',
'AlarmFrequencyEnum',
'IntervalDurationUnitEnum',
],
});
PriorityEnum.value = enumData.data.PriorityEnum;
MonitorFrequencyEnumm.value = enumData.data.MonitorFrequencyEnumm;
AlarmFrequencyEnum.value = enumData.data.AlarmFrequencyEnum;
intervalDurationUnitData.value = enumData.data.IntervalDurationUnitEnum;
};
const toggle = (value: any) => {
//
getMenu();
//
if (value) {
infoObject.value = value;
} else {
infoObject.value = {
orgId: null,
alarmTitle: null,
alarmFrequency: null,
priority: null,
@ -245,6 +210,9 @@
//
formRef.value.validate().then(() => {
let data = { ...infoObject.value };
if (!data.orgId) {
data.orgId = orgId.value;
}
data.createWorkOrder = Number(data.createWorkOrder);
if (data.alarmFrequency !== 2) {
data.repetitions = null;

2
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue

@ -279,7 +279,7 @@
},
],
},
params: { equipmentAlarmId: value.id },
params: { equipmentAlarmId: value.id, orgId: orgId.value },
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};

29
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue

@ -84,7 +84,7 @@
placeholder="请选择取值类型"
allow-clear
style="width: 100%"
:options="qzOptions" />
:options="valueTypeEnum" />
</a-form-item>
<a-form-item label="异常描述" name="abnormalDescription">
<a-textarea
@ -114,7 +114,7 @@
<a-select
v-model:value="infoObject.alarmList[index - 1].logic"
style="width: 70px; margin-left: 12px"
:options="ljOptions" />
:options="logicEnum" />
<span style="line-height: 32px; margin-left: 32px">{{ `数值${index}:` }}</span>
<a-input
style="width: 65px; margin-left: 6px"
@ -158,6 +158,7 @@
import { device } from '/@/api/deviceManage';
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
import { http } from '/nerv-lib/util';
import { getAllEnum } from '/@/api';
const visible = ref(false);
//
@ -241,18 +242,9 @@
);
};
//
const qzOptions = ref<SelectProps['options']>([
{ value: 1, label: '实时值' },
{ value: 2, label: '平均值' },
]);
const valueTypeEnum = ref<SelectProps['options']>();
//
const ljOptions = ref<SelectProps['options']>([
{ value: 0, label: '≥' },
{ value: 1, label: '>' },
{ value: 2, label: '≤' },
{ value: 3, label: '<' },
{ value: 4, label: '=' },
]);
const logicEnum = ref<SelectProps['options']>([]);
//
const clickSwitch = () => {
@ -299,10 +291,16 @@
}
return null; // null
};
const getMenu = async () => {
let enumData = await getAllEnum({ params: ['LogicEnum', 'ValueTypeEnum'] });
logicEnum.value = enumData.data.LogicEnum;
valueTypeEnum.value = enumData.data.ValueTypeEnum;
};
//
const toggle = async (value: any, info: any) => {
equipmentAlarm.value = info;
//
getMenu();
//
await http
.post(device.queryDeviceTree, { orgId: orgId.value, pageNum: 1, pageSize: 10 })
@ -412,6 +410,9 @@
//
formRef.value.validate().then(() => {
let data = { ...infoObject.value };
if (!data.orgId) {
data.orgId = orgId.value;
}
// id
data.equipmentAlarmId = equipmentAlarm.value.id;
//

92
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue

@ -24,7 +24,7 @@
placeholder="请选择监测时长单位"
style="width: 100%"
allowClear
:options="monitorTimeUnitData" />
:options="MonitorTimeUnitEnum" />
</a-form-item>
<a-form-item label="告警频率" name="alarmFrequency">
<a-select
@ -32,7 +32,7 @@
placeholder="请选择告警频率"
style="width: 100%"
allowClear
:options="alarmFrequencyData"
:options="AlarmFrequencyEnum"
@change="handleChangeAlarmFrequency" />
</a-form-item>
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
@ -49,7 +49,7 @@
placeholder="请选择间隔时长单位"
style="width: 80px"
allowClear
:options="intervalDurationUnitData" />
:options="IntervalDurationUnitEnum" />
</template>
</ns-input-number>
</a-form-item>
@ -59,7 +59,7 @@
placeholder="请选择优先级"
style="width: 100%"
allowClear
:options="priorityData" />
:options="PriorityEnum" />
</a-form-item>
<a-form-item label="启用规则">
<a-switch
@ -85,8 +85,13 @@
import { NsMessage } from '/nerv-lib/component';
import { http } from '/nerv-lib/util';
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
import { getAllEnum } from '/@/api';
const visible = ref(false);
//id
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
//
const infoObject = ref({
id: null,
@ -103,63 +108,27 @@
});
const formRef = ref();
const emit = defineEmits(['editObject']);
const alarmFrequencyData = ref([
{
label: '单次',
value: 1,
},
{
label: '重复',
value: 2,
},
{
label: '累计',
value: 3,
},
]);
const monitorTimeUnitData = ref([
{
label: '分',
value: 1,
},
{
label: '时',
value: 2,
},
{
label: '天',
value: 3,
},
]);
const intervalDurationUnitData = ref([
{
label: '分',
value: 1,
},
{
label: '时',
value: 2,
},
{
label: '天',
value: 3,
},
]);
const priorityData = ref([
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
]);
const AlarmFrequencyEnum = ref([]);
const MonitorTimeUnitEnum = ref([]);
const IntervalDurationUnitEnum = ref([]);
const PriorityEnum = ref([]);
const getMenu = async () => {
let enumData = await getAllEnum({
params: [
'PriorityEnum',
'MonitorTimeUnitEnum',
'AlarmFrequencyEnum',
'IntervalDurationUnitEnum',
],
});
PriorityEnum.value = enumData.data.PriorityEnum;
MonitorTimeUnitEnum.value = enumData.data.MonitorTimeUnitEnum;
AlarmFrequencyEnum.value = enumData.data.AlarmFrequencyEnum;
IntervalDurationUnitEnum.value = enumData.data.IntervalDurationUnitEnum;
};
const toggle = (value: any) => {
//
getMenu();
//
if (value) {
infoObject.value = value;
@ -316,6 +285,9 @@
data.intervalDuration = null;
data.intervalDurationUnit = null;
}
if (!data.orgId) {
data.orgId = orgId.value;
}
http.post(deviceAlarms.addOrUpNewData, data).then(() => {
if (infoObject.value.id) {
NsMessage.success('告警编辑成功');

37
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts

@ -1,7 +1,12 @@
import { http } from '/nerv-lib/util';
import { NsMessage } from '/nerv-lib/component';
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const tableKeyMap = [
{
title: '序号',
@ -155,24 +160,23 @@ export const energyAlarmConfigs = (
{
field: 'priority',
label: '告警优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
@ -214,6 +218,7 @@ export const energyAlarmConfigs = (
},
],
},
params: { orgId: orgId.value },
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};

38
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts

@ -1,6 +1,12 @@
import { http } from '/nerv-lib/util';
import { NsMessage } from '/nerv-lib/component';
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const tableKeyMap = [
{
title: '序号',
@ -153,24 +159,23 @@ export const equipmentAlarmTableConfig = (
{
field: 'priority',
label: '告警优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
@ -212,6 +217,7 @@ export const equipmentAlarmTableConfig = (
},
],
},
params: { orgId: orgId.value },
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};

37
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts

@ -1,5 +1,10 @@
import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const tableKeyMap = [
{
title: '序号',
@ -87,24 +92,23 @@ export const notificationtableConfig = (notificationManagements: any) => {
{
field: 'priority',
label: '告警优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
@ -146,6 +150,7 @@ export const notificationtableConfig = (notificationManagements: any) => {
},
],
},
params: { orgId: orgId.value },
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};

4
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue

@ -67,7 +67,7 @@
errorCode: null,
alarmTitle: null,
abnormalDescription: null,
deviceInfo: null,
monitoringPoints: null,
alarmRepetitions: null,
updateTime: null,
});
@ -84,7 +84,7 @@
errorCode: null,
alarmTitle: null,
abnormalDescription: null,
deviceInfo: null,
monitoringPoints: null,
alarmRepetitions: null,
updateTime: null,
};

75
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue

@ -11,7 +11,7 @@
<a-tabs>
<a-tab-pane key="1" tab="更新状态">
<div style="width: 100%; padding: 24px">
<a-form ref="formRef" :model="infoObject">
<a-form ref="formRef" :model="infoObject" :rules="rules">
<a-form-item ref="state" label="当前状态" name="state">
<a-select
v-model:value="infoObject.state"
@ -56,6 +56,7 @@
import { NsMessage } from '/nerv-lib/component';
import { http } from '/nerv-lib/util';
import { energyAlarmApi } from '/@/api/alarmManagement/energyAlarm';
import { getEnum } from '/@/api';
export default defineComponent({
components: { NsSteps },
@ -67,31 +68,53 @@
const energyAlarm = ref({});
const stateOptions = ref();
const logList = ref([]);
const formRef = ref();
const config = ref({
size: logList.value.length,
dataSource: logList.value,
});
//
const rules = {
remarks: [
{
required: true,
message: '请输入备注',
trigger: 'change',
validator: (rules, remarks, cbfn) => {
if (remarks && remarks.trim() !== '') {
cbfn();
} else {
cbfn('备注不能为空');
}
},
},
],
state: [{ required: true, message: '请选择当前状态', trigger: 'change' }],
};
const handleClose = () => {
showEdit.value = true;
energyAlarm.value = {};
infoObject.value = {};
visible.value = false;
config.value.dataSource = [];
};
const btnClick = () => {
delete infoObject.value.createTime;
infoObject.value.alarmEnergyConsumptionLogId = energyAlarm.value.id;
if (energyAlarm.value.createWorkOrder === 0) {
http.post(energyAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => {
if (res.msg === 'success') {
NsMessage.success('操作成功');
showEdit.value = true;
energyAlarm.value = {};
infoObject.value = {};
visible.value = false;
emit('logAdd', null);
}
});
}
formRef.value.validate().then(() => {
delete infoObject.value.createTime;
infoObject.value.alarmEnergyConsumptionLogId = energyAlarm.value.id;
if (energyAlarm.value.createWorkOrder === 0) {
http.post(energyAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => {
if (res.msg === 'success') {
NsMessage.success('操作成功');
showEdit.value = true;
energyAlarm.value = {};
infoObject.value = {};
visible.value = false;
emit('logAdd', null);
}
});
}
});
};
//
const changeShowEdit = () => {
@ -103,23 +126,11 @@
const toggle = async (data) => {
energyAlarm.value = { ...data };
visible.value = true;
if (energyAlarm.value.createWorkOrder === 1) {
stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 4, label: '超时' },
{ value: 5, label: '已关闭' },
];
} else {
stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 5, label: '已关闭' },
];
let states = await getEnum({ params: { enumType: 'AlarmLogStateEnum' } });
stateOptions.value = states.data;
if (energyAlarm.value.createWorkOrder !== 1) {
stateOptions.value = stateOptions.value.filter((item) => item.value !== 4);
}
console.log(data, 'data');
await http
.post(energyAlarmApi.getSelectAlarmEnergyConsumptionLogStatusProcess, {
alarmEnergyConsumptionLogId: data.id,
@ -149,6 +160,8 @@
infoObject,
changeShowEdit,
showEdit,
rules,
formRef,
energyAlarm,
stateOptions,
btnClick,

78
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts

@ -1,6 +1,11 @@
import { energyAlarmApi } from '/@/api/alarmManagement/energyAlarm';
import { dict } from '/@/api';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const tableKeyMap = [
{
title: '序号',
@ -20,7 +25,7 @@ const tableKeyMap = [
},
{
title: '类型',
dataIndex: 'priority',
dataIndex: 'dataSourcesTypeName',
},
{
title: '优先级',
@ -103,55 +108,45 @@ export const notificationtableConfig = (look: any, status: any) => {
{
field: 'priority',
label: '优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
field: 'alarmLogState',
label: '状态',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择状态',
api: () => getEnum({ params: { enumType: 'AlarmLogStateEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '待处理',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '已完成',
value: 3,
},
{
label: '超时',
value: 4,
},
{
label: '关闭',
value: 5,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择状态',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
@ -181,6 +176,7 @@ export const notificationtableConfig = (look: any, status: any) => {
},
],
},
params: { orgId: orgId.value },
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};

55
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue

@ -56,6 +56,7 @@
import { NsMessage } from '/nerv-lib/component';
import { http } from '/nerv-lib/util';
import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm';
import { getEnum } from '/@/api';
export default defineComponent({
components: { NsSteps },
@ -67,6 +68,7 @@
const equipmentAlarm = ref({});
const stateOptions = ref();
const logList = ref([]);
const formRef = ref();
const config = ref({
size: logList.value.length,
dataSource: logList.value,
@ -94,22 +96,26 @@
equipmentAlarm.value = {};
infoObject.value = {};
visible.value = false;
config.value.dataSource = [];
logList.value = [];
};
const btnClick = () => {
delete infoObject.value.createTime;
infoObject.value.alarmEquipmentLogId = equipmentAlarm.value.id;
if (equipmentAlarm.value.createWorkOrder === 0) {
http.post(equipmentAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => {
if (res.msg === 'success') {
NsMessage.success('操作成功');
showEdit.value = true;
equipmentAlarm.value = {};
infoObject.value = {};
visible.value = false;
emit('logAdd', null);
}
});
}
formRef.value.validate().then(() => {
delete infoObject.value.createTime;
infoObject.value.alarmEquipmentLogId = equipmentAlarm.value.id;
if (equipmentAlarm.value.createWorkOrder === 0) {
http.post(equipmentAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => {
if (res.msg === 'success') {
NsMessage.success('操作成功');
showEdit.value = true;
equipmentAlarm.value = {};
infoObject.value = {};
visible.value = false;
emit('logAdd', null);
}
});
}
});
};
//
const changeShowEdit = () => {
@ -121,23 +127,11 @@
const toggle = async (data) => {
equipmentAlarm.value = { ...data };
visible.value = true;
if (equipmentAlarm.value.createWorkOrder === 1) {
stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 4, label: '超时' },
{ value: 5, label: '已关闭' },
];
} else {
stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 5, label: '已关闭' },
];
let states = await getEnum({ params: { enumType: 'AlarmLogStateEnum' } });
stateOptions.value = states.data;
if (equipmentAlarm.value.createWorkOrder !== 1) {
stateOptions.value = stateOptions.value.filter((item) => item.value !== 4);
}
console.log(data, 'data');
await http
.post(equipmentAlarmApi.getSelectAlarmEquipmentLogStatusProcess, {
alarmEquipmentLogId: data.id,
@ -166,6 +160,7 @@
return {
infoObject,
rules,
formRef,
changeShowEdit,
showEdit,
equipmentAlarm,

83
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts

@ -1,4 +1,10 @@
import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const tableKeyMap = [
{
@ -20,18 +26,23 @@ const tableKeyMap = [
{
title: '优先级',
dataIndex: 'priority',
width: 80,
},
{
title: '状态',
dataIndex: 'alarmLogState',
width: 100,
},
{
title: '错误码',
dataIndex: 'errorCode',
width: 100,
},
{
title: '设备信息',
dataIndex: 'deviceInfo',
width: 400,
// textEllipsis: true,
},
{
title: '更新时间',
@ -40,6 +51,7 @@ const tableKeyMap = [
{
title: '重复次数',
dataIndex: 'alarmRepetitions',
width: 80,
},
];
export const notificationtableConfig = (look: any, status: any) => {
@ -77,55 +89,45 @@ export const notificationtableConfig = (look: any, status: any) => {
{
field: 'priority',
label: '优先级',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择告警优先级',
api: () => getEnum({ params: { enumType: 'PriorityEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '紧急',
value: 1,
},
{
label: '重要',
value: 2,
},
{
label: '一般',
value: 3,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择告警优先级',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
field: 'alarmLogState',
label: '状态',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择状态',
api: () => getEnum({ params: { enumType: 'AlarmLogStateEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '待处理',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '已完成',
value: 3,
},
{
label: '超时',
value: 4,
},
{
label: '关闭',
value: 5,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择状态',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
@ -155,6 +157,7 @@ export const notificationtableConfig = (look: any, status: any) => {
},
],
},
params: { orgId: orgId.value },
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};

23
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue

@ -47,6 +47,7 @@
import { defineComponent } from 'vue';
import { ref } from 'vue';
import NsSteps from '/@/components/ns-steps.vue';
import { getEnum } from '/@/api';
export default defineComponent({
components: { NsSteps },
@ -54,19 +55,13 @@
setup() {
const visible = ref(false);
const infoObject = ref({});
const stateOptions = ref([
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
{ value: 3, label: '已完成' },
{ value: 4, label: '超时' },
{ value: 5, label: '已关闭' },
]);
const stateOptions = ref();
const logList = ref([
{ createName: '李四', state: 3, time: '2024-03-10 10:00:00', desc: '完成' },
{ createName: '王五', state: 5, time: '2024-03-10 10:00:00' },
{ createName: '王五', state: 4, time: '2024-03-10 10:00:00' },
{ createName: '王五', state: 2, time: '2024-03-10 10:00:00', desc: '创建工单' },
{ createName: '赵六', state: 1, time: '2024-03-10 10:00:00' },
{ realName: '李四', state: 3, createTime: '2024-03-10 10:00:00', remarks: '完成' },
{ realName: '王五', state: 5, createTime: '2024-03-10 10:00:00' },
{ realName: '王五', state: 4, createTime: '2024-03-10 10:00:00' },
{ realName: '王五', state: 2, createTime: '2024-03-10 10:00:00', remarks: '创建工单' },
{ realName: '赵六', state: 1, createTime: '2024-03-10 10:00:00' },
]);
const config = ref({
size: logList.value.length,
@ -78,7 +73,9 @@
const btnClick = () => {
visible.value = false;
};
const toggle = (data) => {
const toggle = async (data) => {
let states = await getEnum({ params: { enumType: 'AlarmLogStateEnum' } });
stateOptions.value = states.data;
infoObject.value = { ...logList.value[0] };
let stateMap = {
1: '待处理',

46
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts

@ -1,4 +1,10 @@
import { gatewayAlarmApi } from '/@/api/alarmManagement/gatewayAlarm';
import { ref } from 'vue';
import { getEnum } from '/@/api';
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const tableKeyMap = [
{
title: '序号',
@ -99,32 +105,23 @@ export const notificationtableConfig = (look: any, status: any) => {
{
field: 'alarmLogState',
label: '状态',
component: 'NsSelect',
component: 'nsSelectApi',
// dynamicParams: {
// id: 'deviceName', //帮定上级联动数据
// },
componentProps: {
placeholder: '请选择状态',
api: () => getEnum({ params: { enumType: 'AlarmLogStateEnum' } }),
immediate: true,
allowClear: true,
options: [
{
label: '待处理',
value: 1,
},
{
label: '处理中',
value: 2,
},
{
label: '已完成',
value: 3,
},
{
label: '超时',
value: 4,
},
{
label: '关闭',
value: 5,
},
],
resultField: 'data',
labelField: 'label',
valueField: 'value',
placeholder: '请选择状态',
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
// autoSelectFirst: true,
},
},
{
@ -139,6 +136,7 @@ export const notificationtableConfig = (look: any, status: any) => {
},
],
},
params: { orgId: orgId.value },
// pagination: { pageSizeOptions: false },
rowKey: 'id',
};

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

@ -196,7 +196,7 @@ export const formConfig = (disabled) => {
componentProps: {
placeholder: '请输入参考文献',
maxLength: 300,
showCount:true
showCount: true,
},
},
],

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

@ -4,16 +4,15 @@
<div class="main">
<div class="left">
<div class="top">
<a-form style="width: 100%;margin: 0 auto;">
<a-form style="width: 100%; margin: 0 auto">
<div class="ns-form-title"><div class="title">排放分类</div></div>
<div style="padding: 0 16px !important;width: 100%;">
<div style="padding: 0 16px !important; width: 100%">
<a-row>
<a-col :span="24" style="margin-bottom: 16px;">
<a-col :span="24" style="margin-bottom: 16px">
<a-input-search
v-model:value="selectTreeDataValue"
placeholder="请输入关键词"
@search="onSearchTreeData"
/>
@search="onSearchTreeData" />
</a-col>
</a-row>
</div>
@ -21,7 +20,7 @@
<a-tree
v-if="gData && gData.length > 0"
class="draggable-tree"
style="padding: 0 16px !important;"
style="padding: 0 16px !important"
draggable
show-line
checkable
@ -39,10 +38,21 @@
<template #title="data">
<div class="treeRow">
<div>
<span v-if="data.emissionName && selectTreeDataValue && data.emissionName.indexOf(selectTreeDataValue) > -1">
{{ data.emissionName.substring(0, data.emissionName.indexOf(selectTreeDataValue)) }}
<span style="color: #f50" >{{ selectTreeDataValue }}</span>
{{ data.emissionName.substring(data.emissionName.indexOf(selectTreeDataValue) + selectTreeDataValue.length) }}
<span
v-if="
data.emissionName &&
selectTreeDataValue &&
data.emissionName.indexOf(selectTreeDataValue) > -1
">
{{
data.emissionName.substring(0, data.emissionName.indexOf(selectTreeDataValue))
}}
<span style="color: #f50">{{ selectTreeDataValue }}</span>
{{
data.emissionName.substring(
data.emissionName.indexOf(selectTreeDataValue) + selectTreeDataValue.length,
)
}}
</span>
<span v-else>{{ data.emissionName }}</span>
</div>
@ -62,12 +72,12 @@
</template>
</a-tree>
<div class="addTreeNode">
<a-button type="primary" style="width:100%;" @click="addTreeNodeData">新增</a-button>
<a-button type="primary" style="width: 100%" @click="addTreeNodeData">新增</a-button>
</div>
</div>
</div>
<div class="right">
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" :scroll="{ x: 2000}">
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" :scroll="{ x: 2000 }">
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'emissionGas'">
{{ record.emissionGas.label }}
@ -77,10 +87,7 @@
</div>
<!-- 新增树节点 -->
<ns-modal :visible="treeNodeAdd" :title="operationTree" @ok="handleOk" @cancel="handleCancel">
<ns-input
v-model:value="addTreeNode"
class="input"
placeholder="请输入排放类型"/>
<ns-input v-model:value="addTreeNode" class="input" placeholder="请输入排放类型" />
</ns-modal>
<!-- 新增数据库数据 -->
<a-drawer
@ -117,15 +124,21 @@
<a-button type="primary" @click="addUnit">新增单位</a-button>
</div>
<div class="treePart">
<div style="width: 100%;height: 7%;display: flex;justify-content: center;align-items: center;">
<div
style="
width: 100%;
height: 7%;
display: flex;
justify-content: center;
align-items: center;
">
<a-select
ref="select"
:value="unitTreeParams.id"
allowClear
style="width: 96%"
placeholder="选择分组"
@change="handleChange"
>
@change="handleChange">
<a-select-option v-for="(item, index) in groupData" :key="index" :value="item.id">
{{ item.cnValue }}
</a-select-option>
@ -146,8 +159,11 @@
<div class="actionMore">
<EditOutlined v-if="!data.parentId" @click="editGroup(data)" />
<EditOutlined v-else @click="editUnit(data)" />
<MinusCircleOutlined style="margin-left: 6px;" @click="delUnit(data)" />
<PlusCircleOutlined v-if="!data.parentId" style="margin-left: 6px;" @click="addUnit(data)" />
<MinusCircleOutlined style="margin-left: 6px" @click="delUnit(data)" />
<PlusCircleOutlined
v-if="!data.parentId"
style="margin-left: 6px"
@click="addUnit(data)" />
</div>
</div>
</template>
@ -158,31 +174,32 @@
</template>
</a-drawer>
<!-- 新增分组管理 -->
<ns-modal :visible="addGroupManage" :title="addGroupTitle" @ok="unitOrGroupOk" @cancel="groupCancel">
<a-form
ref="unitFormRef"
:model="formState"
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<ns-modal
:visible="addGroupManage"
:title="addGroupTitle"
@ok="unitOrGroupOk"
@cancel="groupCancel">
<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-form-item>
</a-form>
</ns-modal>
<!-- 新增单位 -->
<ns-modal :visible="addUnitManage" :title="addUnitTitle" @ok="unitOrGroupOk" @cancel="unitCancel">
<a-form
ref="unitFormRef"
:model="formState"
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<ns-modal
:visible="addUnitManage"
:title="addUnitTitle"
@ok="unitOrGroupOk"
@cancel="unitCancel">
<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-form-item>
<a-form-item label="选择分组" name="parentId" :required="true">
<a-select v-model:value="formState.parentId" placeholder="请选择所属分组" :disabled="canSelect">
<a-select
v-model:value="formState.parentId"
placeholder="请选择所属分组"
:disabled="canSelect">
<a-select-option v-for="(item, index) in groupData" :key="index" :value="item.id">
{{ item.cnValue }}
</a-select-option>
@ -193,12 +210,17 @@
</div>
</template>
<script lang="ts" setup>
import { MoreOutlined,ExclamationCircleOutlined,EditOutlined,PlusCircleOutlined,MinusCircleOutlined } from '@ant-design/icons-vue';
import {
ExclamationCircleOutlined,
EditOutlined,
PlusCircleOutlined,
MinusCircleOutlined,
} from '@ant-design/icons-vue';
import { Modal } from 'ant-design-vue';
import { computed, createVNode, defineComponent, reactive, ref, watchEffect,watch,toRaw } from 'vue';
import { computed, createVNode, reactive, ref, watchEffect, watch, toRaw } from 'vue';
import { http } from '/nerv-lib/util/http';
import { NsMessage, NsModal } from '/nerv-lib/component';
import { formConfig, formConfig2 } from './config';
import { NsMessage } from '/nerv-lib/component';
import { formConfig } from './config';
import { carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary';
import type {
AntTreeNodeDragEnterEvent,
@ -208,10 +230,21 @@
import { log } from 'node:console';
defineOptions({ name: 'OrderListIndex' });
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const dynamicDisabled = computed(() => {
return formRef.value?.validateResult && userAuthList.value?.length;
});
const fetch = (api, params = { orgId }) => {
return http.post(api, params);
};
const selectTreeDataValue = ref<string>('');
const mainRef = ref();
const data = reactive({});
let formData = ref({});
let formData = ref({
orgId: orgId.value,
});
const formRef = ref();
const visible = ref(false);
const unitManagement = ref(false);
@ -220,7 +253,7 @@
const disabled = ref(false);
const treeNodeAdd = ref<boolean>(false);
const operationTree = ref<string>('新增');
const showOperation = ref(false)
const showOperation = ref(false);
const opMap: any = ref({
type: 'add',
@ -234,15 +267,6 @@
const casData = ref([]);
const treeData = ref([]);
const userAuthList = ref([]);
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const dynamicDisabled = computed(() => {
return formRef.value?.validateResult && userAuthList.value?.length;
});
const fetch = (api, params = { orgId }) => {
return http.post(api, params);
};
//
const x = 3;
@ -358,7 +382,7 @@
for (let i = 0; i < tree.length; i++) {
const node = tree[i];
if (node.children) {
if (node.children.some(item => item.key === key)) {
if (node.children.some((item) => item.key === key)) {
parentKey = node.key;
} else if (getParentKey(key, node.children)) {
parentKey = getParentKey(key, node.children);
@ -374,7 +398,7 @@
expandedKeys.value = keys;
autoExpandParent.value = false;
};
watch(selectTreeDataValue, value => {
watch(selectTreeDataValue, (value) => {
const expanded = dataList
.map((item: TreeProps['treeData'][number]) => {
if (item.title.indexOf(value) > -1) {
@ -393,70 +417,70 @@
console.log('or use this.value', value.value);
};
//
const checkedIds = ref([])
const emissionType = ref()
const checkedIds = ref([]);
const emissionType = ref();
const checkTreeNode = (checkedKeys, info) => {
checkedTreeNodeKeys.value = checkedKeys
checkedIds.value = []
info.checkedNodes.forEach(item=>{
checkedIds.value.push(item.id)
})
checkedTreeNodeKeys.value = checkedKeys;
checkedIds.value = [];
info.checkedNodes.forEach((item) => {
checkedIds.value.push(item.id);
});
sessionStorage.setItem('checkedTreeNode', checkedIds.value);
emissionType.value = checkedIds.value.join(',')
emissionType.value = checkedIds.value.join(',');
mainRef.value?.nsTableRef.reload();
}
};
//
const addTreeNodeData = () => {
operationTree.value='新增'
operationTree.value = '新增';
treeNodeAdd.value = true;
editTreeNode.value.type = 'create'
editTreeNode.value.type = 'create';
};
//
const editTreeNodeData = (data) => {
operationTree.value='编辑'
operationTree.value = '编辑';
treeNodeAdd.value = true;
editTreeNode.value.type = 'update'
addTreeNode.value = data.emissionName
}
editTreeNode.value.type = 'update';
addTreeNode.value = data.emissionName;
};
//
const deleteTreeNode = () => {
Modal.confirm({
title: '警告',
icon: createVNode(ExclamationCircleOutlined),
content: '确定要删除么?',
okText: '确认',
okType: 'primary',
cancelText: '取消',
onOk() {
http.post(carbonEmissionFactorLibrary.delTreeNode,editTreeNode.value).then(() => {
getOrgTree()
NsMessage.success('操作成功');
});
},
onCancel() {
console.log('Cancel');
},
});
}
title: '警告',
icon: createVNode(ExclamationCircleOutlined),
content: '确定要删除么?',
okText: '确认',
okType: 'primary',
cancelText: '取消',
onOk() {
http.post(carbonEmissionFactorLibrary.delTreeNode, editTreeNode.value).then(() => {
getOrgTree();
NsMessage.success('操作成功');
});
},
onCancel() {
console.log('Cancel');
},
});
};
// /
const addTreeNode =ref()
const addTreeNode = ref();
const handleOk = (e: MouseEvent) => {
editTreeNode.value.emissionName = addTreeNode.value
http.post(carbonEmissionFactorLibrary.creat,editTreeNode.value).then(() => {
getOrgTree()
editTreeNode.value.emissionName = addTreeNode.value;
http.post(carbonEmissionFactorLibrary.creat, editTreeNode.value).then(() => {
getOrgTree();
NsMessage.success('操作成功');
addTreeNode.value = ''
addTreeNode.value = '';
treeNodeAdd.value = false;
});
};
const handleCancel = () => {
addTreeNode.value = ''
addTreeNode.value = '';
treeNodeAdd.value = false;
};
//
const getOrgTree = (params?) => {
fetch(carbonEmissionFactorLibrary.getCarbonFactorTree, params).then((res) => {
gData.value = res.data
const getOrgTree = () => {
fetch(carbonEmissionFactorLibrary.getCarbonFactorTree, { orgId: orgId.value }).then((res) => {
gData.value = res.data;
//
// const selectedNodes = [];
// checkedTreeNodeKeys.value.forEach(key => {
@ -469,31 +493,31 @@
// getDefaultIds(selectedNodes)
});
};
const defaultIds = ref([])
const defaultIds = ref([]);
const getDefaultIds = (selectedNodes) => {
selectedNodes.forEach(items => {
defaultIds.value.push(items.id)
if(items.children){
getDefaultIds(items.children)
selectedNodes.forEach((items) => {
defaultIds.value.push(items.id);
if (items.children) {
getDefaultIds(items.children);
}
})
emissionType.value = defaultIds.value.join(',')
checkedIds.value = defaultIds.value
});
emissionType.value = defaultIds.value.join(',');
checkedIds.value = defaultIds.value;
sessionStorage.setItem('checkedTreeNode', checkedIds.value);
}
};
getOrgTree();
//
const editTreeNode = ref({})
const editTreeNode = ref({});
const onSelect = (selectedKeys: string[], info: any) => {
if(info.selected){
showOperation.value = true
if (info.selected) {
showOperation.value = true;
editTreeNode.value = {
id:info.selectedNodes[0].id,
level:info.selectedNodes[0].level,
dataNumber:info.selectedNodes[0].dataNumber,
sortNumber:info.selectedNodes[0].sortNumber,
parentEmissionId:info.selectedNodes[0].parentEmissionId,
}
id: info.selectedNodes[0].id,
level: info.selectedNodes[0].level,
dataNumber: info.selectedNodes[0].dataNumber,
sortNumber: info.selectedNodes[0].sortNumber,
parentEmissionId: info.selectedNodes[0].parentEmissionId,
};
}
};
@ -516,13 +540,14 @@
};
const handleSelect = (selectedKeys: any, info: any) => {
fetch(carbonEmissionFactorLibrary.queryDeptTree, { orgId: info.node?.orgInfo.orgId }).then((res) => {
treeData2.value = res.data;
});
fetch(carbonEmissionFactorLibrary.queryDeptTree, { orgId: info.node?.orgInfo.orgId }).then(
(res) => {
treeData2.value = res.data;
},
);
tableFetch({ orgId: info.node?.orgInfo.orgId });
};
const onClose = () => {
visible.value = false;
formData.value = {};
@ -530,8 +555,8 @@
};
const closeUnitManag = () => {
unitTreeParams.value = {
grp: 'MEASUREMENT_UNIT'
}
grp: 'MEASUREMENT_UNIT',
};
unitManagement.value = false;
};
const onEdit = () => {
@ -542,8 +567,7 @@
// return;
// }
opMap.value.fuc &&
opMap.value.fuc({ ...formData.value });
opMap.value.fuc && opMap.value.fuc({ ...formData.value });
});
};
const tableConfig = ref({
@ -551,7 +575,7 @@
api: carbonEmissionFactorLibrary.getTableList,
params: {
orgId,
emissionType
emissionType,
},
headerActions: [
{
@ -562,13 +586,13 @@
opMap.value.type = 'add';
setTimeout(() => {
formData.value = {
carbonEmissionPrefix:'t',
numberOfReferences:'10'
carbonEmissionPrefix: 't',
numberOfReferences: '10',
};
userAuthList.value.splice(0);
});
opMap.value.fuc = (formData: any) => {
formData.emissionType = formData.emissionType[formData.emissionType.length - 1]
formData.emissionType = formData.emissionType[formData.emissionType.length - 1];
return http.post(carbonEmissionFactorLibrary.creatOrUpdate, formData).then(() => {
mainRef.value?.nsTableRef.reload();
visible.value = false;
@ -607,11 +631,13 @@
type: 'primary',
name: 'userAdd',
handle: () => {
unitManagement.value = true,
fetch(carbonEmissionFactorLibrary.findOutermost,{grp:'MEASUREMENT_UNIT'}).then((res) => {
groupData.value = res.data
});
getUnitTree()
(unitManagement.value = true),
fetch(carbonEmissionFactorLibrary.findOutermost, { grp: 'MEASUREMENT_UNIT' }).then(
(res) => {
groupData.value = res.data;
},
);
getUnitTree();
},
},
],
@ -672,14 +698,14 @@
handle: (record: any) => {
userAuthList.value.splice(0);
setTimeout(() => {
const measurementUnit = ref([])
http.post(carbonEmissionFactorLibrary.getCarbonFactorTree,{}).then((res) => {
measurementUnit.value = res.data
http.post(carbonEmissionFactorLibrary.findById,{ id: record.id } ).then((res) => {
const measurementUnit = ref([]);
http.post(carbonEmissionFactorLibrary.getCarbonFactorTree, {}).then((res) => {
measurementUnit.value = res.data;
http.post(carbonEmissionFactorLibrary.findById, { id: record.id }).then((res) => {
if (res.data.emissionType) {
let selectDevice = ref([Number(res.data.emissionType)]);
findParentIds(measurementUnit.value, res.data.emissionType, selectDevice.value);
res.data.emissionType = selectDevice
res.data.emissionType = selectDevice;
}
formData.value = res.data;
});
@ -687,9 +713,9 @@
}, 10);
opMap.value.type = 'edit';
opMap.value.fuc = (formData: any) => {
formData.emissionType = formData.emissionType[formData.emissionType.length - 1]
if(formData.emissionGas.value){
formData.emissionGas = formData.emissionGas.value
formData.emissionType = formData.emissionType[formData.emissionType.length - 1];
if (formData.emissionGas.value) {
formData.emissionGas = formData.emissionGas.value;
}
return http.post(carbonEmissionFactorLibrary.creatOrUpdate, formData).then(() => {
mainRef.value?.nsTableRef.reload();
@ -756,7 +782,7 @@
},
{
label: 'SF6',
value:3,
value: 3,
},
{
label: 'CH4',
@ -815,9 +841,9 @@
result.unshift(item.id); // id
findParentIds(tree, item.id, result); // id
break; // 退
}else{
for(let childsItem of item.children){
if(childsItem.children && childsItem.children.length > 0){
} else {
for (let childsItem of item.children) {
if (childsItem.children && childsItem.children.length > 0) {
if (childsItem.children.some((child: any) => child.id === Number(targetId))) {
result.unshift(childsItem.id); // id
findParentIds(tree, childsItem.id, result); // id
@ -829,24 +855,26 @@
}
}
}
//
const unitExpandedKeys = ref<string[]>();
const unitSelectedKeys = ref<string[]>([]);
const unitTreeParams = ref({
grp: 'MEASUREMENT_UNIT'
})
const groupData = ref([])
const unitTreeParams = ref({
grp: 'MEASUREMENT_UNIT',
});
const groupData = ref([]);
const unitTreeData = ref<TreeProps['treeData']>(genData);
const handleChange = (value: string) => {
unitTreeParams.value.id = value
getUnitTree()
unitTreeParams.value.id = value;
getUnitTree();
};
const getUnitTree = () => {
fetch(carbonEmissionFactorLibrary.dictionaryUnitManagement, unitTreeParams.value).then((res) => {
unitTreeData.value = res.data
});
}
fetch(carbonEmissionFactorLibrary.dictionaryUnitManagement, unitTreeParams.value).then(
(res) => {
unitTreeData.value = res.data;
},
);
};
//
const labelCol = { span: 5 };
const wrapperCol = { span: 19 };
@ -857,100 +885,100 @@
const formState = ref({
grp: 'MEASUREMENT_UNIT',
grpDesc: '计量单位',
})
});
const addGroupTitle = ref<string>('新增分组');
const addUnitTitle = ref<string>('新增单位');
const addGroup = () => {
addGroupTitle.value = '新增分组'
addGroupManage.value = true
addGroupTitle.value = '新增分组';
addGroupManage.value = true;
};
const editGroup = (data) => {
addGroupTitle.value = '编辑分组'
addGroupManage.value = true
formState.value.id = data.id
formState.value.cnValue = data.cnValue
addGroupTitle.value = '编辑分组';
addGroupManage.value = true;
formState.value.id = data.id;
formState.value.cnValue = data.cnValue;
};
const groupCancel = () => {
addGroupManage.value = false
addGroupManage.value = false;
unitFormRef.value.resetFields();
formState.value = {
grp: 'MEASUREMENT_UNIT',
grpDesc: '计量单位',
}
};
};
const addUnit = (data) => {
if(data.id){
canSelect.value = true
formState.value.parentId = data.id
}else{
canSelect.value = false
if (data.id) {
canSelect.value = true;
formState.value.parentId = data.id;
} else {
canSelect.value = false;
}
fetch(carbonEmissionFactorLibrary.findOutermost).then((res) => {
groupData.value = res.data
groupData.value = res.data;
});
addUnitTitle.value = '新增单位'
addUnitManage.value = true
addUnitTitle.value = '新增单位';
addUnitManage.value = true;
};
const editUnit = (data) => {
addUnitTitle.value = '编辑单位'
addUnitManage.value = true
canSelect.value = true
formState.value.parentId = data.parentId
formState.value.id = data.id
formState.value.cnValue = data.cnValue
addUnitTitle.value = '编辑单位';
addUnitManage.value = true;
canSelect.value = true;
formState.value.parentId = data.parentId;
formState.value.id = data.id;
formState.value.cnValue = data.cnValue;
};
const unitCancel = () => {
addUnitManage.value = false
addUnitManage.value = false;
unitFormRef.value.resetFields();
formState.value = {
grp: 'MEASUREMENT_UNIT',
grpDesc: '计量单位',
}
};
};
const unitOrGroupOk = () => {
unitFormRef.value
.validate()
.then(() => {
console.log('values', formState, toRaw(formState));
if(formState.value.id){
if (formState.value.id) {
fetch(carbonEmissionFactorLibrary.updateDictionary, formState.value).then((res) => {
unitTreeData.value = res.data
if(formState.value.parentId){
addUnitManage.value = false
}else{
addGroupManage.value = false
unitTreeData.value = res.data;
if (formState.value.parentId) {
addUnitManage.value = false;
} else {
addGroupManage.value = false;
}
unitFormRef.value.resetFields();
formState.value = {
grp: 'MEASUREMENT_UNIT',
grpDesc: '计量单位',
}
getUnitTree()
};
getUnitTree();
});
}else{
} else {
fetch(carbonEmissionFactorLibrary.createDictionary, formState.value).then((res) => {
unitTreeData.value = res.data
if(formState.value.parentId){
addUnitManage.value = false
}else{
addGroupManage.value = false
unitTreeData.value = res.data;
if (formState.value.parentId) {
addUnitManage.value = false;
} else {
addGroupManage.value = false;
}
unitFormRef.value.resetFields();
formState.value = {
grp: 'MEASUREMENT_UNIT',
grpDesc: '计量单位',
}
getUnitTree()
};
getUnitTree();
});
}
})
.catch(error => {
.catch((error) => {
console.log('error', error);
});
};
//
const delUnit = (data) => {
formState.value.id = data.id
formState.value.id = data.id;
Modal.confirm({
title: '警告',
content: '确定要删除吗?',
@ -958,9 +986,9 @@
okType: 'primary',
cancelText: '取消',
onOk() {
fetch(carbonEmissionFactorLibrary.delDictionary , formState.value).then((res) => {
fetch(carbonEmissionFactorLibrary.delDictionary, formState.value).then((res) => {
message.success('操作成功!');
getUnitTree()
getUnitTree();
});
},
onCancel() {
@ -968,7 +996,6 @@
},
});
};
</script>
<style lang="less" scoped>
.main {
@ -988,9 +1015,9 @@
}
display: flex;
flex-direction: column;
.top{
.top {
position: relative;
.addTreeNode{
.addTreeNode {
width: 100%;
padding: 16px;
position: absolute;
@ -1008,7 +1035,7 @@
// border-bottom: 5px solid rgb(229, 235, 240);
// overflow-y: auto;
}
.ns-form-title{
.ns-form-title {
font-weight: bold;
user-select: text;
padding: 16px;
@ -1016,7 +1043,7 @@
padding-bottom: 10px;
border-bottom: 1px solid #e9e9e9;
}
.title{
.title {
text-align: left;
height: 32px;
line-height: 32px;
@ -1034,21 +1061,21 @@
height: 13px;
width: 3px;
border-radius: 1px;
background-color: #2778FF;
background-color: #2778ff;
}
.treeRow {
display: flex;
justify-content: space-between;
align-items: center;
}
.addButton{
.addButton {
width: 70%;
height: 5vh;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.treePart{
.treePart {
width: 70%;
height: 100%;
display: flex;

56
hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue

@ -1,20 +1,24 @@
<template>
<div>
<a-table
:columns="column"
:data-source="data"
<a-table
:columns="column"
:data-source="data"
bordered
:pagination="false"
:scroll="{ x: 2000,y:480 }">
:scroll="{ x: 2000, y: 480 }">
<template #title>
<a-date-picker v-model:value="selectYear" picker="year" @change="changeYearData" valueFormat="YYYY" />
<a-date-picker
v-model:value="selectYear"
picker="year"
@change="changeYearData"
valueFormat="YYYY" />
</template>
</a-table>
<a-pagination
<a-pagination
:current="queryParams.pageNum"
:total="total"
:page-size="queryParams.pageSize"
style="display: flex;justify-content: center;margin-top: 16px;"
style="display: flex; justify-content: center; margin-top: 16px"
:show-size-changer="true"
:show-quick-jumper="true"
@change="onChange" />
@ -35,26 +39,26 @@
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const fetch = (api, params = { orgId } ) => {
const fetch = (api, params = { orgId }) => {
return http.post(api, params);
};
const data = ref([]);
const selectYear = ref<Dayjs>(dayjs( new Date().getFullYear().toString()));
const total = ref<number>()
const selectYear = ref<Dayjs>(dayjs(new Date().getFullYear().toString()));
const total = ref<number>();
const queryParams = ref({
pageNum: 1,
pageSize: 10,
year: selectYear.value.format('YYYY'),
orgId: orgId.value
})
orgId: orgId.value,
});
//
const changeYearData = () => {
queryParams.value.year = selectYear.value
getTableList()
}
queryParams.value.year = selectYear.value;
getTableList();
};
//
const column: TableColumnsType [] = [
const column: TableColumnsType[] = [
{
title: '排放类型',
dataIndex: 'cnValue',
@ -163,24 +167,24 @@
};
//
const getTableList = () => {
fetch(carbonEmission.carbonEmissionStatistics , queryParams.value).then((res) => {
data.value = res.data
total.value = res.data.length
fetch(carbonEmission.carbonEmissionStatistics, queryParams.value).then((res) => {
data.value = res.data;
total.value = res.data.length;
});
};
getTableList()
getTableList();
//
const onChange = (pageNumber: number,size: number) => {
const onChange = (pageNumber: number, size: number) => {
queryParams.value.pageNum = pageNumber;
queryParams.value.pageSize = size;
getTableList()
getTableList();
};
</script>
<style scoped lang="less">
:deep(.ant-table-title){
:deep(.ant-table-title) {
display: flex;
}
:deep(.ant-table-container){
:deep(.ant-table-container) {
padding: 0px 16px;
}
</style>
@ -189,4 +193,4 @@
td.column-money {
text-align: right !important;
}
</style>
</style>

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

@ -165,19 +165,16 @@
</div>
</template>
<script lang="ts" setup>
import { ref,reactive, toRaw } from 'vue';
import type { UnwrapRef } from 'vue';
import { ref, toRaw } from 'vue';
import type { Rule } from 'ant-design-vue/es/form';
import { Pagination,message,Modal } from 'ant-design-vue';
import { InboxOutlined } from '@ant-design/icons-vue';
import type { CascaderProps,TreeSelectProps,UploadChangeParam } from 'ant-design-vue';
import { Pagination,message,Modal } from 'ant-design-vue';
import type { TreeSelectProps,UploadChangeParam } from 'ant-design-vue';
import { NsMessage } from '/nerv-lib/component';
import dayjs, { Dayjs } from 'dayjs';
import { http } from '/nerv-lib/util/http';
import { tableColumns } from '../config';
import { energyConsumption,carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary';
import { group } from '/@/api/deviceManage';
import { dict } from '/@/api';
defineOptions({
energyType: 'EnergyConsumption', // name
components: {

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

@ -31,4 +31,3 @@
// }
};
</script>

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

@ -2,16 +2,15 @@
<div class="main">
<div class="left">
<div class="top">
<a-form style="width: 100%;margin: 0 auto;">
<a-form style="width: 100%; margin: 0 auto">
<div class="ns-form-title"><div class="title">因子分类</div></div>
<div style="padding: 0 16px !important;width: 100%;">
<div style="padding: 0 16px !important; width: 100%">
<a-row>
<a-col :span="24" style="margin-bottom: 16px;">
<a-col :span="24" style="margin-bottom: 16px">
<a-input-search
v-model:value="searchValue"
placeholder="请输入关键词"
@search="onSearchTreeData"
/>
@search="onSearchTreeData" />
</a-col>
</a-row>
</div>
@ -25,13 +24,15 @@
show-line
@expand="onExpand"
@select="onSelect"
style="padding: 0 16px !important;"
>
style="padding: 0 16px !important">
<template #title="data">
<span v-if="data.energyType && searchValue && data.energyType.indexOf(searchValue) > -1">
<span
v-if="data.energyType && searchValue && data.energyType.indexOf(searchValue) > -1">
{{ data.energyType.substring(0, data.energyType.indexOf(searchValue)) }}
<span style="color: #f50">{{ searchValue }}</span>
{{ data.energyType.substring(data.energyType.indexOf(searchValue) + searchValue.length) }}
{{
data.energyType.substring(data.energyType.indexOf(searchValue) + searchValue.length)
}}
</span>
<span v-else>{{ data.energyType }}</span>
</template>
@ -61,33 +62,35 @@
</template>
</a-table> -->
<ns-view-list-table v-bind="tableConfig" :model="tableData" ref="mainRef" />
<a-pagination
<a-pagination
:current="queryParams.pageNum"
:total="total"
:page-size="queryParams.pageSize"
style="display: flex;justify-content: center;margin-top: 16px;"
style="display: flex; justify-content: center; margin-top: 16px"
:show-size-changer="true"
:show-quick-jumper="true"
@change="onChange" />
<!-- 新增/编辑 -->
<a-drawer
:width="700"
:visible="visible"
:body-style="{ paddingBottom: '80px' }"
:footer-style="{ textAlign: 'right' }"
destroyOnClose
@close="onClose">
<a-form
ref="formRef"
:model="formState"
:rules="rules"
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<!-- 新增/编辑 -->
<a-drawer
:width="700"
:visible="visible"
:body-style="{ paddingBottom: '80px' }"
:footer-style="{ textAlign: 'right' }"
destroyOnClose
@close="onClose">
<a-form
ref="formRef"
:model="formState"
:rules="rules"
:label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row>
<a-col :span="12">
<a-form-item ref="name" label="日期范围" name="dateRange">
<a-range-picker v-model:value="formState.dateRange" picker="month" valueFormat="YYYY-MM" />
<a-range-picker
v-model:value="formState.dateRange"
picker="month"
valueFormat="YYYY-MM" />
</a-form-item>
</a-col>
<a-col :span="12">
@ -103,20 +106,24 @@
</a-form-item>
</a-col>
</a-row>
</a-form>
<a-table
:columns="drawerColumns"
:data-source="newTableData"
bordered
rowKey="id"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectionChange, type: 'radio' }"
:pagination="false">
</a-table>
<template #footer>
<a-button style="margin-right: 8px" @click="onClose">取消</a-button>
<a-button type="primary" @click="onSubmit">确定</a-button>
</template>
</a-drawer>
</a-form>
<a-table
:columns="drawerColumns"
:data-source="newTableData"
bordered
rowKey="id"
:rowSelection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectionChange,
type: 'radio',
}"
:pagination="false">
</a-table>
<template #footer>
<a-button style="margin-right: 8px" @click="onClose">取消</a-button>
<a-button type="primary" @click="onSubmit">确定</a-button>
</template>
</a-drawer>
</div>
</div>
</template>
@ -124,10 +131,14 @@
<script lang="ts" setup>
import { ref, watch, toRaw } from 'vue';
import type { TreeProps } from 'ant-design-vue';
import { Pagination,Modal } from 'ant-design-vue';
import { columns,drawerColumns } from '../config';
import { Pagination, Modal } from 'ant-design-vue';
import { columns, drawerColumns } from '../config';
import { http } from '/nerv-lib/util/http';
import { quickCalculation,carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary';
import {
quickCalculation,
carbonEmissionFactorLibrary,
} from '/@/api/carbonEmissionFactorLibrary';
import { or } from '@vueuse/core';
defineOptions({
energyType: 'quickCalculation', // name
components: {
@ -137,7 +148,7 @@
const orgId = ref('');
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
orgId.value = result;
const fetch = (api, params = { orgId } ) => {
const fetch = (api, params = { orgId }) => {
return http.post(api, params);
};
const mainRef = ref();
@ -191,7 +202,7 @@
for (let i = 0; i < tree.length; i++) {
const node = tree[i];
if (node.children) {
if (node.children.some(item => item.key === key)) {
if (node.children.some((item) => item.key === key)) {
parentKey = node.key;
} else if (getParentKey(key, node.children)) {
parentKey = getParentKey(key, node.children);
@ -211,17 +222,17 @@
autoExpandParent.value = false;
};
//
const energyType = ref()
const energyType = ref();
const onSelect = (selectedKey: string[], info: any) => {
selectedKeys.value = selectedKey;
if(info.selected){
energyType.value = info.node.id
statsId.value = info.node.id
selectedKeys.value = selectedKey;
if (info.selected) {
energyType.value = info.node.id;
statsId.value = info.node.id;
mainRef.value?.nsTableRef.reload();
}
};
watch(searchValue, value => {
watch(searchValue, (value) => {
const expanded = dataList
.map((item: TreeProps['treeData'][number]) => {
if (item.title.indexOf(value) > -1) {
@ -235,34 +246,33 @@
autoExpandParent.value = true;
});
//
const onSearchTreeData = () => {
};
const statsId = ref()
const onSearchTreeData = () => {};
const statsId = ref();
//
const getTreeData = () => {
fetch(quickCalculation.carbonQuickTree).then((res) => {
gData.value = res.data
energyType.value = gData.value[0].children[0].id
statsId.value = gData.value[0].children[0].id
fetch(quickCalculation.carbonQuickTree, { orgId: orgId.value }).then((res) => {
gData.value = res.data;
energyType.value = gData.value[0].children[0].id;
statsId.value = gData.value[0].children[0].id;
mainRef.value?.nsTableRef.reload();
});
};
getTreeData()
getTreeData();
//
const total = ref<number>()
const total = ref<number>();
const queryParams = ref({
pageNum: 1,
pageSize: 10,
orgId: orgId.value
})
orgId: orgId.value,
});
const tableData = ref([]);
const tableConfig = ref({
title: '排放因子库',
api: quickCalculation.queryCarbonEmissionPage,
params: {
orgId,
energyType
energyType,
},
headerActions: [
{
@ -270,8 +280,8 @@
name: 'userAdd',
type: 'primary',
handle: () => {
visible.value = true
getNewTable()
visible.value = true;
getNewTable();
},
},
],
@ -320,12 +330,12 @@
name: 'userEdit',
handle: (record: any) => {
selectedRowKeys.value = [record.factorId];
formState.value.id = record.id
formState.value.emissionFactors = record.emissionFactors
formState.value.id = record.id;
formState.value.emissionFactors = record.emissionFactors;
formState.value.dateRange = [record.startTime, record.endTime];
formState.value.factorId = record.factorId
visible.value = true
getNewTable()
formState.value.factorId = record.factorId;
visible.value = true;
getNewTable();
},
},
{
@ -342,13 +352,13 @@
});
//
const getTableList = () => {
fetch(quickCalculation.queryCarbonEmissionPage,queryParams.value).then((res) => {
tableData.value = res.data.records
total.value = res.data.total
fetch(quickCalculation.queryCarbonEmissionPage, queryParams.value).then((res) => {
tableData.value = res.data.records;
total.value = res.data.total;
});
};
//
const onChange = (pageNumber: number,size: number) => {
const onChange = (pageNumber: number, size: number) => {
queryParams.value.pageNum = pageNumber;
queryParams.value.pageSize = size;
mainRef.value?.nsTableRef.reload();
@ -357,9 +367,11 @@
const formRef = ref();
const labelCol = { span: 6 };
const wrapperCol = { span: 18 };
const formState = ref({})
const formState = ref({
orgId: orgId.value,
});
const visible = ref(false);
// form
const rules: Record<string, Rule[]> = {
dateRange: [{ required: true, message: '请选择日期范围', trigger: 'change' }],
@ -367,65 +379,65 @@
};
//
const addNewData = () => {
visible.value = true
getNewTable()
visible.value = true;
getNewTable();
};
//
const selectedRowKeys = ref([]);
const onSelectionChange = (selectedKeys, selectedRows) => {
selectedRowKeys.value = selectedKeys;
formState.value.emissionFactors = selectedRows[0].emissionFactors
formState.value.factorId = selectedRows[0].id
formState.value.emissionFactors = selectedRows[0].emissionFactors;
formState.value.factorId = selectedRows[0].id;
};
const queryData = ref({
orgId: orgId.value,
pageNum: 1,
pageSize: 999
})
const newTableData = ref([])
pageSize: 999,
});
const newTableData = ref([]);
const getNewTable = () => {
fetch(carbonEmissionFactorLibrary.getTableList,queryData.value).then((res) => {
newTableData.value = res.data.records
fetch(carbonEmissionFactorLibrary.getTableList, queryData.value).then((res) => {
newTableData.value = res.data.records;
});
};
//
const editData = (record) =>{
const editData = (record) => {
selectedRowKeys.value = [record.factorId];
formState.value.id = record.id
formState.value.emissionFactors = record.emissionFactors
formState.value.id = record.id;
formState.value.emissionFactors = record.emissionFactors;
formState.value.dateRange = [record.startTime, record.endTime];
formState.value.factorId = record.factorId
visible.value = true
getNewTable()
formState.value.factorId = record.factorId;
visible.value = true;
getNewTable();
};
//
const onSubmit = () => {
formRef.value
.validate()
.then(() => {
formState.value.statsId = statsId.value
formState.value.startTime = formState.value.dateRange[0]
formState.value.endTime = formState.value.dateRange[1]
formState.value.statsId = statsId.value;
formState.value.startTime = formState.value.dateRange[0];
formState.value.endTime = formState.value.dateRange[1];
console.log('values', formState, toRaw(formState));
if(formState.value.id){
fetch(quickCalculation.update,formState.value).then((res) => {
visible.value = false
if (formState.value.id) {
fetch(quickCalculation.update, formState.value).then((res) => {
visible.value = false;
selectedRowKeys.value = [];
formState.value = {}
formState.value = {};
formRef.value.resetFields();
mainRef.value?.nsTableRef.reload();
});
}else{
fetch(quickCalculation.creat,formState.value).then((res) => {
visible.value = false
} else {
fetch(quickCalculation.creat, formState.value).then((res) => {
visible.value = false;
selectedRowKeys.value = [];
formState.value = {}
formState.value = {};
formRef.value.resetFields();
mainRef.value?.nsTableRef.reload();
});
}
})
.catch(error => {
.catch((error) => {
console.log('error', error);
});
};
@ -438,9 +450,9 @@
okType: 'primary',
cancelText: '取消',
onOk() {
fetch(quickCalculation.del , {id : record.id }).then((res) => {
fetch(quickCalculation.del, { id: record.id }).then((res) => {
message.success('操作成功!');
getTableList()
getTableList();
});
},
onCancel() {
@ -452,7 +464,7 @@
const onClose = () => {
visible.value = false;
selectedRowKeys.value = [];
formState.value = {}
formState.value = {};
formRef.value.resetFields();
};
</script>
@ -474,9 +486,9 @@
display: flex;
flex-direction: column;
.top{
.top {
position: relative;
.addTreeNode{
.addTreeNode {
width: 100%;
padding: 16px;
position: absolute;
@ -499,7 +511,7 @@
.top {
overflow: auto;
}
.ns-form-title{
.ns-form-title {
font-weight: bold;
user-select: text;
padding: 16px;
@ -507,7 +519,7 @@
padding-bottom: 10px;
border-bottom: 1px solid #e9e9e9;
}
.title{
.title {
text-align: left;
height: 32px;
line-height: 32px;
@ -525,17 +537,17 @@
height: 13px;
width: 3px;
border-radius: 1px;
background-color: #2778FF;
background-color: #2778ff;
}
:deep(.ant-table-title) {
display: flex;
height: 100%;
align-items: center;
}
.ns-table-title{
.ns-table-title {
font-weight: bold;
}
.buttonGroup{
.buttonGroup {
margin-left: 1vw;
width: 5vw;
display: flex;
@ -547,4 +559,4 @@
td.column-money {
text-align: right !important;
}
</style>
</style>

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

File diff suppressed because it is too large

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

@ -20,8 +20,7 @@
:model="formState"
:rules="rules"
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
:wrapper-col="wrapperCol">
<a-form-item ref="name" label="报告名称" name="reportName">
<a-input v-model:value="formState.reportName" placeholder="请输入报告名称" />
</a-form-item>
@ -38,7 +37,10 @@
</a-select>
</a-form-item>
<a-form-item ref="name" label="报告范围" name="reportScope">
<a-range-picker v-model:value="formState.reportScope" picker="month" valueFormat="YYYY-MM" />
<a-range-picker
v-model:value="formState.reportScope"
picker="month"
valueFormat="YYYY-MM" />
</a-form-item>
</a-form>
<template #footer>
@ -49,7 +51,7 @@
</template>
<script lang="ts" setup>
import { ref,toRaw } from 'vue';
import { ref, toRaw } from 'vue';
import { http } from '/nerv-lib/util/http';
import { carbonInventoryCheck } from '/@/api/carbonEmissionFactorLibrary';
import fillIn from './fillInPage/index.vue';
@ -65,7 +67,7 @@
const fillInPage = ref(false);
//
const visible = ref(false);
const formState = ref({})
const formState = ref({});
const formRef = ref();
const labelCol = { span: 5 };
const wrapperCol = { span: 19 };
@ -80,7 +82,7 @@
//
const onClose = () => {
visible.value = false;
formState.value = {}
formState.value = {};
formRef.value.resetFields();
};
//
@ -89,15 +91,15 @@
.validate()
.then(() => {
console.log('values', formState, toRaw(formState));
formState.value.enterpriseOrgId = orgId.value
formState.value.startTime = formState.value.reportScope[0]
formState.value.endTime = formState.value.reportScope[1]
fetch(carbonInventoryCheck.createOrUpdate,formState.value).then((res) => {
visible.value = false
formState.value.enterpriseOrgId = orgId.value;
formState.value.startTime = formState.value.reportScope[0];
formState.value.endTime = formState.value.reportScope[1];
fetch(carbonInventoryCheck.createOrUpdate, formState.value).then((res) => {
visible.value = false;
mainRef.value?.nsTableRef.reload();
});
})
.catch(error => {
.catch((error) => {
console.log('error', error);
});
};
@ -110,7 +112,7 @@
title: '数据库',
api: carbonInventoryCheck.carbonInventoryList,
params: {
orgId
orgId,
},
headerActions: [
{
@ -118,7 +120,7 @@
name: 'userAdd',
type: 'primary',
handle: () => {
visible.value = true
visible.value = true;
},
},
],
@ -161,10 +163,10 @@
label: '编辑',
name: 'userEdit',
handle: (record: any) => {
visible.value = true
fetch(carbonInventoryCheck.findById,{id:record.id}).then((res) => {
formState.value = res.data
formState.value.reportScope = [res.data.startTime,res.data.endTime]
visible.value = true;
fetch(carbonInventoryCheck.findById, { id: record.id }).then((res) => {
formState.value = res.data;
formState.value.reportScope = [res.data.startTime, res.data.endTime];
});
},
},
@ -172,17 +174,16 @@
label: '填报',
name: 'fillIn',
handle: (record: any) => {
isMainPage.value = false
fillInPage.value = true
reportId.value = record.id
year.value = record.reportYear
isMainPage.value = false;
fillInPage.value = true;
reportId.value = record.id;
year.value = record.reportYear;
},
},
{
label: '下载',
name: 'download',
handle: (record: any) => {
},
handle: (record: any) => {},
},
{
label: '删除',
@ -213,7 +214,7 @@
componentProps: {
valueFormat: 'YYYY',
placeholder: ['报告年度', '报告年度'],
picker:"year"
picker: 'year',
},
},
],
@ -222,12 +223,10 @@
rowKey: 'id',
});
//
const updateData = (newDataOne,newDataTwo) => {
isMainPage.value = newDataOne
fillInPage.value = newDataTwo
const updateData = (newDataOne, newDataTwo) => {
isMainPage.value = newDataOne;
fillInPage.value = newDataTwo;
};
</script>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>

68
hx-ai-intelligent/src/view/equipmentControl/liftSystem/index.vue

@ -1,53 +1,47 @@
<template>
<div class="map-box">
<div class="map">
<liftInfo></liftInfo>
<liftInfo />
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import liftInfo from './liftInfo.vue'
//
import { message } from 'ant-design-vue';
import { ref, onMounted } from 'vue';
import liftInfo from './liftInfo.vue';
//
// ===========================================================
// ===========================================================
onMounted(() => {
})
// tab ========================================================
//
const dataSource = ref([]);
onMounted(() => {});
// tab ========================================================
//
const dataSource = ref([]);
</script>
<style lang="less" scoped>
.map-box {
//
// - - -
--on: #0DFFA4;
//
--off: #BFCDE2;
// -
--pause: #FFBC46;
// -
--stop: #F36163;
//
--fault: #FF7636;
//
--unknown: #A742FF;
width: 100%;
height: 100%;
.map {
width: 1280px;
height: 720px;
background-image: url(../image/bg.jpg);
.map-box {
//
// - - -
--on: #0dffa4;
//
--off: #bfcde2;
// -
--pause: #ffbc46;
// -
--stop: #f36163;
//
--fault: #ff7636;
//
--unknown: #a742ff;
width: 100%;
height: 100%;
.map {
width: 1280px;
height: 720px;
background-image: url(../image/bg.jpg);
}
}
}
</style>

171
hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftInfo.vue

@ -10,7 +10,7 @@
<div class="item-box">
<div class="icon">
<div class="icon-item">
<img src="../image/liftState/lift-normal.svg" alt="">
<img src="../image/liftState/lift-normal.svg" alt="" />
</div>
</div>
</div>
@ -21,7 +21,7 @@
<div class="item-box">
<div class="icon">
<div class="icon-item">
<img src="../image/liftState/lift-normal.svg" alt="">
<img src="../image/liftState/lift-normal.svg" alt="" />
</div>
</div>
</div>
@ -32,7 +32,7 @@
<div class="item-box">
<div class="icon">
<div class="icon-item">
<img src="../image/liftState/lift-normal.svg" alt="">
<img src="../image/liftState/lift-normal.svg" alt="" />
</div>
</div>
</div>
@ -43,109 +43,104 @@
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { ref, onMounted } from 'vue';
//
//
// ===========================================================
// ===========================================================
onMounted(() => {
})
// tab ========================================================
//
const runState = ref('1');
//
const liftState = ref('2');
onMounted(() => {});
// tab ========================================================
//
const runState = ref('1');
//
const liftState = ref('2');
</script>
<style lang="less" scoped>
//
.info-box {
//
--text: rgb(20, 255, 255);
//
.info-box {
//
--text: rgb(20, 255, 255);
width: 240px;
height: 130px;
display: flex;
gap: 5px;
flex-direction: column;
background: rgb(17, 44, 86, 0.9);
border-radius: 8px;
box-sizing: border-box;
padding: 8px;
border: 3px solid var(--text);
//
.box-title {
height: auto;
color: var(--text);
//
.dot {
display: inline-block;
width: 2px;
height: 16px;
vertical-align: middle;
background: var(--text);
}
//
span {
padding-left: 8px;
}
}
//
.box-inner {
flex: 1;
width: 240px;
height: 130px;
display: flex;
padding: 0 10px;
// 3
.item {
gap: 5px;
flex-direction: column;
background: rgb(17, 44, 86, 0.9);
border-radius: 8px;
box-sizing: border-box;
padding: 8px;
border: 3px solid var(--text);
//
.box-title {
height: auto;
color: var(--text);
//
.dot {
display: inline-block;
width: 2px;
height: 16px;
vertical-align: middle;
background: var(--text);
}
//
span {
padding-left: 8px;
}
}
//
.box-inner {
flex: 1;
display: flex;
flex-direction: column;
//
.item-box {
padding: 0 10px;
// 3
.item {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
// border: 1px solid red;
.icon {
width: 55px;
height: 55px;
background-image: url(../image/box.svg);
background-size: 130% 130%;
background-repeat: no-repeat;
background-position: left -8px top -8px;
flex-direction: column;
//
.item-box {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
// border: 1px solid red;
position: relative;
.icon-item {
position: absolute;
width: 20px;
height: 20px;
left: 0;
right: 0;
bottom: 0;
top: 0;
margin: auto;
img {
width: 100%;
height: 100%;
.icon {
width: 55px;
height: 55px;
background-image: url(../image/box.svg);
background-size: 130% 130%;
background-repeat: no-repeat;
background-position: left -8px top -8px;
// border: 1px solid red;
position: relative;
.icon-item {
position: absolute;
width: 20px;
height: 20px;
left: 0;
right: 0;
bottom: 0;
top: 0;
margin: auto;
img {
width: 100%;
height: 100%;
}
}
}
}
}
.item-text {
height: 20px;
text-align: center;
font-size: 12px;
color: white;
user-select: none;
.item-text {
height: 20px;
text-align: center;
font-size: 12px;
color: white;
user-select: none;
}
}
}
}
}
</style>

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

@ -1,273 +1,276 @@
<template>
<div class="lighting-box">
<div class="lighting-img-box">
<!-- 左上角区域切换 -->
<div class="btn-box">
<button v-for="item in floorData" class="btn-item" @click=changeFloor(item.childList)>{{ item.name }}</button>
<div class="lighting-box">
<div class="lighting-img-box">
<!-- 左上角区域切换 -->
<div class="btn-box">
<button v-for="item in floorData" class="btn-item" @click="changeFloor(item.childList)">{{
item.name
}}</button>
</div>
<!-- 楼层区域 -->
<div class="area">
<div
v-for="(item, index) in treeData"
:class="computedClass(item.id)"
@click="changeThisArea([item])"
:key="index">
<div v-for="(v, i) in item.childList" :key="i" class="light-group">
<div class="group-shadow" @click.stop="changeThisArea([item, v])">
<div :class="computedClass(v.id)" class="shadow-box"></div>
</div>
<!-- 楼层区域 -->
<div class="area">
<div
v-for="(item, index) in treeData"
:class="computedClass(item.id)"
@click="changeThisArea([item])"
:key="index">
<div v-for="(v, i) in item.childList" :key="i" class="light-group">
<div class="group-shadow" @click.stop="changeThisArea([item, v])">
<div :class="computedClass(v.id)" class="shadow-box"></div>
</div>
</div>
</div>
</div>
<!-- 照明设备 -->
<div class="lights">
<light v-for="(item, index) in bulbs"
:key="index"
:styleObject="item.styleText"
:type="item.type"
:visible="item.visible">
</light>
</div>
</div>
<!-- 右侧抽屉的触发按钮 -->
<div class="drawer-box-in" v-if="!visible" @click="toggleDrawer">
<double-left-outlined class="drawer-icon" style="color: white" />
</div>
<!-- 左侧抽屉的关闭按钮 -->
<div class="drawer-box-out" v-if="visible" @click="toggleDrawer">
<double-right-outlined class="drawer-icon" style="color: white;" />
</div>
</div>
<!-- 右侧抽屉 -->
<a-drawer
v-model:visible="visible"
class="drawer-item"
width="496"
placement="right"
:body-style="{ background: 'rgba(0, 0, 0)', opacity: 0.8 }"
:closable="false"
id="drawer"
:maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="控制面板">
<tabs1
ref="tabs1Ref"
@changeArea="changeArea"
@reset="reset"
:treeData="treeData"
:nowArea="nowArea"
></tabs1>
</a-tab-pane>
<a-tab-pane key="2" tab="计划列表" force-render>
<tabs2></tabs2>
</a-tab-pane>
<a-tab-pane key="3" tab="日志">
<tabs3></tabs3>
</a-tab-pane>
</a-tabs>
</a-drawer>
</div>
<!-- 照明设备 -->
<div class="lights">
<light
v-for="(item, index) in bulbs"
:key="index"
:styleObject="item.styleText"
:type="item.type"
:visible="item.visible" />
</div>
</div>
<!-- 右侧抽屉的触发按钮 -->
<div class="drawer-box-in" v-if="!visible" @click="toggleDrawer">
<double-left-outlined class="drawer-icon" style="color: white" />
</div>
<!-- 左侧抽屉的关闭按钮 -->
<div class="drawer-box-out" v-if="visible" @click="toggleDrawer">
<double-right-outlined class="drawer-icon" style="color: white" />
</div>
<!-- 右侧抽屉 -->
<a-drawer
v-model:visible="visible"
class="drawer-item"
width="496"
:forceRender="preload"
placement="right"
:body-style="{ background: 'rgba(0, 0, 0)', opacity: 0.8 }"
:closable="false"
id="drawer"
:maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="控制面板">
<tabs1 ref="tabs1Ref" @changeArea="changeArea" @reset="reset" :treeData="treeData" />
</a-tab-pane>
<a-tab-pane key="2" tab="计划列表" force-render>
<tabs2 />
</a-tab-pane>
<a-tab-pane key="3" tab="日志">
<tabs3 />
</a-tab-pane>
</a-tabs>
</a-drawer>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
//
import light from './light.vue';
import tabs1 from './tabs1.vue'
import tabs2 from './tabs2.vue'
import tabs3 from './tabs3.vue'
//
import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
// ICON
import {
DoubleLeftOutlined,
DoubleRightOutlined
} from '@ant-design/icons-vue';
<script setup lang="ts">
import { ref, onMounted } from 'vue';
//
import light from './light.vue';
import tabs1 from './tabs1.vue';
import tabs2 from './tabs2.vue';
import tabs3 from './tabs3.vue';
//
import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
// ICON
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons-vue';
// =======================================================
// =======================================================
onMounted(() => {
onMounted(() => {
// 线
getAllArea()
})
getAllArea();
});
// =====================================================
// flagref
const preload = ref(false);
//
const floorData = ref([])
//
const changeFloor = (area: any) => {
// =====================================================
//
const floorData = ref([]);
//
const changeFloor = (area: any) => {
//
reset()
reset();
//
changeArea(['1'])
changeArea(['1']);
//
treeData.value = area
treeData.value = area;
//
treeData.value[0].selected = true
}
treeData.value[0].selected = true;
};
// =====================================================
// =====================================================
//
const treeData = ref([])
// id
const nowArea = ref('1')
// -
const area = ref(['1'])
// 线 -
const bulbs = ref([
//
const treeData = ref([]);
// -
const area = ref(['1']);
// 线 -
const bulbs = ref([
{
styleText: { left: '180px', bottom: '200px' },
area: 1,
type: 1,
visible: true
styleText: { left: '180px', bottom: '200px' },
area: 1,
type: 1,
visible: true,
},
{
styleText: { left: '230px', bottom: '125px' },
area: 1,
type: 2,
visible: true
styleText: { left: '230px', bottom: '125px' },
area: 1,
type: 2,
visible: true,
},
{
styleText: { left: '320px', bottom: '140px' },
area: 1,
type: 3,
visible: true
styleText: { left: '320px', bottom: '140px' },
area: 1,
type: 3,
visible: true,
},
{
styleText: { left: '245px', bottom: '230px' },
area: 1,
type: 3,
visible: true
styleText: { left: '245px', bottom: '230px' },
area: 1,
type: 3,
visible: true,
},
{
styleText: { left: '405px', bottom: '230px' },
area: 2,
type: 3,
visible: true
styleText: { left: '405px', bottom: '230px' },
area: 2,
type: 3,
visible: true,
},
{
styleText: { left: '460px', bottom: '180px' },
area: 2,
type: 3,
visible: true
styleText: { left: '460px', bottom: '180px' },
area: 2,
type: 3,
visible: true,
},
{
styleText: { left: '360px', bottom: '275px' },
area: 2,
type: 3,
visible: true
styleText: { left: '360px', bottom: '275px' },
area: 2,
type: 3,
visible: true,
},
{
styleText: { left: '715px', bottom: '320px' },
area: 3,
type: 1,
visible: true
styleText: { left: '715px', bottom: '320px' },
area: 3,
type: 1,
visible: true,
},
])
// 线
const changeArea = (result: any) => {
console.log(result,'changeArea')
]);
// 线
const changeArea = (result: any) => {
console.log(result, 'changeArea');
//
if (Array.isArray(result)) {
area.value = result
//
area.value = result;
//
} else {
area.value.length = 0
area.value[0] = String(result)
}
}
//
const changeThisArea = (result: any) => {
tabs1Ref.value.changeCancel()
console.log(result, 'changeThisArea')
area.value.length = 0;
area.value[0] = String(result);
}
};
//
const changeThisArea = (result: any) => {
console.log(result, 'changeThisArea');
//
reset()
reset();
let level1 = result[0];
area.value.length = 0
area.value.length = 0;
//
if (result.length === 1) {
result[0].selected = true
area.value.push(result[0].id)
result[0].selected = true;
area.value.push(result[0].id);
//
tabs1Ref.value.changeArea(result[0]);
// + 线
} else if (result.length === 2) {
//
if (!level1) {
level1 = treeData.value[0]
}
// true
level1.selected = result[1].selected = true
area.value.splice(0, 0, level1.id, result[1].id)
//
if (!level1) {
level1 = treeData.value[0];
}
// true
level1.selected = result[1].selected = true;
area.value.splice(0, 0, level1.id, result[1].id);
//
tabs1Ref.value.changeArea(result[0]);
tabs1Ref.value.changeLine(result[1]);
}
nowArea.value = level1.id
}
//
const reset = () => {
};
//
const reset = () => {
treeData.value.forEach((item: any) => {
item.selected = false
item.childList.forEach((i: any) => {
i.selected = false
})
})
}
//
const computedClass = (string: string) => {
item.selected = false;
item.childList.forEach((i: any) => {
i.selected = false;
});
});
};
//
const computedClass = (string: string) => {
if (area.value.indexOf(string) != -1) {
return `isActive area-item area${string}`
return `isActive area-item area${string}`;
} else {
return `area-item area${string}`
return `area-item area${string}`;
}
}
};
const getAllArea = () => {
http.get(lightingManage.getArea, { projectId: 'HLlmTZp8' }).then(res => {
const data = res.data
floorData.value = data
/** 使
* @param id 用于判断样式和层级的前端属性
* @param selected 用于表示是否选中的前端属性
*/
data.forEach((floor: any) => {
floor.childList.forEach((item: any, index: number) => {
if (index == 0) {
item.selected = true
} else {
item.selected = false
}
item.id = String(index + 1)
item.childList.forEach((v: any, i: number) => {
v.selected = false
v.id = (index + 1) + '-' + (i + 1)
})
})
})
treeData.value = data[0].childList
})
}
//
const getAllArea = () => {
http.get(lightingManage.getArea, { projectId: 'HLlmTZp8' }).then((res) => {
const data = res.data;
floorData.value = data;
/** 使
* @param id 用于判断样式和层级的前端属性
* @param selected 用于表示是否选中的前端属性
*/
data.forEach((floor: any) => {
floor.childList.forEach((item: any, index: number) => {
if (index == 0) {
item.selected = true;
} else {
item.selected = false;
}
item.id = String(index + 1);
item.childList.forEach((v: any, i: number) => {
v.selected = false;
v.id = index + 1 + '-' + (i + 1);
});
});
});
// 线 1-1
treeData.value = data[0].childList;
//
preload.value = true;
});
};
// =====================================================
// =====================================================
// - tab
let activeKey = ref('1');
// -
let visible = ref(false);
// -
const toggleDrawer = () => {
// - tab
let activeKey = ref('1');
// -
let visible = ref(false);
// -
const toggleDrawer = () => {
visible.value = !visible.value;
};
const tabs1Ref = ref()
};
// tab1
const tabs1Ref = ref();
</script>
<style lang="less" scoped>
@import "./index.less";
//
.isActive {
@import './index.less';
//
.isActive {
border: 3px solid white !important;
}
// tab
:deep(.ant-tabs-tab-btn) {
}
// tab
:deep(.ant-tabs-tab-btn) {
color: white;
}
}
</style>

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

@ -1,59 +1,59 @@
<template>
<a-popover color="rgba(0, 0, 0, 0.8)">
<template #content>
<div class="light-tag">
<div class="light-tag-tit">
<div>
<img src="/asset/image//bulbLogo/21962.png" alt="" />
<span class="tag-text">{{ result.name }}</span>
</div>
<button class="right-button">{{ type == 1 ? '正常' : '关闭' }}</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="result">自动</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">亮度</span>
<span class="result">{{ result.brightness }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制场景</span>
<span class="result">{{ result.automatic2 }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">色温</span>
<span class="result">{{ result.brightness3 }}</span>
</div>
</div>
</div>
</template>
<div class="icon-box" :style="styleObject" v-show="visible">
<img v-if="type == 1" class="icon-item" src="/asset/image/bulbLogo/22394.png" alt="">
<img v-if="type == 2" class="icon-item" src="/asset/image/bulbLogo/22396.png" alt="">
<img v-if="type == 3" class="icon-item" src="/asset/image/bulbLogo/22400.png" alt="">
<a-popover color="rgba(0, 0, 0, 0.8)">
<template #content>
<div class="light-tag">
<div class="light-tag-tit">
<div>
<img src="/asset/image//bulbLogo/21962.png" alt="" />
<span class="tag-text">{{ result.name }}</span>
</div>
<button class="right-button">{{ type == 1 ? '正常' : '关闭' }}</button>
</div>
</a-popover>
<div class="light-tag-box">
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制模式</span>
<span class="result">自动</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">亮度</span>
<span class="result">{{ result.brightness }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">控制场景</span>
<span class="result">{{ result.automatic2 }}</span>
</div>
<div class="tag-box-item">
<img src="/asset/image//bulbLogo/22496.png" alt="" />
<span class="title">色温</span>
<span class="result">{{ result.brightness3 }}</span>
</div>
</div>
</div>
</template>
<div class="icon-box" :style="styleObject" v-show="visible">
<img v-if="type == 1" class="icon-item" src="/asset/image/bulbLogo/22394.png" alt="" />
<img v-if="type == 2" class="icon-item" src="/asset/image/bulbLogo/22396.png" alt="" />
<img v-if="type == 3" class="icon-item" src="/asset/image/bulbLogo/22400.png" alt="" />
</div>
</a-popover>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { ref } from 'vue';
defineProps({
defineProps({
styleObject: Object,
type: Number,
visible: {
type: Boolean,
default: false
}
});
type: Boolean,
default: false,
},
});
const result = ref({
const result = ref({
id: '1',
name: '站厅照明 1区',
manual: '手动',
@ -64,77 +64,86 @@ const result = ref({
automatic2: '舒适',
brightness3: '4000k',
brightness4: '3800k',
});
});
</script>
<style lang="less" scoped>
.icon-box {
width: 25px;
height: 25px;
position: absolute;
.icon-item {
width: 25px;
cursor: pointer;
transition: all ease 0.1s;
}
.icon-item:active {
transform: scale(1.2);
}
.icon-box {
width: 25px;
height: 25px;
position: absolute;
.icon-item {
width: 25px;
cursor: pointer;
transition: all ease 0.1s;
}
.icon-item:active {
transform: scale(1.2);
}
//
.light-tag {
display: flex;
flex-direction: column;
gap: 10px;
//
.light-tag-tit {
display: flex;
justify-content: space-between;
vertical-align: middle;
height: 30px;
.tag-text {
font-size: 16px;
font-weight: 700;
color: white;
padding-left: 10px;
}
.right-button {
width: 50px;
height: 26px;
background: rgba(57, 215, 187, 0.1);
border: 1px solid rgba(57, 215, 187, 1);
font-size: 12px;
color: rgba(57, 215, 187, 1);
}
}
}
//
.light-tag {
display: flex;
flex-direction: column;
gap: 10px;
//
.light-tag-tit {
display: flex;
justify-content: space-between;
vertical-align: middle;
height: 30px;
.tag-text {
font-size: 16px;
font-weight: 700;
color: white;
padding-left: 10px;
}
.right-button {
width: 50px;
height: 26px;
background: rgba(57, 215, 187, 0.1);
border: 1px solid rgba(57, 215, 187, 1);
font-size: 12px;
color: rgba(57, 215, 187, 1);
}
}
// 4
.light-tag-box {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
grid-gap: 10px;
.tag-box-item {
position: relative;
display: flex;
justify-content: space-between;
img {
width: 120px;
vertical-align: middle;
}
.title {
position: absolute;
left: 60px;
top: 13px;
color: rgba(64, 255, 252, 1);
}
.result {
line-height: 50px;
font-size: 16px;
font-weight: 700;
color: white;
};
}
}
// 4
.light-tag-box {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
grid-gap: 10px;
.tag-box-item {
position: relative;
display: flex;
justify-content: space-between;
img {
width: 120px;
vertical-align: middle;
}
.title {
position: absolute;
left: 60px;
top: 13px;
color: rgba(64, 255, 252, 1);
}
.result {
line-height: 50px;
font-size: 16px;
font-weight: 700;
color: white;
}
}
}
</style>

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

@ -5,15 +5,21 @@
<div class="light-area">
<div class="light-area-tab"></div>
<span class="light-area-text"> 照明区域 </span>
<button class="plan" :class="{ enabled: isPlanEnabled, disabled: !isPlanEnabled }" @click="togglePlan">
<button
class="plan"
:class="{ enabled: isPlanEnabled, disabled: !isPlanEnabled }"
@click="togglePlan">
{{ isPlanEnabled ? '计划启用' : '计划禁用' }}
</button>
</div>
<!-- 照明区域按钮部分 -->
<div class="area">
<template v-if="!showAllButtonsArea">
<button v-for="(button, index) in limitedButtons1" :key="index"
:class="{ btn: true, selected: button.selected }" @click="selectButton(button)">
<button
v-for="(button, index) in limitedButtons1"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
@ -21,8 +27,11 @@
</div>
</template>
<template v-else>
<button v-for="(button, index) in props.treeData" :key="index" :class="{ btn: true, selected: button.selected }"
@click="selectButton(button)">
<button
v-for="(button, index) in props.treeData"
:key="index"
:class="{ btn: true, selected: button.selected }"
@click="changeArea(button)">
{{ button.name }}
</button>
<div style="margin-top: 10px">
@ -37,13 +46,20 @@
<div class="circuit-tab"></div>
<span class="circuit-text">照明回路</span>
<div class="btn2">
<button class="openPlan" :class="{ enabled2: isPlanEnabled2, disabled2: !isPlanEnabled2 }" @click="togglePlan2">
<button
class="openPlan"
:class="{ enabled2: isPlanEnabled2, disabled2: !isPlanEnabled2 }"
@click="togglePlan2">
{{ isPlanEnabled2 ? '启用面板' : '禁用面板' }}
</button>
<a-switch v-model:checked="selectAllCheckbox" :disabled="singleSelection" :class="{
'blue-background': selectAllCheckbox,
'grey-background': !selectAllCheckbox,
}" @change="toggleAllSelection" />
<a-switch
v-model:checked="selectAllCheckbox"
:disabled="singleSelection"
:class="{
'blue-background': selectAllCheckbox,
'grey-background': !selectAllCheckbox,
}"
@change="toggleAllSelection" />
<button class="allBtn">全选</button>
<button class="both" @click="selectAll">
{{ singleSelection ? '多选' : '单选' }}
@ -52,8 +68,12 @@
</div>
<div class="btnArea">
<template v-if="!showAllButtons">
<button v-for="(button, index) in limitedButtons2" :key="index"
:class="{ btn: true, selected: button.selected }" class="zmhlbtn" @click="toggleSelection(button)">
<button
v-for="(button, index) in limitedButtons2"
:key="index"
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<stop-outlined v-if="button.ctrlStatus" />
{{ button.name }}
</button>
@ -62,8 +82,12 @@
</div>
</template>
<template v-else>
<button v-for="(button, index) in buttons2" :key="index"
:class="{ btn: true, selected: button.selected }" class="zmhlbtn" @click="toggleSelection(button)">
<button
v-for="(button, index) in buttons2"
:key="index"
:class="{ btn: true, selected: button.selected }"
class="zmhlbtn"
@click="changeLine(button)">
<stop-outlined v-if="button.ctrlStatus" />
{{ button.name }}
</button>
@ -81,37 +105,42 @@
</div>
<!-- 控制模式按钮部分 -->
<div class="control-mode-btn-area" v-show="thisButton2.code">
<button v-for="(button3, index) in controlMode" :key="index"
class="btn"
:disabled="button3.value!= 3"
:class="{ selected: thisButton2.mode.value == button3.value }" @click="selectButton3(button3)">
<button
v-for="(button3, index) in controlMode"
:key="index"
class="btn"
:disabled="button3.value != 3"
:class="{ selected: thisButton2.mode.value == button3.value }"
@click="selectButton3(button3)">
{{ button3.label }}
</button>
</div>
</div>
<!-- 控制场景部分 -->
<div>
<div class="control-scene-area" v-show="thisButton2.mode.value == '3'">
<div class="control-scene-area" v-show="thisButton2.mode.value == 3">
<div class="control-scene-tab"></div>
<span class="control-scene-text"> 控制场景 </span>
</div>
<!-- 控制场景按钮部分 -->
<div class="control-scene-btn-area" v-show="thisButton2.mode.value == '3'">
<button v-for="(button4, index) in controlScene" :key="index"
:class="{ btn: true, selected: thisButton2.mode.value == button4.value }" @click="selectButton4(button4)">
<div class="control-scene-btn-area" v-show="thisButton2.mode.value == 3">
<button
v-for="(button4, index) in controlScene"
:key="index"
:class="{ btn: true, selected: thisButton2.scene.value == button4.value }"
@click="selectButton4(button4)">
{{ button4.label }}
</button>
</div>
</div>
<!-- 底部按钮区 -->
<div class="bottom">
<a-popconfirm
<a-popconfirm
title="刷新将会取消已作出的修改"
ok-text="确定"
cancel-text="取消"
@confirm="changeConfirm"
@cancel="changeCancel"
>
@cancel="changeCancel">
<button class="flushed">刷新</button>
</a-popconfirm>
<button class="execute" @click="showModal">执行</button>
@ -129,7 +158,11 @@
<div class="imgText">
<div class="zjzm">
<img class="title-img" src="/asset/image//bulbLogo/21961.png" alt="" />&nbsp;
<span class="title-text" style="font-size: 20px; font-weight: 500; color: rgba(255, 255, 255, 1)">{{ item.name }}</span>
<span
class="title-text"
style="font-size: 20px; font-weight: 500; color: rgba(255, 255, 255, 1)"
>{{ item.name }}</span
>
</div>
<button class="cxbtn" @click="delBtn(item.id)">撤销</button>
</div>
@ -143,9 +176,7 @@
</div>
</div>
<div class="btn-item">
<div class="left">
亮度
</div>
<div class="left"> 亮度 </div>
<div class="right">
<span>100lux</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
@ -153,9 +184,7 @@
</div>
</div>
<div class="btn-item">
<div class="left">
控制场景
</div>
<div class="left"> 控制场景 </div>
<div class="right">
<span>手动</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
@ -163,9 +192,7 @@
</div>
</div>
<div class="btn-item">
<div class="left">
色温
</div>
<div class="left"> 色温 </div>
<div class="right">
<span>4000k</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
@ -176,7 +203,7 @@
</div>
</div>
</div>
<div style="width: 100%; height: 60px;"></div>
<div style="width: 100%; height: 60px"></div>
<div class="button-box">
<button class="cancel" @click="executeVisible = false">取消</button>
<button class="execute">执行</button>
@ -186,380 +213,415 @@
</template>
<script setup lang="ts">
import { ref, computed, onMounted, watch } from 'vue';
import {
DownOutlined,
UpOutlined,
StopOutlined,
} from '@ant-design/icons-vue';
import { message } from 'ant-design-vue';
//
import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
import { getAllEnum } from '/@/api/index'
// =========================================================================
onMounted(() => {
//
setArea(0)
import { ref, computed, onMounted } from 'vue';
import { DownOutlined, UpOutlined, StopOutlined } from '@ant-design/icons-vue';
import { message } from 'ant-design-vue';
//
import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
import { getAllEnum } from '/@/api/index';
// =========================================================================
onMounted(() => {
//
setArea();
//
getEnum(['IlluminationMode', 'IlluminationScene']);
});
//
getEnum(['IlluminationMode', 'IlluminationScene'])
})
//
const getEnum = (arr: any) => {
getAllEnum({ params: arr }).then(res => {
const data = res.data
controlMode.value = data.IlluminationMode
controlScene.value = data.IlluminationScene
})
}
// 线
const setArea = (isHandle: number) => {
const data = props.treeData.find((item: any) => {
return item.id == props.nowArea
})
//
data.selected = true
//
selectedButton.value = props.nowArea
//
buttons2.value = data.childList
//
if (isHandle) {
// 线childrenselectedtrue
const button2 = data.childList.find((item: any) => {
return item.selected == true
})
// 线
if (button2) {
thisButton2.value = button2;
console.log(button2,'2222222222')
const getEnum = (arr: any) => {
getAllEnum({ params: arr }).then((res) => {
const data = res.data;
//
controlMode.value = data.IlluminationMode;
//
controlScene.value = data.IlluminationScene;
});
};
// 1-1 线
const setArea = () => {
const data = props.treeData[0];
buttons2.value = data.childList;
};
// ===================================================================
const props = defineProps({
// >
treeData: {
type: Array,
default: [],
},
});
//
/**
* @method changeArea 用于控制俯视图的选中状态
* @method reset 用于重置按钮区
*/
const emit = defineEmits(['changeArea', 'reset']);
// =======================================================================
//
const isPlanEnabled = ref(false);
//
const togglePlan = () => {
isPlanEnabled.value = !isPlanEnabled.value;
};
//
const showAllButtonsArea = ref(false);
// 1
const selectedButton = ref<string | undefined>('1');
//
const changeArea = (button: any) => {
//
selectedButton.value = button.id;
// 线
buttons2.value = button.childList;
//
emit('reset');
//
button.selected = true;
//
emit('changeArea', button.id);
// 线 -
resetMode();
// -
handleButton.value = '';
};
// 8
const limitedButtons1 = computed(() => props.treeData.slice(0, 8));
// ======================================================================
// id
const handleButton = ref('');
// /
const isPlanEnabled2 = ref(true);
// /
const togglePlan2 = () => {
//
if (handleButton.value == '') {
return message.info('请选择照明回路');
}
//
const btn: any = buttons2.value.find((button) => button.id === handleButton.value);
let panel = +!btn.ctrlStatus;
isLoading.value = true;
http
.get(lightingManage.setDisable, { deviceGroup: btn.code, panel })
.then((res) => {
if (res.msg === 'success') {
// - - - loading
isPlanEnabled2.value = !isPlanEnabled2.value;
btn.ctrlStatus = panel;
isLoading.value = false;
} else {
isLoading.value = false;
}
})
.catch(() => {
isLoading.value = false;
});
};
//
let singleSelection = ref(true);
//
const selectAll = () => {
selectAllCheckbox.value = false;
buttons2.value.forEach((button) => {
button.selected = false;
});
singleSelection.value = !singleSelection.value;
// 线 -
resetMode();
//
emit('changeArea', [selectedButton.value]);
};
//
const selectAllCheckbox = ref(false);
// switch
const toggleAllSelection = () => {
let arr = [selectedButton.value];
//
if (selectAllCheckbox.value) {
buttons2.value.forEach((item, index) => {
// 线-
if (index == 0) {
thisButton2.value = item;
}
item.selected = true;
arr.push(item.id);
});
//
} else {
buttons2.value.forEach((item) => {
item.selected = false;
});
// -
resetMode();
}
emit('changeArea', arr);
};
// 线
const thisButton2 = ref({
code: '',
mode: {
value: -1,
},
scene: {
value: -1,
},
});
//
const changeLine = (button: any) => {
// ID/
handleButton.value = button.id;
// /
if (button.ctrlStatus) {
isPlanEnabled2.value = true;
} else {
resetMode()
isPlanEnabled2.value = false;
}
}
}
// ===================================================================
const props = defineProps({
// >
treeData: {
type: Array,
default: []
},
// ID
nowArea: {
type: String,
}
});
//
/**
* @method changeArea 用于控制俯视图的选中状态
* @method reset 用于重置按钮区
*/
const emit = defineEmits(['changeArea','reset']);
//
watch(() => props.nowArea, () => {
setArea(1)
// 线
handleButton.value = ''
})
// =======================================================================
//
const isPlanEnabled = ref(false);
//
const togglePlan = () => {
isPlanEnabled.value = !isPlanEnabled.value;
};
//
const showAllButtonsArea = ref(false);
// 1
const selectedButton = ref<string | undefined>('1');
// -
const selectButton = (button: any) => {
//
selectedButton.value = button.id;
initMenu(1)
button.selected = true
buttons2.value = button.childList
emit('changeArea', button.id);
resetMode()
handleButton.value = ''
};
// 8
const limitedButtons1 = computed(() => props.treeData.slice(0, 8));
// ======================================================================
// id
const handleButton = ref('');
// /
const isPlanEnabled2 = ref(true);
// /
const togglePlan2 = () => {
//
if (handleButton.value == '') {
return message.info('请选择照明回路');
}
//
const btn: any = buttons2.value.find((button) => button.id === handleButton.value)
let panel = +(!btn.ctrlStatus)
isLoading.value = true
http.get(lightingManage.setDisable, { deviceGroup: btn.code, panel }).then(res => {
if (res.msg === 'success') {
// - - - loading
isPlanEnabled2.value = !isPlanEnabled2.value;
btn.ctrlStatus = panel
isLoading.value = false
//
let level1 = selectedButton.value;
let level2 = button.id;
// false
if (singleSelection.value) {
buttons2.value.forEach((item) => {
item.selected = false;
});
button.selected = !button.selected;
emit('changeArea', [level1, level2]);
} else {
isLoading.value = false
//
button.selected = !button.selected;
const arr = [level1];
buttons2.value.forEach((item) => {
if (item.selected) {
arr.push(item.id);
}
});
emit('changeArea', arr);
}
}).catch(() => { isLoading.value = false })
};
//
let singleSelection = ref(true);
//
const selectAll = () => {
selectAllCheckbox.value = false
buttons2.value.forEach((button) => {
button.selected = false;
});
singleSelection.value = !singleSelection.value;
resetMode()
emit('changeArea', [selectedButton.value])
};
//
const selectAllCheckbox = ref(false);
// switch
const toggleAllSelection = () => {
let arr = [selectedButton.value]
//
if (selectAllCheckbox.value) {
buttons2.value.forEach((item) => {
item.selected = true;
arr.push(item.id)
});
//
} else {
buttons2.value.forEach((item) => {
item.selected = false;
});
}
emit('changeArea', arr)
};
//
const toggleSelection = (button: any) => {
// ID/
handleButton.value = button.id
// /
if (button.ctrlStatus) {
isPlanEnabled2.value = true
} else {
isPlanEnabled2.value = false
}
//
let level1 = selectedButton.value
let level2 = button.id
// false
if (singleSelection.value) {
buttons2.value.forEach(item => {
item.selected = false;
});
emit('changeArea', [level1, level2])
button.selected = !button.selected;
} else {
//
button.selected = !button.selected;
const arr = [level1]
buttons2.value.forEach(item => {
if (item.selected) {
arr.push(item.id)
//
if (button.selected) {
//
thisButton2.value = button;
} else {
//
resetMode();
}
console.log(thisButton2, 'button');
};
//
const buttons2 = ref([]);
//
const showAllButtons = ref(false);
// 8
const limitedButtons2 = computed(() => buttons2.value.slice(0, 8));
// ====================================================================
// -
const selectButton3 = (button3) => {
let checked = thisButton2.value.mode;
console.log(button3.value, '---', checked.value);
//
if (checked.value === button3.value) {
return;
}
checked.value = button3.value;
};
// =====================================================================
//
const controlMode = ref([]);
//
const controlScene = ref([]);
// -
const selectedButton4 = ref(null);
// -
const selectButton4 = (button4) => {
// 线
const data = thisButton2.value;
//
let before = data.scene.value;
//
let after = button4.value;
//
if (before === after) {
return;
//
} else {
thisButton2.value.scene.value = after;
//
const result = changeList.value.find((item, index) => {
item.index = index;
return item.deviceGroup == data.code;
});
//
if (result) {
//
if (after == result.before) {
changeList.value.splice(result.index, 1);
// after
} else {
result.scene = after;
// flag
delete result.index;
}
//
} else {
changeList.value.push({
// 线
deviceGroup: data.code,
deviceGroupName: data.name,
//
region: data.pcode,
regionName: '',
//
before: before,
//
scene: after,
});
}
});
emit('changeArea', arr)
}
//
if (button.selected) {
//
thisButton2.value = button
} else {
//
resetMode()
}
console.log(thisButton2,'button')
};
//
const buttons2 = ref([]);
//
const showAllButtons = ref(false);
// 8
const limitedButtons2 = computed(() => buttons2.value.slice(0, 8));
// ====================================================================
const thisButton2 = ref({
code: '',
mode: {
value: '0'
}
})
// -
const selectButton3 = (button3) => {
let checked = thisButton2.value.mode
console.log(button3.value,'---', checked.value)
//
if (checked.value === button3.value) {
return
}
checked.value = button3.value
selectedButton4.value = null; //
};
const diff = () => {
console.log(thisButton2)
}
// =====================================================================
//
const controlMode = ref([])
//
const controlScene = ref([])
// -
const selectedButton4 = ref(null);
// -
const selectButton4 = (button4) => {
selectedButton4.value = button4.label;
};
// ========================================================================
//
const submitArray = ref([])
const cxList = ref([
{
id: '1',
name: '站厅照明 1区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
{
id: '2',
name: '站厅照明 2区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
{
id: '3',
name: '站厅照明 3区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
]);
//
const delBtn = (id: any) => {
cxList.value.pop();
console.log(cxList.value.length);
if (cxList.value.length === 0) {
executeVisible.value = false;
}
};
// ========================================================================
const isLoading = ref(false)
console.log(changeList.value, 'changeList');
}
// 5
const initMenu = (tier: number) => {
// 1 = -
if (tier == 1) {
emit('reset')
//
selectedButton4.value = null;
} else if (tier == 2) {
//
selectedButton4.value = null;
}
}
//
const refresh = () => {
//
executeVisible.value = false
//
selectedButton.value = '1';
emit('changeArea', ['1']);
emit('reset')
let data = props.treeData[0]
//
data.selected = true
buttons2.value = data.childList
selectedButton4.value = null;
resetMode()
};
//
const executeVisible = ref<boolean>(false);
const showModal = () => {
executeVisible.value = true;
};
//
const changeConfirm = () => {
refresh()
}
//
const changeCancel = () => {
}
// 线
const resetMode = () => {
thisButton2.value = {
code: '',
mode: {
value: '0'
thisButton2.value.scene.value = after;
console.log(thisButton2, '222222');
console.log(button4, '44444');
};
// ========================================================================
//
const changeList: any = ref([]);
//
const submitList = ref([]);
const cxList = ref([
{
id: '1',
name: '站厅照明 1区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
{
id: '2',
name: '站厅照明 2区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
{
id: '3',
name: '站厅照明 3区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
]);
//
const delBtn = () => {
cxList.value.pop();
console.log(cxList.value.length);
if (cxList.value.length === 0) {
executeVisible.value = false;
}
}
}
};
defineExpose({
changeCancel
});
// ========================================================================
const isLoading = ref(false);
//
const refresh = () => {
//
executeVisible.value = false;
//
selectedButton.value = '1';
emit('changeArea', ['1']);
emit('reset');
let data = props.treeData[0];
//
data.selected = true;
buttons2.value = data.childList;
selectedButton4.value = null;
resetMode();
};
//
const executeVisible = ref<boolean>(false);
const showModal = () => {
http
.post(lightingManage.getChangeList, { infoList: changeList.value, projectId: 'HLlmTZp8' })
.then((res) => {
if (res.msg === 'success') {
isLoading.value = true;
console.log(res);
} else {
isLoading.value = false;
}
});
executeVisible.value = true;
};
//
const changeConfirm = () => {
refresh();
};
//
const changeCancel = () => {};
// 线
const resetMode = () => {
thisButton2.value = {
code: '',
mode: {
value: -1,
},
scene: {
value: -1,
},
};
};
//
defineExpose({
//
changeArea,
// 线
changeLine,
});
</script>
<style lang="less" scoped>
@import "./dialogStyle.less";
@import "./tabs1.less";
@import './dialogStyle.less';
@import './tabs1.less';
</style>

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

@ -20,10 +20,10 @@
<td v-if="row.planStatus == '2'">
<button
style="
font-size: 12px;
background: rgba(57, 215, 187, 0.1);
color: rgb(57, 215, 187);
border: 1px solid rgb(57, 215, 187);
font-size: 12px;
background: rgba(57, 215, 187, 0.1);
color: rgb(57, 215, 187);
border: 1px solid rgb(57, 215, 187);
">
已执行
</button>
@ -31,10 +31,10 @@
<td v-if="row.planStatus == '1'">
<button
style="
font-size: 12px;
background: rgba(243, 97, 99, 0.1);
border: 1px solid rgba(243, 97, 99);
color: rgba(243, 97, 99);
font-size: 12px;
background: rgba(243, 97, 99, 0.1);
border: 1px solid rgba(243, 97, 99);
color: rgba(243, 97, 99);
">
待执行
</button>
@ -42,11 +42,10 @@
<td>
<div class="tabReboot" @click="restartPlan(row.id)">重启</div>
<a-popconfirm
title="此操作将永久删除该条数据"
ok-text="确定"
cancel-text="取消"
@confirm="deletePlan(row.id)"
>
title="此操作将永久删除该条数据"
ok-text="确定"
cancel-text="取消"
@confirm="deletePlan(row.id)">
<div class="tabDelete">删除</div>
</a-popconfirm>
</td>
@ -70,7 +69,7 @@
@search="handleSearch"
:listStyle="{ border: '2px solid rgba(25,74,125,1)', height: 'calc(100vh - 200px)' }" />
</div>
<div style="width: 100%; height: 60px;"></div>
<div style="width: 100%; height: 60px"></div>
<div class="button-box">
<button class="cancel" @click="addVisible = false">取消</button>
<button class="execute" @click="sendPlan">确定</button>
@ -79,175 +78,171 @@
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
//
import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
import { message } from 'ant-design-vue';
import { ref, onMounted } from 'vue';
//
import { http } from '/nerv-lib/util/http';
import { lightingManage } from '/@/api/IlluminationInfo';
import { message } from 'ant-design-vue';
// ===========================================================
// ===========================================================
onMounted(() => {
//
getTable()
// 穿
getLeftPlan()
})
onMounted(() => {
//
getTable();
// 穿
getLeftPlan();
});
// tab ========================================================
// tab ========================================================
//
const dataSource = ref([]);
//
const getTable = () => {
http.get(lightingManage.getPlanTable, {}).then(res => {
dataSource.value = res.data
})
}
//
const deletePlan = (id: String) => {
http.delete(lightingManage.deletePlan, [id]).then(() => {
message.success('操作成功')
getTable()
})
}
//
const restartPlan = (id: String) => {
http.post(lightingManage.restartPlan, { planId: id }).then(() => {
message.success('操作成功')
getTable()
})
}
//
const dataSource = ref([]);
//
const getTable = () => {
http.get(lightingManage.getPlanTable, {}).then((res) => {
dataSource.value = res.data;
});
};
//
const deletePlan = (id: String) => {
http.delete(lightingManage.deletePlan, [id]).then(() => {
message.success('操作成功');
getTable();
});
};
//
const restartPlan = (id: String) => {
http.post(lightingManage.restartPlan, { planId: id }).then(() => {
message.success('操作成功');
getTable();
});
};
// tab ====================================================
// tab ====================================================
//
const addVisible = ref(false);
//
const addModal = () => {
addVisible.value = true;
};
//
const addVisible = ref(false);
//
const addModal = () => {
addVisible.value = true;
};
// 穿 =======================================================
// 穿 =======================================================
// 穿
const transferData = ref([]) as any;
// 穿
const getLeftPlan = () => {
http.get(lightingManage.getLeftPlan, {}).then(res => {
let arr = []
res.data.forEach((item: any) => {
arr.push({
key: item.id,
title: item.planName
})
})
transferData.value = arr
})
}
const handleChange = (keys: string[], direction: string, moveKeys: string[]) => {
console.log(keys, direction, moveKeys);
};
const handleSearch = (dir: string, value: string) => {
console.log('search:', dir, value);
};
// 穿
const targetKeys = ref<string[]>([]);
// 穿
const sendPlan = () => {
if (targetKeys.value.length < 1) {
return message.info('没有选择任何计划');
}
http.post(lightingManage.submitLeftPlan, targetKeys.value).then(() => {
message.success('添加成功')
//
getTable()
getLeftPlan()
})
}
const filterOption = (inputValue: string, option: any) => {
return option.description.indexOf(inputValue) > -1;
};
// 穿
const transferData = ref([]) as any;
// 穿
const getLeftPlan = () => {
http.get(lightingManage.getLeftPlan, {}).then((res) => {
let arr = [];
res.data.forEach((item: any) => {
arr.push({
key: item.id,
title: item.planName,
});
});
transferData.value = arr;
});
};
const handleChange = (keys: string[], direction: string, moveKeys: string[]) => {
console.log(keys, direction, moveKeys);
};
const handleSearch = (dir: string, value: string) => {
console.log('search:', dir, value);
};
// 穿
const targetKeys = ref<string[]>([]);
// 穿
const sendPlan = () => {
if (targetKeys.value.length < 1) {
return message.info('没有选择任何计划');
}
http.post(lightingManage.submitLeftPlan, targetKeys.value).then(() => {
message.success('添加成功');
//
getTable();
getLeftPlan();
});
};
const filterOption = (inputValue: string, option: any) => {
return option.description.indexOf(inputValue) > -1;
};
</script>
<style lang="less" scoped>
@import "./dialogStyle.less";
@import './dialogStyle.less';
//
.div-add {
height: 64px;
display: flex;
justify-content: flex-end;
align-items: center;
position: fixed;
bottom: 0;
right: 0;
margin-right: 20px;
.add {
width: 74px;
height: 40px;
opacity: 1;
border-radius: 4px;
background: rgba(67, 136, 251, 1);
border: rgba(67, 136, 251, 1);
font-size: 14px;
font-weight: 400;
color: rgba(255, 255, 255, 1);
cursor: pointer;
//
.div-add {
height: 64px;
display: flex;
justify-content: flex-end;
align-items: center;
position: fixed;
bottom: 0;
right: 0;
margin-right: 20px;
.add {
width: 74px;
height: 40px;
opacity: 1;
border-radius: 4px;
background: rgba(67, 136, 251, 1);
border: rgba(67, 136, 251, 1);
font-size: 14px;
font-weight: 400;
color: rgba(255, 255, 255, 1);
cursor: pointer;
}
}
}
//
.custom-table {
border-collapse: collapse;
width: 416px;
height: 60px;
color: rgba(255, 255, 255, 1);
}
.custom-table th,
.custom-table td {
border: 1px solid rgba(163, 192, 243, 1);
text-align: left;
padding: 8px;
text-align: center;
}
.table1 {
margin-top: 20px;
width: 100%;
border: 1px solid rgba(255, 255, 255);
border-radius: 5px;
background: rgba(255, 255, 255, 0.1);
//
.tabReboot,
.tabDelete {
border: none;
display: inline-block;
background-color: rgba(0, 0, 0, 0);
font-size: 14px;
font-weight: 400;
letter-spacing: 0;
line-height: 20px;
color: rgba(67, 136, 251, 1);
cursor: pointer;
}
.tabReboot {
margin-right: 8px;
//
.custom-table {
border-collapse: collapse;
width: 416px;
height: 60px;
color: rgba(255, 255, 255, 1);
}
.tabReboot::active {
color: white !important;
.custom-table th,
.custom-table td {
border: 1px solid rgba(163, 192, 243, 1);
text-align: left;
padding: 8px;
text-align: center;
}
.tabDelete::active {
color: white;
.table1 {
margin-top: 20px;
width: 100%;
border: 1px solid rgba(255, 255, 255);
border-radius: 5px;
background: rgba(255, 255, 255, 0.1);
//
.tabReboot,
.tabDelete {
border: none;
display: inline-block;
background-color: rgba(0, 0, 0, 0);
font-size: 14px;
font-weight: 400;
letter-spacing: 0;
line-height: 20px;
color: rgba(67, 136, 251, 1);
cursor: pointer;
}
.tabReboot {
margin-right: 8px;
}
.tabReboot::active {
color: white !important;
}
.tabDelete::active {
color: white;
}
}
}
::v-deep(.ant-transfer) {
// hover
.ant-transfer-list-content-item:hover {
background: black;
::v-deep(.ant-transfer) {
// hover
.ant-transfer-list-content-item:hover {
background: black;
}
}
}
</style>

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

@ -9,7 +9,10 @@
</tr>
</thead>
<tbody>
<tr v-for="(row, index) in dataSource1" :key="index" @click="handleRowClick(row.key)"
<tr
v-for="(row, index) in dataSource1"
:key="index"
@click="handleRowClick(row.key)"
:class="row.key === trIndex ? 'isTrIndex' : ''">
<td>{{ row.key }}</td>
<td>{{ row.data }}</td>
@ -19,7 +22,7 @@
</tbody>
</table>
<div class="out-dialog" :class="{ 'showDialog' : logModalVisible }" v-if="logModalVisible">
<div class="out-dialog" :class="{ showDialog: logModalVisible }" v-if="logModalVisible">
<div class="content" v-if="logModalVisible">
<div>
<div class="div-operation"></div>
@ -30,7 +33,11 @@
<div class="imgText">
<div class="zjzm">
<img class="title-img" src="/asset/image//bulbLogo/21961.png" alt="" />&nbsp;
<span class="title-text" style="font-size: 20px; font-weight: 500; color: rgba(255, 255, 255, 1)">{{ item.name }}</span>
<span
class="title-text"
style="font-size: 20px; font-weight: 500; color: rgba(255, 255, 255, 1)"
>{{ item.name }}</span
>
</div>
</div>
<div class="btn-box">
@ -43,9 +50,7 @@
</div>
</div>
<div class="btn-item">
<div class="left">
亮度
</div>
<div class="left"> 亮度 </div>
<div class="right">
<span>100lux</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
@ -53,9 +58,7 @@
</div>
</div>
<div class="btn-item">
<div class="left">
控制场景
</div>
<div class="left"> 控制场景 </div>
<div class="right">
<span>手动</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
@ -63,9 +66,7 @@
</div>
</div>
<div class="btn-item">
<div class="left">
色温
</div>
<div class="left"> 色温 </div>
<div class="right">
<span>4000k</span>
<img src="/asset/image/bulbLogo/22406.png" alt="" />
@ -76,7 +77,7 @@
</div>
</div>
</div>
<div style="height: 60px;"></div>
<div style="height: 60px"></div>
<div class="button-box">
<button class="cancel" @click="logModalVisible = false">取消</button>
</div>
@ -87,169 +88,164 @@
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
//
onMounted(() => {
})
// ===================================================================
const props = defineProps({
// >
treeData: {
type: Array
},
});
const emit = defineEmits(['changeArea']);
//
const dataSource1 = ref([
{
key: '1',
data: '2024-05-01',
planName: '计划再开',
status: '张三111',
},
{
key: '2',
data: '2024-05-01',
planName: '检修模式',
status: '李四12',
},
{
key: '3',
data: '2024-05-01',
planName: '设备变更',
status: '王五33',
},
]);
const cxList = ref([
{
id: '1',
name: '站厅照明 1区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
{
id: '2',
name: '站厅照明 2区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
{
id: '3',
name: '站厅照明 3区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
]);
let trIndex = ref('-1');
const logModalVisible = ref(false);
const handleRowClick = (index: any) => {
trIndex.value = index;
if (index === trIndex.value) {
console.log('tri');
}
//
logModalVisible.value = true;
};
import { ref, onMounted } from 'vue';
//
onMounted(() => {});
// ===================================================================
const props = defineProps({
// >
treeData: {
type: Array,
},
});
const emit = defineEmits(['changeArea']);
//
const dataSource1 = ref([
{
key: '1',
data: '2024-05-01',
planName: '计划再开',
status: '张三111',
},
{
key: '2',
data: '2024-05-01',
planName: '检修模式',
status: '李四12',
},
{
key: '3',
data: '2024-05-01',
planName: '设备变更',
status: '王五33',
},
]);
const cxList = ref([
{
id: '1',
name: '站厅照明 1区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
{
id: '2',
name: '站厅照明 2区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
{
id: '3',
name: '站厅照明 3区',
manual: '手动',
automatic: '自动',
brightness: '100lux',
brightness2: '30lux',
manual2: '手动',
automatic2: '自动',
brightness3: '4000k',
brightness4: '3800k',
},
]);
let trIndex = ref('-1');
const logModalVisible = ref(false);
const handleRowClick = (index: any) => {
trIndex.value = index;
if (index === trIndex.value) {
console.log('tri');
}
//
logModalVisible.value = true;
};
</script>
<style lang="less" scoped>
@import "./dialogStyle.less";
//
.div-add {
height: 64px;
display: flex;
justify-content: flex-end;
align-items: center;
position: fixed;
bottom: 0;
right: 0;
margin-right: 20px;
.add {
width: 74px;
height: 40px;
opacity: 1;
border-radius: 4px;
background: rgba(67, 136, 251, 1);
border: rgba(67, 136, 251, 1);
font-size: 14px;
font-weight: 400;
color: rgba(255, 255, 255, 1);
cursor: pointer;
@import './dialogStyle.less';
//
.div-add {
height: 64px;
display: flex;
justify-content: flex-end;
align-items: center;
position: fixed;
bottom: 0;
right: 0;
margin-right: 20px;
.add {
width: 74px;
height: 40px;
opacity: 1;
border-radius: 4px;
background: rgba(67, 136, 251, 1);
border: rgba(67, 136, 251, 1);
font-size: 14px;
font-weight: 400;
color: rgba(255, 255, 255, 1);
cursor: pointer;
}
}
}
//
.custom-table {
border-collapse: collapse;
width: 416px;
height: 60px;
color: rgba(255, 255, 255, 1);
}
.custom-table th,
.custom-table td {
border: 1px solid rgba(163, 192, 243, 1);
text-align: left;
padding: 8px;
text-align: center;
}
.table1 {
margin-top: 20px;
width: 100%;
border: 1px solid rgba(255, 255, 255);
border-radius: 5px;
background: rgba(255, 255, 255, 0.1);
.tabReboot,
.tabDelete {
border: none;
background-color: rgba(0, 0, 0, 0);
font-size: 14px;
font-weight: 400;
letter-spacing: 0;
line-height: 20px;
color: rgba(67, 136, 251, 1);
//
.custom-table {
border-collapse: collapse;
width: 416px;
height: 60px;
color: rgba(255, 255, 255, 1);
}
.tabReboot {
margin-right: 8px;
.custom-table th,
.custom-table td {
border: 1px solid rgba(163, 192, 243, 1);
text-align: left;
padding: 8px;
text-align: center;
}
.isTrIndex {
background: rgba(67, 136, 251, 1);
.table1 {
margin-top: 20px;
width: 100%;
border: 1px solid rgba(255, 255, 255);
border-radius: 5px;
background: rgba(255, 255, 255, 0.1);
.tabReboot,
.tabDelete {
border: none;
background-color: rgba(0, 0, 0, 0);
font-size: 14px;
font-weight: 400;
letter-spacing: 0;
line-height: 20px;
color: rgba(67, 136, 251, 1);
}
.tabReboot {
margin-right: 8px;
}
.isTrIndex {
background: rgba(67, 136, 251, 1);
}
}
}
::v-deep(.ant-transfer) {
// hover
.ant-transfer-list-content-item:hover {
background: black;
::v-deep(.ant-transfer) {
// hover
.ant-transfer-list-content-item:hover {
background: black;
}
}
}
</style>

Loading…
Cancel
Save