89cc325b by lxs

Merge branch 'develop' into release-test

2 parents bef7b128 f8ac5ee4
...@@ -8,6 +8,7 @@ import { useRouter, useRoute } from "vue-router"; ...@@ -8,6 +8,7 @@ import { useRouter, useRoute } from "vue-router";
8 import { ElMessage, ElMessageBox } from "element-plus"; 8 import { ElMessage, ElMessageBox } from "element-plus";
9 import useDataAssetStore from "@/store/modules/dataAsset"; 9 import useDataAssetStore from "@/store/modules/dataAsset";
10 import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory"; 10 import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory";
11 import { getClassifyGradList } from "@/api/modules/dataInventory";
11 import { TableColumnWidth } from '@/utils/enum'; 12 import { TableColumnWidth } from '@/utils/enum';
12 13
13 const { proxy } = getCurrentInstance() as any; 14 const { proxy } = getCurrentInstance() as any;
...@@ -144,12 +145,37 @@ const tableBtnClick = (scope, btn) => { ...@@ -144,12 +145,37 @@ const tableBtnClick = (scope, btn) => {
144 145
145 const toPath = (type) => { 146 const toPath = (type) => {
146 if (type == 'add') { 147 if (type == 'add') {
148 loading.value = true;
149 getClassifyGradList({ pageIndex: 1, pageSize: 50, type: 'C' }).then((res: any) => {
150 loading.value = false;
151 if (res.code == proxy.$passCode) {
152 const data = res.data?.records || []
153 if (data.length == 0) {
154 ElMessageBox.confirm('系统未创建分类分级规则,是否跳转去新建', "提示", {
155 confirmButtonText: "确定",
156 cancelButtonText: "取消",
157 type: 'warning',
158 }).then(() => {
159 router.push({
160 name: "templateConfig",
161 });
162 });
163 } else {
147 router.push({ 164 router.push({
148 name: "taskEdit", 165 name: "taskEdit",
149 query: { 166 query: {
150 type 167 type
151 }, 168 },
152 }); 169 });
170 }
171 }
172 }).catch(() => {
173 loading.value = false;
174 ElMessage({
175 type: "error",
176 message: '请求失败',
177 });
178 })
153 } else if (type == 'edit') { 179 } else if (type == 'edit') {
154 router.push({ 180 router.push({
155 name: "taskEdit", 181 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!