fix: 网元授权上传后点击ok检查状态
This commit is contained in:
@@ -10,7 +10,6 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
|||||||
import { delNeHost, listNeHost } from '@/api/ne/neHost';
|
import { delNeHost, listNeHost } from '@/api/ne/neHost';
|
||||||
import useDictStore from '@/store/modules/dict';
|
import useDictStore from '@/store/modules/dict';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { number } from 'echarts';
|
|
||||||
const { getDict } = useDictStore();
|
const { getDict } = useDictStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const EditModal = defineAsyncComponent(
|
const EditModal = defineAsyncComponent(
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { FileType } from 'ant-design-vue/es/upload/interface';
|
|||||||
import { uploadFile } from '@/api/tool/file';
|
import { uploadFile } from '@/api/tool/file';
|
||||||
import { useClipboard } from '@vueuse/core';
|
import { useClipboard } from '@vueuse/core';
|
||||||
import saveAs from 'file-saver';
|
import saveAs from 'file-saver';
|
||||||
import { number } from 'echarts';
|
|
||||||
const { copy } = useClipboard({ legacy: true });
|
const { copy } = useClipboard({ legacy: true });
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const emit = defineEmits(['ok', 'cancel', 'update:open']);
|
const emit = defineEmits(['ok', 'cancel', 'update:open']);
|
||||||
|
|||||||
@@ -186,10 +186,10 @@ function fnGetList(pageNum?: number) {
|
|||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listNeLicense(toRaw(queryParams)).then(res => {
|
listNeLicense(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
const { total, rows } = res.data;
|
const { total, rows } = res.data;
|
||||||
tablePagination.total = total;
|
tablePagination.total = total;
|
||||||
tableState.data = rows.filter((s:any) => s.neType !== 'OMC');
|
tableState.data = rows.filter((s: any) => s.neType !== 'OMC');
|
||||||
if (
|
if (
|
||||||
tablePagination.total <=
|
tablePagination.total <=
|
||||||
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||||
@@ -236,9 +236,27 @@ function fnModalVisibleByEdit(licenseId: number) {
|
|||||||
* 对话框弹出确认执行函数
|
* 对话框弹出确认执行函数
|
||||||
* 进行表达规则校验
|
* 进行表达规则校验
|
||||||
*/
|
*/
|
||||||
function fnModalOk() {
|
function fnModalOk(e: any) {
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
fnGetList();
|
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