feat: 页面调整组件属性升级
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted, toRaw, defineAsyncComponent } from 'vue';
|
||||
import { PageContainer } from 'antdv-pro-layout';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import {
|
||||
Modal,
|
||||
TableColumnsType,
|
||||
message,
|
||||
notification,
|
||||
} from 'ant-design-vue/lib';
|
||||
import { SizeType } from 'ant-design-vue/lib/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
|
||||
} from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import useNeInfoStore from '@/store/modules/neinfo';
|
||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
@@ -239,11 +240,11 @@ function fnGetList(pageNum?: number) {
|
||||
/**对话框对象信息状态类型 */
|
||||
type ModalStateType = {
|
||||
/**单文件上传 */
|
||||
visibleByEdit: boolean;
|
||||
openByEdit: boolean;
|
||||
/**多文件上传 */
|
||||
visibleByMoreFile: boolean;
|
||||
openByMoreFile: boolean;
|
||||
/**勾选升级情况 */
|
||||
visibleByUpgrade: boolean;
|
||||
openByUpgrade: boolean;
|
||||
/**操作数据进行版本升级 */
|
||||
operateDataUpgrade: any[];
|
||||
/**确定按钮 loading */
|
||||
@@ -252,9 +253,9 @@ type ModalStateType = {
|
||||
|
||||
/**对话框对象信息状态 */
|
||||
let modalState: ModalStateType = reactive({
|
||||
visibleByEdit: false,
|
||||
visibleByMoreFile: false,
|
||||
visibleByUpgrade: false,
|
||||
openByEdit: false,
|
||||
openByMoreFile: false,
|
||||
openByUpgrade: false,
|
||||
operateDataUpgrade: [],
|
||||
confirmLoading: false,
|
||||
});
|
||||
@@ -265,7 +266,7 @@ let modalState: ModalStateType = reactive({
|
||||
*/
|
||||
function fnModalEditOk() {
|
||||
fnGetList(1);
|
||||
if (modalState.visibleByUpgrade) {
|
||||
if (modalState.openByUpgrade) {
|
||||
fnModalEditCancel();
|
||||
}
|
||||
}
|
||||
@@ -275,9 +276,9 @@ function fnModalEditOk() {
|
||||
* 进行表达规则校验
|
||||
*/
|
||||
function fnModalEditCancel() {
|
||||
modalState.visibleByEdit = false;
|
||||
modalState.visibleByMoreFile = false;
|
||||
modalState.visibleByUpgrade = false;
|
||||
modalState.openByEdit = false;
|
||||
modalState.openByMoreFile = false;
|
||||
modalState.openByUpgrade = false;
|
||||
modalState.operateDataUpgrade = [];
|
||||
}
|
||||
|
||||
@@ -370,7 +371,7 @@ function fnRecordUpgradeConfirm() {
|
||||
async function fnRecordUpgrade() {
|
||||
if (modalState.confirmLoading) return;
|
||||
modalState.confirmLoading = true;
|
||||
modalState.visibleByUpgrade = true;
|
||||
modalState.openByUpgrade = true;
|
||||
// 操作升级的网元数据
|
||||
const selectRows = tableState.data.filter(item =>
|
||||
tableState.selectedRowKeys.includes(item.id)
|
||||
@@ -511,7 +512,7 @@ onMounted(() => {
|
||||
<a-button
|
||||
type="primary"
|
||||
@click.prevent="
|
||||
() => (modalState.visibleByEdit = !modalState.visibleByEdit)
|
||||
() => (modalState.openByEdit = !modalState.openByEdit)
|
||||
"
|
||||
>
|
||||
<template #icon><UploadOutlined /></template>
|
||||
@@ -522,7 +523,7 @@ onMounted(() => {
|
||||
:disabled="tableState.selectedRowKeys.length > 1"
|
||||
@click.prevent="
|
||||
() =>
|
||||
(modalState.visibleByMoreFile = !modalState.visibleByMoreFile)
|
||||
(modalState.openByMoreFile = !modalState.openByMoreFile)
|
||||
"
|
||||
>
|
||||
<template #icon><UploadOutlined /></template>
|
||||
@@ -646,14 +647,14 @@ onMounted(() => {
|
||||
|
||||
<!-- 新增单文件上传 -->
|
||||
<EditModal
|
||||
v-model:visible="modalState.visibleByEdit"
|
||||
v-model:open="modalState.openByEdit"
|
||||
@ok="fnModalEditOk"
|
||||
@cancel="fnModalEditCancel"
|
||||
></EditModal>
|
||||
|
||||
<!-- 新增多文件上传框 -->
|
||||
<UploadMoreFile
|
||||
v-model:visible="modalState.visibleByMoreFile"
|
||||
v-model:open="modalState.openByMoreFile"
|
||||
:ne-type="tableState.selectedRowOne.neType"
|
||||
@ok="fnModalEditOk"
|
||||
@cancel="fnModalEditCancel"
|
||||
@@ -667,7 +668,7 @@ onMounted(() => {
|
||||
:body-style="{ height: '520px', overflowY: 'scroll' }"
|
||||
:keyboard="false"
|
||||
:mask-closable="false"
|
||||
:visible="modalState.visibleByUpgrade"
|
||||
:open="modalState.openByUpgrade"
|
||||
:title="t('views.ne.neVersion.upgradeModal')"
|
||||
:closable="false"
|
||||
@ok="fnModalEditOk"
|
||||
|
||||
Reference in New Issue
Block a user