fix: 数据采集
This commit is contained in:
parent
94e92acfdf
commit
c017f82c36
|
@ -4,6 +4,7 @@
|
|||
:visible="true"
|
||||
width="700px"
|
||||
@cancel="handleCancel"
|
||||
:destroyOnClose="true"
|
||||
>
|
||||
<div class="sizeText">
|
||||
将批量修改
|
||||
|
@ -86,7 +87,6 @@
|
|||
<script lang="ts" setup>
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import { savePointBatch } from '@/api/data-collect/collector';
|
||||
import { Rule } from 'ant-design-vue/lib/form';
|
||||
import { cloneDeep, isObject } from 'lodash';
|
||||
import { regOnlyNumber } from '../../../data';
|
||||
|
||||
|
@ -107,15 +107,6 @@ const formData = ref({
|
|||
features: [],
|
||||
});
|
||||
|
||||
const checkLength = (_rule: Rule, value: string): Promise<any> =>
|
||||
new Promise(async (resolve, reject) => {
|
||||
if (value) {
|
||||
return String(value).length > 64
|
||||
? reject('最多可输入64个字符')
|
||||
: resolve('');
|
||||
}
|
||||
});
|
||||
|
||||
const handleOk = async () => {
|
||||
const data = cloneDeep(formData.value);
|
||||
const { accessModes, features, interval } = data;
|
||||
|
@ -136,7 +127,11 @@ const handleOk = async () => {
|
|||
);
|
||||
}
|
||||
}
|
||||
features.length !== 0 && (i.features = data.features);
|
||||
if(features.length !== 0) {
|
||||
i.features = data.features
|
||||
} else {
|
||||
i.features = i.features.map((it: any) =>it.value)
|
||||
}
|
||||
if (!!interval || Number(interval) === 0) {
|
||||
i.interval = data.interval;
|
||||
i.configuration = {
|
||||
|
@ -157,10 +152,6 @@ const handleOk = async () => {
|
|||
const handleCancel = () => {
|
||||
emit('change', false);
|
||||
};
|
||||
|
||||
const filterOption = (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
Loading…
Reference in New Issue