style: 网元软件代码优化

This commit is contained in:
TsMask
2024-05-27 18:33:46 +08:00
parent cd49162dfc
commit 939a235a87
3 changed files with 18 additions and 8 deletions

View File

@@ -157,6 +157,12 @@ type StateType = {
optionType: 'upload' | 'option';
/**文件上传 */
visibleByFile: boolean;
/**
* 依赖包类型
* IMS-rtproxy/mf/adb
* UDM-adb
*/
depType: string[];
/**软件包信息数据 */
from: {
neType: string; // 版本需要
@@ -175,6 +181,7 @@ let state: StateType = reactive({
stepNext: false,
optionType: 'option',
visibleByFile: false,
depType: [],
from: {
id: undefined,
neType: '',
@@ -199,6 +206,11 @@ function fnOptionTypeChange() {
}
}
/**对话框弹出 */
function fnModalOpen() {
state.visibleByFile = !state.visibleByFile;
}
/**对话框弹出确认执行函数*/
function fnModalOk(e: any) {
Object.assign(state.from, e, { id: '' });
@@ -320,6 +332,7 @@ onMounted(() => {
</a-radio-button>
</a-radio-group>
</a-form-item>
<!-- 选择已上传 -->
<template v-if="state.optionType === 'option'">
<a-form-item
@@ -367,12 +380,9 @@ onMounted(() => {
name="upload"
:help="state.from.name"
>
<a-button
type="primary"
@click.prevent="() => (state.visibleByFile = !state.visibleByFile)"
>
<template #icon><PlusOutlined /></template>
{{ t('common.addText') }}
<a-button type="primary" @click.prevent="fnModalOpen()">
<template #icon><UploadOutlined /></template>
{{ t('views.ne.neSoftware.upload') }}
</a-button>
</a-form-item>
</template>