diff --git a/src/plugins/file-static-url.ts b/src/plugins/file-static-url.ts index 7a434865..f0d1e275 100644 --- a/src/plugins/file-static-url.ts +++ b/src/plugins/file-static-url.ts @@ -17,5 +17,5 @@ export function parseUrlPath(path: string) { const baseUrl = import.meta.env.PROD ? sessionGet('baseUrl') || import.meta.env.VITE_API_BASE_URL : import.meta.env.VITE_API_BASE_URL; - return `${baseUrl}${path}`; + return `${baseUrl}${path}?r=${Math.random().toFixed(2)}`; } diff --git a/src/views/mmlManage/neOperate/index.vue b/src/views/mmlManage/neOperate/index.vue index 31e12693..231b770b 100644 --- a/src/views/mmlManage/neOperate/index.vue +++ b/src/views/mmlManage/neOperate/index.vue @@ -64,6 +64,22 @@ let state: StateType = reactive({ function fnTreeSelect(_: any, info: any) { state.mmlSelect = info.node.dataRef; state.from = {}; + // 遍历判断是否有初始value + if (Array.isArray(state.mmlSelect.param)) { + for (const param of state.mmlSelect.param) { + if (typeof param.value !== 'undefined' && param.value != '') { + const valueType = param.type; + if (['enum', 'int'].includes(valueType)) { + state.from[param.name] = Number(param.value); + } else if (valueType === 'bool') { + state.from[param.name] = Boolean(param.value); + } else { + state.from[param.name] = param.value; + } + } + } + } + state.autoCompleteValue = `${state.mmlSelect.operation} ${state.mmlSelect.object}`.trim(); // state.mmlCmdLog = ''; @@ -569,7 +585,7 @@ onMounted(() => { { + - diff --git a/src/views/mmlManage/omcOperate/index.vue b/src/views/mmlManage/omcOperate/index.vue index 3c80fd45..1697d956 100644 --- a/src/views/mmlManage/omcOperate/index.vue +++ b/src/views/mmlManage/omcOperate/index.vue @@ -60,6 +60,22 @@ let state: StateType = reactive({ function fnTreeSelect(_: any, info: any) { state.mmlSelect = info.node.dataRef; state.from = {}; + // 遍历判断是否有初始value + if (Array.isArray(state.mmlSelect.param)) { + for (const param of state.mmlSelect.param) { + if (typeof param.value !== 'undefined' && param.value != '') { + const valueType = param.type; + if (['enum', 'int'].includes(valueType)) { + state.from[param.name] = Number(param.value); + } else if (valueType === 'bool') { + state.from[param.name] = Boolean(param.value); + } else { + state.from[param.name] = param.value; + } + } + } + } + state.autoCompleteValue = `${state.mmlSelect.operation} ${state.mmlSelect.object}`.trim(); // state.mmlCmdLog = ''; @@ -537,7 +553,7 @@ onMounted(() => { { + - diff --git a/src/views/mmlManage/udmOperate/index.vue b/src/views/mmlManage/udmOperate/index.vue index c29726c8..8e40e194 100644 --- a/src/views/mmlManage/udmOperate/index.vue +++ b/src/views/mmlManage/udmOperate/index.vue @@ -60,6 +60,22 @@ let state: StateType = reactive({ function fnTreeSelect(_: any, info: any) { state.mmlSelect = info.node.dataRef; state.from = {}; + // 遍历判断是否有初始value + if (Array.isArray(state.mmlSelect.param)) { + for (const param of state.mmlSelect.param) { + if (typeof param.value !== 'undefined' && param.value != '') { + const valueType = param.type; + if (['enum', 'int'].includes(valueType)) { + state.from[param.name] = Number(param.value); + } else if (valueType === 'bool') { + state.from[param.name] = Boolean(param.value); + } else { + state.from[param.name] = param.value; + } + } + } + } + state.autoCompleteValue = `${state.mmlSelect.operation} ${state.mmlSelect.object}`.trim(); // state.mmlCmdLog = ''; @@ -542,7 +558,7 @@ onMounted(() => { { + - diff --git a/src/views/neUser/sub/index.vue b/src/views/neUser/sub/index.vue index 4ad30ee4..b42802ae 100644 --- a/src/views/neUser/sub/index.vue +++ b/src/views/neUser/sub/index.vue @@ -454,6 +454,7 @@ const modalStateFrom = Form.useForm( modalState.from, reactive({ imsi: [{ required: true, message: 'IMSI' + t('common.unableNull') }], + msisdn: [{ required: true, message: 'MSISDN' + t('common.unableNull') }], staticIp: [ { required: true, message: 'static ip' + t('common.unableNull') }, ], @@ -473,7 +474,7 @@ const modalStateFrom = Form.useForm( function fnModalOk() { const from = Object.assign({}, toRaw(modalState.from)); - let validateNames = ['imsi', 'staticIp']; + let validateNames = ['imsi', 'msisdn', 'staticIp']; if (from.id === '') { validateNames.push('smData'); @@ -573,7 +574,7 @@ function fnBatchModalOk() { modalState.confirmLoading = true; let ardArr = [0, 0, 0, 0, 0, 0, 0, 0]; let hplmnArr = [0, 0, 0, 0, 0, 0, 0, 0]; - let odbArr = [0, 0, 0, 0, 0, 0, 0, 0,0]; + let odbArr = [0, 0, 0, 0, 0, 0, 0, 0, 0]; from.ard.forEach((item: any) => { ardArr[item] = 1;