- 排放分类
+ 因子分类
@@ -20,117 +18,131 @@
-
-
- {{ emissionName.substring(0, emissionName.indexOf(selectTreeDataValue)) }}
- {{ selectTreeDataValue }}
- {{ emissionName.substring(emissionName.indexOf(selectTreeDataValue) + selectTreeDataValue.length) }}
+ :tree-data="gData"
+ show-line
+ @expand="onExpand"
+ @select="onSelect"
+ style="padding: 0 16px !important;"
+ >
+
+
+ {{ data.energyType.substring(0, data.energyType.indexOf(searchValue)) }}
+ {{ searchValue }}
+ {{ data.energyType.substring(data.energyType.indexOf(searchValue) + searchValue.length) }}
- {{ emissionName }}
+ {{ data.energyType }}
-
+
+
+
+
+ 编辑
+
+ 删除
+
+
+
+
+ 排放因子库
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 确定
+
+
-
-
-
-
-
-
-
-
- 取消
- 确定
-
-
+
+
+
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/dialogStyle.less b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/dialogStyle.less
new file mode 100644
index 0000000..7dee3a5
--- /dev/null
+++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/dialogStyle.less
@@ -0,0 +1,141 @@
+.out-dialog {
+ position: fixed;
+ right: 496px;
+ width: 500px;
+ height: 100%;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+ box-sizing: border-box;
+ color: rgb(255, 83, 0);
+ background: black;
+ display: flex;
+ padding: 25px;
+ flex-direction: column;
+ .content {
+ overflow-y: scroll;
+ .div-operation {
+ display: inline-block;
+ width: 3px;
+ height: 13px;
+ opacity: 1;
+ border-radius: 1px;
+ background: rgba(67, 136, 251, 1);
+ }
+ .text-operation {
+ display: inline-block;
+ color: rgba(255, 255, 255, 1);
+ font-size: 16px;
+ font-weight: 700;
+ margin-left: 5px;
+ }
+ .j-box {
+ background-color: #000;
+ opacity: 1;
+ z-index: 99999;
+ overflow-y: scroll;
+ .journal {
+ padding: 1% 3%;
+ width: 100%;
+ height: 150px;
+ background-color: rgba(0, 0, 0);
+ border-radius: 12px;
+ border: 2px solid transparent;
+ border-image: linear-gradient(to bottom, #0077ff, #00f6ff, #000000) 1;
+ }
+ .imgText {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .ztzm {
+ display: flex;
+ align-items: center;
+ }
+
+ .cxbtn {
+ color: rgba(255, 255, 255, 1);
+ border: none;
+ border-radius: 6px;
+ width: 59.79px;
+ height: 32px;
+ opacity: 1;
+ background: linear-gradient(
+ 180deg,
+ rgba(255, 187, 0, 1) 0%,
+ rgba(255, 112, 3, 1) 91.21%,
+ rgba(255, 129, 3, 1) 100%
+ );
+ }
+ }
+ .btn-box {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ grid-template-rows: 1fr 1fr;
+ grid-row-gap: 15px;
+ .btn-item {
+ text-align: center;
+ display: flex;
+ align-content: space-between;
+ .left {
+ width: 70px;
+ height: 35px;
+ line-height: 35px;
+ border-radius: 4px;
+ background: linear-gradient(
+ 180deg,
+ rgba(1, 206, 255, 1) 0%,
+ rgba(0, 150, 229, 1) 100%
+ );
+ color: rgba(255, 255, 255, 1);
+ font-size: 14px;
+ font-weight: 400;
+ }
+ .right {
+ width: 140px;
+ height: 35px;
+ line-height: 35px;
+ span {
+ vertical-align: middle;
+ }
+ img {
+ padding: 0 5px;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .button-box {
+ width: 100%;
+ box-sizing: border-box;
+ padding: 10px;
+ height: 60px;
+ position: absolute;
+ background-color: transparent;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ .execute, .cancel {
+ margin-right: 10px;
+ width: 74px;
+ height: 40px;
+ opacity: 1;
+ cursor: pointer;
+ border-radius: 4px;
+ font-size: 14px;
+ font-weight: 400;
+ border: 0;
+ margin-left: 10px;
+ }
+ .execute {
+ background: rgb(67, 136, 251);
+ color: white;
+ }
+ .cancel {
+ background: white;
+ color: black;
+ }
+ }
+}
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/index.less b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/index.less
index 5d707a0..dd02f25 100644
--- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/index.less
+++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/index.less
@@ -1,952 +1,156 @@
-//
\ No newline at end of file
+// 页面容器
+.lighting-box {
+ // width: 100%;
+ // height: 100%;
+ position: relative;
+ // background: linear-gradient(#badaff, #8cabeb, #7095de);
+ // 照明设备功能总容器
+ .lighting-img-box {
+ position: relative;
+ width: 1280px;
+ height: 720px;
+ user-select: none;
+ background-image: url(../image/bg.jpg);
+ // 由于背景是俯视图,会产生有交点的透视效果,故使用透视属性
+ perspective: 1000px;
+ perspective-origin: 850px -160px;
+ // 左上角区域切换功能
+ .btn-box {
+ width: 120px;
+ position: sticky;
+ top: 10px;
+ left: 10px;
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ .btn-item {
+ cursor: pointer;
+ width: 100%;
+ height: 40px;
+ border-radius: 4px;
+ background: rgba(39, 120, 255, 1);
+ border: 1px solid rgba(51, 199, 255, 1);
+ box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3);
+ font-size: 18px;
+ color: white;
+ }
+ .btn-item:hover {
+ color: black;
+ }
+ }
+ // 大区分区
+ .area{
+ position: absolute;
+ bottom: 170px;
+ left: 240px;
+ width: 780px;
+ height: 240px;
+ transform: rotateX(79deg) rotateZ(-22deg) skew(29deg);
+ display: flex;
+ gap: 8px;
+ .area1 {
+ width: 170px;
+ background: rgba(0, 251, 91, 0.3);
+ border: 2px solid rgb(0, 251, 91);
+ display: flex;
+ }
+ .area2 {
+ width: 240px;
+ background: rgba(255, 165, 0, 0.3);
+ border: 2px solid rgb(255, 165, 0);
+ display: flex;
+ }
+ .area3 {
+ width: 110px;
+ background: rgba(255, 0, 0, 0.3);
+ border: 2px solid rgb(255, 0, 0);
+ }
+ .area4 {
+ flex: 1;
+ background: rgba(80, 236, 244, 0.3);
+ border: 2px solid rgb(80, 236, 244);
+ }
+ // .area-item:hover {
+ // transform: scale(1.05);
+ // }
+ .area-item {
+ cursor: pointer;
+ transition: all ease 0.2s;
+ >.light-group {
+ height: 100%;
+ flex: 1;
+ display:flex;
+ justify-content: center;
+ align-items: center;
+ .group-shadow1 {
+ width: 35px;
+ height: 150px;
+ border-radius: 20px;
+ background: rgba(0, 0, 0, 0.1);
+ }
+ .group-shadow2 {
+ width: 35px;
+ height: 180px;
+ border-radius: 20px;
+ background: rgba(0, 0, 0, 0.1);
+ }
+ .group-shadow3 {
+ width: 40px;
+ height: 180px;
+ border-radius: 20px;
+ background: rgba(0, 0, 0, 0.1);
+ }
+ .group-shadow4 {
+ width: 40px;
+ height: 160px;
+ border-radius: 20px;
+ background: rgba(0, 0, 0, 0.1);
+ }
+ }
+ // .group-shadow {
+ // transition: all ease 0.2s;
+ // }
+ // .group-shadow:hover {
+ // transform: scale(1.05);
+ // }
+ }
+ }
+ }
+}
+// 总容器与抽屉按钮
+.ns-content-main {
+ position: relative;
+ // 抽屉打开按钮
+ .drawer-box-in {
+ width: 30px;
+ height: 40px;
+ border-radius: 2px;
+ position: fixed;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+ background: rgba(0, 0 ,0 ,0.5);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ cursor: pointer;
+ }
+ // 抽屉关闭按钮
+ .drawer-box-out {
+ width: 30px;
+ height: 40px;
+ border-radius: 2px;
+ position: fixed;
+ right: 496px;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+ background: rgba(0, 0 ,0 ,0.5);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ cursor: pointer;
+ }
+
+}
diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less
deleted file mode 100644
index dd02f25..0000000
--- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less
+++ /dev/null
@@ -1,156 +0,0 @@
-// 页面容器
-.lighting-box {
- // width: 100%;
- // height: 100%;
- position: relative;
- // background: linear-gradient(#badaff, #8cabeb, #7095de);
- // 照明设备功能总容器
- .lighting-img-box {
- position: relative;
- width: 1280px;
- height: 720px;
- user-select: none;
- background-image: url(../image/bg.jpg);
- // 由于背景是俯视图,会产生有交点的透视效果,故使用透视属性
- perspective: 1000px;
- perspective-origin: 850px -160px;
- // 左上角区域切换功能
- .btn-box {
- width: 120px;
- position: sticky;
- top: 10px;
- left: 10px;
- display: flex;
- flex-direction: column;
- gap: 8px;
- .btn-item {
- cursor: pointer;
- width: 100%;
- height: 40px;
- border-radius: 4px;
- background: rgba(39, 120, 255, 1);
- border: 1px solid rgba(51, 199, 255, 1);
- box-shadow: 0px 10px 15px rgba(0, 54, 136, 0.3);
- font-size: 18px;
- color: white;
- }
- .btn-item:hover {
- color: black;
- }
- }
- // 大区分区
- .area{
- position: absolute;
- bottom: 170px;
- left: 240px;
- width: 780px;
- height: 240px;
- transform: rotateX(79deg) rotateZ(-22deg) skew(29deg);
- display: flex;
- gap: 8px;
- .area1 {
- width: 170px;
- background: rgba(0, 251, 91, 0.3);
- border: 2px solid rgb(0, 251, 91);
- display: flex;
- }
- .area2 {
- width: 240px;
- background: rgba(255, 165, 0, 0.3);
- border: 2px solid rgb(255, 165, 0);
- display: flex;
- }
- .area3 {
- width: 110px;
- background: rgba(255, 0, 0, 0.3);
- border: 2px solid rgb(255, 0, 0);
- }
- .area4 {
- flex: 1;
- background: rgba(80, 236, 244, 0.3);
- border: 2px solid rgb(80, 236, 244);
- }
- // .area-item:hover {
- // transform: scale(1.05);
- // }
- .area-item {
- cursor: pointer;
- transition: all ease 0.2s;
- >.light-group {
- height: 100%;
- flex: 1;
- display:flex;
- justify-content: center;
- align-items: center;
- .group-shadow1 {
- width: 35px;
- height: 150px;
- border-radius: 20px;
- background: rgba(0, 0, 0, 0.1);
- }
- .group-shadow2 {
- width: 35px;
- height: 180px;
- border-radius: 20px;
- background: rgba(0, 0, 0, 0.1);
- }
- .group-shadow3 {
- width: 40px;
- height: 180px;
- border-radius: 20px;
- background: rgba(0, 0, 0, 0.1);
- }
- .group-shadow4 {
- width: 40px;
- height: 160px;
- border-radius: 20px;
- background: rgba(0, 0, 0, 0.1);
- }
- }
- // .group-shadow {
- // transition: all ease 0.2s;
- // }
- // .group-shadow:hover {
- // transform: scale(1.05);
- // }
- }
- }
- }
-}
-// 总容器与抽屉按钮
-.ns-content-main {
- position: relative;
- // 抽屉打开按钮
- .drawer-box-in {
- width: 30px;
- height: 40px;
- border-radius: 2px;
- position: fixed;
- right: 0;
- top: 0;
- bottom: 0;
- margin: auto;
- background: rgba(0, 0 ,0 ,0.5);
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- }
- // 抽屉关闭按钮
- .drawer-box-out {
- width: 30px;
- height: 40px;
- border-radius: 2px;
- position: fixed;
- right: 496px;
- top: 0;
- bottom: 0;
- margin: auto;
- background: rgba(0, 0 ,0 ,0.5);
- display: flex;
- justify-content: center;
- align-items: center;
- cursor: pointer;
- }
-
-}
diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
index 7557a9c..a1c1006 100644
--- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
+++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue
@@ -3,19 +3,19 @@
-
-
-
+
+
+
@@ -40,16 +40,18 @@
placement="right"
:body-style="{ background: 'rgba(0, 0, 0)', opacity: 0.8 }"
:closable="false"
- id="Odrawer"
+ id="drawer"
:maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }">
-
+
+
+
+
-
@@ -61,15 +63,17 @@ import { ref } from 'vue';
import { treeData } from './treeData'
import light from './light.vue';
import tabs1 from './tabs1.vue'
+import tabs2 from './tabs2.vue'
+import tabs3 from './tabs3.vue'
// ICON
import {
DoubleLeftOutlined,
DoubleRightOutlined
} from '@ant-design/icons-vue';
-// 分区 - 当前选择的分区 - 默认选择一区
-let area = ref(['1'])
-// 分区 - 分区小灯泡
+// 分区 - 当前选择的分区序号 - 默认选择一区
+const area = ref(['1'])
+// 分区 - 分区小灯泡 - 此处位置需前端写死
const bulbs = ref([
{
styleText: { left: '190px', bottom: '200px' },
@@ -121,6 +125,16 @@ const bulbs = ref([
},
])
+// 分区 - 左上角分区切换
+const changeArea = (area: number) => {
+ if (area == 1) {
+ console.log('1F')
+ } else if (area == 2) {
+ console.log('2F')
+ } else if (area == 3) {
+ console.log('站台')
+ }
+}
// 分区 - 单个分区切换
const getArea = (result: any) => {
// 如果传入的值是数组
@@ -132,16 +146,14 @@ const getArea = (result: any) => {
area.value[0] = String(result)
}
}
-// 分区 - 多个分区切换,只有照明回路能够触发多个分区
// 分区 - 样式函数
-const computedClass = (number: number) => {
- if (area.value.indexOf(number) != -1) {
- return `isActive area-item area${number}`
+const computedClass = (string: string) => {
+ if (area.value.indexOf(string) != -1) {
+ return `isActive area-item area${string}`
} else {
- return `area-item area${number}`
+ return `area-item area${string}`
}
}
-
// 抽屉 - 当前选择的tab
let activeKey = ref('1');
// 抽屉 - 打开状态
@@ -153,7 +165,7 @@ const toggleDrawer = () => {
diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs3.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs3.vue
new file mode 100644
index 0000000..96b21d7
--- /dev/null
+++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs3.vue
@@ -0,0 +1,255 @@
+
+
+
+
+ 序号 |
+ 执行时间 |
+ 操作内容 |
+ 操作人 |
+
+
+
+
+ {{ row.key }} |
+ {{ row.data }} |
+ {{ row.planName }} |
+ {{ row.status }} |
+
+
+
+
+
+
+
+
+
+
+
+
{{
+ item.name }}
+
+
+
+
+
控制模式
+
+
手动
+
+
自动
+
+
+
+
+ 亮度
+
+
+
100lux
+
+
30lux
+
+
+
+
+ 控制场景
+
+
+
手动
+
+
自动
+
+
+
+
+ 色温
+
+
+
4000k
+
+
3800k
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/config.ts b/hx-ai-intelligent/src/view/equipmentManage/group/config.ts
index 4a51f89..be69c2c 100644
--- a/hx-ai-intelligent/src/view/equipmentManage/group/config.ts
+++ b/hx-ai-intelligent/src/view/equipmentManage/group/config.ts
@@ -1,38 +1,46 @@
+import { NsSelect } from './../../../../../lib/component/form/select/index';
import { dateUtil } from '/nerv-lib/util/date-util';
import data from './mock.json';
import { http } from '/nerv-lib/util';
import { ref } from 'vue';
-import { group } from '/@/api/deviceManage';
+import { device, group } from '/@/api/deviceManage';
import { dict } from '/@/api';
import { origanizemanage } from '/@/api/origanizemanage';
const tableCalKeyMap = [
{
title: '来源企业',
- dataIndex: 'orgName',
- // textEllipsis: true,
- // textNumber: 4,
+ dataIndex: 'linkOrgName',
+ textEllipsis: true,
+ textNumber: 10,
},
{
title: '设备id',
+ textNumber: 10,
dataIndex: 'deviceCode',
+ textEllipsis: true,
},
{
title: '设备编号',
- dataIndex: 'deviceName',
- textNumber: 8,
- textEllipsis: true,
+ dataIndex: 'deviceNum',
+ textNumber: 10,
},
{
+ textNumber: 10,
title: '分组名称',
- dataIndex: 'position',
+ dataIndex: 'groupName',
},
{
title: '设备品牌/型号',
- dataIndex: 'position',
+ textNumber: 10,
+ dataIndex: 'deviceNameType',
},
{
+ textNumber: 10,
title: '设备状态',
- dataIndex: 'position',
+ dataIndex: 'deviceStatus',
+ customRender: ({ value }) => {
+ return value === '0' ? '启用' : '停用';
+ },
},
];
const tableKeyMap = [
@@ -59,7 +67,6 @@ const doWnload = (url) => {
a.click();
};
-const mockData = ref(data.listData);
export const formSchema = [
{
field: 'isCreate',
@@ -116,7 +123,7 @@ export const formSchema = [
immediate: true,
// resultField: 'data.COUNT_POINT',
labelField: 'cnValue',
- valueField: 'cnValue',
+ valueField: 'dicKey',
},
rules: [
{
@@ -146,6 +153,26 @@ export const editTreeConfig = (orgId) => ({
],
},
});
+export const editCalTreeConfig = (orgId) => ({
+ selectedKeys: ['0-0'],
+ defaultExpandAll: true,
+ api: group.queryEditCompute,
+ params: { orgId },
+ resultField: 'data.orgInfos',
+ fieldNames: { title: 'orgName', key: 'orgId' },
+ formConfig: {
+ schemas: [
+ {
+ field: 'orgName',
+ component: 'NsInput',
+ autoSubmit: true,
+ componentProps: {
+ placeholder: '请输入企业名称',
+ },
+ },
+ ],
+ },
+});
export const treeConfig = (orgId) => {
return {
defaultExpandAll: true,
@@ -172,7 +199,7 @@ export const treeConfig = (orgId) => {
immediate: true,
// resultField: 'data.ENERGY_TYPE',
labelField: 'cnValue',
- valueField: 'cnValue',
+ valueField: 'dicKey',
placeholder: '请选择能耗种类',
autoSelectFirst: true,
},
@@ -200,6 +227,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
label: '编辑',
name: 'groupEdit',
type: 'primary',
+ dynamicDisabled: () => !defaultParams.value?.id,
handle: (a, b) => {
el.value.toggle();
},
@@ -211,9 +239,11 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
dynamicDisabled: (data: any) => {
return data.list.length === 0;
},
- handle: () => {
- mockData.value.splice(0, 2);
- },
+ dynamicParams: { linkIds: 'linkId[]' },
+ confirm: true,
+ isClearCheck: true,
+ isReload: true,
+ api: group.delGroupList,
},
{
label: '批量导出',
@@ -254,23 +284,6 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
-
- {
- label: '批量分组',
- name: 'groupBatGroup',
- type: 'primary',
- handle: () => {
- elGroup.value.toggle();
- },
- },
- {
- label: '公式编辑',
- name: 'groupFormulaEdit',
- type: 'primary',
- handle: () => {
- elFormula.value.toggle();
- },
- },
],
columns: tableKeyMap,
columnActions: {
@@ -279,11 +292,11 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
{
label: '删除',
name: 'groupDelete',
- dynamicParams: ['uuid', 'appealType'],
+ dynamicParams: { linkIds: 'linkId[]' },
confirm: true,
- handle: () => {
- mockData.value.splice(0, 1);
- },
+ isClearCheck: true,
+ isReload: true,
+ api: group.delGroupList,
},
],
},
@@ -291,60 +304,30 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
formConfig: {
schemas: [
{
- field: 'name',
- label: '设备名称',
- component: 'NsInput',
+ field: 'orgName',
+ component: 'NsSelectApi',
+ defaultParams: defaultParams.value,
componentProps: {
- placeholder: '请输入',
+ placeholder: '请选择公司',
+ mode: 'multiple',
+ api: group.dropGroupFilter,
+ resultField: 'data',
+ params: { filterField: 'ORG' },
+ labelField: 'orgName',
+ valueField: 'orgId',
+ filterOption: (input: string, option: any) => {
+ return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+ },
+ showSearch: true,
+ dropdownReload: true,
+ allowClear: true,
},
},
{
- field: 'provider',
- label: '设备厂商',
+ field: 'pointNum',
component: 'NsInput',
componentProps: {
- placeholder: '请输入',
- },
- },
- {
- field: 'payWay',
- label: '设备区域',
- component: 'NsSelect',
- componentProps: {
- placeholder: '请选择',
- options: [
- {
- label: '全部',
- value: '',
- },
- ],
- },
- },
- {
- field: 'createTime',
- label: '生产日期',
- component: 'NsRangePicker',
- fieldMap: ['queryStartDate', 'queryEndDate'],
- componentProps: {
- valueFormat: 'YYYY-MM-DD',
- },
- },
- {
- field: 'createTime1',
- label: '采购日期',
- component: 'NsRangePicker',
- fieldMap: ['queryStartDate', 'queryEndDate'],
- componentProps: {
- valueFormat: 'YYYY-MM-DD',
- },
- },
- {
- field: 'createTime2',
- label: '启用日期',
- component: 'NsRangePicker',
- fieldMap: ['queryStartDate', 'queryEndDate'],
- componentProps: {
- valueFormat: 'YYYY-MM-DD',
+ placeholder: '请输入节点编号',
},
},
],
@@ -355,13 +338,11 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
};
export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
- // 分组节点
+ // 计算节点
return {
title: '点位信息',
- // api: '/carbon_emission/device/getDeviceList',
- value: mockData.value,
- params: defaultParams,
-
+ api: group.queryGroupInfoPage,
+ params: defaultParams.value,
headerActions: [
{
label: '编辑',
@@ -378,9 +359,11 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
dynamicDisabled: (data: any) => {
return data.list.length === 0;
},
- handle: () => {
- mockData.value.splice(0, 2);
- },
+ dynamicParams: { ids: 'id[]' },
+ confirm: true,
+ isReload: true,
+ isClearCheck: true,
+ api: group.delComputeList,
},
{
label: '批量导出',
@@ -421,7 +404,31 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
},
},
+
+ {
+ label: '批量分组',
+ name: 'groupBatGroup',
+ type: 'primary',
+ dynamicDisabled: (data: any) => {
+ return data.list.length === 0;
+ },
+ handle: ({ list }) => {
+ const ids = list.map(({ id }) => id);
+
+ defaultParams.value['saveDeviceInfoIds'] = ids;
+ elGroup.value.toggle();
+ },
+ },
+ {
+ label: '公式编辑',
+ name: 'groupFormulaEdit',
+ type: 'primary',
+ handle: () => {
+ elFormula.value.toggle();
+ },
+ },
],
+ scroll: { x: 1400 },
columns: tableCalKeyMap,
columnActions: {
title: '操作',
@@ -429,11 +436,11 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
{
label: '删除',
name: 'groupDelete',
- dynamicParams: 'id',
+ dynamicParams: { ids: 'id[]' },
confirm: true,
isReload: true,
isClearCheck: true,
- api: group.delGroupList,
+ api: group.delComputeList,
},
],
},
@@ -441,18 +448,80 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
formConfig: {
schemas: [
{
- field: 'name',
- label: '设备名称',
- component: 'NsInput',
+ field: 'orgIds',
+ component: 'NsSelectApi',
+ defaultParams: defaultParams.value,
componentProps: {
placeholder: '请选择公司',
+ mode: 'multiple',
+ api: group.dropGroupInfoFilter,
+ resultField: 'data',
+ params: { filterField: 'ORG' },
+ labelField: 'orgName',
+ valueField: 'orgId',
+ filterOption: (input: string, option: any) => {
+ return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+ },
+ showSearch: true,
+ dropdownReload: true,
+ allowClear: true,
+ },
+ },
+ {
+ field: 'deviceCode',
+ component: 'NsInput',
+ componentProps: {
+ placeholder: '请输入设备id',
+ },
+ },
+ {
+ field: 'deviceNum',
+ component: 'NsInput',
+ componentProps: {
+ placeholder: '请输入设备编号',
+ },
+ },
+ {
+ field: 'deviceStatus',
+ component: 'NsSelectApi',
+ componentProps: {
+ placeholder: '请选择设备状态',
+ api: () => dict({ params: { dicKey: 'DEVICE_STATUS' } }),
+ immediate: true,
+ labelField: 'cnValue',
+ valueField: 'dicKey',
+ },
+ },
+ {
+ field: 'deviceNameType',
+ component: 'NsSelectApi',
+ defaultParams: defaultParams.value,
+ componentProps: {
+ placeholder: '请选择设备型号',
+ api: (params: any) => {
+ return http.post(group.dropGroupInfoFilter, params).then((res: any) => {
+ const result = [...new Set(res.data)];
+ return { data: result };
+ });
+ },
+ resultField: 'data',
+
+ params: { filterField: 'DEVICE_TYPE' },
+ // labelField: 'orgName',
+ // valueField: 'orgId',
+ filterOption: (input: string, option: any) => {
+ return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+ },
+ showSearch: true,
+ dropdownReload: true,
+ allowClear: true,
},
},
{
field: 'provider',
component: 'NsInput',
componentProps: {
- placeholder: '请输入节点编号',
+ placeholder: '请输入分组名称',
},
},
],
diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/edit.vue b/hx-ai-intelligent/src/view/equipmentManage/group/edit.vue
index d43c189..455cc0f 100644
--- a/hx-ai-intelligent/src/view/equipmentManage/group/edit.vue
+++ b/hx-ai-intelligent/src/view/equipmentManage/group/edit.vue
@@ -14,12 +14,10 @@
v-model:target-keys="targetKeys"
:data-source="dataSource"
style="height: 100%; width: 66%"
- oneWay
:listStyle="listStyle"
show-search
:render="(item) => item.title"
- :filter-option="filterOption"
- @change="handleChange" />
+ :filter-option="filterOption" />