分类分级任务联调
Showing
3 changed files
with
97 additions
and
54 deletions
| ... | @@ -159,7 +159,7 @@ const toPath = (type) => { | ... | @@ -159,7 +159,7 @@ const toPath = (type) => { |
| 159 | query: { | 159 | query: { |
| 160 | guid: currTableData.value.guid, | 160 | guid: currTableData.value.guid, |
| 161 | name: currTableData.value.taskName, | 161 | name: currTableData.value.taskName, |
| 162 | detail: JSON.stringify(currTableData.value), | 162 | execGuid: currTableData.value.execGuid, |
| 163 | type | 163 | type |
| 164 | }, | 164 | }, |
| 165 | }); | 165 | }); | ... | ... |
| ... | @@ -12,6 +12,7 @@ import { setItemsDisabled, tagMethod, tagType, changeNum, } from "@/utils/common | ... | @@ -12,6 +12,7 @@ import { setItemsDisabled, tagMethod, tagType, changeNum, } from "@/utils/common |
| 12 | import useDataAssetStore from "@/store/modules/dataAsset"; | 12 | import useDataAssetStore from "@/store/modules/dataAsset"; |
| 13 | import TableTools from '@/components/Tools/table_tools.vue'; | 13 | import TableTools from '@/components/Tools/table_tools.vue'; |
| 14 | import { | 14 | import { |
| 15 | getCgTaskDetail, | ||
| 15 | getTaskExeTreeList, | 16 | getTaskExeTreeList, |
| 16 | getTaskFieldCount, | 17 | getTaskFieldCount, |
| 17 | execTaskFieldList, | 18 | execTaskFieldList, |
| ... | @@ -26,22 +27,17 @@ import { | ... | @@ -26,22 +27,17 @@ import { |
| 26 | const { proxy } = getCurrentInstance() as any; | 27 | const { proxy } = getCurrentInstance() as any; |
| 27 | const router = useRouter(); | 28 | const router = useRouter(); |
| 28 | const route = useRoute(); | 29 | const route = useRoute(); |
| 29 | const userStore = useUserStore(); | ||
| 30 | const userData = JSON.parse(userStore.userData); | ||
| 31 | const assetStore = useDataAssetStore(); | ||
| 32 | const detailData = JSON.parse(route.query.detail); | ||
| 33 | 30 | ||
| 31 | const loading = ref(false); | ||
| 34 | const gradeList = ref([]); | 32 | const gradeList = ref([]); |
| 35 | const treeData = ref([ | 33 | const treeData = ref([ |
| 36 | { | 34 | { |
| 37 | classifyName: "全部", | 35 | classifyName: "全部", |
| 38 | guid: "all", | 36 | classifyDetailGuid: "all", |
| 39 | children: [ | 37 | children: [], |
| 40 | { classifyName: '未分类', guid: 'unclassified' } | ||
| 41 | ], | ||
| 42 | }, | 38 | }, |
| 43 | ]); | 39 | ]); |
| 44 | const currTreeNode = ref({ classifyName: "全部", guid: "all" }) | 40 | const currTreeNode = ref({ classifyName: "全部", classifyDetailGuid: "all" }) |
| 45 | const treeInfoRef = ref(); | 41 | const treeInfoRef = ref(); |
| 46 | const treeInfo: any = ref({ | 42 | const treeInfo: any = ref({ |
| 47 | id: "data-pickup-tree", | 43 | id: "data-pickup-tree", |
| ... | @@ -50,9 +46,9 @@ const treeInfo: any = ref({ | ... | @@ -50,9 +46,9 @@ const treeInfo: any = ref({ |
| 50 | queryPlaceholder: "输入组织名称搜索", | 46 | queryPlaceholder: "输入组织名称搜索", |
| 51 | props: { | 47 | props: { |
| 52 | label: "classifyName", | 48 | label: "classifyName", |
| 53 | value: "guid", | 49 | value: "classifyDetailGuid", |
| 54 | }, | 50 | }, |
| 55 | nodeKey: 'guid', | 51 | nodeKey: 'classifyDetailGuid', |
| 56 | expandedKey: [], | 52 | expandedKey: [], |
| 57 | expandOnNodeClick: false, | 53 | expandOnNodeClick: false, |
| 58 | data: [], | 54 | data: [], |
| ... | @@ -69,6 +65,7 @@ const tabsInfo = ref({ | ... | @@ -69,6 +65,7 @@ const tabsInfo = ref({ |
| 69 | }); | 65 | }); |
| 70 | const cascaderRef = ref(); | 66 | const cascaderRef = ref(); |
| 71 | const sheetParams = ref({}); | 67 | const sheetParams = ref({}); |
| 68 | const sheetSearchRef = ref(); | ||
| 72 | const sheetItemList = ref([ | 69 | const sheetItemList = ref([ |
| 73 | { | 70 | { |
| 74 | type: "select", | 71 | type: "select", |
| ... | @@ -99,6 +96,7 @@ const sheetItemList = ref([ | ... | @@ -99,6 +96,7 @@ const sheetItemList = ref([ |
| 99 | }, | 96 | }, |
| 100 | ]); | 97 | ]); |
| 101 | const fieldParams = ref({}); | 98 | const fieldParams = ref({}); |
| 99 | const fieldSearchRef = ref(); | ||
| 102 | const fieldItemList = ref([ | 100 | const fieldItemList = ref([ |
| 103 | { | 101 | { |
| 104 | type: "select", | 102 | type: "select", |
| ... | @@ -165,7 +163,7 @@ const fieldItemList = ref([ | ... | @@ -165,7 +163,7 @@ const fieldItemList = ref([ |
| 165 | checkStrictly: true, | 163 | checkStrictly: true, |
| 166 | expandTrigger: "hover", | 164 | expandTrigger: "hover", |
| 167 | label: "classifyName", | 165 | label: "classifyName", |
| 168 | value: "guid", | 166 | value: "classifyDetailGuid", |
| 169 | }, | 167 | }, |
| 170 | filterable: true, | 168 | filterable: true, |
| 171 | clearable: true, | 169 | clearable: true, |
| ... | @@ -250,7 +248,7 @@ const fieldTableInfo = ref({ | ... | @@ -250,7 +248,7 @@ const fieldTableInfo = ref({ |
| 250 | checkStrictly: false, | 248 | checkStrictly: false, |
| 251 | expandTrigger: "hover", | 249 | expandTrigger: "hover", |
| 252 | label: "classifyName", | 250 | label: "classifyName", |
| 253 | value: "guid", | 251 | value: "classifyDetailGuid", |
| 254 | }, | 252 | }, |
| 255 | filterable: true, | 253 | filterable: true, |
| 256 | clearable: true, | 254 | clearable: true, |
| ... | @@ -301,7 +299,7 @@ const formItems = ref([ | ... | @@ -301,7 +299,7 @@ const formItems = ref([ |
| 301 | checkStrictly: false, | 299 | checkStrictly: false, |
| 302 | expandTrigger: "hover", | 300 | expandTrigger: "hover", |
| 303 | label: "classifyName", | 301 | label: "classifyName", |
| 304 | value: "guid", | 302 | value: "classifyDetailGuid", |
| 305 | }, | 303 | }, |
| 306 | filterable: true, | 304 | filterable: true, |
| 307 | clearable: true, | 305 | clearable: true, |
| ... | @@ -363,6 +361,29 @@ const dialogInfo: any = ref({ | ... | @@ -363,6 +361,29 @@ const dialogInfo: any = ref({ |
| 363 | }, | 361 | }, |
| 364 | }) | 362 | }) |
| 365 | 363 | ||
| 364 | // 获取任务详情 | ||
| 365 | const getTaskDetail = (param) => { | ||
| 366 | loading.value = true; | ||
| 367 | getCgTaskDetail(param).then((res: any) => { | ||
| 368 | loading.value = false; | ||
| 369 | if (res.code == proxy.$passCode) { | ||
| 370 | taskDetail.value = res.data || {}; | ||
| 371 | getFieldCount() | ||
| 372 | getSheetFieldList({ type: 1 }); | ||
| 373 | getFieldTree() | ||
| 374 | getGradeData(); | ||
| 375 | nextTick(() => { | ||
| 376 | getSheetTableData(); | ||
| 377 | getFieldTableData(); | ||
| 378 | }) | ||
| 379 | } else { | ||
| 380 | ElMessage.error(res.msg); | ||
| 381 | } | ||
| 382 | }).catch(() => { | ||
| 383 | loading.value = false; | ||
| 384 | }) | ||
| 385 | } | ||
| 386 | |||
| 366 | // 获取字段统计 | 387 | // 获取字段统计 |
| 367 | const getFieldCount = () => { | 388 | const getFieldCount = () => { |
| 368 | getTaskFieldCount({ execGuid: taskDetail.value.execGuid }).then((res: any) => { | 389 | getTaskFieldCount({ execGuid: taskDetail.value.execGuid }).then((res: any) => { |
| ... | @@ -398,13 +419,16 @@ const getFieldTree = () => { | ... | @@ -398,13 +419,16 @@ const getFieldTree = () => { |
| 398 | treeInfo.value.loading = false; | 419 | treeInfo.value.loading = false; |
| 399 | if (res.code == proxy.$passCode) { | 420 | if (res.code == proxy.$passCode) { |
| 400 | const data = res.data || []; | 421 | const data = res.data || []; |
| 401 | treeData.value[0].children.splice(1); | 422 | const children: any = [ |
| 402 | treeData.value[0].children.push(...data); | 423 | { classifyName: '未分类', classifyDetailGuid: 'unclassified' }, |
| 424 | ...data | ||
| 425 | ] | ||
| 426 | treeData.value[0].children = children; | ||
| 403 | treeInfo.value.data = treeData.value; | 427 | treeInfo.value.data = treeData.value; |
| 404 | treeInfo.value.expandedKey = ['all']; | 428 | treeInfo.value.expandedKey = ['all']; |
| 405 | treeInfoRef.value.setCurrentKey('all'); | 429 | treeInfoRef.value.setCurrentKey('all'); |
| 406 | formItems.value[0].options = JSON.parse(JSON.stringify(data)); | 430 | formItems.value[0].options = JSON.parse(JSON.stringify(data)); |
| 407 | fieldItemList.value[4].options = JSON.parse(JSON.stringify(data)); | 431 | fieldItemList.value[4].options = JSON.parse(JSON.stringify(children)); |
| 408 | fieldTableInfo.value.fields[4].options = JSON.parse(JSON.stringify(data)); | 432 | fieldTableInfo.value.fields[4].options = JSON.parse(JSON.stringify(data)); |
| 409 | } else { | 433 | } else { |
| 410 | ElMessage.error(res.msg); | 434 | ElMessage.error(res.msg); |
| ... | @@ -444,25 +468,26 @@ const tabChange = (val) => { | ... | @@ -444,25 +468,26 @@ const tabChange = (val) => { |
| 444 | tabsInfo.value.activeName = val; | 468 | tabsInfo.value.activeName = val; |
| 445 | } | 469 | } |
| 446 | 470 | ||
| 447 | const nodeClick = (data) => { | 471 | const nodeClick = (data, node) => { |
| 448 | currTreeNode.value = data; | 472 | currTreeNode.value = data; |
| 449 | if (data.guid == 'all') { | 473 | if (data.classifyDetailGuid == 'all') { |
| 450 | getFieldTableData({ isClassify: '' }) | 474 | fieldItemList.value[4].default = []; |
| 451 | } else if (data.guid == 'unclassified') { | 475 | getFieldTableData() |
| 452 | getFieldTableData({ isClassify: 'N' }) | ||
| 453 | } else { | 476 | } else { |
| 454 | getFieldTableData({ isClassify: 'Y', classifyDetail: data.guid }); | ||
| 455 | const parentGuids = data.parentGuids || []; | 477 | const parentGuids = data.parentGuids || []; |
| 456 | parentGuids.push(data.guid) | 478 | parentGuids.push(data.classifyDetailGuid) |
| 457 | fieldItemList.value[4].default = parentGuids; | 479 | fieldItemList.value[4].default = parentGuids; |
| 480 | console.log('tree', parentGuids) | ||
| 481 | getFieldTableData(); | ||
| 458 | } | 482 | } |
| 459 | } | 483 | } |
| 460 | 484 | ||
| 461 | // 获取库表数据 | 485 | // 获取库表数据 |
| 462 | const getSheetTableData = () => { | 486 | const getSheetTableData = () => { |
| 463 | sheetTableInfo.value.loading = true; | 487 | sheetTableInfo.value.loading = true; |
| 488 | const sheetParams = sheetSearchRef.value.toolSearch.formInline || {}; | ||
| 464 | execTaskSheetList( | 489 | execTaskSheetList( |
| 465 | Object.assign({}, { ...sheetParams.value }, { | 490 | Object.assign({}, { ...sheetParams }, { |
| 466 | execGuid: taskDetail.value.execGuid, | 491 | execGuid: taskDetail.value.execGuid, |
| 467 | pageIndex: sheetTableInfo.value.page.curr, | 492 | pageIndex: sheetTableInfo.value.page.curr, |
| 468 | pageSize: sheetTableInfo.value.page.limit, | 493 | pageSize: sheetTableInfo.value.page.limit, |
| ... | @@ -484,15 +509,20 @@ const getSheetTableData = () => { | ... | @@ -484,15 +509,20 @@ const getSheetTableData = () => { |
| 484 | }; | 509 | }; |
| 485 | 510 | ||
| 486 | // 获取字段表格数据 | 511 | // 获取字段表格数据 |
| 487 | const getFieldTableData = (param: any = {}) => { | 512 | const getFieldTableData = () => { |
| 488 | fieldTableInfo.value.loading = true; | 513 | fieldTableInfo.value.loading = true; |
| 514 | const fieldParams = fieldSearchRef.value.toolSearch.formInline || {}; | ||
| 489 | let params: any = { | 515 | let params: any = { |
| 490 | ...fieldParams.value, | 516 | ...fieldParams, |
| 491 | ...param, | ||
| 492 | execGuid: taskDetail.value.execGuid, | 517 | execGuid: taskDetail.value.execGuid, |
| 493 | pageIndex: fieldTableInfo.value.page.curr, | 518 | pageIndex: fieldTableInfo.value.page.curr, |
| 494 | pageSize: fieldTableInfo.value.page.limit, | 519 | pageSize: fieldTableInfo.value.page.limit, |
| 495 | } | 520 | } |
| 521 | const classifyName = params.classifyName?.at(-1) || undefined; | ||
| 522 | params.isClassify = classifyName === undefined ? '' : classifyName == 'unclassified' ? 'N' : 'Y'; | ||
| 523 | if (classifyName && classifyName != 'unclassified') { | ||
| 524 | params.classifyDetail = classifyName; | ||
| 525 | } | ||
| 496 | delete params.classifyName | 526 | delete params.classifyName |
| 497 | execTaskFieldList(params).then((res: any) => { | 527 | execTaskFieldList(params).then((res: any) => { |
| 498 | fieldTableInfo.value.loading = false; | 528 | fieldTableInfo.value.loading = false; |
| ... | @@ -542,7 +572,7 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -542,7 +572,7 @@ const tableBtnClick = (scope, btn) => { |
| 542 | treeInfo.value.expandedKey = ['all']; | 572 | treeInfo.value.expandedKey = ['all']; |
| 543 | treeInfoRef.value.setCurrentKey('all'); | 573 | treeInfoRef.value.setCurrentKey('all'); |
| 544 | getSheetFieldList({ type: 2, databaseGuid: row.databaseGuid }, row.tableGuid); | 574 | getSheetFieldList({ type: 2, databaseGuid: row.databaseGuid }, row.tableGuid); |
| 545 | getFieldTableData({ databaseGuid: row.databaseGuid, tableGuid: row.tableGuid }); | 575 | getFieldTableData(); |
| 546 | } else if (type == "edit") { | 576 | } else if (type == "edit") { |
| 547 | row.STATE = 'Running'; | 577 | row.STATE = 'Running'; |
| 548 | } else if (type == 'save') { | 578 | } else if (type == 'save') { |
| ... | @@ -573,8 +603,8 @@ const tablePageChange = (info) => { | ... | @@ -573,8 +603,8 @@ const tablePageChange = (info) => { |
| 573 | sheetTableInfo.value.page.curr = Number(info.curr); | 603 | sheetTableInfo.value.page.curr = Number(info.curr); |
| 574 | getSheetTableData(); | 604 | getSheetTableData(); |
| 575 | } else { | 605 | } else { |
| 576 | fieldTableInfo.value.page.limit = page.value.limit; | 606 | fieldTableInfo.value.page.limit = Number(info.limit); |
| 577 | fieldTableInfo.value.page.curr = page.value.curr; | 607 | fieldTableInfo.value.page.curr = Number(info.curr); |
| 578 | getFieldTableData(); | 608 | getFieldTableData(); |
| 579 | } | 609 | } |
| 580 | }; | 610 | }; |
| ... | @@ -602,27 +632,35 @@ const btnClick = async (btn, bType = null) => { | ... | @@ -602,27 +632,35 @@ const btnClick = async (btn, bType = null) => { |
| 602 | 632 | ||
| 603 | // 保存字段 | 633 | // 保存字段 |
| 604 | const saveFields = (params, isBatch = false) => { | 634 | const saveFields = (params, isBatch = false) => { |
| 635 | loading.value = true; | ||
| 605 | execFieldConfirm(params).then((res: any) => { | 636 | execFieldConfirm(params).then((res: any) => { |
| 637 | loading.value = false; | ||
| 606 | if (res.code == proxy.$passCode) { | 638 | if (res.code == proxy.$passCode) { |
| 607 | ElMessage.success('保存成功'); | 639 | ElMessage.success('保存成功'); |
| 608 | isBatch && getFieldTableData(); | 640 | isBatch && getFieldTableData(); |
| 609 | } else { | 641 | } else { |
| 610 | ElMessage.error(res.msg); | 642 | ElMessage.error(res.msg); |
| 611 | } | 643 | } |
| 644 | }).catch(() => { | ||
| 645 | loading.value = false; | ||
| 612 | }) | 646 | }) |
| 613 | } | 647 | } |
| 614 | 648 | ||
| 615 | // 任务确认 | 649 | // 任务确认 |
| 616 | const saveTask = () => { | 650 | const saveTask = () => { |
| 651 | loading.value = true; | ||
| 617 | execTaskConfirm({ execGuid: taskDetail.value.execGuid }).then((res: any) => { | 652 | execTaskConfirm({ execGuid: taskDetail.value.execGuid }).then((res: any) => { |
| 653 | loading.value = false; | ||
| 618 | if (res.code == proxy.$passCode) { | 654 | if (res.code == proxy.$passCode) { |
| 619 | ElMessage.success('保存成功'); | 655 | ElMessage.success('变更成功'); |
| 620 | router.push({ | 656 | router.push({ |
| 621 | name: "taskConfig", | 657 | name: "taskConfig", |
| 622 | }); | 658 | }); |
| 623 | } else { | 659 | } else { |
| 624 | ElMessage.error(res.msg); | 660 | ElMessage.error(res.msg); |
| 625 | } | 661 | } |
| 662 | }).catch(() => { | ||
| 663 | loading.value = false; | ||
| 626 | }) | 664 | }) |
| 627 | } | 665 | } |
| 628 | 666 | ||
| ... | @@ -644,7 +682,10 @@ const searchField = (val: any, clear: boolean = false) => { | ... | @@ -644,7 +682,10 @@ const searchField = (val: any, clear: boolean = false) => { |
| 644 | }; | 682 | }; |
| 645 | 683 | ||
| 646 | const cascaderChange = (val, row) => { | 684 | const cascaderChange = (val, row) => { |
| 647 | console.log(val, row); | 685 | treeInfoRef.value.expandedKey = val || ['all']; |
| 686 | treeInfoRef.value.setCurrentKey(val?.at(-1) || 'all'); | ||
| 687 | console.log('cascader', val) | ||
| 688 | getFieldTableData(); | ||
| 648 | }; | 689 | }; |
| 649 | 690 | ||
| 650 | const selectChange = (val, item, scope = null) => { | 691 | const selectChange = (val, item, scope = null) => { |
| ... | @@ -716,19 +757,21 @@ onActivated(() => { | ... | @@ -716,19 +757,21 @@ onActivated(() => { |
| 716 | }) | 757 | }) |
| 717 | 758 | ||
| 718 | onBeforeMount(() => { | 759 | onBeforeMount(() => { |
| 719 | taskDetail.value = detailData; | 760 | if (route.query.type == 'log') { |
| 720 | getFieldCount() | 761 | getTaskDetail({ guid: route.query.guid, execGuid: taskDetail.value.execGuid }); |
| 721 | getSheetFieldList({ type: 1 }); | 762 | } else { |
| 722 | getFieldTree() | 763 | getTaskDetail({ guid: route.query.guid }); |
| 723 | getSheetTableData(); | 764 | } |
| 724 | getFieldTableData(); | 765 | }) |
| 725 | getGradeData(); | 766 | |
| 767 | onMounted(() => { | ||
| 768 | |||
| 726 | }) | 769 | }) |
| 727 | 770 | ||
| 728 | </script> | 771 | </script> |
| 729 | 772 | ||
| 730 | <template> | 773 | <template> |
| 731 | <div class="container_wrap full flex"> | 774 | <div class="container_wrap full flex" v-loading="loading"> |
| 732 | <div class="main_wrap full"> | 775 | <div class="main_wrap full"> |
| 733 | <div class="content_main panel"> | 776 | <div class="content_main panel"> |
| 734 | <div class="template_panel"> | 777 | <div class="template_panel"> |
| ... | @@ -749,17 +792,17 @@ onBeforeMount(() => { | ... | @@ -749,17 +792,17 @@ onBeforeMount(() => { |
| 749 | </div> | 792 | </div> |
| 750 | <div class="desc_item"> | 793 | <div class="desc_item"> |
| 751 | <span class="desc_label">执行时间:</span> | 794 | <span class="desc_label">执行时间:</span> |
| 752 | <span class="desc_value">{{ taskDetail.cgDirName || '--' }}</span> | 795 | <span class="desc_value">{{ taskDetail.updateTime || '--' }}</span> |
| 753 | </div> | 796 | </div> |
| 754 | </div> | 797 | </div> |
| 755 | <div class="desc_group"> | 798 | <div class="desc_group"> |
| 756 | <div class="desc_item"> | 799 | <div class="desc_item"> |
| 757 | <span class="desc_label">分类:</span> | 800 | <span class="desc_label">分类:</span> |
| 758 | <span class="desc_value text_btn">{{ taskDetail.classifyName || '--' }}</span> | 801 | <span class="desc_value">{{ taskDetail.classifyName || '--' }}</span> |
| 759 | </div> | 802 | </div> |
| 760 | <div class="desc_item"> | 803 | <div class="desc_item"> |
| 761 | <span class="desc_label">分级:</span> | 804 | <span class="desc_label">分级:</span> |
| 762 | <span class="desc_value text_btn">{{ taskDetail.gradeName || '--' }}</span> | 805 | <span class="desc_value">{{ taskDetail.gradeName || '--' }}</span> |
| 763 | </div> | 806 | </div> |
| 764 | <div class="desc_item"> | 807 | <div class="desc_item"> |
| 765 | <span class="desc_label">元数据名称:</span> | 808 | <span class="desc_label">元数据名称:</span> |
| ... | @@ -787,7 +830,7 @@ onBeforeMount(() => { | ... | @@ -787,7 +830,7 @@ onBeforeMount(() => { |
| 787 | <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" /> | 830 | <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" /> |
| 788 | <div class="panel" v-show="tabsInfo.activeName == 'sheet'"> | 831 | <div class="panel" v-show="tabsInfo.activeName == 'sheet'"> |
| 789 | <div class="table_tool_wrap"> | 832 | <div class="table_tool_wrap"> |
| 790 | <TableTools :searchItems="sheetItemList" :searchId="'sheet-search'" :init="false" | 833 | <TableTools ref="sheetSearchRef" :searchItems="sheetItemList" :searchId="'sheet-search'" :init="false" |
| 791 | @selectChange="selectChange" @search="searchSheet" /> | 834 | @selectChange="selectChange" @search="searchSheet" /> |
| 792 | </div> | 835 | </div> |
| 793 | <div class="table_panel_wrap"> | 836 | <div class="table_panel_wrap"> |
| ... | @@ -800,7 +843,7 @@ onBeforeMount(() => { | ... | @@ -800,7 +843,7 @@ onBeforeMount(() => { |
| 800 | </div> | 843 | </div> |
| 801 | <div class="box_right"> | 844 | <div class="box_right"> |
| 802 | <div class="table_tool_wrap"> | 845 | <div class="table_tool_wrap"> |
| 803 | <TableTools :searchItems="fieldItemList" :searchId="'field-search'" :init="false" | 846 | <TableTools ref="fieldSearchRef" :searchItems="fieldItemList" :searchId="'field-search'" :init="false" |
| 804 | @selectChange="selectChange" @cascaderChange="cascaderChange" @search="searchField" /> | 847 | @selectChange="selectChange" @cascaderChange="cascaderChange" @search="searchField" /> |
| 805 | <div class="tools_btns"> | 848 | <div class="tools_btns"> |
| 806 | <div class="btns"> | 849 | <div class="btns"> | ... | ... |
| ... | @@ -71,12 +71,11 @@ const tableInfo = ref({ | ... | @@ -71,12 +71,11 @@ const tableInfo = ref({ |
| 71 | actionInfo: { | 71 | actionInfo: { |
| 72 | label: "操作", | 72 | label: "操作", |
| 73 | type: "btn", | 73 | type: "btn", |
| 74 | width: 100, | 74 | width: 90, |
| 75 | btns: (scope) => { | 75 | btns: (scope) => { |
| 76 | let row = scope.row, btnArr: any = [ | 76 | return [ |
| 77 | { label: "查看结果", value: "path" }, | 77 | { label: "查看结果", value: "log" }, |
| 78 | ]; | 78 | ]; |
| 79 | return btnArr; | ||
| 80 | }, | 79 | }, |
| 81 | }, | 80 | }, |
| 82 | }); | 81 | }); |
| ... | @@ -107,7 +106,7 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -107,7 +106,7 @@ const tableBtnClick = (scope, btn) => { |
| 107 | const type = btn.value; | 106 | const type = btn.value; |
| 108 | const row = scope.row; | 107 | const row = scope.row; |
| 109 | currTableData.value = row; | 108 | currTableData.value = row; |
| 110 | if (type == "path") { | 109 | if (type == "log") { |
| 111 | toPath(type); | 110 | toPath(type); |
| 112 | } | 111 | } |
| 113 | }; | 112 | }; |
| ... | @@ -116,8 +115,9 @@ const toPath = (type) => { | ... | @@ -116,8 +115,9 @@ const toPath = (type) => { |
| 116 | router.push({ | 115 | router.push({ |
| 117 | name: "taskDetail", | 116 | name: "taskDetail", |
| 118 | query: { | 117 | query: { |
| 119 | guid: currTableData.value.guid, | 118 | guid: currTableData.value.taskGuid, |
| 120 | name: currTableData.value.damName, | 119 | name: currTableData.value.taskName, |
| 120 | execGuid: currTableData.value.guid, | ||
| 121 | type | 121 | type |
| 122 | }, | 122 | }, |
| 123 | }); | 123 | }); | ... | ... |
-
Please register or sign in to post a comment