feat: 页面调整组件属性升级
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { stepState, fnToStepName } from '../hooks/useStep';
|
||||
import { Modal } from 'ant-design-vue/lib';
|
||||
import { Modal } from 'ant-design-vue/es';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { removeToken } from '@/plugins/auth-token';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { Modal, message } from 'ant-design-vue/lib';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import { nextTick, onMounted, reactive, ref, toRaw } from 'vue';
|
||||
import {
|
||||
addNeInfo,
|
||||
@@ -53,7 +54,7 @@ const tabState: TabStateType = reactive({
|
||||
/**对话框对象信息状态类型 */
|
||||
type ModalStateType = {
|
||||
/**新增框或修改框是否显示 */
|
||||
visibleByEdit: boolean;
|
||||
openByEdit: boolean;
|
||||
/**标题 */
|
||||
title: string;
|
||||
/**表单数据 */
|
||||
@@ -66,7 +67,7 @@ type ModalStateType = {
|
||||
|
||||
/**对话框对象信息状态 */
|
||||
let modalState: ModalStateType = reactive({
|
||||
visibleByEdit: false,
|
||||
openByEdit: false,
|
||||
title: '网元配置',
|
||||
from: {
|
||||
id: undefined,
|
||||
@@ -274,7 +275,7 @@ function fnModalVisibleByEdit(record?: any) {
|
||||
},
|
||||
],
|
||||
};
|
||||
modalState.visibleByEdit = true;
|
||||
modalState.openByEdit = true;
|
||||
} else {
|
||||
//获取单个网元信息 当修改时
|
||||
if (modalState.confirmLoading) return;
|
||||
@@ -287,7 +288,7 @@ function fnModalVisibleByEdit(record?: any) {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
Object.assign(modalState.from, res.data);
|
||||
modalState.title = t('views.configManage.neManage.editNe');
|
||||
modalState.visibleByEdit = true;
|
||||
modalState.openByEdit = true;
|
||||
} else {
|
||||
message.error(t('common.getInfoFail'), 2);
|
||||
}
|
||||
@@ -361,7 +362,7 @@ function fnDelete(data: any) {
|
||||
* 进行表达规则校验
|
||||
*/
|
||||
function fnModalCancel() {
|
||||
modalState.visibleByEdit = false;
|
||||
modalState.openByEdit = false;
|
||||
modalState.confirmLoading = false;
|
||||
tabState.confirmLoading = false;
|
||||
}
|
||||
@@ -609,7 +610,7 @@ onMounted(() => {
|
||||
:destroyOnClose="true"
|
||||
:keyboard="false"
|
||||
:mask-closable="false"
|
||||
:visible="modalState.visibleByEdit"
|
||||
:open="modalState.openByEdit"
|
||||
:title="modalState.title"
|
||||
:confirm-loading="modalState.confirmLoading"
|
||||
@ok="fnModalOk"
|
||||
@@ -623,7 +624,7 @@ onMounted(() => {
|
||||
:model="modalState.from"
|
||||
autocomplete="off"
|
||||
>
|
||||
<a-row :gutter="16">
|
||||
<a-row>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.ne.common.neType')"
|
||||
@@ -652,7 +653,7 @@ onMounted(() => {
|
||||
<template #title>
|
||||
{{ t('views.ne.common.neTypeTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
@@ -680,7 +681,7 @@ onMounted(() => {
|
||||
<template #title>
|
||||
{{ t('views.ne.common.neIdTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
@@ -688,7 +689,7 @@ onMounted(() => {
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-row>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.ne.common.ipAddr')"
|
||||
@@ -716,7 +717,7 @@ onMounted(() => {
|
||||
{{ t('views.ne.common.ipAddrTip') }}
|
||||
</div>
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit;" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
@@ -731,7 +732,7 @@ onMounted(() => {
|
||||
</a-divider>
|
||||
|
||||
<!-- 主机连接配置 -->
|
||||
<a-row :gutter="16">
|
||||
<a-row>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.ne.neHost.addr')">
|
||||
<a-input
|
||||
@@ -758,7 +759,7 @@ onMounted(() => {
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-row>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.ne.neHost.user')">
|
||||
<a-input
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { Modal, message } from 'ant-design-vue/lib';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import { onMounted, reactive, toRaw } from 'vue';
|
||||
import { fnToStepName } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
@@ -147,6 +147,9 @@ function fnGetList() {
|
||||
case 'N3IWF':
|
||||
state.from.sbi.n3iwf_ip = item.ip;
|
||||
break;
|
||||
case 'SMSC':
|
||||
state.from.sbi.smsc_ip = item.ip;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Modal, TableColumnsType } from 'ant-design-vue/lib';
|
||||
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import { Modal, TableColumnsType } from 'ant-design-vue/es';
|
||||
import { fnToStepName } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
@@ -68,9 +69,9 @@ type StateType = {
|
||||
/**勾选单行记录 */
|
||||
selectedRowOne: any;
|
||||
/**多文件上传 */
|
||||
visibleByMoreFile: boolean;
|
||||
openByMoreFile: boolean;
|
||||
/**勾选安装弹窗 */
|
||||
visibleByInstall: boolean;
|
||||
openByInstall: boolean;
|
||||
/**操作数据进行版本升级 */
|
||||
operateDataUpgrade: any[];
|
||||
/**确定按钮 loading */
|
||||
@@ -83,8 +84,8 @@ let state: StateType = reactive({
|
||||
data: [],
|
||||
selectedRowKeys: [],
|
||||
selectedRowOne: { neType: '' },
|
||||
visibleByMoreFile: false,
|
||||
visibleByInstall: false,
|
||||
openByMoreFile: false,
|
||||
openByInstall: false,
|
||||
operateDataUpgrade: [],
|
||||
confirmLoading: false,
|
||||
});
|
||||
@@ -106,15 +107,15 @@ function fnTableSelectedRowKeys(
|
||||
/**对话框弹出确认执行函数*/
|
||||
function fnModalOk() {
|
||||
fnGetList();
|
||||
if (state.visibleByInstall) {
|
||||
if (state.openByInstall) {
|
||||
fnModalCancel();
|
||||
}
|
||||
}
|
||||
|
||||
/**对话框弹出关闭执行函数*/
|
||||
function fnModalCancel() {
|
||||
state.visibleByMoreFile = false;
|
||||
state.visibleByInstall = false;
|
||||
state.openByMoreFile = false;
|
||||
state.openByInstall = false;
|
||||
state.operateDataUpgrade = [];
|
||||
}
|
||||
|
||||
@@ -133,7 +134,7 @@ function fnRecordInstallConfirm() {
|
||||
async function fnRecordInstall() {
|
||||
if (state.confirmLoading) return;
|
||||
state.confirmLoading = true;
|
||||
state.visibleByInstall = true;
|
||||
state.openByInstall = true;
|
||||
// 操作升级的网元数据
|
||||
const selectRows = state.data.filter(item =>
|
||||
state.selectedRowKeys.includes(item.id)
|
||||
@@ -280,7 +281,7 @@ onMounted(() => {
|
||||
type="dashed"
|
||||
:disabled="state.selectedRowKeys.length > 1"
|
||||
@click.prevent="
|
||||
() => (state.visibleByMoreFile = !state.visibleByMoreFile)
|
||||
() => (state.openByMoreFile = !state.openByMoreFile)
|
||||
"
|
||||
>
|
||||
<template #icon><UploadOutlined /></template>
|
||||
@@ -308,7 +309,7 @@ onMounted(() => {
|
||||
|
||||
<!-- 新增多文件上传框 -->
|
||||
<UploadMoreFile
|
||||
v-model:visible="state.visibleByMoreFile"
|
||||
v-model:open="state.openByMoreFile"
|
||||
:ne-type="state.selectedRowOne.neType"
|
||||
@ok="fnModalOk"
|
||||
@cancel="fnModalCancel"
|
||||
@@ -321,7 +322,7 @@ onMounted(() => {
|
||||
:body-style="{ height: '520px', overflowY: 'scroll' }"
|
||||
:keyboard="false"
|
||||
:mask-closable="false"
|
||||
:visible="state.visibleByInstall"
|
||||
:open="state.openByInstall"
|
||||
:title="t('views.system.quickStart.stepInstallModal')"
|
||||
:closable="false"
|
||||
@ok="fnModalOk"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { Modal, TableColumnsType, message } from 'ant-design-vue/lib';
|
||||
import { Modal, TableColumnsType, message } from 'ant-design-vue/es';
|
||||
import { defineAsyncComponent, h, onMounted, reactive, ref } from 'vue';
|
||||
import { fnToStepName, stepState } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
@@ -64,7 +64,7 @@ type StateType = {
|
||||
/**勾选记录 */
|
||||
selectedRowKeys: (string | number)[];
|
||||
/**授权文件上传 */
|
||||
visibleByLicenseFile: boolean;
|
||||
openByLicenseFile: boolean;
|
||||
/**授权文件上传勾选指定到网元授权列表 */
|
||||
neLicenseList: any[];
|
||||
/**确定按钮 loading */
|
||||
@@ -76,7 +76,7 @@ let state: StateType = reactive({
|
||||
loading: false,
|
||||
data: [],
|
||||
selectedRowKeys: [],
|
||||
visibleByLicenseFile: false,
|
||||
openByLicenseFile: false,
|
||||
neLicenseList: [],
|
||||
confirmLoading: false,
|
||||
});
|
||||
@@ -93,7 +93,7 @@ function fnModalOk() {
|
||||
|
||||
/**对话框弹出关闭执行函数*/
|
||||
function fnModalCancel() {
|
||||
state.visibleByLicenseFile = false;
|
||||
state.openByLicenseFile = false;
|
||||
}
|
||||
|
||||
/**对话框弹出打开执行函数 */
|
||||
@@ -108,7 +108,7 @@ function fnModalOpen() {
|
||||
state.neLicenseList = [];
|
||||
}
|
||||
|
||||
state.visibleByLicenseFile = !state.visibleByLicenseFile;
|
||||
state.openByLicenseFile = !state.openByLicenseFile;
|
||||
}
|
||||
|
||||
/**勾选刷新网元状态 */
|
||||
@@ -278,7 +278,7 @@ onMounted(() => {
|
||||
|
||||
<!-- 授权文件上传框 -->
|
||||
<UploadLicenseFile
|
||||
v-model:visible="state.visibleByLicenseFile"
|
||||
v-model:open="state.openByLicenseFile"
|
||||
:licenseList="state.neLicenseList"
|
||||
@ok="fnModalOk"
|
||||
@cancel="fnModalCancel"
|
||||
|
||||
@@ -4,12 +4,12 @@ import useI18n from '@/hooks/useI18n';
|
||||
import { nextTick, onMounted, reactive, watch } from 'vue';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { parseUrlPath } from '@/plugins/file-static-url';
|
||||
import { Modal, message } from 'ant-design-vue/lib';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import { transferStaticFile, uploadFile } from '@/api/tool/file';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { sessionGet } from '@/utils/cache-session-utils';
|
||||
import { FileType } from 'ant-design-vue/lib/upload/interface';
|
||||
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||
import { FileType } from 'ant-design-vue/es/upload/interface';
|
||||
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
|
||||
import { changeValue } from '@/api/system/config';
|
||||
import { bootloaderAccount } from '@/api/system/quick-start/bootloader';
|
||||
const { t, currentLocale } = useI18n();
|
||||
|
||||
Reference in New Issue
Block a user