feat: 查询补充

This commit is contained in:
xuziqiang
2024-07-15 15:53:54 +08:00
parent 0681836c02
commit 32d1a633b1
8 changed files with 112 additions and 529 deletions

View File

@@ -1,8 +1,9 @@
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 = [
@@ -122,7 +123,7 @@ export const formSchema = [
immediate: true,
// resultField: 'data.COUNT_POINT',
labelField: 'cnValue',
valueField: 'cnValue',
valueField: 'dicKey',
},
rules: [
{
@@ -198,7 +199,7 @@ export const treeConfig = (orgId) => {
immediate: true,
// resultField: 'data.ENERGY_TYPE',
labelField: 'cnValue',
valueField: 'cnValue',
valueField: 'dicKey',
placeholder: '请选择能耗种类',
autoSelectFirst: true,
},
@@ -303,9 +304,22 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => {
schemas: [
{
field: 'orgName',
component: 'NsInput',
component: 'NsSelectApi',
defaultParams: defaultParams.value,
componentProps: {
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,
},
},
{
@@ -433,11 +447,23 @@ 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,
},
},
{
@@ -455,17 +481,40 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => {
},
},
{
field: 'provider',
component: 'NsInput',
field: 'deviceStatus',
component: 'NsSelectApi',
componentProps: {
placeholder: '请输入设备状态',
placeholder: '请选择设备状态',
api: () => dict({ params: { dicKey: 'DEVICE_STATUS' } }),
immediate: true,
labelField: 'cnValue',
valueField: 'dicKey',
},
},
{
field: 'deviceNameType',
component: 'NsInput',
component: 'NsSelectApi',
defaultParams: defaultParams.value,
componentProps: {
placeholder: '请输入设备型号',
placeholder: '请选择设备型号',
mode: 'multiple',
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,
},
},
{