From 9c39a6b7caf8172465258074c50e6d7e00464702 Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Thu, 20 Mar 2025 17:21:07 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81tplink-=E9=A1=B9=E7=9B=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=9A=E5=AE=8C=E6=88=90=E6=9C=BA=E6=9E=84=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E7=9A=84=E7=BB=84=E4=BB=B6=E4=BB=A3=E7=A0=81=202?= =?UTF-8?q?=E3=80=81=E6=9C=8D=E5=8A=A1=E6=8C=87=E4=BB=A4=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=97=E8=A1=A8=E9=A1=B5=E6=8C=87=E4=BB=A4=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ConfigServiceDirective.data.ts | 14 +++ .../iot/tplink/project/ProjectInfo.data.ts | 92 ++++++++++++------- 2 files changed, 71 insertions(+), 35 deletions(-) diff --git a/src/views/config/serviceDirective/ConfigServiceDirective.data.ts b/src/views/config/serviceDirective/ConfigServiceDirective.data.ts index 13c87cb..18d8702 100644 --- a/src/views/config/serviceDirective/ConfigServiceDirective.data.ts +++ b/src/views/config/serviceDirective/ConfigServiceDirective.data.ts @@ -41,6 +41,20 @@ export const columns: BasicColumn[] = [ align: 'center', dataIndex: 'directiveName', }, + { + title: '指令标签', + align: 'center', + dataIndex: 'tagList', + width:150, + ellipsis: false, + format(text, record, index) { + if(!!text){ + return text.map(item => item.tagName).join(','); + }else{ + return '暂未设置' + } + }, + }, // { // title: '收费价格', // align: 'center', diff --git a/src/views/iot/tplink/project/ProjectInfo.data.ts b/src/views/iot/tplink/project/ProjectInfo.data.ts index b53408b..0c6aac0 100644 --- a/src/views/iot/tplink/project/ProjectInfo.data.ts +++ b/src/views/iot/tplink/project/ProjectInfo.data.ts @@ -1,56 +1,70 @@ -import {BasicColumn} from '/@/components/Table'; -import {FormSchema} from '/@/components/Table'; +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; //列表数据 export const columns: BasicColumn[] = [ { - title: '机构序号', - align: "center", - dataIndex: 'projectId' + title: '项目序号', + align: 'center', + dataIndex: 'projectId', + }, + { + title: '项目名称', + align: 'center', + dataIndex: 'projectName', }, { title: '机构名称', - align: "center", - dataIndex: 'projectName' + align: 'center', + dataIndex: 'institutionalId_dictText', }, { title: '创建时间', - align: "center", - dataIndex: 'createTimeStr' + align: 'center', + dataIndex: 'createTimeStr', }, { title: '设备数量', - align: "center", - dataIndex: 'deviceNum' + align: 'center', + dataIndex: 'deviceNum', }, { title: '离线设备数', - align: "center", - dataIndex: 'offlineNum' + align: 'center', + dataIndex: 'offlineNum', }, { title: '异常设备数', - align: "center", - dataIndex: 'abnormalNum' + align: 'center', + dataIndex: 'abnormalNum', }, { title: '运行天数', - align: "center", - dataIndex: 'runningTimeStr' + align: 'center', + dataIndex: 'runningTimeStr', }, { title: '状态', - align: "center", + align: 'center', dataIndex: 'status', - customRender:({record})=>{ - return record.status?(record.status=='1'?'正常':'冻结'):''; + customRender: ({ record }) => { + return record.status ? (record.status == '1' ? '正常' : '冻结') : ''; }, - } + }, ]; export const searchFormSchema: FormSchema[] = [ { - label: '名称', + label: '机构', + field: 'institutionalId', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc', + placeholder: '请选择机构', + }, + }, + { + label: '项目名称', field: 'projectName', component: 'Input', //colProps: { span: 6 }, @@ -67,7 +81,7 @@ export const searchFormSchema: FormSchema[] = [ ], }, //colProps: { span: 6 }, - } + }, ]; export const formSchema: FormSchema[] = [ @@ -78,45 +92,54 @@ export const formSchema: FormSchema[] = [ show: false, }, { - label: '机构序号', + label: '项目序号', field: 'projectId', component: 'Input', - dynamicDisabled: true + dynamicDisabled: true, + }, + { + label: '项目名称', + field: 'projectName', + component: 'Input', }, { label: '机构名称', - field: 'projectName', - component: 'Input', + field: 'institutionalId', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc', + placeholder: '请选择机构', + }, }, { label: '创建时间', field: 'createTimeStr', component: 'Input', - dynamicDisabled: true + dynamicDisabled: true, }, { label: '设备数量', field: 'deviceNum', component: 'Input', - dynamicDisabled: true + dynamicDisabled: true, }, { label: '离线设备数', field: 'offlineNum', component: 'Input', - dynamicDisabled: true + dynamicDisabled: true, }, { label: '异常设备数', field: 'abnormalNum', component: 'Input', - dynamicDisabled: true + dynamicDisabled: true, }, { label: '运行天数', field: 'runningTimeStr', component: 'Input', - dynamicDisabled: true + dynamicDisabled: true, }, { label: '状态', @@ -128,10 +151,9 @@ export const formSchema: FormSchema[] = [ options: [ { label: '正常', value: 1, key: '1' }, { label: '冻结', value: 2, key: '2' }, - ] + ], }; }, - dynamicDisabled: true + dynamicDisabled: true, }, ]; -