fix: bug#11010、11021、11029、11031、11032 修复通道管理部分bug
This commit is contained in:
parent
7b17adc477
commit
c366f4a2cc
|
|
@ -195,7 +195,7 @@ import {
|
|||
import { FormValidate, FormState } from '../data';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import type { FormDataType } from '../type.d';
|
||||
import { isArray } from 'lodash-es';
|
||||
import { cloneDeep, isArray } from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
|
|
@ -217,7 +217,7 @@ const Options = ref({
|
|||
'security-policies': [],
|
||||
});
|
||||
|
||||
const formData = ref<FormDataType>(FormState);
|
||||
const formData = ref<FormDataType>(cloneDeep(FormState));
|
||||
|
||||
const handleOk = async () => {
|
||||
const params = await formRef.value?.validate();
|
||||
|
|
@ -238,11 +238,12 @@ const handleCancel = () => {
|
|||
const changeAuthType = (value: Array<string>) => {
|
||||
formData.value.configuration.authType = value[0];
|
||||
};
|
||||
|
||||
const isAuthType = computed(() => {
|
||||
const { authType } = formData.value.configuration;
|
||||
return isArray(authType)
|
||||
? authType[0] === 'username'
|
||||
: authType === 'username';
|
||||
? authType[0] === 'username' && formData.value.provider === 'OPC_UA'
|
||||
: authType === 'username' && formData.value.provider === 'OPC_UA';
|
||||
});
|
||||
const isSecurityMode = computed(() => {
|
||||
const { securityMode } = formData.value.configuration;
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ export const FormState: FormDataType = {
|
|||
host: '',
|
||||
port: '502',
|
||||
endpoint: '',
|
||||
securityPolicy: undefined,
|
||||
securityPolicy: 'None',
|
||||
securityMode: undefined,
|
||||
certificate: undefined,
|
||||
authType: undefined,
|
||||
authType: 'username',
|
||||
username: '',
|
||||
password: '',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -198,6 +198,9 @@ const columns = [
|
|||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
ellipsis: true,
|
||||
search: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
|
@ -254,7 +257,7 @@ const getActions = (
|
|||
state === 'enabled' ? '请先禁用该组件,再删除。' : '删除',
|
||||
},
|
||||
popConfirm: {
|
||||
title: '确认删除?',
|
||||
title: '该操作将会删除下属采集器与点位,确定删除?',
|
||||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
if (res.success) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue