diff --git a/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts b/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts index d7954ff..cd2d05b 100644 --- a/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts +++ b/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts @@ -138,9 +138,21 @@ export const tableConfig = (orgId) => { { field: 'deviceName', label: '设备名称', - component: 'NsInput', + component: 'NsSelectApi', componentProps: { - placeholder: '请输入设备名称', + placeholder: '请选择设备名称', + api: device.dropArea, + resultField: 'data', + params: { orgId, filterField: 'DEVICE_NAME_FACTORY' }, + labelField: 'deviceName', + valueField: 'deviceName', + filterOption: (input: string, option: any) => { + return option.deviceName.toLowerCase().indexOf(input.toLowerCase()) >= 0; + }, + showSearch: true, + immediate: true, + dropdownReload: true, + allowClear: true, }, }, { @@ -166,7 +178,7 @@ export const tableConfig = (orgId) => { loadData: (selectedOptions, options) => { const targetOption = selectedOptions[selectedOptions.length - 1]; if (!selectedOptions.length) { - http.post(device.dropArea, { orgId }).then((res) => { + http.post(device.dropArea, { orgId, filterField: 'DEVICE_AREA' }).then((res) => { options.value = res.data?.map((item) => { return { label: item, value: item, children: [], isLeaf: false }; }); @@ -175,12 +187,14 @@ export const tableConfig = (orgId) => { const value = targetOption?.value; if (targetOption) { targetOption.loading = true; - http.post(device.dropArea, { device1Area: value, orgId }).then((res) => { - targetOption.loading = false; - targetOption.children = res.data?.map((item) => { - return { label: item, value: item, children: [], isLeaf: true }; + http + .post(device.dropArea, { device1Area: value, orgId, filterField: 'DEVICE_AREA' }) + .then((res) => { + targetOption.loading = false; + targetOption.children = res.data?.map((item) => { + return { label: item, value: item, children: [], isLeaf: true }; + }); }); - }); } }, }, @@ -188,15 +202,21 @@ export const tableConfig = (orgId) => { { field: 'manufacturer', label: '设备厂商', - component: 'NsInput', + component: 'NsSelectApi', componentProps: { - placeholder: '请输入设备厂商', - options: [ - { - label: '全部', - value: '', - }, - ], + placeholder: '请选择设备厂商', + api: device.dropArea, + resultField: 'data', + params: { orgId, filterField: 'DEVICE_NAME_FACTORY' }, + labelField: 'manufacturer', + valueField: 'manufacturer', + filterOption: (input: string, option: any) => { + return option.manufacturer.toLowerCase().indexOf(input.toLowerCase()) >= 0; + }, + showSearch: true, + immediate: true, + dropdownReload: true, + allowClear: true, }, }, { diff --git a/lib/saas/view/system/login.vue b/lib/saas/view/system/login.vue index 8c59eab..187327a 100644 --- a/lib/saas/view/system/login.vue +++ b/lib/saas/view/system/login.vue @@ -129,7 +129,7 @@ accountNo: userName.value.trim(), password: password.value.trim(), }); - validator(null, value.code) + validator(null, value?.code) .then(() => { // 记住密码 rememberFunc(data);