fix: 网元授权上传后替换文件ok检查状态
This commit is contained in:
@@ -14,7 +14,6 @@ import { FileType } from 'ant-design-vue/es/upload/interface';
|
||||
import { uploadFile } from '@/api/tool/file';
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
import saveAs from 'file-saver';
|
||||
import { number } from 'echarts';
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
const emit = defineEmits(['ok', 'cancel', 'update:open']);
|
||||
|
||||
@@ -236,9 +236,27 @@ function fnModalVisibleByEdit(licenseId: number) {
|
||||
* 对话框弹出确认执行函数
|
||||
* 进行表达规则校验
|
||||
*/
|
||||
function fnModalOk() {
|
||||
function fnModalOk(e: any) {
|
||||
// 获取列表数据
|
||||
fnGetList();
|
||||
// 获取当前行数据
|
||||
const item = tableState.data.find(
|
||||
(item: any) => e.neType === item.neType && e.neId === item.neId
|
||||
);
|
||||
if (item) {
|
||||
stateNeLicense(e.neType, e.neId).then(res => {
|
||||
const row = tableState.data.find(
|
||||
(item: any) => e.neType === item.neType && e.neId === item.neId
|
||||
);
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
row.status = '1';
|
||||
row.serialNum = res.data.sn;
|
||||
row.expiryDate = res.data.expire;
|
||||
} else {
|
||||
row.status = '0';
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user