Merge branch 'develop' into release-test
Showing
1 changed file
with
32 additions
and
6 deletions
| ... | @@ -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') { |
| 147 | router.push({ | 148 | loading.value = true; |
| 148 | name: "taskEdit", | 149 | getClassifyGradList({ pageIndex: 1, pageSize: 50, type: 'C' }).then((res: any) => { |
| 149 | query: { | 150 | loading.value = false; |
| 150 | type | 151 | if (res.code == proxy.$passCode) { |
| 151 | }, | 152 | const data = res.data?.records || [] |
| 152 | }); | 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 { | ||
| 164 | router.push({ | ||
| 165 | name: "taskEdit", | ||
| 166 | query: { | ||
| 167 | type | ||
| 168 | }, | ||
| 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", | ... | ... |
-
Please register or sign in to post a comment