|
@@ -257,6 +257,21 @@
|
|
|
await getForm().setFieldsValue({
|
|
|
gdeviceids: props.deviceId ? [props.deviceId] : deviceOptions.value[0] ? [deviceOptions.value[0]['value']] : [''],
|
|
|
});
|
|
|
+ if (stationType.value !== 'redis') {
|
|
|
+ await getForm().updateSchema({
|
|
|
+ field: 'gdeviceids',
|
|
|
+ defaultValue: [props.deviceId ? props.deviceId : deviceOptions.value[0] ? deviceOptions.value[0]['value'] : ''],
|
|
|
+ componentProps: {
|
|
|
+ mode: 'multiple',
|
|
|
+ maxTagCount: 'responsive',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ await getForm().updateSchema({
|
|
|
+ field: 'gdeviceids',
|
|
|
+ defaultValue: props.deviceId ? props.deviceId : deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function resetFormParam() {
|
|
@@ -380,15 +395,12 @@
|
|
|
label: computed(() => `${deviceKide.value.startsWith('location') ? '查询人员' : '查询设备'}`),
|
|
|
field: 'gdeviceids',
|
|
|
component: 'Select',
|
|
|
- defaultValue: props.deviceId ? [props.deviceId] : deviceOptions.value[0] ? [deviceOptions.value[0]['value']] : [''],
|
|
|
required: true,
|
|
|
componentProps: {
|
|
|
showSearch: true,
|
|
|
filterOption: (input: string, option: any) => {
|
|
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
|
},
|
|
|
- mode: 'multiple',
|
|
|
- maxTagCount: 'responsive',
|
|
|
options: deviceOptions,
|
|
|
onChange: (e, option) => {
|
|
|
if (option && (option['strinstallpos'] || option['strtype'] || option['devicekind']))
|
|
@@ -508,8 +520,6 @@
|
|
|
onMounted(async () => {
|
|
|
await getDeviceList();
|
|
|
if (deviceOptions.value[0]) {
|
|
|
- stationType.value = deviceOptions.value[0]['stationtype'];
|
|
|
- historyType.value = deviceOptions.value[0]['strtype'] || deviceOptions.value[0]['devicekind'];
|
|
|
nextTick(async () => {
|
|
|
await getDataSource();
|
|
|
});
|