feat: 开站网元授权状态标签字典
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { Modal, TableColumnsType, message } from 'ant-design-vue/lib';
|
||||
import { defineAsyncComponent, onMounted, reactive, ref, toRaw } from 'vue';
|
||||
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
||||
import { fnToStepName, stepState } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import {
|
||||
codeNeLicense,
|
||||
@@ -11,10 +12,14 @@ import {
|
||||
} from '@/api/ne/neLicense';
|
||||
import saveAs from 'file-saver';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const UploadLicenseFile = defineAsyncComponent(
|
||||
() => import('../../../ne/neLicense/components/UploadLicenseFile.vue')
|
||||
);
|
||||
|
||||
/**字典数据-状态 */
|
||||
let dictStatus = ref<DictType[]>([]);
|
||||
|
||||
/**表格字段列 */
|
||||
let tableColumns = ref<TableColumnsType>([
|
||||
{
|
||||
@@ -99,8 +104,8 @@ function fnModalOpen() {
|
||||
state.selectedRowKeys.includes(item.id)
|
||||
);
|
||||
state.neLicenseList = neTypeArr;
|
||||
}else{
|
||||
state.neLicenseList = []
|
||||
} else {
|
||||
state.neLicenseList = [];
|
||||
}
|
||||
|
||||
state.visibleByLicenseFile = !state.visibleByLicenseFile;
|
||||
@@ -129,6 +134,10 @@ function fnRecordState() {
|
||||
row.status = '1';
|
||||
row.serialNum = res.data.sn;
|
||||
row.expiryDate = res.data.expire;
|
||||
} else {
|
||||
row.status = '0';
|
||||
row.serialNum = '-';
|
||||
row.expiryDate = '-';
|
||||
}
|
||||
}
|
||||
message.success(t('common.operateOk'), 3);
|
||||
@@ -193,7 +202,7 @@ function fnGetList() {
|
||||
if (state.selectedRowKeys.length > 0) {
|
||||
state.selectedRowKeys = [];
|
||||
}
|
||||
state.data = res.rows.filter(s => s.neType !== 'OMC');;
|
||||
state.data = res.rows.filter(s => s.neType !== 'OMC');
|
||||
}
|
||||
state.loading = false;
|
||||
});
|
||||
@@ -225,7 +234,14 @@ function fnStepNext(stepName: 'Done') {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 初始字典数据
|
||||
getDict('ne_license_status')
|
||||
.then(res => {
|
||||
dictStatus.value = res;
|
||||
})
|
||||
.finally(() => {
|
||||
fnGetList();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -249,6 +265,11 @@ onMounted(() => {
|
||||
onChange: fnTableSelectedRowKeys,
|
||||
}"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'status'">
|
||||
<DictTag :options="dictStatus" :value="record.status" />
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<!-- 授权文件上传框 -->
|
||||
|
||||
Reference in New Issue
Block a user