feat: 网元授权文件支持勾选指定网元类型替换
This commit is contained in:
@@ -60,6 +60,8 @@ type StateType = {
|
||||
selectedRowKeys: (string | number)[];
|
||||
/**授权文件上传 */
|
||||
visibleByLicenseFile: boolean;
|
||||
/**授权文件上传勾选指定到网元授权列表 */
|
||||
neLicenseList: any[];
|
||||
/**确定按钮 loading */
|
||||
confirmLoading: boolean;
|
||||
};
|
||||
@@ -70,6 +72,7 @@ let state: StateType = reactive({
|
||||
data: [],
|
||||
selectedRowKeys: [],
|
||||
visibleByLicenseFile: false,
|
||||
neLicenseList: [],
|
||||
confirmLoading: false,
|
||||
});
|
||||
|
||||
@@ -88,6 +91,21 @@ function fnModalCancel() {
|
||||
state.visibleByLicenseFile = false;
|
||||
}
|
||||
|
||||
/**对话框弹出打开执行函数 */
|
||||
function fnModalOpen() {
|
||||
if (state.selectedRowKeys.length > 0) {
|
||||
// 勾选的网元数据的网元类型
|
||||
let neTypeArr = state.data.filter(item =>
|
||||
state.selectedRowKeys.includes(item.id)
|
||||
);
|
||||
state.neLicenseList = neTypeArr;
|
||||
}else{
|
||||
state.neLicenseList = []
|
||||
}
|
||||
|
||||
state.visibleByLicenseFile = !state.visibleByLicenseFile;
|
||||
}
|
||||
|
||||
/**勾选刷新网元状态 */
|
||||
function fnRecordState() {
|
||||
Modal.confirm({
|
||||
@@ -236,6 +254,7 @@ onMounted(() => {
|
||||
<!-- 授权文件上传框 -->
|
||||
<UploadLicenseFile
|
||||
v-model:visible="state.visibleByLicenseFile"
|
||||
:licenseList="state.neLicenseList"
|
||||
@ok="fnModalOk"
|
||||
@cancel="fnModalCancel"
|
||||
></UploadLicenseFile>
|
||||
@@ -244,12 +263,7 @@ onMounted(() => {
|
||||
<a-space direction="horizontal" :size="18">
|
||||
<a-button @click="fnStepPrev()"> 上一步 </a-button>
|
||||
|
||||
<a-button
|
||||
type="primary"
|
||||
@click.prevent="
|
||||
() => (state.visibleByLicenseFile = !state.visibleByLicenseFile)
|
||||
"
|
||||
>
|
||||
<a-button type="primary" @click.prevent="fnModalOpen">
|
||||
<template #icon><UploadOutlined /></template>
|
||||
Upload License
|
||||
</a-button>
|
||||
|
||||
Reference in New Issue
Block a user