89cc325b by lxs

Merge branch 'develop' into release-test

2 parents bef7b128 f8ac5ee4
......@@ -8,6 +8,7 @@ import { useRouter, useRoute } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus";
import useDataAssetStore from "@/store/modules/dataAsset";
import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory";
import { getClassifyGradList } from "@/api/modules/dataInventory";
import { TableColumnWidth } from '@/utils/enum';
const { proxy } = getCurrentInstance() as any;
......@@ -144,12 +145,37 @@ const tableBtnClick = (scope, btn) => {
const toPath = (type) => {
if (type == 'add') {
router.push({
name: "taskEdit",
query: {
type
},
});
loading.value = true;
getClassifyGradList({ pageIndex: 1, pageSize: 50, type: 'C' }).then((res: any) => {
loading.value = false;
if (res.code == proxy.$passCode) {
const data = res.data?.records || []
if (data.length == 0) {
ElMessageBox.confirm('系统未创建分类分级规则,是否跳转去新建', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: 'warning',
}).then(() => {
router.push({
name: "templateConfig",
});
});
} else {
router.push({
name: "taskEdit",
query: {
type
},
});
}
}
}).catch(() => {
loading.value = false;
ElMessage({
type: "error",
message: '请求失败',
});
})
} else if (type == 'edit') {
router.push({
name: "taskEdit",
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!