fix: 网元快速安装移除网元历史包选择

This commit is contained in:
TsMask
2025-03-12 11:25:15 +08:00
parent e14c1ce771
commit 5caa285ede

View File

@@ -149,8 +149,6 @@ function fnGetList(pageNum?: number) {
type StateType = {
/**是否可以下一步 */
stepNext: boolean;
/**文件操作类型 上传 or 选择 */
optionType: 'upload' | 'option';
/**文件上传 */
openByFile: boolean;
/**网元拓展包列表类型 */
@@ -171,7 +169,6 @@ type StateType = {
/**对象信息状态 */
let state: StateType = reactive({
stepNext: false,
optionType: 'option',
openByFile: false,
depType: [],
from: {
@@ -186,18 +183,6 @@ let state: StateType = reactive({
confirmLoading: false,
});
/**
* 表单修改文件操作类型
*/
function fnOptionTypeChange() {
state.from.name = '';
state.from.version = '';
tableState.selectedRowKeys = [];
if (state.optionType === 'option') {
fnGetList(1);
}
}
/**对话框弹出 */
function fnModalOpen() {
state.openByFile = !state.openByFile;
@@ -226,17 +211,6 @@ function fnRecordInstall() {
state.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0);
// 选择的软件需要更新版本
if (state.optionType === 'option') {
const res = await newNeVersion(from);
if (res.code === RESULT_CODE_ERROR) {
message.error(res.msg, 3);
hide();
state.confirmLoading = false;
return;
}
}
// 进行安装
let preinput = {};
if (from.neType.toUpperCase() === 'IMS') {
@@ -256,8 +230,6 @@ function fnRecordInstall() {
}
// 非选择的重置
state.optionType = 'option';
fnOptionTypeChange();
hide();
state.confirmLoading = false;
},
@@ -306,67 +278,6 @@ onMounted(() => {
:wrapper-col="{ span: 16 }"
:label-wrap="true"
>
<a-form-item
:label="t('views.ne.neQuickSetup.installSource')"
name="optionType"
>
<a-radio-group
v-model:value="state.optionType"
button-style="solid"
:disabled="state.confirmLoading"
@change="fnOptionTypeChange"
>
<a-radio-button value="option">
{{ t('views.ne.neQuickSetup.installSourceOption') }}
</a-radio-button>
<a-radio-button value="upload">
{{ t('views.ne.neQuickSetup.installSourceUpload') }}
</a-radio-button>
</a-radio-group>
</a-form-item>
<!-- 选择已上传 -->
<template v-if="state.optionType === 'option'">
<a-form-item
:label="t('views.ne.neQuickSetup.installSelect')"
name="option"
>
<a-table
class="table"
row-key="id"
:columns="tableColumns"
:loading="tableState.loading"
:data-source="tableState.data"
:pagination="tablePagination"
size="small"
:scroll="{ x: tableColumns.length * 100, y: '400px' }"
:row-selection="{
type: 'radio',
columnWidth: '48px',
selectedRowKeys: tableState.selectedRowKeys,
onChange: fnTableSelectedRowKeys,
}"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'name'">
<a-tooltip placement="topLeft">
<template #title>{{ record.path }}</template>
<div style="cursor: pointer">{{ record.name }}</div>
</a-tooltip>
</template>
<template v-if="column.key === 'description'">
<a-tooltip placement="topLeft">
<template #title>{{ record.description }}</template>
<div style="cursor: pointer">{{ record.description }}</div>
</a-tooltip>
</template>
</template>
</a-table>
</a-form-item>
</template>
<!-- 重新上传 -->
<template v-if="state.optionType === 'upload'">
<a-form-item
:label="t('views.ne.neQuickSetup.installUpload')"
name="upload"
@@ -377,7 +288,6 @@ onMounted(() => {
{{ t('views.ne.neSoftware.upload') }}
</a-button>
</a-form-item>
</template>
</a-form>
<!-- 文件上传框 -->