feat: 网元版本状态标签字典
This commit is contained in:
@@ -3,12 +3,19 @@ import { Modal, TableColumnsType, message } from 'ant-design-vue/lib';
|
||||
import { defineAsyncComponent, onMounted, reactive, ref, toRaw } from 'vue';
|
||||
import { fnToStepName } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { listNeVersion, operateNeVersion } from '@/api/ne/neVersion';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
const UploadMoreFile = defineAsyncComponent(
|
||||
() => import('../../../ne/neSoftware/components/UploadMoreFile.vue')
|
||||
);
|
||||
|
||||
/**字典数据-状态 */
|
||||
let dictStatus = ref<DictType[]>([]);
|
||||
|
||||
/**表格字段列 */
|
||||
let tableColumns = ref<TableColumnsType>([
|
||||
{
|
||||
@@ -44,6 +51,7 @@ let tableColumns = ref<TableColumnsType>([
|
||||
{
|
||||
title: 'status',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
@@ -214,7 +222,14 @@ function fnStepNext(stepName: 'NeInfoSoftwareLicense') {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fnGetList();
|
||||
// 初始字典数据
|
||||
getDict('ne_version_status')
|
||||
.then(res => {
|
||||
dictStatus.value = res;
|
||||
})
|
||||
.finally(() => {
|
||||
fnGetList();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -238,6 +253,11 @@ onMounted(() => {
|
||||
onChange: fnTableSelectedRowKeys,
|
||||
}"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'status'">
|
||||
<DictTag :options="dictStatus" :value="record.status" />
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<!-- 新增多文件上传框 -->
|
||||
@@ -255,6 +275,8 @@ onMounted(() => {
|
||||
:visible="state.visibleByUpgrade"
|
||||
title="Upgrade Version"
|
||||
:confirm-loading="state.confirmLoading"
|
||||
:closable="false"
|
||||
:cancelButtonProps="{ disabled: state.visibleByUpgrade }"
|
||||
@ok="fnModalOk"
|
||||
@cancel="fnModalCancel"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user