fix: 参数配置移除编辑器输入
This commit is contained in:
@@ -89,7 +89,7 @@ const FATCH_OPTIONS: OptionsType = {
|
||||
credentials: undefined,
|
||||
repeatSubmit: true,
|
||||
whithToken: true,
|
||||
signal: undefined
|
||||
signal: undefined,
|
||||
};
|
||||
|
||||
/**请求前的拦截 */
|
||||
@@ -209,7 +209,7 @@ export async function request(options: OptionsType): Promise<ResultType> {
|
||||
if (!options.signal) {
|
||||
const controller = new AbortController();
|
||||
const { signal } = controller;
|
||||
options.signal = signal;
|
||||
options.signal = signal;
|
||||
timeoutId = setTimeout(() => {
|
||||
controller.abort(); // 终止请求
|
||||
}, options.timeout);
|
||||
|
||||
@@ -15,8 +15,6 @@ import {
|
||||
} from '@/api/configManage/configParam';
|
||||
import { TabPosition } from 'ant-design-vue/lib/tabs/src/interface';
|
||||
import useNeInfoStore from '@/store/modules/neinfo';
|
||||
import CodemirrorEdite from '@/components/CodemirrorEdite/index.vue';
|
||||
import CodemirrorEditeDiff from '@/components/CodemirrorEditeDiff/index.vue';
|
||||
import { SizeType } from 'ant-design-vue/lib/config-provider';
|
||||
import { toRaw } from 'vue';
|
||||
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
|
||||
@@ -27,43 +25,6 @@ const route = useRoute();
|
||||
/**路由标题 */
|
||||
let title = ref<string>((route.meta.title as string) ?? '标题');
|
||||
|
||||
/**参数对象信息状态类型 */
|
||||
type ParamStateType = {
|
||||
/**进入编辑视图 */
|
||||
visibleByEdit: boolean;
|
||||
/**更新比较视图 */
|
||||
visibleByUpdate: boolean;
|
||||
/**标题 */
|
||||
title: string;
|
||||
/**新内容 */
|
||||
newArea: string;
|
||||
/**旧内容 */
|
||||
oldArea: string;
|
||||
};
|
||||
|
||||
/**参数对象信息状态 */
|
||||
let paramState: ParamStateType = reactive({
|
||||
visibleByEdit: false,
|
||||
visibleByUpdate: false,
|
||||
title: '参数设置',
|
||||
newArea: `database`,
|
||||
oldArea: `dat database`,
|
||||
});
|
||||
|
||||
/**
|
||||
* 视图是否可编辑或更新
|
||||
* @param noticeId 网元id, 不传为新增
|
||||
*/
|
||||
function fnModalVisible(type: 'edit' | 'update') {
|
||||
if (type === 'edit') {
|
||||
paramState.visibleByEdit = !paramState.visibleByEdit;
|
||||
}
|
||||
if (type === 'update') {
|
||||
paramState.title = '比较参数';
|
||||
paramState.visibleByUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**网元类型选择 type,id */
|
||||
let neTypeSelect = ref<string[]>(['', '']);
|
||||
|
||||
@@ -1579,29 +1540,6 @@ onMounted(() => {
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
|
||||
<a-space :size="8" align="center">
|
||||
<a-button type="primary" @click.prevent="fnModalVisible('edit')">
|
||||
<template #icon><PlusOutlined /></template>
|
||||
修改
|
||||
</a-button>
|
||||
<a-button type="primary" @click.prevent="fnModalVisible('update')">
|
||||
<template #icon><PlusOutlined /></template>
|
||||
提交
|
||||
</a-button>
|
||||
</a-space>
|
||||
|
||||
<CodemirrorEdite
|
||||
v-model:value="paramState.newArea"
|
||||
:disabled="!paramState.visibleByEdit"
|
||||
></CodemirrorEdite>
|
||||
|
||||
<CodemirrorEditeDiff
|
||||
v-model:visible="paramState.visibleByUpdate"
|
||||
:title="paramState.title"
|
||||
:new-area="paramState.newArea"
|
||||
:old-area="paramState.oldArea"
|
||||
></CodemirrorEditeDiff>
|
||||
</PageContainer>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user