feat: 页面调整组件属性升级

This commit is contained in:
TsMask
2024-10-28 11:02:39 +08:00
parent 670225a655
commit da0d49d306
125 changed files with 1775 additions and 3464 deletions

View File

@@ -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"