diff --git a/hx-ai-intelligent/src/App.vue b/hx-ai-intelligent/src/App.vue index 1b31526..9d71885 100644 --- a/hx-ai-intelligent/src/App.vue +++ b/hx-ai-intelligent/src/App.vue @@ -48,11 +48,18 @@ height: 100%; } } + // 树组件 :deep(.ant-tree-node-content-wrapper) { overflow: hidden; text-overflow: ellipsis; text-wrap: nowrap; } + + :deep(.ant-tree-node-selected) { + color: @primary-color !important; + } + + // ns-view-list-table 搜索区域 :deep(.ns-table-search) { .ns-flexv2-form { .ns-operate { diff --git a/hx-ai-intelligent/src/api/IlluminationInfo.ts b/hx-ai-intelligent/src/api/IlluminationInfo.ts new file mode 100644 index 0000000..f6de125 --- /dev/null +++ b/hx-ai-intelligent/src/api/IlluminationInfo.ts @@ -0,0 +1,20 @@ + +// 照明系统及相关接口 +export enum lightingManage { + + // 主页 ======================================================== + + // 获得分区与线路 + getArea = '/carbon-smart/IlluminationInfo/region', + // 修改线路的可用/禁用状态 + setDisable = '/carbon-smart/IlluminationInfo/revisePanel', + + // 计划列表tab页 ================================================ + + // 获得计划列表tab页的表格数据 + getPlanTable = '/carbon-smart/IlluminationPlan/selectPanelPlan', + // 获得计划列表tab页的穿梭框左侧数据 + getLeftPlan = '/carbon-smart/IlluminationPlan/getPlan', + // 提交穿梭框被选择的数据 + submitLeftPlan = '/carbon-smart/IlluminationPlan/joinPlan', +} diff --git a/hx-ai-intelligent/src/api/alarmSettings/notificationManagements.ts b/hx-ai-intelligent/src/api/alarmSettings/notificationManagements.ts new file mode 100644 index 0000000..3751491 --- /dev/null +++ b/hx-ai-intelligent/src/api/alarmSettings/notificationManagements.ts @@ -0,0 +1,5 @@ +export enum notificationManagementApi { + getTableList = '/carbon-smart/api/AlarmContactInformation/selectAlarmContactInformation', //通知管理分页 + upData = '/carbon-smart/api/AlarmContactInformation/update', //通知管理 修改 + findById = '/carbon-smart/api/AlarmContactInformation/findById', //通知管理 查询详情 +} diff --git a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts index 5d666ad..708c970 100644 --- a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts +++ b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts @@ -9,11 +9,11 @@ export enum carbonEmissionFactorLibrary { creat = '/carbon-smart/api/carbon/emission/type/creatOrUpdate', delTreeNode = '/carbon-smart/api/carbon/emission/type/del', // 单位管理 - dictionaryUnitManagement = '/carbon-smart/api/carbon/emission/factor/dictionaryUnitManagement', - findOutermost = '/carbon-smart/api/carbon/emission/factor/findOutermost', - createDictionary = '/carbon-smart/api/carbon/emission/factor/createDictionary', - updateDictionary = '/carbon-smart/api/carbon/emission/factor/updateDictionary', - delDictionary = '/carbon-smart/api/carbon/emission/factor/delDictionary', + dictionaryUnitManagement = '/carbon-smart/client/dict/dictionaryUnitManagement', + findOutermost = '/carbon-smart/client/dict/findOutermost', + createDictionary = '/carbon-smart/client/dict/createDictionary', + updateDictionary = '/carbon-smart/client/dict/updateDictionary', + delDictionary = '/carbon-smart/client/dict/delDictionary', } // 碳排管理-碳排统计接口 export enum energyConsumption { diff --git a/hx-ai-intelligent/src/router/alarmManagement.ts b/hx-ai-intelligent/src/router/alarmManagement.ts index f9d7428..02aee50 100644 --- a/hx-ai-intelligent/src/router/alarmManagement.ts +++ b/hx-ai-intelligent/src/router/alarmManagement.ts @@ -18,7 +18,7 @@ const alarmManagement = { component: () => import('/@/view/alarmManagement/alarmOverview/index.vue'), meta: { title: '告警总览', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, @@ -37,7 +37,7 @@ const alarmManagement = { component: () => import('/@/view/alarmManagement/equipmentAlarm/index.vue'), meta: { title: '设备告警', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, @@ -56,7 +56,7 @@ const alarmManagement = { component: () => import('/@/view/alarmManagement/alarmSettings/index.vue'), meta: { title: '告警设置', - keepAlive: true, + keepAlive: false, operates: [ { title: '设备告警新增', code: 'equipmentAlarmAdd' }, { title: '设备告警导入', code: 'equipmentAlarmImport' }, diff --git a/hx-ai-intelligent/src/router/carbonEmissionManage.ts b/hx-ai-intelligent/src/router/carbonEmissionManage.ts index 5ecc903..1ce91af 100644 --- a/hx-ai-intelligent/src/router/carbonEmissionManage.ts +++ b/hx-ai-intelligent/src/router/carbonEmissionManage.ts @@ -19,7 +19,7 @@ const equipment = { component: () => import('/@/view/carbonEmissionManage/carbonEmissionStatistics/index.vue'), meta: { title: '碳排统计', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, @@ -39,7 +39,27 @@ const equipment = { component: () => import('/@/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue'), meta: { title: '碳排因子库', - keepAlive: true, + keepAlive: false, + // backApi: [], + }, + }, + ], + }, + { + 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: [], }, }, diff --git a/hx-ai-intelligent/src/router/equipmentControl.ts b/hx-ai-intelligent/src/router/equipmentControl.ts index 3ed5421..e682e9a 100644 --- a/hx-ai-intelligent/src/router/equipmentControl.ts +++ b/hx-ai-intelligent/src/router/equipmentControl.ts @@ -18,7 +18,7 @@ const equipmentControl = { component: () => import('/@/view/equipmentControl/lightingManage/indexs.vue'), meta: { title: '智能照明', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, diff --git a/hx-ai-intelligent/src/router/equipmentManage.ts b/hx-ai-intelligent/src/router/equipmentManage.ts index 576e048..5cb2769 100644 --- a/hx-ai-intelligent/src/router/equipmentManage.ts +++ b/hx-ai-intelligent/src/router/equipmentManage.ts @@ -19,7 +19,7 @@ const equipment = { component: () => import('/@/view/equipmentManage/ledger/index.vue'), meta: { title: '设备台账', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, @@ -38,7 +38,7 @@ const equipment = { component: () => import('/@/view/equipmentManage/group/index.vue'), meta: { title: '分组管理', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, @@ -57,7 +57,7 @@ const equipment = { // component: () => import('/@/view/equipmentManage/energyMapping/index.vue'), // meta: { // title: '能耗映射', - // keepAlive: true, + // keepAlive: false, // // backApi: [], // }, // }, diff --git a/hx-ai-intelligent/src/router/home.ts b/hx-ai-intelligent/src/router/home.ts index 4ef3db5..965c0e4 100644 --- a/hx-ai-intelligent/src/router/home.ts +++ b/hx-ai-intelligent/src/router/home.ts @@ -17,7 +17,7 @@ const home = { // name: 'homeIndex', // meta: { // title: '首页', - // keepAlive: true, + // keepAlive: false, // // backApi: [], // }, // }, diff --git a/hx-ai-intelligent/src/router/monitor.ts b/hx-ai-intelligent/src/router/monitor.ts index 8a21dde..e2ee039 100644 --- a/hx-ai-intelligent/src/router/monitor.ts +++ b/hx-ai-intelligent/src/router/monitor.ts @@ -18,7 +18,7 @@ const equipment = { component: () => import('/@/view/monitor/environmentMonitor/index.vue'), meta: { title: '环境监测', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, @@ -37,7 +37,7 @@ const equipment = { component: () => import('/@/view/monitor/deviceMonitor/index.vue'), meta: { title: '设备监测', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, @@ -56,7 +56,7 @@ const equipment = { component: () => import('/@/view/monitor/energyMonitor/index.vue'), meta: { title: '能耗监测', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, @@ -75,7 +75,7 @@ const equipment = { // component: () => import('/@/view/monitor/group/index.vue'), // meta: { // title: '分组管理', - // keepAlive: true, + // keepAlive: false, // // backApi: [], // }, // }, diff --git a/hx-ai-intelligent/src/router/organizationManage.ts b/hx-ai-intelligent/src/router/organizationManage.ts index 6b5a52e..1984cd3 100644 --- a/hx-ai-intelligent/src/router/organizationManage.ts +++ b/hx-ai-intelligent/src/router/organizationManage.ts @@ -18,7 +18,7 @@ const organizationManage = { component: () => import('/@/view/organizationManage/usermanage/index.vue'), meta: { title: '用户管理', - keepAlive: true, + keepAlive: false, operates: [ { title: '新增', code: 'userAdd' }, { title: '导入', code: 'userImport' }, @@ -48,7 +48,7 @@ const organizationManage = { component: () => import('/@/view/organizationManage/departmentManage/index.vue'), meta: { title: '部门/权限', - keepAlive: true, + keepAlive: false, operates: [ { title: '新增部门', code: 'authorityDeptAdd' }, { title: '新增子部门', code: 'authorityDeptSonAdd' }, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue index c3aa677..c673609 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue @@ -177,6 +177,25 @@ ], }, }, + { + label: '是否创建工单', + field: 'createWorkOrder', + component: 'NsRadioGroup', + rules: [ + { + required: true, + message: '是否创建工单不能为空', + trigger: 'change', + }, + ], + componentProps: { + radioType: 'radio', + options: [ + { label: '是', value: 1 }, + { label: '否', value: 0 }, + ], + }, + }, ], }, }, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue index 6f92f87..1b57ddd 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue @@ -215,7 +215,7 @@ pageNum: 1, pageSize: 99, }, - placeholder: '请选择设备点位', + placeholder: '请选择设备名称', resultField: 'data.records', labelField: 'deviceName', valueField: 'id', diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue index f44bf69..f591179 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue @@ -196,8 +196,8 @@ }); }; //选择设备方法 - const selectDevice = (value: string) => { - console.log(`selected ${value}`); + const selectDevice = () => { + getDevicePoint({ id: infoObject.value.deviceName }); }; //获取设备列表 const getDevicePage = (value: any) => { diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue index 7670079..4d0538c 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue @@ -195,6 +195,25 @@ ], }, }, + { + label: '是否创建工单', + field: 'createWorkOrder', + component: 'NsRadioGroup', + rules: [ + { + required: true, + message: '是否创建工单不能为空', + trigger: 'change', + }, + ], + componentProps: { + radioType: 'radio', + options: [ + { label: '是', value: 1 }, + { label: '否', value: 0 }, + ], + }, + }, ], }, }, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue index 83fc3a1..96398fe 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue @@ -4,21 +4,27 @@ @@ -90,7 +96,7 @@ {{ record.repetitions.label }} @@ -124,6 +130,7 @@ import { deviceAlarms } from '/@/api/alarmSettings/deviceAlarms'; import { energyAlarms } from '/@/api/alarmSettings/energyAlarm'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; + import { notificationManagementApi } from '/@/api/alarmSettings/notificationManagements'; export default { name: 'AlarmSettingsIndex', @@ -146,6 +153,22 @@ const equipmentAlarm = ref(true); const energyAlarm = ref(true); const notificationConfig = notificationtableConfig(notificationManagements); + //获取 通知方式 + const getNotificationMethod = (data: any) => { + if (!data) return ''; + const methods = []; + const notifications = data.split(','); + + notifications.forEach((notification) => { + if (notification === '1') { + methods.push('站内信息'); + } else if (notification === '2') { + methods.push('邮件'); + } + }); + + return methods.join('/'); + }; //能源告警配置 const energyAlarmConfig = energyAlarmConfigs( editeEnergyAlarm, @@ -169,6 +192,10 @@ energyAlarm.value = !energyAlarm.value; configureEnergyAlarms.value.show = false; }; + //通知 修改成功 + const updNotification = () => { + mainRef.value?.nsTableRef.reload(); + }; const clickSwitch = (data: any) => { NsModal.confirm({ title: '启用状态', @@ -182,12 +209,14 @@ if (data.type === 1) { //通知方式 http - .post(deviceAlarms.addOrUpNewData, { + .post(notificationManagementApi.upData, { id: data.record.id, - enableRules: data.record.enableRules === 1 ? 0 : 1, + enableNotifications: data.record.enableNotifications === 1 ? 0 : 1, }) .then(() => { - NsMessage.success(data.record.enableRules === 1 ? '通知已关闭' : '通知已启用'); + NsMessage.success( + data.record.enableNotifications === 1 ? '通知已关闭' : '通知已启用', + ); mainRef.value?.nsTableRef.reload(); }); } @@ -232,6 +261,8 @@ equipmentAlarmConfig, editObject, editeEnergyAlarm, + updNotification, + getNotificationMethod, clickSwitch, editEquipmentAlarm, notificationManagements, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue index 74a5db0..fccaaaf 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/index.vue @@ -10,10 +10,10 @@ @close="handleClose">
- +
-
-
- 联系人名单 +
+ 联系人名单
@@ -85,12 +69,11 @@ + diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts index 8d4092f..069127e 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts @@ -145,7 +145,7 @@ export const notificationtableConfig = (look: any, status: any) => { fieldMap: ['manufactureBeginDate', 'manufactureEndDate'], componentProps: { valueFormat: 'YYYY-MM-DD', - placeholder: ['设备生产开始日期', '设备生产结束日期'], + placeholder: ['开始日期', '结束日期'], }, }, ], diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue index cf05dbf..3bb69b9 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue @@ -707,16 +707,17 @@ { field: 'emissionProcess', label: '排放环节', - component: 'NsSelect', + component: 'NsInput', componentProps: { - allowClear: true, + // allowClear: true, placeholder: '请选择排放环节', - options: [ - { - label: '消费环节', - value: 0, - } - ], + maxLength: 30, + // options: [ + // { + // label: '消费环节', + // value: 0, + // } + // ], }, }, { diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index copy.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index copy.vue new file mode 100644 index 0000000..62c8b54 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index copy.vue @@ -0,0 +1,306 @@ + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue index 9298666..d792f11 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue @@ -83,7 +83,7 @@ }, { title: '计量单位', - dataIndex: 'unit', + dataIndex: 'unitName', }, { title: '加权平均', diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue index 78ff753..c4a1582 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue @@ -1,6 +1,6 @@ - - --> + + = { energyType: [{ required: true, message: '请输入能源种类', trigger: 'change' }], @@ -229,19 +233,182 @@ queryParams.value.year = selectYear.value getTableList() } + const mainRef = ref(); + const year = selectYear.value.format('YYYY') + const tableConfig = ref({ + title: '能耗统计', + api: energyConsumption.pageList, + params: queryParams.value, + headerActions: [ + { + label: '新增', + name: 'userAdd', + type: 'primary', + handle: () => { + getDictList() + visible.value = true + }, + }, + { + label: '导入', + type: 'primary', + name: 'userImport', + handle: () => {}, + }, + { + label: '导出', + type: 'primary', + name: 'userExports', + }, + { + label: '模板下载', + type: 'primary', + name: 'userExports', + }, + { + label: '上传凭证', + type: 'primary', + handle: () => { + openUpload.value = true; + }, + }, + { + label: '凭证下载', + type: 'primary', + name: 'userExports', + }, + ], + columns: [ + { + title: '序号', + customRender: (text: any) => { + return text.index + 1; + }, + }, + { + title: '能源种类', + dataIndex: 'energyType', + }, + { + title: '计量单位', + className: 'unitName', + dataIndex: 'unitName', + }, + { + title: '全年', + dataIndex: 'yearly', + }, + { + title: '1月', + dataIndex: 'jan', + // customRender: ({ text, record }) => ({ + // children: text, + // attrs: { + // style: record.janFlag === 1 ? 'color: red' : 'color: blue' + // } + // }) + }, + { + title: '2月', + dataIndex: 'feb', + }, + { + title: '3月', + dataIndex: 'mar', + }, + { + title: '4月', + dataIndex: 'apr', + }, + { + title: '5月', + dataIndex: 'may', + }, + { + title: '6月', + dataIndex: 'jun', + }, + { + title: '7月', + dataIndex: 'jul', + }, + { + title: '8月', + dataIndex: 'aug', + }, + { + title: '9月', + dataIndex: 'sep', + }, + { + title: '10月', + dataIndex: 'oct', + }, + { + title: '11月', + dataIndex: 'nov', + }, + { + title: '12月', + dataIndex: 'dec', + }, + ], + columnActions: { + title: '操作', + actions: [ + { + label: '编辑', + name: 'userEdit', + handle: (record: any) => { + getDictList() + visible.value = true + fetch(energyConsumption.findById , {id : record.id }).then((res) => { + // if(res.data.unit){ + // res.data.unit = res.data.unit.split(',') + // } + formState.value = res.data + }); + }, + }, + { + label: '删除', + name: 'userDelete', + dynamicParams: { id: 'id' }, + confirm: true, + isReload: true, + api: energyConsumption.del, + }, + ], + }, + + formConfig: { + schemas: [ + { + field: 'year', + label: '年份', + component: 'NsDatePicker', + componentProps: { + picker: 'year', + valueFormat: 'YYYY', + defaultValue: selectYear.value.format('YYYY'), + }, + }, + ], + params: {}, + }, + rowKey: 'id', + }); // 获取表格数据 const getTableList = () => { fetch(energyConsumption.pageList , queryParams.value).then((res) => { data.value = res.data.records - total.value = res.data.total }); }; - getTableList() // 分页器 const onChange = (pageNumber: number,size: number) => { queryParams.value.pageNum = pageNumber; queryParams.value.pageSize = size; - getTableList() + mainRef.value?.nsTableRef.reload(); }; // 计算碳排切换 const changeRadio = (e) => { @@ -258,28 +425,29 @@ .then(() => { console.log('values', formState, toRaw(formState)); if(formState.value.unit){ - formState.value.unit = formState.value.unit.join(',') + formState.value.unit = formState.value.unit.join(',').split(',')[1] } if(formState.value.id){ fetch(energyConsumption.update , formState.value).then((res) => { visible.value = false + formState.value = { + orgId: orgId.value, + } message.success('操作成功!'); - getTableList() + mainRef.value?.nsTableRef.reload(); }); }else{ fetch(energyConsumption.creat , formState.value).then((res) => { if(res.data === '新增数据已存在'){ visible.value = false - queryParams.value = formState.value - queryParams.value.pageNum = 1, - queryParams.value.pageSize = 10, - queryParams.value.orgId = orgId.value, - queryParams.value.year = selectYear.value.format('YYYY') - getTableList() + NsMessage.warning(res.data); }else{ visible.value = false + formState.value = { + orgId: orgId.value, + } message.success('操作成功!'); - getTableList() + mainRef.value?.nsTableRef.reload(); } }); } @@ -298,10 +466,10 @@ fetch(carbonEmissionFactorLibrary.dictionaryUnitManagement, { grp: 'MEASUREMENT_UNIT'}).then((res) => { measurementUnit.value = res.data measurementUnit.value = measurementUnit.value.map(item => ({ - value: item.cnValue, + value: item.id, label: item.cnValue, children: item.children ? item.children.map(child => ({ - value: child.cnValue, + value: child.id, label: child.cnValue })) : [] })); @@ -310,10 +478,10 @@ fetch(group.queryDeviceGroupTree, { energyType: 'ELECTRICITY_USAGE',orgId: orgId.value }).then((res) => { treeData.value = res.data treeData.value = treeData.value.map(item => ({ - value: item.pointName, + value: item.id, label: item.pointName, children: item.children ? item.children.map(child => ({ - value: child.pointName, + value: child.id, label: child.pointName })) : [] })); @@ -329,8 +497,8 @@ getDictList() visible.value = true fetch(energyConsumption.findById , {id : record.id }).then((res) => { - if(res.data.unit){ - res.data.unit = res.data.unit.split(',') + if(res.data.unitName){ + res.data.unitName = res.data.unitName.split(',') } formState.value = res.data }); @@ -346,7 +514,7 @@ onOk() { fetch(energyConsumption.del , {id : record.id }).then((res) => { message.success('操作成功!'); - getTableList() + mainRef.value?.nsTableRef.reload(); }); }, onCancel() { @@ -357,6 +525,9 @@ // 关闭新增抽屉 const onClose = () => { visible.value = false; + formState.value = { + orgId: orgId.value, + } formRef.value.resetFields(); }; // 点击上传凭证按钮 diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue index c45e65d..602471f 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/quickCalculation/index.vue @@ -39,7 +39,7 @@
- 新增
- + --> + { return http.post(api, params); }; + const mainRef = ref(); // 数结构 const x = 3; const y = 2; @@ -209,12 +211,13 @@ autoExpandParent.value = false; }; // 被选中的树节点 + const energyType = ref() const onSelect = (selectedKey: string[], info: any) => { selectedKeys.value = selectedKey; if(info.selected){ - queryParams.value.energyType = info.node.id + energyType.value = info.node.id statsId.value = info.node.id - getTableList() + mainRef.value?.nsTableRef.reload(); } }; @@ -239,10 +242,9 @@ const getTreeData = () => { fetch(quickCalculation.carbonQuickTree).then((res) => { gData.value = res.data - debugger - queryParams.value.energyType = gData.value[0].children[0].id + energyType.value = gData.value[0].children[0].id statsId.value = gData.value[0].children[0].id - getTableList() + mainRef.value?.nsTableRef.reload(); }); }; getTreeData() @@ -254,6 +256,90 @@ orgId: orgId.value }) const tableData = ref([]); + + const tableConfig = ref({ + title: '排放因子库', + api: quickCalculation.queryCarbonEmissionPage, + params: { + orgId, + energyType + }, + headerActions: [ + { + label: '新增', + name: 'userAdd', + type: 'primary', + handle: () => { + visible.value = true + getNewTable() + }, + }, + ], + columns: [ + { + title: '序号', + customRender: (text: any) => { + return text.index + 1; + }, + }, + { + title: '因子值', + dataIndex: 'emissionFactors', + }, + { + title: '计量单位', + className: 'carbonEmissionSuffix', + dataIndex: 'carbonEmissionSuffix', + }, + { + title: '更新时间', + className: 'updateTime', + dataIndex: 'updateTime', + }, + { + title: '启用时间', + className: 'startTime', + dataIndex: 'startTime', + }, + { + title: '结束时间', + className: 'endTime', + dataIndex: 'endTime', + }, + { + title: '数据来源', + className: 'dataSources', + dataIndex: 'dataSources', + }, + ], + columnActions: { + title: '操作', + actions: [ + { + label: '编辑', + name: 'userEdit', + handle: (record: any) => { + selectedRowKeys.value = [record.factorId]; + 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() + }, + }, + { + label: '删除', + name: 'userDelete', + dynamicParams: { id: 'id' }, + confirm: true, + isReload: true, + api: quickCalculation.del, + }, + ], + }, + rowKey: 'id', + }); // 获取列表数据 const getTableList = () => { fetch(quickCalculation.queryCarbonEmissionPage,queryParams.value).then((res) => { @@ -265,7 +351,7 @@ const onChange = (pageNumber: number,size: number) => { queryParams.value.pageNum = pageNumber; queryParams.value.pageSize = size; - getTableList() + mainRef.value?.nsTableRef.reload(); }; // 新增/编辑 const formRef = ref(); @@ -289,7 +375,7 @@ const onSelectionChange = (selectedKeys, selectedRows) => { selectedRowKeys.value = selectedKeys; formState.value.emissionFactors = selectedRows[0].emissionFactors - formState.value.carbonId = selectedRows[0].id + formState.value.factorId = selectedRows[0].id }; const queryData = ref({ orgId: orgId.value, @@ -304,11 +390,11 @@ }; // 点击编辑按钮 const editData = (record) =>{ - selectedRowKeys.value = [record.carbonId]; + selectedRowKeys.value = [record.factorId]; formState.value.id = record.id formState.value.emissionFactors = record.emissionFactors formState.value.dateRange = [record.startTime, record.endTime]; - formState.value.carbonId = record.carbonId + formState.value.factorId = record.factorId visible.value = true getNewTable() }; @@ -321,14 +407,13 @@ formState.value.startTime = formState.value.dateRange[0] formState.value.endTime = formState.value.dateRange[1] console.log('values', formState, toRaw(formState)); - debugger if(formState.value.id){ fetch(quickCalculation.update,formState.value).then((res) => { visible.value = false selectedRowKeys.value = []; formState.value = {} formRef.value.resetFields(); - getTableList() + mainRef.value?.nsTableRef.reload(); }); }else{ fetch(quickCalculation.creat,formState.value).then((res) => { @@ -336,7 +421,7 @@ selectedRowKeys.value = []; formState.value = {} formRef.value.resetFields(); - getTableList() + mainRef.value?.nsTableRef.reload(); }); } }) @@ -408,6 +493,9 @@ ::v-deep .ant-table-container{ padding: 0px 16px; } + :deep(.ns-table-main) { + margin-top: unset !important; + } .top { overflow: auto; } diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts new file mode 100644 index 0000000..6c3642a --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/config.ts @@ -0,0 +1,283 @@ +import { ref } from 'vue'; +import { http } from '/nerv-lib/util'; +import { origanizemanage } from '/@/api/origanizemanage'; +import { carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary'; +export const formConfig = (disabled) => { + return ref([ + { + field: 'fields', + component: 'NsChildForm', + componentProps: { + schemas: [ + { + label: '排放源', + field: 'emissionSources', + component: 'NsInput', + componentProps: { + placeholder: '请输入排放源', + maxLength: 20, + }, + rules: [ + { + required: true, + message: '请输入排放源', + }, + ], + }, + { + field: 'emissionType', + label: '排放分类', + component: 'NsCascader', + fieldMap: ['emissionType'], + componentProps: { + placeholder: '请选择排放分类', + api: carbonEmissionFactorLibrary.getCarbonFactorTree, + fieldNames: { label: 'emissionName', value: 'id' }, + showSearch: true, + }, + rules: [ + { + required: true, + message: '请选择排放分类', + }, + ], + }, + { + field: 'emissionGas', + label: '排放气体', + component: 'NsSelect', + componentProps: { + allowClear: true, + placeholder: '请选择排放气体', + options: [ + { + label: 'CO2', + value: 'CO2', + }, + { + label: 'CO2e', + value: 'CO2e', + }, + { + label: 'SF6', + value:'SF6', + }, + { + label: 'CH4', + value: 'CH4', + }, + { + label: 'PFCs', + value: 'PFCs', + }, + { + label: 'HFCs', + value: 'HFCs', + }, + ], + }, + rules: [ + { + required: true, + message: '请选择排放气体', + }, + ], + }, + // { + // field: 'emissionProcess', + // label: '排放环节', + // component: 'NsSelectApi', + // componentProps: { + // api: carbonEmissionFactorLibrary.getEmissionProcess, + // params: { + // emissionType: sessionStorage.getItem('checkedTreeNode'), + // }, + // resultField: 'data', + // labelField: 'emissionProcess', + // valueField: 'emissionProcess', + // immediate: true, + // autoSelectFirst: false, + // filterOption:false, + // showSearch:true, + // autoClearSearchValue:false + // }, + // }, + { + label: '排放环节', + field: 'emissionProcess', + component: 'NsInput', + componentProps: { + placeholder: '请输入排放环节', + maxLength: 20, + }, + rules: [ + { + required: true, + message: '请输入排放环节', + }, + ], + }, + { + label: '排放因子', + field: 'emissionFactors', + component: 'NsInputNumber', + componentProps: { + placeholder: '请输入排放因子值', + maxLength: 20, + }, + rules: [ + { + required: true, + message: '请输入排放因子值', + trigger: 'change', + }, + ], + }, + { + field: 'carbonEmissionPrefix', + label: '碳排前缀', + component: 'NsSelect', + componentProps: { + disabled: true, + allowClear: true, + defaultValue: 't', + placeholder: '请选择碳排前缀', + options: [ + { + label: 'g', + value: 'g', + }, + { + label: 'kg', + value: 'kg', + }, + { + label: 't', + value: 't', + }, + ], + }, + rules: [ + { + required: true, + message: '请选择碳排前缀', + }, + ], + }, + { + label: '碳排后缀', + field: 'carbonEmissionSuffix', + component: 'NsInput', + componentProps: { + placeholder: '请输入碳排后缀', + maxLength: 20, + }, + rules: [ + { + required: true, + message: '请输入碳排后缀', + }, + ], + }, + { + label: '已引用数', + field: 'numberOfReferences', + component: 'NsInput', + componentProps: { + defaultValue: 10, + disabled: true, + maxLength: 20, + }, + }, + { + label: '参考文献', + field: 'reference', + component: 'NsTextarea', + componentProps: { + placeholder: '请输入参考文献', + maxLength: 20, + }, + }, + ], + }, + }, + ]); +}; +const options = ref([]); + +const getUserPerList = (transform, params = {}) => { + return http.post(origanizemanage.queryUserPerList, { ...params }).then((res) => { + return res.data?.map((item) => { + item = { ...item, ...transform(item) }; + return item; + }); + }); +}; +export const formConfig2 = (casData: any) => { + return ref([ + { + field: 'information', + component: 'NsCascader', + componentProps: { + placeholder: '请选择', + displayRender: ({ labels, selectedOptions }: any) => { + console.log(labels, selectedOptions); + + casData.value = selectedOptions.map(({ label, value }) => { + return { label, value }; + }); + return labels.join('/'); + }, + loadData: (selectedOptions, options) => { + console.log(selectedOptions, options, 'selectedOptions, options'); + + const targetOption = selectedOptions[selectedOptions.length - 1]; + let transForm, params; + // load options lazily + if (!selectedOptions.length) { + transForm = (data) => { + data['label'] = data.orgName; + data['value'] = data.orgId; + data['isLeaf'] = false; + data['level'] = 1; + return data; + }; + getUserPerList(transForm).then((res) => { + options.value = [...res]; + }); + } + const id = targetOption?.value; + const level = targetOption?.level; + if (targetOption) { + targetOption.loading = true; + } + + if (level === 1) { + transForm = (data) => { + data['label'] = data.deptName; + data['value'] = data.deptId; + data['isLeaf'] = false; + data['level'] = 2; + return data; + }; + params = { orgId: id }; + } else if (level === 2) { + transForm = (data) => { + data['label'] = data.roleName; + data['value'] = data.roleId; + data['level'] = 3; + return data; + }; + params = { deptId: id }; + } + if (targetOption) { + getUserPerList(transForm, { ...params }).then((res) => { + targetOption.loading = false; + targetOption.children = [...res]; + }); + } + }, + }, + }, + ]); +}; diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue new file mode 100644 index 0000000..eb62cd7 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/fillInPage/index.vue @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue new file mode 100644 index 0000000..89ff479 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/index.vue @@ -0,0 +1,197 @@ + + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/mock.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/mock.ts new file mode 100644 index 0000000..76ff687 --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonInventoryCheck/mock.ts @@ -0,0 +1,45 @@ +import { ref } from 'vue'; +import { origanizemanage } from '/@/api/origanizemanage'; +import { http } from '/nerv-lib/saas'; + +export const mockData = ref([ + { + id: 3, + zhanghao: 'axb', + name: '张三', + sex: '男', + phone: '123456789', + email: '1234567889', + relation: '1', + role: '1', + status: '1', + }, +]); + +export const mockData2 = ref([ + { + information: '铁路局1/产品部1/产品总监1', + }, +]); + +export const treeData = ref([ + { + title: '铁路总局', + key: '0-0', + children: [ + { title: '济阳站', key: '0-0-0' }, + { title: '临沂站', key: '0-0-1' }, + ], + }, +]); + +export const treeData2 = [ + { + title: '全部', + key: '0-0', + children: [ + { title: '产品部', key: '0-0-0' }, + { title: '运维部', key: '0-0-1' }, + ], + }, +]; diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/dialogStyle.less b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/dialogStyle.less index 7dee3a5..b3bf2f3 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/dialogStyle.less +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/dialogStyle.less @@ -3,6 +3,7 @@ right: 496px; width: 500px; height: 100%; + z-index: 99; top: 0; bottom: 0; margin: auto; @@ -12,6 +13,7 @@ display: flex; padding: 25px; flex-direction: column; + transition: all ease 0.5s; .content { overflow-y: scroll; .div-operation { @@ -138,4 +140,11 @@ color: black; } } +} + +.fade-enter-active, .fade-leave-active { + transform: translateX(0px); +} +.fade-enter-from, .fade-leave-to { + transform: translateX(496px); } \ 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 dd02f25..4b4cf21 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/index.less +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/index.less @@ -1,7 +1,5 @@ // 页面容器 .lighting-box { - // width: 100%; - // height: 100%; position: relative; // background: linear-gradient(#badaff, #8cabeb, #7095de); // 照明设备功能总容器 @@ -47,32 +45,46 @@ height: 240px; transform: rotateX(79deg) rotateZ(-22deg) skew(29deg); display: flex; - gap: 8px; + gap: 5px; .area1 { - width: 170px; + width: 70px; background: rgba(0, 251, 91, 0.3); border: 2px solid rgb(0, 251, 91); display: flex; } .area2 { - width: 240px; + width: 200px; background: rgba(255, 165, 0, 0.3); border: 2px solid rgb(255, 165, 0); display: flex; } .area3 { - width: 110px; + width: 120px; background: rgba(255, 0, 0, 0.3); border: 2px solid rgb(255, 0, 0); + display: flex; } .area4 { - flex: 1; + width: 70px; background: rgba(80, 236, 244, 0.3); border: 2px solid rgb(80, 236, 244); + display: flex; + } + .area5 { + flex: 1; + background: rgba(0, 251, 91, 0.3); + border: 2px solid rgb(0, 251, 91); + display: flex; + } + .area6 { + flex: 1; + background: rgba(255, 165, 0, 0.3); + border: 2px solid rgb(255, 165, 0); + display: flex; } - // .area-item:hover { - // transform: scale(1.05); - // } + .area-item:hover { + transform: scale(1.05); + } .area-item { cursor: pointer; transition: all ease 0.2s; @@ -82,37 +94,16 @@ 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; + box-sizing: border-box; + padding: 10px; + // border: 2px solid red; + .shadow-box { + width: 30px; + height: 200px; border-radius: 20px; - background: rgba(0, 0, 0, 0.1); + background: rgba(0, 0, 0, 0.2); } } - // .group-shadow { - // transition: all ease 0.2s; - // } - // .group-shadow:hover { - // transform: scale(1.05); - // } } } } diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue index a1c1006..dee6eb5 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue @@ -3,25 +3,31 @@
- - - + +
-
+
+
+
- + +
@@ -44,7 +50,7 @@ :maskStyle="{ 'background-color': 'rgba(0, 0, 0, 0)' }"> - + @@ -59,94 +65,170 @@ diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue index d0db90a..d1a523d 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/tabs2.vue @@ -14,29 +14,29 @@ - {{ row.key }} - {{ row.data }} + {{ index + 1 }} + {{ row.startTime }} {{ row.planName }} - + - + @@ -73,41 +73,53 @@ - + diff --git a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue index e7be87b..ab6b8c8 100644 --- a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue +++ b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue @@ -145,7 +145,7 @@ 取消 编辑 @@ -501,6 +501,7 @@ roleFormData.value = {}; opMap.type = ''; opMap.fuc = ''; + selectRoleRef.value = ''; roleDisabled.value = true; }; @@ -627,6 +628,7 @@ roleActiveKey.value = 1; // 需要重置数据 clearDeptData(); + clearRoleData(); const { selected } = info; if (!selectedKeys?.length) return; @@ -686,7 +688,7 @@ roleFormData.value = cloneDeep(info.node.dataRef); roleCheckedKeys.value = []; if (selectRoleRef.value?.proleId) { - // 查询子部门 + // 查询子角色 getRolesonPermissionTree({ roleId: selectRoleRef.value?.proleId }); } else { getRolePermissionTree({ deptId: selectRef.value.deptInfo.deptId }); @@ -723,6 +725,13 @@ deptPermission().then(() => { clearDeptData(); disabled.value = true; + // 部门权限修改后更新角色树 + if (selectRoleRef.value?.proleId) { + // 查询子角色 + getRolesonPermissionTree({ roleId: selectRoleRef.value?.proleId }); + } else { + getRolePermissionTree({ deptId: selectRef.value.deptInfo.deptId }); + } }); } }; @@ -816,7 +825,7 @@ padding: @ns-gap; background-color: @white; border-radius: @ns-border-radius; - // box-shadow: @ns-content-box-shadow; + box-shadow: @ns-content-box-shadow; } .tree { diff --git a/hx-ai-intelligent/src/view/organizationManage/usermanage/config.ts b/hx-ai-intelligent/src/view/organizationManage/usermanage/config.ts index 6b5e24c..dd3e275 100644 --- a/hx-ai-intelligent/src/view/organizationManage/usermanage/config.ts +++ b/hx-ai-intelligent/src/view/organizationManage/usermanage/config.ts @@ -4,100 +4,91 @@ import { origanizemanage } from '/@/api/origanizemanage'; export const formConfig = (disabled) => { return ref([ { - field: 'field111', - component: 'NsChildForm', + label: '账号', + field: 'accountNo', + component: 'NsInput', componentProps: { - title: '用户信息', - schemas: [ - { - label: '账号', - field: 'accountNo', - component: 'NsInput', - componentProps: { - placeholder: '请输入账号', - maxLength: 20, - disabled, - }, - rules: [ - { - required: true, - message: '请输入账号', - }, - ], - }, - { - label: '姓名', - field: 'realName', - component: 'NsInput', - componentProps: { - placeholder: '请输入姓名', - maxLength: 20, - }, - rules: [ - { - required: true, - message: '请输入姓名', - }, - ], - }, - { - label: '性别', - field: 'sex', - component: 'NsRadioGroup', - defaultValue: '男', - componentProps: { - radioType: 'radio', - options: [ - { label: '男', value: '男' }, - { label: '女', value: '女' }, - ], - }, - }, - { - label: '手机号', - field: 'telephone', - component: 'NsInput', - componentProps: { - placeholder: '请输入手机号', - maxLength: 11, - }, - rules: [ - { - required: true, - message: '请输入正确手机号格式', - pattern: /^[1][3-9][0-9]{9}$/, - }, - ], - }, - { - label: '邮箱', - field: 'email', - component: 'NsInput', - componentProps: { - placeholder: '请输入邮箱', - maxLength: 30, - }, - rules: [ - { - pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, - message: '请输入正确的邮箱格式', - trigger: 'blur', - }, - ], - }, - { - label: '组织关系', - field: 'orgName', - component: 'NsInput', - defaultValue: JSON.parse(sessionStorage.getItem(import.meta.env.VITE_PUBLIC_PATH)).orgName, - componentProps: { - disabled: true, - maxLength: 30, - }, - }, + placeholder: '请输入账号', + maxLength: 20, + disabled, + }, + rules: [ + { + required: true, + message: '请输入账号', + }, + ], + }, + { + label: '姓名', + field: 'realName', + component: 'NsInput', + componentProps: { + placeholder: '请输入姓名', + maxLength: 20, + }, + rules: [ + { + required: true, + message: '请输入姓名', + }, + ], + }, + { + label: '性别', + field: 'sex', + component: 'NsRadioGroup', + defaultValue: '男', + componentProps: { + radioType: 'radio', + options: [ + { label: '男', value: '男' }, + { label: '女', value: '女' }, ], }, }, + { + label: '手机号', + field: 'telephone', + component: 'NsInput', + componentProps: { + placeholder: '请输入手机号', + maxLength: 11, + }, + rules: [ + { + required: true, + message: '请输入正确手机号格式', + pattern: /^[1][3-9][0-9]{9}$/, + }, + ], + }, + { + label: '邮箱', + field: 'email', + component: 'NsInput', + componentProps: { + placeholder: '请输入邮箱', + maxLength: 30, + }, + rules: [ + { + pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, + message: '请输入正确的邮箱格式', + trigger: 'blur', + }, + ], + }, + { + label: '组织关系', + field: 'orgName', + component: 'NsInput', + defaultValue: JSON.parse(sessionStorage.getItem(import.meta.env.VITE_PUBLIC_PATH)).orgName, + componentProps: { + disabled: true, + maxLength: 30, + }, + }, ]); }; const options = ref([]); diff --git a/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue b/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue index 9528e9e..e290d2c 100644 --- a/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue +++ b/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue @@ -32,12 +32,14 @@ :footer-style="{ textAlign: 'right' }" destroyOnClose @close="onClose"> + 用户信息 用户权限 import { computed, createVNode, defineComponent, reactive, ref, watchEffect } from 'vue'; import { http } from '/nerv-lib/util/http'; - import { NsMessage, NsModal } from '/nerv-lib/component'; + import { Badge, NsMessage, NsModal } from '/nerv-lib/component'; import { formConfig, formConfig2 } from './config'; import { origanizemanage } from '/@/api/origanizemanage'; @@ -265,6 +267,7 @@ deptRoleInfoList: str, roleId: casData.value[2].value, roleName: casData.value[2].label, + deptId: casData.value[1].value, orgId: casData.value[0].value, } as never); handleClose(); @@ -386,19 +389,21 @@ return createVNode('div', {}, [ createVNode('span', {}, value[0]?.deptRoleInfoList), value.length > 1 && - createVNode( - 'a', - { - onClick: () => - NsModal.info({ - icon: null, - content: createVNode('div', { - innerHTML: value.map((item) => item?.deptRoleInfoList).join('
'), - }), + createVNode(Badge, { + onClick: () => + NsModal.info({ + icon: null, + content: createVNode('div', { + innerHTML: value.map((item) => item?.deptRoleInfoList).join('
'), }), + }), + size: 'small', + style: { + transform: 'translateY(-4px)', + cursor: 'pointer', }, - `+${value.length}`, - ), + count: value.length - 1, + }), ]); }, }, @@ -596,6 +601,12 @@ .main { background-color: @ns-content-bg; display: flex; + + .top, + :deep(.ns-table-search), + :deep(.ns-table-main) { + box-shadow: @ns-content-box-shadow; + } } .left { width: 300px; diff --git a/hx-op/src/router/home.ts b/hx-op/src/router/home.ts index b8ea9f4..171c853 100644 --- a/hx-op/src/router/home.ts +++ b/hx-op/src/router/home.ts @@ -11,7 +11,7 @@ const home = { component: () => import('/@/view/developing.vue'), meta: { title: '首页', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, diff --git a/hx-op/src/router/organizationManage.ts b/hx-op/src/router/organizationManage.ts index f4ecc42..e0b11ad 100644 --- a/hx-op/src/router/organizationManage.ts +++ b/hx-op/src/router/organizationManage.ts @@ -11,7 +11,7 @@ const organizationManage = { component: () => import('/@/view/organizationManage/enterpriseManage/index.vue'), meta: { title: '企业管理', - keepAlive: true, + keepAlive: false, // backApi: [], }, }, diff --git a/lib/saas/view/system/application.vue b/lib/saas/view/system/application.vue index 3b432cf..76a7517 100644 --- a/lib/saas/view/system/application.vue +++ b/lib/saas/view/system/application.vue @@ -337,7 +337,7 @@ height: 100%; background-color: @white; border-radius: @ns-border-radius; - overflow-y: auto; + // overflow-y: auto; // overflow-x: hidden; // margin: 0 16px 16px 16px; }