分类分级任务联调
Showing
5 changed files
with
322 additions
and
134 deletions
| ... | @@ -472,6 +472,13 @@ export const getTaskFieldCount = (data) => request({ | ... | @@ -472,6 +472,13 @@ export const getTaskFieldCount = (data) => request({ |
| 472 | params: data | 472 | params: data |
| 473 | }) | 473 | }) |
| 474 | 474 | ||
| 475 | // 分类分级任务执行数据库信息查询 | ||
| 476 | export const getDbFieldList = (data) => request({ | ||
| 477 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-query-db-list`, | ||
| 478 | method: 'get', | ||
| 479 | params: data | ||
| 480 | }) | ||
| 481 | |||
| 475 | // 分类分级任务执行字段查询 | 482 | // 分类分级任务执行字段查询 |
| 476 | export const execTaskFieldList = (data) => request({ | 483 | export const execTaskFieldList = (data) => request({ |
| 477 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field-list-query`, | 484 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field-list-query`, |
| ... | @@ -489,7 +496,7 @@ export const execTaskSheetList = (data) => request({ | ... | @@ -489,7 +496,7 @@ export const execTaskSheetList = (data) => request({ |
| 489 | export const execTaskConfirm = (data) => request({ | 496 | export const execTaskConfirm = (data) => request({ |
| 490 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-task`, | 497 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-task`, |
| 491 | method: 'post', | 498 | method: 'post', |
| 492 | data | 499 | params: data |
| 493 | }) | 500 | }) |
| 494 | 501 | ||
| 495 | // 分类分级任务执行字段确认 | 502 | // 分类分级任务执行字段确认 |
| ... | @@ -536,7 +543,7 @@ export const filterVal = (val, type) => { | ... | @@ -536,7 +543,7 @@ export const filterVal = (val, type) => { |
| 536 | } else if(type == 'confirmStatus'){ | 543 | } else if(type == 'confirmStatus'){ |
| 537 | switch (val) { | 544 | switch (val) { |
| 538 | case 'N': | 545 | case 'N': |
| 539 | status = '草稿中'; | 546 | status = '待确认'; |
| 540 | break; | 547 | break; |
| 541 | case 'Y': | 548 | case 'Y': |
| 542 | status = '已确认'; | 549 | status = '已确认'; |
| ... | @@ -557,6 +564,18 @@ export const filterVal = (val, type) => { | ... | @@ -557,6 +564,18 @@ export const filterVal = (val, type) => { |
| 557 | status = '待确认'; | 564 | status = '待确认'; |
| 558 | break; | 565 | break; |
| 559 | } | 566 | } |
| 567 | } else if(type == 'changeStatus'){ | ||
| 568 | switch (val) { | ||
| 569 | case 'N': | ||
| 570 | status = '待确认'; | ||
| 571 | break; | ||
| 572 | case 'Y': | ||
| 573 | status = '已确认'; | ||
| 574 | break; | ||
| 575 | default: | ||
| 576 | status = '--'; | ||
| 577 | break; | ||
| 578 | } | ||
| 560 | } | 579 | } |
| 561 | return status; | 580 | return status; |
| 562 | } | 581 | } | ... | ... |
| ... | @@ -498,6 +498,11 @@ const scheduleChange = (val, rowValue) => { | ... | @@ -498,6 +498,11 @@ const scheduleChange = (val, rowValue) => { |
| 498 | const treeSelectNodeChange = (node, item, nodeObj) => { | 498 | const treeSelectNodeChange = (node, item, nodeObj) => { |
| 499 | emits("treeSelectNodeChange", node, item, nodeObj); | 499 | emits("treeSelectNodeChange", node, item, nodeObj); |
| 500 | } | 500 | } |
| 501 | |||
| 502 | const getCascaderCheckedData = () => { | ||
| 503 | const dialogForm = dialogFormRef.value[0] || dialogFormRef.value; | ||
| 504 | return dialogForm.getCascaderCheckedData(); | ||
| 505 | } | ||
| 501 | const setTreeChecked = (checkedKeys, leafOnly: boolean = false) => { | 506 | const setTreeChecked = (checkedKeys, leafOnly: boolean = false) => { |
| 502 | nextTick(() => { | 507 | nextTick(() => { |
| 503 | const formTree = formTreeRef.value[0] || formTreeRef.value; | 508 | const formTree = formTreeRef.value[0] || formTreeRef.value; |
| ... | @@ -533,7 +538,8 @@ defineExpose({ | ... | @@ -533,7 +538,8 @@ defineExpose({ |
| 533 | formTreeRef, | 538 | formTreeRef, |
| 534 | setTableRowSelected, | 539 | setTableRowSelected, |
| 535 | setTreeChecked, | 540 | setTreeChecked, |
| 536 | getDialogConRef | 541 | getDialogConRef, |
| 542 | getCascaderCheckedData | ||
| 537 | }); | 543 | }); |
| 538 | </script> | 544 | </script> |
| 539 | 545 | ... | ... |
| ... | @@ -101,7 +101,7 @@ onMounted(() => { | ... | @@ -101,7 +101,7 @@ onMounted(() => { |
| 101 | <template v-if="item.type == 'select'"> | 101 | <template v-if="item.type == 'select'"> |
| 102 | <el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]" | 102 | <el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]" |
| 103 | :placeholder="item.placeholder" :clearable="item.clearable" :filterable="item.filterable" | 103 | :placeholder="item.placeholder" :clearable="item.clearable" :filterable="item.filterable" |
| 104 | @change="(val) => selectChange(val, item)"> | 104 | :disabled="item.disabled ?? false" @change="(val) => selectChange(val, item)"> |
| 105 | <el-option v-for="opt in item.options" :label="item.props?.label ? opt[item.props.label] : opt.label" | 105 | <el-option v-for="opt in item.options" :label="item.props?.label ? opt[item.props.label] : opt.label" |
| 106 | :value="item.props?.value ? opt[item.props.value] : opt.value" /> | 106 | :value="item.props?.value ? opt[item.props.value] : opt.value" /> |
| 107 | </el-select> | 107 | </el-select> | ... | ... |
| ... | @@ -64,7 +64,9 @@ const tableInfo = ref({ | ... | @@ -64,7 +64,9 @@ const tableInfo = ref({ |
| 64 | { | 64 | { |
| 65 | label: "结果状态", field: "confirmStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { | 65 | label: "结果状态", field: "confirmStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { |
| 66 | return filterVal(scope.row.confirmStatus, 'confirmStatus'); | 66 | return filterVal(scope.row.confirmStatus, 'confirmStatus'); |
| 67 | } | 67 | }, tagType: (scope) => { |
| 68 | return scope.row.confirmStatus=='Y'?'success':'warning'; | ||
| 69 | }, | ||
| 68 | }, | 70 | }, |
| 69 | ], | 71 | ], |
| 70 | data: [], | 72 | data: [], |
| ... | @@ -157,6 +159,7 @@ const toPath = (type) => { | ... | @@ -157,6 +159,7 @@ const toPath = (type) => { |
| 157 | query: { | 159 | query: { |
| 158 | guid: currTableData.value.guid, | 160 | guid: currTableData.value.guid, |
| 159 | name: currTableData.value.taskName, | 161 | name: currTableData.value.taskName, |
| 162 | detail: JSON.stringify(currTableData.value), | ||
| 160 | type | 163 | type |
| 161 | }, | 164 | }, |
| 162 | }); | 165 | }); | ... | ... |
| ... | @@ -11,8 +11,17 @@ import { Search, Warning } from "@element-plus/icons-vue"; | ... | @@ -11,8 +11,17 @@ import { Search, Warning } from "@element-plus/icons-vue"; |
| 11 | import { setItemsDisabled, tagMethod, tagType, changeNum, } from "@/utils/common"; | 11 | 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 { getCgTaskDetail, getTaskExeTreeList, getTaskFieldCount, execTaskFieldList, execTaskSheetList, execTaskConfirm, execFieldConfirm, filterVal, } from "@/api/modules/dataInventory"; | 14 | import { |
| 15 | import { ro } from "element-plus/es/locale"; | 15 | getTaskExeTreeList, |
| 16 | getTaskFieldCount, | ||
| 17 | execTaskFieldList, | ||
| 18 | execTaskSheetList, | ||
| 19 | execTaskConfirm, | ||
| 20 | execFieldConfirm, | ||
| 21 | filterVal, | ||
| 22 | getGradeList, | ||
| 23 | getDbFieldList | ||
| 24 | } from "@/api/modules/dataInventory"; | ||
| 16 | 25 | ||
| 17 | const { proxy } = getCurrentInstance() as any; | 26 | const { proxy } = getCurrentInstance() as any; |
| 18 | const router = useRouter(); | 27 | const router = useRouter(); |
| ... | @@ -20,20 +29,20 @@ const route = useRoute(); | ... | @@ -20,20 +29,20 @@ const route = useRoute(); |
| 20 | const userStore = useUserStore(); | 29 | const userStore = useUserStore(); |
| 21 | const userData = JSON.parse(userStore.userData); | 30 | const userData = JSON.parse(userStore.userData); |
| 22 | const assetStore = useDataAssetStore(); | 31 | const assetStore = useDataAssetStore(); |
| 32 | const detailData = JSON.parse(route.query.detail); | ||
| 23 | 33 | ||
| 24 | const classifyData = ref([ | 34 | const gradeList = ref([]); |
| 25 | { classifyName: '未分类', guid: 'unclassified' }, | ||
| 26 | ]) | ||
| 27 | const treeData = ref([ | 35 | const treeData = ref([ |
| 28 | { | 36 | { |
| 29 | classifyName: "全部", | 37 | classifyName: "全部", |
| 30 | guid: "all", | 38 | guid: "all", |
| 31 | children: [ | 39 | children: [ |
| 32 | { classifyName: '未分类', guid: 'unclassified' }, | 40 | { classifyName: '未分类', guid: 'unclassified' } |
| 33 | ], | 41 | ], |
| 34 | }, | 42 | }, |
| 35 | ]); | 43 | ]); |
| 36 | const currTreeNode = ref({}) | 44 | const currTreeNode = ref({ classifyName: "全部", guid: "all" }) |
| 45 | const treeInfoRef = ref(); | ||
| 37 | const treeInfo: any = ref({ | 46 | const treeInfo: any = ref({ |
| 38 | id: "data-pickup-tree", | 47 | id: "data-pickup-tree", |
| 39 | filter: true, | 48 | filter: true, |
| ... | @@ -49,7 +58,7 @@ const treeInfo: any = ref({ | ... | @@ -49,7 +58,7 @@ const treeInfo: any = ref({ |
| 49 | data: [], | 58 | data: [], |
| 50 | }); | 59 | }); |
| 51 | 60 | ||
| 52 | const taskDetail = ref({}) | 61 | const taskDetail: any = ref({}) |
| 53 | const fieldCounts = ref({}) | 62 | const fieldCounts = ref({}) |
| 54 | const tabsInfo = ref({ | 63 | const tabsInfo = ref({ |
| 55 | activeName: 'field', | 64 | activeName: 'field', |
| ... | @@ -64,30 +73,29 @@ const sheetItemList = ref([ | ... | @@ -64,30 +73,29 @@ const sheetItemList = ref([ |
| 64 | { | 73 | { |
| 65 | type: "select", | 74 | type: "select", |
| 66 | label: "", | 75 | label: "", |
| 67 | placeholder: '变更类型', | ||
| 68 | field: 'isCgChange', | ||
| 69 | default: '', | ||
| 70 | options: [ | ||
| 71 | { label: '已确认', value: 'Y' }, | ||
| 72 | { label: '待确认', value: 'N' }, | ||
| 73 | ], | ||
| 74 | clearable: true, | ||
| 75 | }, | ||
| 76 | { | ||
| 77 | type: "input", | ||
| 78 | label: "", | ||
| 79 | placeholder: '数据库名', | 76 | placeholder: '数据库名', |
| 80 | field: 'databaseName', | 77 | field: 'databaseGuid', |
| 81 | default: '', | 78 | default: '', |
| 79 | options: [], | ||
| 80 | props: { | ||
| 81 | label: 'name', | ||
| 82 | value: 'dbGuid' | ||
| 83 | }, | ||
| 82 | clearable: true, | 84 | clearable: true, |
| 83 | }, | 85 | }, |
| 84 | { | 86 | { |
| 85 | type: "input", | 87 | type: "select", |
| 86 | label: "", | 88 | label: "", |
| 87 | placeholder: '表中文/英文名', | 89 | placeholder: '表中文/英文名', |
| 88 | field: 'tableName', | 90 | field: 'tableGuid', |
| 89 | default: '', | 91 | default: '', |
| 92 | options: [], | ||
| 93 | props: { | ||
| 94 | label: 'name', | ||
| 95 | value: 'dbGuid' | ||
| 96 | }, | ||
| 90 | clearable: true, | 97 | clearable: true, |
| 98 | disabled: true | ||
| 91 | }, | 99 | }, |
| 92 | ]); | 100 | ]); |
| 93 | const fieldParams = ref({}); | 101 | const fieldParams = ref({}); |
| ... | @@ -96,7 +104,7 @@ const fieldItemList = ref([ | ... | @@ -96,7 +104,7 @@ const fieldItemList = ref([ |
| 96 | type: "select", | 104 | type: "select", |
| 97 | label: "", | 105 | label: "", |
| 98 | placeholder: '变更类型', | 106 | placeholder: '变更类型', |
| 99 | field: 'isCgChange', | 107 | field: 'changeStatus', |
| 100 | default: '', | 108 | default: '', |
| 101 | options: [ | 109 | options: [ |
| 102 | { label: '已确认', value: 'Y' }, | 110 | { label: '已确认', value: 'Y' }, |
| ... | @@ -105,20 +113,45 @@ const fieldItemList = ref([ | ... | @@ -105,20 +113,45 @@ const fieldItemList = ref([ |
| 105 | clearable: true, | 113 | clearable: true, |
| 106 | }, | 114 | }, |
| 107 | { | 115 | { |
| 108 | type: "input", | 116 | type: "select", |
| 109 | label: "", | 117 | label: "", |
| 110 | placeholder: '字段中文/英文名', | 118 | placeholder: '数据库名', |
| 111 | field: 'fieldName', | 119 | field: 'databaseGuid', |
| 112 | default: '', | 120 | default: '', |
| 121 | options: [], | ||
| 122 | props: { | ||
| 123 | label: 'name', | ||
| 124 | value: 'dbGuid' | ||
| 125 | }, | ||
| 113 | clearable: true, | 126 | clearable: true, |
| 114 | }, | 127 | }, |
| 115 | { | 128 | { |
| 116 | type: "input", | 129 | type: "select", |
| 117 | label: "", | 130 | label: "", |
| 118 | placeholder: '表中文/英文名', | 131 | placeholder: '表中文/英文名', |
| 119 | field: 'tableName', | 132 | field: 'tableGuid', |
| 133 | default: '', | ||
| 134 | options: [], | ||
| 135 | props: { | ||
| 136 | label: 'name', | ||
| 137 | value: 'dbGuid' | ||
| 138 | }, | ||
| 139 | clearable: true, | ||
| 140 | disabled: true | ||
| 141 | }, | ||
| 142 | { | ||
| 143 | type: "select", | ||
| 144 | label: "", | ||
| 145 | placeholder: '字段中文/英文名', | ||
| 146 | field: 'fieldGuid', | ||
| 120 | default: '', | 147 | default: '', |
| 148 | options: [], | ||
| 149 | props: { | ||
| 150 | label: 'name', | ||
| 151 | value: 'dbGuid' | ||
| 152 | }, | ||
| 121 | clearable: true, | 153 | clearable: true, |
| 154 | disabled: true | ||
| 122 | }, | 155 | }, |
| 123 | { | 156 | { |
| 124 | type: "cascader", | 157 | type: "cascader", |
| ... | @@ -127,9 +160,9 @@ const fieldItemList = ref([ | ... | @@ -127,9 +160,9 @@ const fieldItemList = ref([ |
| 127 | field: 'classifyName', | 160 | field: 'classifyName', |
| 128 | default: [], | 161 | default: [], |
| 129 | options: [], | 162 | options: [], |
| 130 | showAllLevels: true, | 163 | showAllLevels: false, |
| 131 | props: { | 164 | props: { |
| 132 | checkStrictly: false, | 165 | checkStrictly: true, |
| 133 | expandTrigger: "hover", | 166 | expandTrigger: "hover", |
| 134 | label: "classifyName", | 167 | label: "classifyName", |
| 135 | value: "guid", | 168 | value: "guid", |
| ... | @@ -141,7 +174,7 @@ const fieldItemList = ref([ | ... | @@ -141,7 +174,7 @@ const fieldItemList = ref([ |
| 141 | type: "select", | 174 | type: "select", |
| 142 | label: "", | 175 | label: "", |
| 143 | placeholder: '分级', | 176 | placeholder: '分级', |
| 144 | field: 'dataSourceGuid', | 177 | field: 'gradeDetailGuid', |
| 145 | default: '', | 178 | default: '', |
| 146 | options: [], | 179 | options: [], |
| 147 | props: { | 180 | props: { |
| ... | @@ -150,14 +183,6 @@ const fieldItemList = ref([ | ... | @@ -150,14 +183,6 @@ const fieldItemList = ref([ |
| 150 | }, | 183 | }, |
| 151 | clearable: true, | 184 | clearable: true, |
| 152 | }, | 185 | }, |
| 153 | { | ||
| 154 | type: "input", | ||
| 155 | label: "", | ||
| 156 | placeholder: '数据库名', | ||
| 157 | field: 'databaseName', | ||
| 158 | default: '', | ||
| 159 | clearable: true, | ||
| 160 | }, | ||
| 161 | ]); | 186 | ]); |
| 162 | 187 | ||
| 163 | const checked1 = ref(false); | 188 | const checked1 = ref(false); |
| ... | @@ -204,20 +229,22 @@ const sheetTableInfo = ref({ | ... | @@ -204,20 +229,22 @@ const sheetTableInfo = ref({ |
| 204 | show: false | 229 | show: false |
| 205 | }, | 230 | }, |
| 206 | }); | 231 | }); |
| 207 | 232 | const selectRowData = ref([]); | |
| 208 | const fieldTableInfo = ref({ | 233 | const fieldTableInfo = ref({ |
| 209 | id: "metadata-table", | 234 | id: "metadata-table", |
| 210 | fields: [ | 235 | fields: [ |
| 211 | { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, | 236 | { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, |
| 212 | { | 237 | { |
| 213 | label: "分类分级变更状态", field: "isCgChange", width: 140, align: 'center', type: "tag", getName: (scope) => { | 238 | label: "确认状态", field: "changeStatus", width: 140, align: 'center', type: "tag", getName: (scope) => { |
| 214 | return filterVal(scope.row.isCgChange, 'isCgChange'); | 239 | return filterVal(scope.row.changeStatus, 'changeStatus'); |
| 215 | } | 240 | }, tagType: (scope) => { |
| 241 | return scope.row.changeStatus == 'Y' ? 'success' : 'warning'; | ||
| 242 | }, | ||
| 216 | }, | 243 | }, |
| 217 | { label: "字段名", field: "fieldName", width: 120 }, | 244 | { label: "字段名", field: "fieldName", width: 120 }, |
| 218 | { label: "字段中文名", field: "fieldChName", width: 200 }, | 245 | { label: "字段中文名", field: "fieldChName", width: 200 }, |
| 219 | { | 246 | { |
| 220 | label: "分类", field: "classifyGuids", width: 280, | 247 | label: "分类", field: "classifyDetailGuid", width: 280, |
| 221 | type: "cascader", | 248 | type: "cascader", |
| 222 | options: [], | 249 | options: [], |
| 223 | showAllLevels: false, | 250 | showAllLevels: false, |
| ... | @@ -230,11 +257,26 @@ const fieldTableInfo = ref({ | ... | @@ -230,11 +257,26 @@ const fieldTableInfo = ref({ |
| 230 | filterable: true, | 257 | filterable: true, |
| 231 | clearable: true, | 258 | clearable: true, |
| 232 | getName: (scope) => { | 259 | getName: (scope) => { |
| 233 | const classifyNames = scope.row.classifyNames || []; | 260 | if (scope.row['STATE'] === 'Running') { |
| 234 | return classifyNames.join('/'); | 261 | const classifyNames = scope.row.classifyDetailGuidRoutes || []; |
| 262 | return classifyNames; | ||
| 263 | } else { | ||
| 264 | const classifyNames = scope.row.classifyDetailNameRoutes || []; | ||
| 265 | return classifyNames.length ? classifyNames.join('/') : '--'; | ||
| 266 | } | ||
| 235 | } | 267 | } |
| 236 | }, | 268 | }, |
| 237 | { label: "分级", field: "gradeDetailName", width: 120, type: 'select' }, | 269 | { |
| 270 | label: "分级", field: "gradeDetailName", width: 120, type: 'select', options: [], props: { label: 'gradeName', value: 'guid' }, | ||
| 271 | // getName: (scope) => { | ||
| 272 | // if (scope.row['STATE'] === 'Running') { | ||
| 273 | // const classifyNames = scope.row.gradeGuid || ''; | ||
| 274 | // return classifyNames; | ||
| 275 | // } else { | ||
| 276 | // return scope.row.gradeDetailName || '--'; | ||
| 277 | // } | ||
| 278 | // } | ||
| 279 | }, | ||
| 238 | { label: "标签", field: "label", width: 96 }, | 280 | { label: "标签", field: "label", width: 96 }, |
| 239 | { label: "规则", field: "ruleDetail", width: 200 }, | 281 | { label: "规则", field: "ruleDetail", width: 200 }, |
| 240 | { label: "表英文名", field: "tableName", width: 200 }, | 282 | { label: "表英文名", field: "tableName", width: 200 }, |
| ... | @@ -274,21 +316,22 @@ const formItems = ref([ | ... | @@ -274,21 +316,22 @@ const formItems = ref([ |
| 274 | filterable: true, | 316 | filterable: true, |
| 275 | clearable: true, | 317 | clearable: true, |
| 276 | required: true, | 318 | required: true, |
| 319 | block: true, | ||
| 277 | }, | 320 | }, |
| 278 | { | 321 | { |
| 279 | label: '分级', | 322 | label: '分级', |
| 280 | type: 'select', | 323 | type: 'select', |
| 281 | placeholder: '请选择', | 324 | placeholder: '请选择', |
| 282 | field: 'gradeName', | 325 | field: 'gradeGuid', |
| 283 | default: '', | 326 | default: '', |
| 284 | block: true, | ||
| 285 | options: [], | 327 | options: [], |
| 286 | props: { | 328 | props: { |
| 287 | value: 'guid', | 329 | value: 'guid', |
| 288 | label: 'daName' | 330 | label: 'gradeName' |
| 289 | }, | 331 | }, |
| 290 | clearable: true, | 332 | clearable: true, |
| 291 | required: true | 333 | required: true, |
| 334 | block: true, | ||
| 292 | }, | 335 | }, |
| 293 | ]); | 336 | ]); |
| 294 | 337 | ||
| ... | @@ -296,11 +339,12 @@ const formRules = ref({ | ... | @@ -296,11 +339,12 @@ const formRules = ref({ |
| 296 | classifyName: [ | 339 | classifyName: [ |
| 297 | { required: true, trigger: 'change', message: "请选择分类" } | 340 | { required: true, trigger: 'change', message: "请选择分类" } |
| 298 | ], | 341 | ], |
| 299 | gradeName: [ | 342 | gradeGuid: [ |
| 300 | { required: true, trigger: 'change', message: "请选择分级" } | 343 | { required: true, trigger: 'change', message: "请选择分级" } |
| 301 | ], | 344 | ], |
| 302 | }); | 345 | }); |
| 303 | 346 | ||
| 347 | const dialogRef = ref(); | ||
| 304 | const dialogInfo: any = ref({ | 348 | const dialogInfo: any = ref({ |
| 305 | visible: false, | 349 | visible: false, |
| 306 | size: 480, | 350 | size: 480, |
| ... | @@ -329,34 +373,38 @@ const dialogInfo: any = ref({ | ... | @@ -329,34 +373,38 @@ const dialogInfo: any = ref({ |
| 329 | }, | 373 | }, |
| 330 | }) | 374 | }) |
| 331 | 375 | ||
| 332 | // 获取任务详情 | 376 | // 获取字段统计 |
| 333 | const getTaskDetail = (data) => { | 377 | const getFieldCount = () => { |
| 334 | getCgTaskDetail(data).then((res: any) => { | 378 | getTaskFieldCount({ execGuid: taskDetail.value.execGuid }).then((res: any) => { |
| 335 | if (res.code == proxy.$passCode) { | 379 | if (res.code == proxy.$passCode) { |
| 336 | const data = res.data || {}; | 380 | const data = res.data || {}; |
| 337 | taskDetail.value = data; | 381 | fieldCounts.value = data; |
| 338 | getFieldCount({ execGuid: data.execGuid }) | 382 | } else { |
| 339 | getFieldTree({ execGuid: data.execGuid }) | 383 | ElMessage.error(res.msg); |
| 340 | getSheetTableData(); | ||
| 341 | getFieldTableData(); | ||
| 342 | } | 384 | } |
| 343 | }) | 385 | }) |
| 344 | } | 386 | } |
| 345 | 387 | ||
| 346 | // 获取字段统计 | 388 | // 获取分级数据 |
| 347 | const getFieldCount = (data) => { | 389 | const getGradeData = () => { |
| 348 | getTaskFieldCount(data).then((res: any) => { | 390 | getGradeList({ classifyGradeGuid: taskDetail.value.gradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => { |
| 349 | if (res.code == proxy.$passCode) { | 391 | if (res.code == proxy.$passCode) { |
| 350 | const data = res.data || {}; | 392 | let data = res.data.records || []; |
| 351 | fieldCounts.value = data; | 393 | data.map(d => d.gradeName = d.dataGrade + '级'); |
| 394 | gradeList.value = JSON.parse(JSON.stringify(data)); | ||
| 395 | formItems.value[1].options = JSON.parse(JSON.stringify(data)); | ||
| 396 | fieldItemList.value[5].options = JSON.parse(JSON.stringify(data)); | ||
| 397 | fieldTableInfo.value.fields[5].options = JSON.parse(JSON.stringify(data)); | ||
| 398 | } else { | ||
| 399 | ElMessage.error(res.msg); | ||
| 352 | } | 400 | } |
| 353 | }) | 401 | }) |
| 354 | } | 402 | } |
| 355 | 403 | ||
| 356 | // 获取字段统计 | 404 | // 获取字段统计 |
| 357 | const getFieldTree = (data) => { | 405 | const getFieldTree = () => { |
| 358 | treeInfo.value.loading = true; | 406 | treeInfo.value.loading = true; |
| 359 | getTaskExeTreeList(data).then((res: any) => { | 407 | getTaskExeTreeList({ execGuid: taskDetail.value.execGuid }).then((res: any) => { |
| 360 | treeInfo.value.loading = false; | 408 | treeInfo.value.loading = false; |
| 361 | if (res.code == proxy.$passCode) { | 409 | if (res.code == proxy.$passCode) { |
| 362 | const data = res.data || []; | 410 | const data = res.data || []; |
| ... | @@ -364,23 +412,57 @@ const getFieldTree = (data) => { | ... | @@ -364,23 +412,57 @@ const getFieldTree = (data) => { |
| 364 | treeData.value[0].children.push(...data); | 412 | treeData.value[0].children.push(...data); |
| 365 | treeInfo.value.data = treeData.value; | 413 | treeInfo.value.data = treeData.value; |
| 366 | treeInfo.value.expandedKey = ['all']; | 414 | treeInfo.value.expandedKey = ['all']; |
| 367 | classifyData.value.splice(1); | 415 | treeInfoRef.value.setCurrentKey('all'); |
| 368 | classifyData.value.push(...data); | 416 | formItems.value[0].options = JSON.parse(JSON.stringify(data)); |
| 369 | fieldItemList.value[3].options = JSON.parse(JSON.stringify(classifyData.value)); | 417 | fieldItemList.value[4].options = JSON.parse(JSON.stringify(data)); |
| 370 | fieldTableInfo.value.fields[4].options = JSON.parse(JSON.stringify(classifyData.value)); | 418 | fieldTableInfo.value.fields[4].options = JSON.parse(JSON.stringify(data)); |
| 419 | } else { | ||
| 420 | ElMessage.error(res.msg); | ||
| 371 | } | 421 | } |
| 372 | }).catch(() => { | 422 | }).catch(() => { |
| 373 | treeInfo.value.loading = false; | 423 | treeInfo.value.loading = false; |
| 374 | }) | 424 | }) |
| 375 | } | 425 | } |
| 376 | 426 | ||
| 427 | // 获取库、表、字段信息 | ||
| 428 | const getSheetFieldList = (params, tId) => { | ||
| 429 | getDbFieldList({ execGuid: taskDetail.value.execGuid, ...params }).then(res => { | ||
| 430 | if (res.code == proxy.$passCode) { | ||
| 431 | const data = res.data || []; | ||
| 432 | if (params.type == 1) { | ||
| 433 | sheetItemList.value[0].options = JSON.parse(JSON.stringify(data)); | ||
| 434 | fieldItemList.value[1].options = JSON.parse(JSON.stringify(data)); | ||
| 435 | } else if (params.type == 2) { | ||
| 436 | if (tabsInfo.value.activeName == 'sheet') { | ||
| 437 | sheetItemList.value[1].options = JSON.parse(JSON.stringify(data)); | ||
| 438 | } else { | ||
| 439 | fieldItemList.value[2].options = JSON.parse(JSON.stringify(data)); | ||
| 440 | if(tId){ | ||
| 441 | fieldItemList.value[2].default = tId; | ||
| 442 | } | ||
| 443 | } | ||
| 444 | } else { | ||
| 445 | fieldItemList.value[3].options = JSON.parse(JSON.stringify(data)); | ||
| 446 | } | ||
| 447 | } else { | ||
| 448 | ElMessage.error(res.msg); | ||
| 449 | } | ||
| 450 | }) | ||
| 451 | } | ||
| 452 | |||
| 377 | const tabChange = (val) => { | 453 | const tabChange = (val) => { |
| 378 | tabsInfo.value.activeName = val; | 454 | tabsInfo.value.activeName = val; |
| 379 | } | 455 | } |
| 380 | 456 | ||
| 381 | const nodeClick = (data) => { | 457 | const nodeClick = (data) => { |
| 382 | currTreeNode.value = data; | 458 | currTreeNode.value = data; |
| 383 | getFieldTableData(); | 459 | if (data.guid == 'all') { |
| 460 | getFieldTableData({ isClassify: '' }) | ||
| 461 | } else if (data.guid == 'unclassified') { | ||
| 462 | getFieldTableData({ isClassify: 'N' }) | ||
| 463 | } else { | ||
| 464 | getFieldTableData({ isClassify: 'Y' }); | ||
| 465 | } | ||
| 384 | } | 466 | } |
| 385 | 467 | ||
| 386 | // 获取库表数据 | 468 | // 获取库表数据 |
| ... | @@ -388,7 +470,6 @@ const getSheetTableData = () => { | ... | @@ -388,7 +470,6 @@ const getSheetTableData = () => { |
| 388 | sheetTableInfo.value.loading = true; | 470 | sheetTableInfo.value.loading = true; |
| 389 | execTaskSheetList( | 471 | execTaskSheetList( |
| 390 | Object.assign({}, { ...sheetParams.value }, { | 472 | Object.assign({}, { ...sheetParams.value }, { |
| 391 | // changeStatus: checked2.value ? 'N' : 'Y', | ||
| 392 | execGuid: taskDetail.value.execGuid, | 473 | execGuid: taskDetail.value.execGuid, |
| 393 | pageIndex: sheetTableInfo.value.page.curr, | 474 | pageIndex: sheetTableInfo.value.page.curr, |
| 394 | pageSize: sheetTableInfo.value.page.limit, | 475 | pageSize: sheetTableInfo.value.page.limit, |
| ... | @@ -400,6 +481,8 @@ const getSheetTableData = () => { | ... | @@ -400,6 +481,8 @@ const getSheetTableData = () => { |
| 400 | sheetTableInfo.value.page.curr = res.data.pageIndex; | 481 | sheetTableInfo.value.page.curr = res.data.pageIndex; |
| 401 | sheetTableInfo.value.page.limit = res.data.pageSize; | 482 | sheetTableInfo.value.page.limit = res.data.pageSize; |
| 402 | sheetTableInfo.value.page.rows = res.data.totalRows; | 483 | sheetTableInfo.value.page.rows = res.data.totalRows; |
| 484 | } else { | ||
| 485 | ElMessage.error(res.msg); | ||
| 403 | } | 486 | } |
| 404 | }) | 487 | }) |
| 405 | .catch((res) => { | 488 | .catch((res) => { |
| ... | @@ -408,18 +491,18 @@ const getSheetTableData = () => { | ... | @@ -408,18 +491,18 @@ const getSheetTableData = () => { |
| 408 | }; | 491 | }; |
| 409 | 492 | ||
| 410 | // 获取字段表格数据 | 493 | // 获取字段表格数据 |
| 411 | const getFieldTableData = () => { | 494 | const getFieldTableData = (param = {}) => { |
| 412 | fieldTableInfo.value.loading = true; | 495 | fieldTableInfo.value.loading = true; |
| 413 | execTaskFieldList( | 496 | let params: any = { |
| 414 | Object.assign({}, { ...sheetParams.value }, { | 497 | ...fieldParams.value, |
| 415 | isClassify: checked1.value ? 'Y' : 'N', | 498 | ...param, |
| 416 | changeStatus: '', | 499 | execGuid: taskDetail.value.execGuid, |
| 417 | execGuid: taskDetail.value.execGuid, | 500 | pageIndex: fieldTableInfo.value.page.curr, |
| 418 | pageIndex: fieldTableInfo.value.page.curr, | 501 | pageSize: fieldTableInfo.value.page.limit, |
| 419 | pageSize: fieldTableInfo.value.page.limit, | 502 | } |
| 420 | classifyDetailGuid: currTreeNode.value.guid == 'all' || currTreeNode.value.guid == 'unclassified' ? '' : currTreeNode.value.guid, | 503 | params.classifyDetail = params.classifyName && params.classifyName.length ? params.classifyName.at(-1) : ''; |
| 421 | }) | 504 | delete params.classifyName |
| 422 | ).then((res: any) => { | 505 | execTaskFieldList(params).then((res: any) => { |
| 423 | fieldTableInfo.value.loading = false; | 506 | fieldTableInfo.value.loading = false; |
| 424 | if (res.code == proxy.$passCode) { | 507 | if (res.code == proxy.$passCode) { |
| 425 | let data = res.data.records || []; | 508 | let data = res.data.records || []; |
| ... | @@ -428,6 +511,8 @@ const getFieldTableData = () => { | ... | @@ -428,6 +511,8 @@ const getFieldTableData = () => { |
| 428 | fieldTableInfo.value.page.curr = res.data.pageIndex; | 511 | fieldTableInfo.value.page.curr = res.data.pageIndex; |
| 429 | fieldTableInfo.value.page.limit = res.data.pageSize; | 512 | fieldTableInfo.value.page.limit = res.data.pageSize; |
| 430 | fieldTableInfo.value.page.rows = res.data.totalRows; | 513 | fieldTableInfo.value.page.rows = res.data.totalRows; |
| 514 | } else { | ||
| 515 | ElMessage.error(res.msg); | ||
| 431 | } | 516 | } |
| 432 | }) | 517 | }) |
| 433 | .catch((res) => { | 518 | .catch((res) => { |
| ... | @@ -439,6 +524,14 @@ const tableCellClassName = (scope) => { | ... | @@ -439,6 +524,14 @@ const tableCellClassName = (scope) => { |
| 439 | return (scope.column.label == '分类' || scope.column.label == '分级') && scope.row['STATE'] === 'Running' ? 'edit_cell' : '' | 524 | return (scope.column.label == '分类' || scope.column.label == '分级') && scope.row['STATE'] === 'Running' ? 'edit_cell' : '' |
| 440 | } | 525 | } |
| 441 | 526 | ||
| 527 | const rowSelectable = (row, index) => { | ||
| 528 | return row.selectable ?? true; | ||
| 529 | }; | ||
| 530 | |||
| 531 | const tableSelectionChange = (val) => { | ||
| 532 | selectRowData.value = val; | ||
| 533 | }; | ||
| 534 | |||
| 442 | const getCascaderCheckedData = () => { | 535 | const getCascaderCheckedData = () => { |
| 443 | const formCascader = cascaderRef.value[0] || cascaderRef.value; | 536 | const formCascader = cascaderRef.value[0] || cascaderRef.value; |
| 444 | const data = formCascader.getCheckedNodes(); | 537 | const data = formCascader.getCheckedNodes(); |
| ... | @@ -451,17 +544,20 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -451,17 +544,20 @@ const tableBtnClick = (scope, btn) => { |
| 451 | currTableData.value = row; | 544 | currTableData.value = row; |
| 452 | if (type == 'tab') { | 545 | if (type == 'tab') { |
| 453 | tabsInfo.value.activeName = 'field'; | 546 | tabsInfo.value.activeName = 'field'; |
| 454 | fieldItemList.value[2].default = row.tableName; | 547 | getFieldTableData({ databaseGuid: row.databaseGuid, tableGuid: row.tableGuid }); |
| 548 | fieldItemList.value[1].default = row.databaseGuid; | ||
| 549 | fieldItemList.value[2].disabled = false; | ||
| 550 | getSheetFieldList({ type: 2, databaseGuid: row.databaseGuid }, row.tableGuid); | ||
| 455 | } else if (type == "edit") { | 551 | } else if (type == "edit") { |
| 456 | row.STATE = 'Running'; | 552 | row.STATE = 'Running'; |
| 457 | } else if (type == 'save') { | 553 | } else if (type == 'save') { |
| 458 | const cascaderData = getCascaderCheckedData(); | 554 | const cascaderData = getCascaderCheckedData(); |
| 459 | row.classifyNames = cascaderData.length ? cascaderData.pathLabels : []; | 555 | row.classifyDetailNameRoutes = cascaderData.length ? cascaderData[0].pathLabels : []; |
| 460 | row.classifyGuids = cascaderData.length ? cascaderData.pathValues : []; | 556 | row.classifyDetailGuidRoutes = cascaderData.length ? cascaderData[0].pathValues : []; |
| 461 | row.classifyDetailGuid = cascaderData.length ? cascaderData.value : ''; | 557 | row.classifyDetailGuid = cascaderData.length ? cascaderData[0].value : ''; |
| 462 | row.classifyDetailName = cascaderData.length ? cascaderData.label : ''; | 558 | row.classifyDetailName = cascaderData.length ? cascaderData[0].label : ''; |
| 463 | row.STATE = ''; | 559 | row.STATE = ''; |
| 464 | if (cascaderData.length && row.gradeDetailGuid) { | 560 | if (cascaderData.length && row.gradeDetailName) { |
| 465 | const params = [ | 561 | const params = [ |
| 466 | { | 562 | { |
| 467 | guid: row.guid, | 563 | guid: row.guid, |
| ... | @@ -493,14 +589,19 @@ const btnClick = async (btn, bType = null) => { | ... | @@ -493,14 +589,19 @@ const btnClick = async (btn, bType = null) => { |
| 493 | if (type == 'path') { | 589 | if (type == 'path') { |
| 494 | router.push({ | 590 | router.push({ |
| 495 | name: "classifyGradeCatalogue", | 591 | name: "classifyGradeCatalogue", |
| 496 | // query: { guid: taskDetail.value.damGuid }, | ||
| 497 | }); | 592 | }); |
| 593 | } else if (type == 'batch') { | ||
| 594 | if (selectRowData.value.length == 0) { | ||
| 595 | ElMessage.warning('请选择需要操作的数据'); | ||
| 596 | return | ||
| 597 | } | ||
| 598 | dialogInfo.value.visible = true; | ||
| 498 | } else if (type == 'cancel') { | 599 | } else if (type == 'cancel') { |
| 499 | router.push({ | 600 | router.push({ |
| 500 | name: "taskConfig", | 601 | name: "taskConfig", |
| 501 | }); | 602 | }); |
| 502 | } else if (type == 'confirm') { | 603 | } else if (type == 'confirm') { |
| 503 | 604 | saveTask(); | |
| 504 | } | 605 | } |
| 505 | }; | 606 | }; |
| 506 | 607 | ||
| ... | @@ -510,18 +611,22 @@ const saveFields = (params, isBatch = false) => { | ... | @@ -510,18 +611,22 @@ const saveFields = (params, isBatch = false) => { |
| 510 | if (res.code == proxy.$passCode) { | 611 | if (res.code == proxy.$passCode) { |
| 511 | ElMessage.success('保存成功'); | 612 | ElMessage.success('保存成功'); |
| 512 | isBatch && getFieldTableData(); | 613 | isBatch && getFieldTableData(); |
| 614 | } else { | ||
| 615 | ElMessage.error(res.msg); | ||
| 513 | } | 616 | } |
| 514 | }) | 617 | }) |
| 515 | } | 618 | } |
| 516 | 619 | ||
| 517 | // 任务确认 | 620 | // 任务确认 |
| 518 | const saveTask = (params) => { | 621 | const saveTask = () => { |
| 519 | execTaskConfirm(params).then((res: any) => { | 622 | execTaskConfirm({ execGuid: taskDetail.value.execGuid }).then((res: any) => { |
| 520 | if (res.code == proxy.$passCode) { | 623 | if (res.code == proxy.$passCode) { |
| 521 | ElMessage.success('保存成功'); | 624 | ElMessage.success('保存成功'); |
| 522 | router.push({ | 625 | router.push({ |
| 523 | name: "taskConfig", | 626 | name: "taskConfig", |
| 524 | }); | 627 | }); |
| 628 | } else { | ||
| 629 | ElMessage.error(res.msg); | ||
| 525 | } | 630 | } |
| 526 | }) | 631 | }) |
| 527 | } | 632 | } |
| ... | @@ -543,35 +648,69 @@ const searchField = (val: any, clear: boolean = false) => { | ... | @@ -543,35 +648,69 @@ const searchField = (val: any, clear: boolean = false) => { |
| 543 | getFieldTableData(); | 648 | getFieldTableData(); |
| 544 | }; | 649 | }; |
| 545 | 650 | ||
| 546 | const cascaderChange = (val) => { | 651 | const checkboxChange = (val) => { |
| 547 | // dictionaryGuid.value = val ? val.at(-1) : '' | 652 | getFieldTableData({ isClassify: val ? 'N' : 'Y' }); |
| 548 | } | 653 | } |
| 549 | 654 | ||
| 550 | const selectChange = (val) => { | 655 | const selectChange = (val, item, scope = null) => { |
| 551 | // standardSetGuid.value = val | 656 | if (scope) { |
| 657 | let row = scope.row; | ||
| 658 | row.gradeGuid = val || ''; | ||
| 659 | row.gradeDetailName = val ? item.options.find(i => i.guid == val)?.gradeName : ''; | ||
| 660 | } else { | ||
| 661 | if (tabsInfo.value.activeName == 'sheet') { | ||
| 662 | if (!val) { | ||
| 663 | sheetItemList.value[1].default = ''; | ||
| 664 | sheetItemList.value[1].disabled = true; | ||
| 665 | } else { | ||
| 666 | sheetItemList.value[1].disabled = false; | ||
| 667 | } | ||
| 668 | } else { | ||
| 669 | if (item.field == "databaseGuid") { | ||
| 670 | if (!val) { | ||
| 671 | fieldItemList.value[2].default = ''; | ||
| 672 | fieldItemList.value[3].default = ''; | ||
| 673 | fieldItemList.value[2].disabled = true; | ||
| 674 | fieldItemList.value[3].disabled = true; | ||
| 675 | } else { | ||
| 676 | fieldItemList.value[2].disabled = false; | ||
| 677 | } | ||
| 678 | } else { | ||
| 679 | if (!val) { | ||
| 680 | fieldItemList.value[3].default = ''; | ||
| 681 | fieldItemList.value[3].disabled = true; | ||
| 682 | } else { | ||
| 683 | fieldItemList.value[3].disabled = false; | ||
| 684 | } | ||
| 685 | } | ||
| 686 | } | ||
| 687 | if (val) { | ||
| 688 | const params = { | ||
| 689 | type: item.field == "databaseGuid" ? 2 : 3, | ||
| 690 | dbGuid: val || '' | ||
| 691 | } | ||
| 692 | getSheetFieldList(params) | ||
| 693 | } | ||
| 694 | } | ||
| 552 | } | 695 | } |
| 553 | 696 | ||
| 554 | const dialogBtnClick = (btn, info) => { | 697 | const dialogBtnClick = (btn, info) => { |
| 555 | if (btn.value == 'submit') { | 698 | if (btn.value == 'submit') { |
| 556 | // let daInfo = assetListData.value.find(a => a.guid == info.registerGuid); | 699 | let params: any = [] |
| 557 | // savePromise.value = saveQuality({ | 700 | const cascaderData = dialogRef.value.getCascaderCheckedData(); |
| 558 | // tenantGuid: userData.tenantGuid, | 701 | const gradeName = gradeList.value.find(i => i.guid == info.gradeGuid)?.gradeName; |
| 559 | // registerGuid: info.registerGuid, | 702 | selectRowData.value.map((item: any) => { |
| 560 | // daName: daInfo.daName, | 703 | const param = { |
| 561 | // registerTime: daInfo.registerTime, | 704 | guid: item.guid, |
| 562 | // issuingEntityGuid: daInfo.exchangeGuid, | 705 | classifyDetailGuid: cascaderData[0].value, |
| 563 | // qualityEvaluationFile: info.qualityEvaluationFile?.map(f => f.url) || [] | 706 | classifyDetailName: cascaderData[0].label, |
| 564 | // }).then((res: any) => { | 707 | gradeDetailGuid: info.gradeGuid, |
| 565 | // savePromise.value = null; | 708 | gradeDetailName: gradeName, |
| 566 | // if (res?.code == proxy.$passCode) { | 709 | } |
| 567 | // ElMessage.success('质量评价发起成功'); | 710 | params.push(param) |
| 568 | // dialogInfo.value.visible = false; | 711 | }) |
| 569 | // page.value.curr = 1; | 712 | saveFields(params, true); |
| 570 | // getTableData(); | 713 | dialogInfo.value.visible = false; |
| 571 | // } else { | ||
| 572 | // ElMessage.error(res.msg); | ||
| 573 | // } | ||
| 574 | // }) | ||
| 575 | } else if (btn.value == 'cancel') { | 714 | } else if (btn.value == 'cancel') { |
| 576 | dialogInfo.value.visible = false; | 715 | dialogInfo.value.visible = false; |
| 577 | } | 716 | } |
| ... | @@ -582,7 +721,13 @@ onActivated(() => { | ... | @@ -582,7 +721,13 @@ onActivated(() => { |
| 582 | }) | 721 | }) |
| 583 | 722 | ||
| 584 | onBeforeMount(() => { | 723 | onBeforeMount(() => { |
| 585 | getTaskDetail({ guid: route.query.guid }) | 724 | taskDetail.value = detailData; |
| 725 | getFieldCount() | ||
| 726 | getSheetFieldList({ type: 1 }); | ||
| 727 | getFieldTree() | ||
| 728 | getSheetTableData(); | ||
| 729 | getFieldTableData(); | ||
| 730 | getGradeData(); | ||
| 586 | }) | 731 | }) |
| 587 | 732 | ||
| 588 | </script> | 733 | </script> |
| ... | @@ -595,7 +740,9 @@ onBeforeMount(() => { | ... | @@ -595,7 +740,9 @@ onBeforeMount(() => { |
| 595 | <div class="panel_title"> | 740 | <div class="panel_title"> |
| 596 | <div class="title_wrap"> | 741 | <div class="title_wrap"> |
| 597 | <span class="title_text">{{ taskDetail.taskName }}</span> | 742 | <span class="title_text">{{ taskDetail.taskName }}</span> |
| 598 | <el-tag type="warning">{{ filterVal(taskDetail.confirmStatus, 'confirmStatus') }}</el-tag> | 743 | <el-tag :type="taskDetail.confirmStatus == 'Y' ? 'success' : 'warning'">{{ |
| 744 | filterVal(taskDetail.confirmStatus, | ||
| 745 | 'confirmStatus') }}</el-tag> | ||
| 599 | </div> | 746 | </div> |
| 600 | </div> | 747 | </div> |
| 601 | <div class="title_desc"> | 748 | <div class="title_desc"> |
| ... | @@ -645,7 +792,8 @@ onBeforeMount(() => { | ... | @@ -645,7 +792,8 @@ onBeforeMount(() => { |
| 645 | <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" /> | 792 | <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" /> |
| 646 | <div class="panel" v-show="tabsInfo.activeName == 'sheet'"> | 793 | <div class="panel" v-show="tabsInfo.activeName == 'sheet'"> |
| 647 | <div class="table_tool_wrap"> | 794 | <div class="table_tool_wrap"> |
| 648 | <TableTools :searchItems="sheetItemList" :searchId="'sheet-search'" :init="false" @search="searchSheet" /> | 795 | <TableTools :searchItems="sheetItemList" :searchId="'sheet-search'" :init="false" |
| 796 | @selectChange="selectChange" @search="searchSheet" /> | ||
| 649 | </div> | 797 | </div> |
| 650 | <div class="table_panel_wrap"> | 798 | <div class="table_panel_wrap"> |
| 651 | <Table :tableInfo="sheetTableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> | 799 | <Table :tableInfo="sheetTableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> |
| ... | @@ -653,12 +801,12 @@ onBeforeMount(() => { | ... | @@ -653,12 +801,12 @@ onBeforeMount(() => { |
| 653 | </div> | 801 | </div> |
| 654 | <div class="panel flex" v-show="tabsInfo.activeName == 'field'"> | 802 | <div class="panel flex" v-show="tabsInfo.activeName == 'field'"> |
| 655 | <div class="box_left"> | 803 | <div class="box_left"> |
| 656 | <Tree :treeInfo="treeInfo" @nodeClick="nodeClick" /> | 804 | <Tree ref="treeInfoRef" :treeInfo="treeInfo" @nodeClick="nodeClick" /> |
| 657 | </div> | 805 | </div> |
| 658 | <div class="box_right"> | 806 | <div class="box_right"> |
| 659 | <div class="table_tool_wrap"> | 807 | <div class="table_tool_wrap"> |
| 660 | <TableTools :searchItems="fieldItemList" :searchId="'field-search'" :init="false" | 808 | <TableTools :searchItems="fieldItemList" :searchId="'field-search'" :init="false" |
| 661 | @search="searchField" /> | 809 | @selectChange="selectChange" @search="searchField" /> |
| 662 | <div class="tools_btns"> | 810 | <div class="tools_btns"> |
| 663 | <div class="btns"> | 811 | <div class="btns"> |
| 664 | <el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变量分类分级</el-button> | 812 | <el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变量分类分级</el-button> |
| ... | @@ -666,7 +814,7 @@ onBeforeMount(() => { | ... | @@ -666,7 +814,7 @@ onBeforeMount(() => { |
| 666 | <el-button plain @click="btnClick({ value: 'export' })">导出</el-button> | 814 | <el-button plain @click="btnClick({ value: 'export' })">导出</el-button> |
| 667 | </div> | 815 | </div> |
| 668 | <div class="checkboxs"> | 816 | <div class="checkboxs"> |
| 669 | <el-checkbox v-model="checked1">仅看未分级分类</el-checkbox> | 817 | <el-checkbox v-model="checked1" @change="(val) => checkboxChange(val)">仅看未分级分类</el-checkbox> |
| 670 | <!-- <el-checkbox v-model="checked2">仅看变更</el-checkbox> --> | 818 | <!-- <el-checkbox v-model="checked2">仅看变更</el-checkbox> --> |
| 671 | </div> | 819 | </div> |
| 672 | </div> | 820 | </div> |
| ... | @@ -675,19 +823,32 @@ onBeforeMount(() => { | ... | @@ -675,19 +823,32 @@ onBeforeMount(() => { |
| 675 | <div class="table_panel" v-loading="fieldTableInfo.loading"> | 823 | <div class="table_panel" v-loading="fieldTableInfo.loading"> |
| 676 | <el-table ref="costTableRef" :data="fieldTableInfo.data" border :height="'100%'" | 824 | <el-table ref="costTableRef" :data="fieldTableInfo.data" border :height="'100%'" |
| 677 | style="width: 100%; display: inline-block" :style="{ 'max-height': 'calc(100% - 44px)' }" | 825 | style="width: 100%; display: inline-block" :style="{ 'max-height': 'calc(100% - 44px)' }" |
| 678 | :cell-class-name="tableCellClassName"> | 826 | :cell-class-name="tableCellClassName" @selection-change="tableSelectionChange"> |
| 827 | <el-table-column type="selection" align="center" :width="32" :selectable="rowSelectable" | ||
| 828 | fixed="left" /> | ||
| 679 | <el-table-column v-for="(item, i) in fieldTableInfo.fields" :label="item.label" :width="item.width" | 829 | <el-table-column v-for="(item, i) in fieldTableInfo.fields" :label="item.label" :width="item.width" |
| 680 | :min-width="item.minWidth" :fixed="item.fixed" :align="item.align" | 830 | :min-width="item.minWidth" :fixed="item.fixed" :align="item.align" |
| 681 | :sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass" | 831 | :sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass" |
| 682 | show-overflow-tooltip> | 832 | show-overflow-tooltip> |
| 683 | <template #default="scope"> | 833 | <template #default="scope"> |
| 684 | <el-tag v-if="item.type == 'tag'" | 834 | <span v-if="item.type == 'index'"> |
| 835 | {{ | ||
| 836 | fieldTableInfo.page.curr !== undefined | ||
| 837 | ? (fieldTableInfo.page.curr - 1) * fieldTableInfo.page.limit + scope.$index + 1 | ||
| 838 | : scope.$index + 1 | ||
| 839 | }} | ||
| 840 | </span> | ||
| 841 | <el-tag v-else-if="item.type == 'tag'" | ||
| 685 | :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{ | 842 | :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{ |
| 686 | item.getName ? item.getName(scope) : tagMethod(scope.row, item.field) | 843 | item.getName ? item.getName(scope) : tagMethod(scope.row, item.field) |
| 687 | }}</el-tag> | 844 | }}</el-tag> |
| 688 | <el-select v-else-if="item.type == 'select' && scope.row['STATE'] === 'Running'" | 845 | <el-select v-else-if="item.type == 'select' && scope.row['STATE'] === 'Running'" |
| 689 | v-model="scope.row[item.field]" :placeholder="item.placeholder" | 846 | v-model="scope.row[item.field]" :placeholder="item.placeholder" |
| 690 | :disabled="item.disabled ?? false" :clearable="item.clearable ?? true" size="small" /> | 847 | :disabled="item.disabled ?? false" :clearable="item.clearable ?? true" size="small" |
| 848 | @change="(val) => selectChange(val, item, scope)"> | ||
| 849 | <el-option v-for="opt in item.options" :key="opt.value" | ||
| 850 | :label="opt[item.props?.label ?? 'label']" :value="opt[item.props?.value ?? 'value']" /> | ||
| 851 | </el-select> | ||
| 691 | <el-cascader v-else-if="item.type == 'cascader' && scope.row['STATE'] === 'Running'" | 852 | <el-cascader v-else-if="item.type == 'cascader' && scope.row['STATE'] === 'Running'" |
| 692 | ref="cascaderRef" v-model="scope.row[item.field]" :options="item.options" :props="item.props" | 853 | ref="cascaderRef" v-model="scope.row[item.field]" :options="item.options" :props="item.props" |
| 693 | :show-all-levels="item.showAllLevels ?? true" :disabled="item.disabled ?? false" | 854 | :show-all-levels="item.showAllLevels ?? true" :disabled="item.disabled ?? false" |
| ... | @@ -722,8 +883,7 @@ onBeforeMount(() => { | ... | @@ -722,8 +883,7 @@ onBeforeMount(() => { |
| 722 | </div> | 883 | </div> |
| 723 | </div> | 884 | </div> |
| 724 | </div> | 885 | </div> |
| 725 | <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @cascaderChange="cascaderChange" | 886 | <Dialog ref="dialogRef" :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" /> |
| 726 | @selectChange="selectChange" /> | ||
| 727 | </div> | 887 | </div> |
| 728 | </template> | 888 | </template> |
| 729 | 889 | ... | ... |
-
Please register or sign in to post a comment