Merge branch 'main' of http://192.168.2.166:3180/OMC/ems_frontend_vue3
This commit is contained in:
@@ -17,5 +17,5 @@ export function parseUrlPath(path: string) {
|
|||||||
const baseUrl = import.meta.env.PROD
|
const baseUrl = import.meta.env.PROD
|
||||||
? sessionGet('baseUrl') || import.meta.env.VITE_API_BASE_URL
|
? sessionGet('baseUrl') || import.meta.env.VITE_API_BASE_URL
|
||||||
: 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)}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,22 @@ let state: StateType = reactive({
|
|||||||
function fnTreeSelect(_: any, info: any) {
|
function fnTreeSelect(_: any, info: any) {
|
||||||
state.mmlSelect = info.node.dataRef;
|
state.mmlSelect = info.node.dataRef;
|
||||||
state.from = {};
|
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.autoCompleteValue =
|
||||||
`${state.mmlSelect.operation} ${state.mmlSelect.object}`.trim();
|
`${state.mmlSelect.operation} ${state.mmlSelect.object}`.trim();
|
||||||
// state.mmlCmdLog = '';
|
// state.mmlCmdLog = '';
|
||||||
@@ -569,7 +585,7 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<a-form
|
<a-form
|
||||||
layout="vertical"
|
layout="horizontal"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:validate-on-rule-change="false"
|
:validate-on-rule-change="false"
|
||||||
:validateTrigger="[]"
|
:validateTrigger="[]"
|
||||||
@@ -587,8 +603,15 @@ onMounted(() => {
|
|||||||
<a-textarea :placeholder="t('common.ipnutPlease')" auto-size />
|
<a-textarea :placeholder="t('common.ipnutPlease')" auto-size />
|
||||||
</a-auto-complete>
|
</a-auto-complete>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
|
||||||
<template v-if="state.mmlSelect.operation && state.mmlSelect.param">
|
<template v-if="state.mmlSelect.operation && state.mmlSelect.param">
|
||||||
|
<a-form
|
||||||
|
layout="vertical"
|
||||||
|
autocomplete="off"
|
||||||
|
:validate-on-rule-change="false"
|
||||||
|
:validateTrigger="[]"
|
||||||
|
>
|
||||||
<a-divider orientation="left">
|
<a-divider orientation="left">
|
||||||
{{ t('views.mmlManage.cmdParamPanel') }}
|
{{ t('views.mmlManage.cmdParamPanel') }}
|
||||||
</a-divider>
|
</a-divider>
|
||||||
@@ -664,8 +687,8 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</template>
|
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</template>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<!-- 命令展示 -->
|
<!-- 命令展示 -->
|
||||||
|
|||||||
@@ -60,6 +60,22 @@ let state: StateType = reactive({
|
|||||||
function fnTreeSelect(_: any, info: any) {
|
function fnTreeSelect(_: any, info: any) {
|
||||||
state.mmlSelect = info.node.dataRef;
|
state.mmlSelect = info.node.dataRef;
|
||||||
state.from = {};
|
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.autoCompleteValue =
|
||||||
`${state.mmlSelect.operation} ${state.mmlSelect.object}`.trim();
|
`${state.mmlSelect.operation} ${state.mmlSelect.object}`.trim();
|
||||||
// state.mmlCmdLog = '';
|
// state.mmlCmdLog = '';
|
||||||
@@ -537,7 +553,7 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<a-form
|
<a-form
|
||||||
layout="vertical"
|
layout="horizontal"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:validate-on-rule-change="false"
|
:validate-on-rule-change="false"
|
||||||
:validateTrigger="[]"
|
:validateTrigger="[]"
|
||||||
@@ -555,8 +571,15 @@ onMounted(() => {
|
|||||||
<a-textarea :placeholder="t('common.ipnutPlease')" auto-size />
|
<a-textarea :placeholder="t('common.ipnutPlease')" auto-size />
|
||||||
</a-auto-complete>
|
</a-auto-complete>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
|
||||||
<template v-if="state.mmlSelect.operation && state.mmlSelect.param">
|
<template v-if="state.mmlSelect.operation && state.mmlSelect.param">
|
||||||
|
<a-form
|
||||||
|
layout="vertical"
|
||||||
|
autocomplete="off"
|
||||||
|
:validate-on-rule-change="false"
|
||||||
|
:validateTrigger="[]"
|
||||||
|
>
|
||||||
<a-divider orientation="left">
|
<a-divider orientation="left">
|
||||||
{{ t('views.mmlManage.cmdParamPanel') }}
|
{{ t('views.mmlManage.cmdParamPanel') }}
|
||||||
</a-divider>
|
</a-divider>
|
||||||
@@ -632,8 +655,8 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</template>
|
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</template>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<!-- 命令展示 -->
|
<!-- 命令展示 -->
|
||||||
|
|||||||
@@ -60,6 +60,22 @@ let state: StateType = reactive({
|
|||||||
function fnTreeSelect(_: any, info: any) {
|
function fnTreeSelect(_: any, info: any) {
|
||||||
state.mmlSelect = info.node.dataRef;
|
state.mmlSelect = info.node.dataRef;
|
||||||
state.from = {};
|
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.autoCompleteValue =
|
||||||
`${state.mmlSelect.operation} ${state.mmlSelect.object}`.trim();
|
`${state.mmlSelect.operation} ${state.mmlSelect.object}`.trim();
|
||||||
// state.mmlCmdLog = '';
|
// state.mmlCmdLog = '';
|
||||||
@@ -542,7 +558,7 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<a-form
|
<a-form
|
||||||
layout="vertical"
|
layout="horizontal"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:validate-on-rule-change="false"
|
:validate-on-rule-change="false"
|
||||||
:validateTrigger="[]"
|
:validateTrigger="[]"
|
||||||
@@ -560,8 +576,15 @@ onMounted(() => {
|
|||||||
<a-textarea :placeholder="t('common.ipnutPlease')" auto-size />
|
<a-textarea :placeholder="t('common.ipnutPlease')" auto-size />
|
||||||
</a-auto-complete>
|
</a-auto-complete>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
|
||||||
<template v-if="state.mmlSelect.operation && state.mmlSelect.param">
|
<template v-if="state.mmlSelect.operation && state.mmlSelect.param">
|
||||||
|
<a-form
|
||||||
|
layout="vertical"
|
||||||
|
autocomplete="off"
|
||||||
|
:validate-on-rule-change="false"
|
||||||
|
:validateTrigger="[]"
|
||||||
|
>
|
||||||
<a-divider orientation="left">
|
<a-divider orientation="left">
|
||||||
{{ t('views.mmlManage.cmdParamPanel') }}
|
{{ t('views.mmlManage.cmdParamPanel') }}
|
||||||
</a-divider>
|
</a-divider>
|
||||||
@@ -637,8 +660,8 @@ onMounted(() => {
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</template>
|
|
||||||
</a-form>
|
</a-form>
|
||||||
|
</template>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<!-- 命令展示 -->
|
<!-- 命令展示 -->
|
||||||
|
|||||||
@@ -454,6 +454,7 @@ const modalStateFrom = Form.useForm(
|
|||||||
modalState.from,
|
modalState.from,
|
||||||
reactive({
|
reactive({
|
||||||
imsi: [{ required: true, message: 'IMSI' + t('common.unableNull') }],
|
imsi: [{ required: true, message: 'IMSI' + t('common.unableNull') }],
|
||||||
|
msisdn: [{ required: true, message: 'MSISDN' + t('common.unableNull') }],
|
||||||
staticIp: [
|
staticIp: [
|
||||||
{ required: true, message: 'static ip' + t('common.unableNull') },
|
{ required: true, message: 'static ip' + t('common.unableNull') },
|
||||||
],
|
],
|
||||||
@@ -473,7 +474,7 @@ const modalStateFrom = Form.useForm(
|
|||||||
function fnModalOk() {
|
function fnModalOk() {
|
||||||
const from = Object.assign({}, toRaw(modalState.from));
|
const from = Object.assign({}, toRaw(modalState.from));
|
||||||
|
|
||||||
let validateNames = ['imsi', 'staticIp'];
|
let validateNames = ['imsi', 'msisdn', 'staticIp'];
|
||||||
|
|
||||||
if (from.id === '') {
|
if (from.id === '') {
|
||||||
validateNames.push('smData');
|
validateNames.push('smData');
|
||||||
|
|||||||
Reference in New Issue
Block a user