1.02版本提交
Showing
14 changed files
with
310 additions
and
94 deletions
| ... | @@ -615,6 +615,15 @@ export const saveBizRuleConfig = (data) => request({ | ... | @@ -615,6 +615,15 @@ export const saveBizRuleConfig = (data) => request({ |
| 615 | data | 615 | data |
| 616 | }) | 616 | }) |
| 617 | 617 | ||
| 618 | /** 业务规则配置-批量新增 | ||
| 619 | * @param {Object} | ||
| 620 | * @path /biz-rule-config/save | ||
| 621 | */ | ||
| 622 | export const batchSaveBizRuleConfig = (data) => request({ | ||
| 623 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/save-batch`, | ||
| 624 | method: 'post', | ||
| 625 | data | ||
| 626 | }) | ||
| 618 | 627 | ||
| 619 | /**树形目录 | 628 | /**树形目录 |
| 620 | * @param {Object} | 629 | * @param {Object} | ... | ... |
| ... | @@ -29,9 +29,9 @@ const fileFormRef = ref(); | ... | @@ -29,9 +29,9 @@ const fileFormRef = ref(); |
| 29 | const fileFormItems: any = ref([ | 29 | const fileFormItems: any = ref([ |
| 30 | { | 30 | { |
| 31 | label: '选择文件上传', | 31 | label: '选择文件上传', |
| 32 | tip: '支持扩展名:xlsx、xls,文件大小不超过20MB', | 32 | tip: '支持扩展名:xlsx、xls、csv,文件大小不超过20MB', |
| 33 | type: 'upload-file', | 33 | type: 'upload-file', |
| 34 | accept: '.xlsx, .xls', | 34 | accept: '.xlsx, .xls, .csv', |
| 35 | limit: 1, | 35 | limit: 1, |
| 36 | limitSize: 20, | 36 | limitSize: 20, |
| 37 | isExcel: true, | 37 | isExcel: true, | ... | ... |
| ... | @@ -476,7 +476,7 @@ const uploadFile = (file, item) => { | ... | @@ -476,7 +476,7 @@ const uploadFile = (file, item) => { |
| 476 | return Promise.resolve(); | 476 | return Promise.resolve(); |
| 477 | } | 477 | } |
| 478 | if (item.isExcel) { | 478 | if (item.isExcel) { |
| 479 | const isExcel = file.file.type === 'application/vnd.ms-excel' || file.file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | 479 | const isExcel = file.file.type === 'application/vnd.ms-excel' || file.file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.file.type == 'text/csv'; |
| 480 | if (!isExcel) { | 480 | if (!isExcel) { |
| 481 | uploadRef.value["ref" + item.field].handleRemove(file); | 481 | uploadRef.value["ref" + item.field].handleRemove(file); |
| 482 | ElMessage.error('上传文件只能是 .xls, .xlsx 格式'); | 482 | ElMessage.error('上传文件只能是 .xls, .xlsx 格式'); | ... | ... |
| ... | @@ -36,7 +36,7 @@ const toolBar = computed(() => { | ... | @@ -36,7 +36,7 @@ const toolBar = computed(() => { |
| 36 | }) | 36 | }) |
| 37 | 37 | ||
| 38 | const onUpload = async (file, list) => { | 38 | const onUpload = async (file, list) => { |
| 39 | const isExcel = file.raw.type === 'application/vnd.ms-excel' || file.raw.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; | 39 | const isExcel = file.raw.type === 'application/vnd.ms-excel' || file.raw.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.raw.type == 'text/csv'; |
| 40 | if (!isExcel) { | 40 | if (!isExcel) { |
| 41 | const fileUpload = fileUploadRef.value[0] || fileUploadRef.value | 41 | const fileUpload = fileUploadRef.value[0] || fileUploadRef.value |
| 42 | fileUpload?.handleRemove(file) | 42 | fileUpload?.handleRemove(file) | ... | ... |
| ... | @@ -102,7 +102,7 @@ const useUserStore = defineStore( | ... | @@ -102,7 +102,7 @@ const useUserStore = defineStore( |
| 102 | await process(); | 102 | await process(); |
| 103 | } | 103 | } |
| 104 | /** 轮询是否需要刷新token。如果是同步多个调用,则不处理错误的信息。 */ | 104 | /** 轮询是否需要刷新token。如果是同步多个调用,则不处理错误的信息。 */ |
| 105 | setInterval(async () => { | 105 | timer.value = setInterval(async () => { |
| 106 | process(); | 106 | process(); |
| 107 | }, 600000); | 107 | }, 600000); |
| 108 | } | 108 | } | ... | ... |
| ... | @@ -444,9 +444,11 @@ const handleTableEdit = (scope) => { | ... | @@ -444,9 +444,11 @@ const handleTableEdit = (scope) => { |
| 444 | drawerInfo.value.visible = true; | 444 | drawerInfo.value.visible = true; |
| 445 | drawerInfo.value.type = 'edit'; | 445 | drawerInfo.value.type = 'edit'; |
| 446 | drawerInfo.value.header.title = '编辑合同'; | 446 | drawerInfo.value.header.title = '编辑合同'; |
| 447 | drawerInfo.value.footer.visible = true; | ||
| 447 | currTableData.value = scope.row; | 448 | currTableData.value = scope.row; |
| 448 | contractEditFormItems.value.forEach(item => { | 449 | contractEditFormItems.value.forEach(item => { |
| 449 | item.default = scope.row[item.field]; | 450 | item.default = scope.row[item.field]; |
| 451 | item.disabled = false; | ||
| 450 | if (item.field == 'contractNodeCodes') { | 452 | if (item.field == 'contractNodeCodes') { |
| 451 | item.default = scope.row.contractNodeCodes?.map(c => c.code) || []; | 453 | item.default = scope.row.contractNodeCodes?.map(c => c.code) || []; |
| 452 | item.options = scope.row.contractTypeCode == '1' ? registerContractNodesList.value : (!scope.row.contractTypeCode ? [] : tradeContractNodesList.value); | 454 | item.options = scope.row.contractTypeCode == '1' ? registerContractNodesList.value : (!scope.row.contractTypeCode ? [] : tradeContractNodesList.value); |
| ... | @@ -455,6 +457,7 @@ const handleTableEdit = (scope) => { | ... | @@ -455,6 +457,7 @@ const handleTableEdit = (scope) => { |
| 455 | nodesInfo.value = scope.row.contractNodes?.map(node => { | 457 | nodesInfo.value = scope.row.contractNodes?.map(node => { |
| 456 | let items = cloneDeep(nodeFormItems.value); | 458 | let items = cloneDeep(nodeFormItems.value); |
| 457 | items.forEach(item => { | 459 | items.forEach(item => { |
| 460 | item.disabled = false; | ||
| 458 | item.default = node[item.field]; | 461 | item.default = node[item.field]; |
| 459 | if (item.field == 'dateRange') { | 462 | if (item.field == 'dateRange') { |
| 460 | item.default = [node.startDate, node.endDate]; | 463 | item.default = [node.startDate, node.endDate]; |
| ... | @@ -483,12 +486,44 @@ const handleTableDel = (scope) => { | ... | @@ -483,12 +486,44 @@ const handleTableDel = (scope) => { |
| 483 | }) | 486 | }) |
| 484 | } | 487 | } |
| 485 | 488 | ||
| 489 | const handleTableView = (scope) => { | ||
| 490 | drawerInfo.value.visible = true; | ||
| 491 | drawerInfo.value.type = 'view'; | ||
| 492 | drawerInfo.value.header.title = '查看合同'; | ||
| 493 | currTableData.value = scope.row; | ||
| 494 | contractEditFormItems.value.forEach(item => { | ||
| 495 | item.default = scope.row[item.field]; | ||
| 496 | item.disabled = true; | ||
| 497 | if (item.field == 'contractNodeCodes') { | ||
| 498 | item.default = scope.row.contractNodeCodes?.map(c => c.code) || []; | ||
| 499 | item.options = scope.row.contractTypeCode == '1' ? registerContractNodesList.value : (!scope.row.contractTypeCode ? [] : tradeContractNodesList.value); | ||
| 500 | } | ||
| 501 | }) | ||
| 502 | nodesInfo.value = scope.row.contractNodes?.map(node => { | ||
| 503 | let items = cloneDeep(nodeFormItems.value); | ||
| 504 | items.forEach(item => { | ||
| 505 | item.default = node[item.field]; | ||
| 506 | item.disabled = true; | ||
| 507 | if (item.field == 'dateRange') { | ||
| 508 | item.default = [node.startDate, node.endDate]; | ||
| 509 | } | ||
| 510 | }) | ||
| 511 | return Object.assign({}, node, { | ||
| 512 | nodeFormItems: items, | ||
| 513 | nodeFormRules: nodeFormRules.value | ||
| 514 | }) | ||
| 515 | }) || []; | ||
| 516 | drawerInfo.value.footer.visible = false; | ||
| 517 | } | ||
| 518 | |||
| 486 | const handleCreate = () => { | 519 | const handleCreate = () => { |
| 487 | drawerInfo.value.visible = true; | 520 | drawerInfo.value.visible = true; |
| 488 | drawerInfo.value.type = 'add'; | 521 | drawerInfo.value.type = 'add'; |
| 489 | drawerInfo.value.header.title = '新增合同'; | 522 | drawerInfo.value.header.title = '新增合同'; |
| 523 | drawerInfo.value.footer.visible = true; | ||
| 490 | contractEditFormItems.value.forEach(item => { | 524 | contractEditFormItems.value.forEach(item => { |
| 491 | item.default = ''; | 525 | item.default = ''; |
| 526 | item.disabled = false; | ||
| 492 | if (item.field == 'partyBGuid') { | 527 | if (item.field == 'partyBGuid') { |
| 493 | item.default = userData.tenantGuid; | 528 | item.default = userData.tenantGuid; |
| 494 | } | 529 | } |
| ... | @@ -701,8 +736,9 @@ onBeforeMount(() => { | ... | @@ -701,8 +736,9 @@ onBeforeMount(() => { |
| 701 | </el-table-column> | 736 | </el-table-column> |
| 702 | <el-table-column label="操作" width="100px" align="left" fixed="right" show-overflow-tooltip> | 737 | <el-table-column label="操作" width="100px" align="left" fixed="right" show-overflow-tooltip> |
| 703 | <template #default="scope"> | 738 | <template #default="scope"> |
| 704 | <span class="text_btn" @click="handleTableEdit(scope)">编辑</span> | 739 | <span v-if="!scope.row.createUserId || scope.row.createUserId == userData.userGuid" class="text_btn" @click="handleTableEdit(scope)">编辑</span> |
| 705 | <span class="text_btn ml4" @click="handleTableDel(scope)">删除</span> | 740 | <span v-if="!scope.row.createUserId || scope.row.createUserId == userData.userGuid" class="text_btn ml4" @click="handleTableDel(scope)">删除</span> |
| 741 | <span v-if="scope.row.createUserId && scope.row.createUserId != userData.userGuid" class="text_btn ml4" @click="handleTableView(scope)">查看</span> | ||
| 706 | </template> | 742 | </template> |
| 707 | </el-table-column> | 743 | </el-table-column> |
| 708 | </el-table> | 744 | </el-table> |
| ... | @@ -722,7 +758,7 @@ onBeforeMount(() => { | ... | @@ -722,7 +758,7 @@ onBeforeMount(() => { |
| 722 | </div> | 758 | </div> |
| 723 | 759 | ||
| 724 | <!-- 新增按钮 --> | 760 | <!-- 新增按钮 --> |
| 725 | <div class="bottm_tools" v-show="nodesInfo.length < contractNodeCodes?.length" @click="addNode"> | 761 | <div class="bottm_tools" v-show="nodesInfo.length < contractNodeCodes?.length && drawerInfo.type != 'view'" @click="addNode"> |
| 726 | <el-icon> | 762 | <el-icon> |
| 727 | <Plus /> | 763 | <Plus /> |
| 728 | </el-icon> | 764 | </el-icon> | ... | ... |
| ... | @@ -15,12 +15,13 @@ import { | ... | @@ -15,12 +15,13 @@ import { |
| 15 | qualityAllow, | 15 | qualityAllow, |
| 16 | deleteQuality, | 16 | deleteQuality, |
| 17 | updatQuality, | 17 | updatQuality, |
| 18 | getTenantList | 18 | getTenantList, |
| 19 | } from "@/api/modules/dataAsset"; | 19 | } from "@/api/modules/dataAsset"; |
| 20 | import useUserStore from "@/store/modules/user"; | 20 | import useUserStore from "@/store/modules/user"; |
| 21 | import useDataAssetStore from "@/store/modules/dataAsset"; | 21 | import useDataAssetStore from "@/store/modules/dataAsset"; |
| 22 | import { | 22 | import { |
| 23 | getStaffDetailInfo | 23 | getStaffDetailInfo, |
| 24 | getSingleList | ||
| 24 | } from "@/api/modules/queryService"; | 25 | } from "@/api/modules/queryService"; |
| 25 | import { isNeedApprove, rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise, isMyFirstNode, passFlowData } from "@/api/modules/workFlowService"; | 26 | import { isNeedApprove, rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise, isMyFirstNode, passFlowData } from "@/api/modules/workFlowService"; |
| 26 | 27 | ||
| ... | @@ -70,13 +71,10 @@ const deploymentId = ref(''); | ... | @@ -70,13 +71,10 @@ const deploymentId = ref(''); |
| 70 | const tenantList: any = ref([]); | 71 | const tenantList: any = ref([]); |
| 71 | 72 | ||
| 72 | onBeforeMount(() => { | 73 | onBeforeMount(() => { |
| 73 | getTenantList({ | 74 | // 获取质量评估机构 |
| 74 | bizState: 'Y', | 75 | getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => { |
| 75 | pageSize: -1 | ||
| 76 | }).then((res: any) => { | ||
| 77 | tenantList.value = []; | ||
| 78 | if (res.code == proxy.$passCode) { | 76 | if (res.code == proxy.$passCode) { |
| 79 | tenantList.value = res.data?.records || []; | 77 | tenantList.value = res.data.records || []; |
| 80 | formItems.value[1].options = tenantList.value; | 78 | formItems.value[1].options = tenantList.value; |
| 81 | } else { | 79 | } else { |
| 82 | proxy.$ElMessage.error(res.msg); | 80 | proxy.$ElMessage.error(res.msg); |
| ... | @@ -181,8 +179,21 @@ const handleCreate = () => { | ... | @@ -181,8 +179,21 @@ const handleCreate = () => { |
| 181 | formItems.value[0].default = ''; | 179 | formItems.value[0].default = ''; |
| 182 | formItems.value[1].visible = !needApprove.value; | 180 | formItems.value[1].visible = !needApprove.value; |
| 183 | formItems.value[1].default = ''; | 181 | formItems.value[1].default = ''; |
| 184 | formItems.value[2].visible = true; | 182 | formItems.value[2].visible = needApprove.value; |
| 185 | formItems.value[2].default = []; | 183 | formItems.value[2].default = []; |
| 184 | if (!needApprove.value) { | ||
| 185 | passFormItems.value[0].default = null; | ||
| 186 | passFormItems.value[1].disabled = false; | ||
| 187 | passFormItems.value[1].default = null; | ||
| 188 | passFormItems.value[2].default = ''; | ||
| 189 | passFormItems.value[3].default = []; | ||
| 190 | passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; | ||
| 191 | dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value); | ||
| 192 | dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value); | ||
| 193 | } else { | ||
| 194 | dialogInfo.value.contents[0].formInfo.items = formItems.value; | ||
| 195 | dialogInfo.value.contents[0].formInfo.rules = formRules.value; | ||
| 196 | } | ||
| 186 | dialogInfo.value.visible = true; | 197 | dialogInfo.value.visible = true; |
| 187 | dialogInfo.value.type = ''; | 198 | dialogInfo.value.type = ''; |
| 188 | if (needApprove.value) { | 199 | if (needApprove.value) { |
| ... | @@ -303,8 +314,26 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -303,8 +314,26 @@ const tableBtnClick = (scope, btn) => { |
| 303 | formItems.value[0].default = row.damGuid; | 314 | formItems.value[0].default = row.damGuid; |
| 304 | formItems.value[1].visible = !needApprove.value; | 315 | formItems.value[1].visible = !needApprove.value; |
| 305 | formItems.value[1].default = row.evaluationAgencyGuid; | 316 | formItems.value[1].default = row.evaluationAgencyGuid; |
| 317 | formItems.value[2].visible = needApprove.value; | ||
| 306 | formItems.value[2].default = row.qualityEvaluationFile || []; | 318 | formItems.value[2].default = row.qualityEvaluationFile || []; |
| 307 | dialogInfo.value.contents[0].formInfo.items = formItems.value; | 319 | if (!needApprove.value) { |
| 320 | passFormItems.value[0].default = row['qualityScore']; | ||
| 321 | if (row.dataStartDate) { | ||
| 322 | passFormItems.value[1].disabled = true; | ||
| 323 | passFormItems.value[1].default = [row.dataStartDate, row.dataEndDate]; | ||
| 324 | } else { | ||
| 325 | passFormItems.value[1].disabled = false; | ||
| 326 | passFormItems.value[1].default = null; | ||
| 327 | } | ||
| 328 | passFormItems.value[2].default = row.evaluationNote || ''; | ||
| 329 | passFormItems.value[3].default = row.evaluationFile || []; | ||
| 330 | passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; | ||
| 331 | dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value); | ||
| 332 | dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value); | ||
| 333 | } else { | ||
| 334 | dialogInfo.value.contents[0].formInfo.items = formItems.value; | ||
| 335 | dialogInfo.value.contents[0].formInfo.rules = formRules.value; | ||
| 336 | } | ||
| 308 | dialogInfo.value.visible = true; | 337 | dialogInfo.value.visible = true; |
| 309 | dialogInfo.value.type = 'reSubmit'; | 338 | dialogInfo.value.type = 'reSubmit'; |
| 310 | } else { | 339 | } else { |
| ... | @@ -494,7 +523,7 @@ const formRules = ref({ | ... | @@ -494,7 +523,7 @@ const formRules = ref({ |
| 494 | 523 | ||
| 495 | const dialogInfo = ref({ | 524 | const dialogInfo = ref({ |
| 496 | visible: false, | 525 | visible: false, |
| 497 | size: 510, | 526 | size: 560, |
| 498 | direction: "column", | 527 | direction: "column", |
| 499 | header: { | 528 | header: { |
| 500 | title: "质量评价发起", | 529 | title: "质量评价发起", |
| ... | @@ -519,6 +548,22 @@ const dialogInfo = ref({ | ... | @@ -519,6 +548,22 @@ const dialogInfo = ref({ |
| 519 | }, | 548 | }, |
| 520 | }); | 549 | }); |
| 521 | 550 | ||
| 551 | const handleDialogSelectChange = (val, row, info) => { | ||
| 552 | if (row.field == 'damGuid') { | ||
| 553 | let selectDam = val && assetListData.value.find(a => a.guid == val); | ||
| 554 | formItems.value.forEach(item => { | ||
| 555 | item.default = info[item.field]; | ||
| 556 | }) | ||
| 557 | passFormItems.value.forEach(item => { | ||
| 558 | item.default = info[item.field]; | ||
| 559 | if (item.field == 'evaluationRange') { | ||
| 560 | item.disabled = !!selectDam?.dataStartDate; | ||
| 561 | item.default = selectDam?.dataStartDate ? [selectDam.dataStartDate, selectDam.dataEndDate] : null; | ||
| 562 | } | ||
| 563 | }) | ||
| 564 | } | ||
| 565 | } | ||
| 566 | |||
| 522 | /** 编辑质量评价发起资产申请按钮处理。 */ | 567 | /** 编辑质量评价发起资产申请按钮处理。 */ |
| 523 | const dialogBtnClick = (btn, info) => { | 568 | const dialogBtnClick = (btn, info) => { |
| 524 | if (btn.value == 'submit') { | 569 | if (btn.value == 'submit') { |
| ... | @@ -538,7 +583,17 @@ const dialogBtnClick = (btn, info) => { | ... | @@ -538,7 +583,17 @@ const dialogBtnClick = (btn, info) => { |
| 538 | name: file.name, | 583 | name: file.name, |
| 539 | url: file.url | 584 | url: file.url |
| 540 | } | 585 | } |
| 541 | }) || [] | 586 | }) || [], |
| 587 | qualityScore: info.qualityScore, | ||
| 588 | evaluationRangeStart: info.evaluationRange[0], | ||
| 589 | evaluationRangeEnd: info.evaluationRange[1], | ||
| 590 | evaluationNote: info.evaluationNote, | ||
| 591 | evaluationFile: info.evaluationFile?.map(file => { | ||
| 592 | return { | ||
| 593 | name: file.name, | ||
| 594 | url: file.url | ||
| 595 | } | ||
| 596 | }) || [], | ||
| 542 | }).then((res: any) => { | 597 | }).then((res: any) => { |
| 543 | dialogInfo.value.footer.btns[1].loading = false; | 598 | dialogInfo.value.footer.btns[1].loading = false; |
| 544 | if (res?.code == proxy.$passCode) { | 599 | if (res?.code == proxy.$passCode) { |
| ... | @@ -563,7 +618,17 @@ const dialogBtnClick = (btn, info) => { | ... | @@ -563,7 +618,17 @@ const dialogBtnClick = (btn, info) => { |
| 563 | name: file.name, | 618 | name: file.name, |
| 564 | url: file.url | 619 | url: file.url |
| 565 | } | 620 | } |
| 566 | }) || [] | 621 | }) || [], |
| 622 | qualityScore: info.qualityScore, | ||
| 623 | evaluationRangeStart: info.evaluationRange[0], | ||
| 624 | evaluationRangeEnd: info.evaluationRange[1], | ||
| 625 | evaluationNote: info.evaluationNote, | ||
| 626 | evaluationFile: info.evaluationFile?.map(file => { | ||
| 627 | return { | ||
| 628 | name: file.name, | ||
| 629 | url: file.url | ||
| 630 | } | ||
| 631 | }) || [], | ||
| 567 | }).then((res: any) => { | 632 | }).then((res: any) => { |
| 568 | dialogInfo.value.footer.btns[1].loading = false; | 633 | dialogInfo.value.footer.btns[1].loading = false; |
| 569 | if (res?.code == proxy.$passCode) { | 634 | if (res?.code == proxy.$passCode) { |
| ... | @@ -796,6 +861,27 @@ const passDialogInfo = ref({ | ... | @@ -796,6 +861,27 @@ const passDialogInfo = ref({ |
| 796 | }, | 861 | }, |
| 797 | }); | 862 | }); |
| 798 | 863 | ||
| 864 | const dialogInputChange = (val, item, info) => { | ||
| 865 | if (item.field != 'qualityScore') { | ||
| 866 | return; | ||
| 867 | } | ||
| 868 | passDialogInputChange(val, item); | ||
| 869 | formItems.value.forEach(item => { | ||
| 870 | item.default = info[item.field]; | ||
| 871 | }) | ||
| 872 | passFormItems.value.forEach(item => { | ||
| 873 | item.default = info[item.field]; | ||
| 874 | }) | ||
| 875 | if (!needApprove.value) { | ||
| 876 | dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value); | ||
| 877 | dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value); | ||
| 878 | } else { | ||
| 879 | dialogInfo.value.contents[0].formInfo.items = formItems.value; | ||
| 880 | dialogInfo.value.contents[0].formInfo.rules = formRules.value; | ||
| 881 | } | ||
| 882 | } | ||
| 883 | |||
| 884 | |||
| 799 | const passDialogInputChange = (val, item) => { | 885 | const passDialogInputChange = (val, item) => { |
| 800 | if (item.field == 'qualityScore') { | 886 | if (item.field == 'qualityScore') { |
| 801 | passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为${val}分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; | 887 | passFormItems.value[2].placeholder = `本次评估数据资产总体质量得分为${val}分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; |
| ... | @@ -986,7 +1072,8 @@ const passCommonDialogBtnClick = (btn, info) => { | ... | @@ -986,7 +1072,8 @@ const passCommonDialogBtnClick = (btn, info) => { |
| 986 | <div class="table_panel_wrap"> | 1072 | <div class="table_panel_wrap"> |
| 987 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> | 1073 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> |
| 988 | </div> | 1074 | </div> |
| 989 | <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" /> | 1075 | <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @inputChange="dialogInputChange" |
| 1076 | @selectChange="handleDialogSelectChange" /> | ||
| 990 | <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange=passDialogInputChange /> | 1077 | <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange=passDialogInputChange /> |
| 991 | <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" /> | 1078 | <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" /> |
| 992 | <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" /> | 1079 | <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" /> | ... | ... |
| ... | @@ -255,7 +255,7 @@ const btnClick = (btn) => { | ... | @@ -255,7 +255,7 @@ const btnClick = (btn) => { |
| 255 | assessFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。'; | 255 | assessFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。'; |
| 256 | qualityEvaluateFormItems.value[2].placeholder = '本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:'; | 256 | qualityEvaluateFormItems.value[2].placeholder = '本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:'; |
| 257 | if (evaDetailInfo.value.dataStartDate) { | 257 | if (evaDetailInfo.value.dataStartDate) { |
| 258 | qualityEvaluateFormItems.value[1].default = [evaDetailInfo.value.dataStartDate, aevaDetailInfo.value.dataEndDate]; | 258 | qualityEvaluateFormItems.value[1].default = [evaDetailInfo.value.dataStartDate, evaDetailInfo.value.dataEndDate]; |
| 259 | qualityEvaluateFormItems.value[1].disabled = true; | 259 | qualityEvaluateFormItems.value[1].disabled = true; |
| 260 | } else { | 260 | } else { |
| 261 | qualityEvaluateFormItems.value[1].default = null; | 261 | qualityEvaluateFormItems.value[1].default = null; |
| ... | @@ -1031,7 +1031,7 @@ const handleClick = () => { | ... | @@ -1031,7 +1031,7 @@ const handleClick = () => { |
| 1031 | </el-table-column> | 1031 | </el-table-column> |
| 1032 | </el-table> | 1032 | </el-table> |
| 1033 | </ContentWrap> | 1033 | </ContentWrap> |
| 1034 | <ContentWrap v-if="route.query.type == 'qualityEvaluate' || route.query.type == 'costAssess'" id="id-assetContent" | 1034 | <ContentWrap v-if="(route.query.type == 'qualityEvaluate' && evaDetailInfo?.qualityEvaluationFile?.length > 0) || (route.query.type == 'costAssess' && costAssessDetail?.costAssessmentFile?.length > 0)" id="id-assetContent" |
| 1035 | title="附件信息" description="" style="margin: 16px 16px 16px"> | 1035 | title="附件信息" description="" style="margin: 16px 16px 16px"> |
| 1036 | <div class="list_panel mt4"> | 1036 | <div class="list_panel mt4"> |
| 1037 | <div class="list_item isFile" v-if="evaDetailInfo?.qualityEvaluationFile?.length" :style="{ width: '40%' }"> | 1037 | <div class="list_item isFile" v-if="evaDetailInfo?.qualityEvaluationFile?.length" :style="{ width: '40%' }"> | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
| 6 | import { Warning } from "@element-plus/icons-vue"; | 6 | import { Warning } from "@element-plus/icons-vue"; |
| 7 | import TableTools from '@/components/Tools/table_tools.vue'; | 7 | import TableTools from '@/components/Tools/table_tools.vue'; |
| 8 | import { | 8 | import { |
| 9 | batchSaveBizRuleConfig, | ||
| 9 | saveBizRuleConfig, | 10 | saveBizRuleConfig, |
| 10 | getDbDirTreeList, | 11 | getDbDirTreeList, |
| 11 | getDbDirTablePageList, | 12 | getDbDirTablePageList, |
| ... | @@ -1148,7 +1149,7 @@ const drawerBtnClick = async (btn, info) => { | ... | @@ -1148,7 +1149,7 @@ const drawerBtnClick = async (btn, info) => { |
| 1148 | } | 1149 | } |
| 1149 | 1150 | ||
| 1150 | try { | 1151 | try { |
| 1151 | const res: any = await saveBizRuleConfig(params); | 1152 | const res: any = await batchSaveBizRuleConfig(params); |
| 1152 | if (res.code == proxy.$passCode) { | 1153 | if (res.code == proxy.$passCode) { |
| 1153 | btn.loading = false; | 1154 | btn.loading = false; |
| 1154 | proxy.$ElMessage.success('配置成功!'); | 1155 | proxy.$ElMessage.success('配置成功!'); | ... | ... |
| ... | @@ -24,9 +24,9 @@ const fileFormRef = ref(); | ... | @@ -24,9 +24,9 @@ const fileFormRef = ref(); |
| 24 | const fileFormItems: any = ref([ | 24 | const fileFormItems: any = ref([ |
| 25 | { | 25 | { |
| 26 | label: '选择文件上传', | 26 | label: '选择文件上传', |
| 27 | tip: '支持扩展名:xlsx、xls,文件大小不超过20MB', | 27 | tip: '支持扩展名:xlsx、xls、csv,文件大小不超过20MB', |
| 28 | type: 'upload-file', | 28 | type: 'upload-file', |
| 29 | accept: '.xlsx, .xls', | 29 | accept: '.xlsx, .xls, .csv', |
| 30 | limit: 1, | 30 | limit: 1, |
| 31 | limitSize: 20, | 31 | limitSize: 20, |
| 32 | isExcel: true, | 32 | isExcel: true, | ... | ... |
| ... | @@ -282,7 +282,8 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [], | ... | @@ -282,7 +282,8 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [], |
| 282 | if (item.classifyDetailGuid === targetGuid) { | 282 | if (item.classifyDetailGuid === targetGuid) { |
| 283 | return { | 283 | return { |
| 284 | path, | 284 | path, |
| 285 | route | 285 | route, |
| 286 | item | ||
| 286 | }; // 找到目标节点,返回路径 | 287 | }; // 找到目标节点,返回路径 |
| 287 | } | 288 | } |
| 288 | if (item.children && item.children.length > 0) { | 289 | if (item.children && item.children.length > 0) { |
| ... | @@ -295,34 +296,11 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [], | ... | @@ -295,34 +296,11 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [], |
| 295 | return null; // 未找到目标节点 | 296 | return null; // 未找到目标节点 |
| 296 | }; | 297 | }; |
| 297 | 298 | ||
| 298 | // 存储分级数据 | 299 | const handleCascaderChange = (row, value) => { |
| 299 | const gradeInfo = ref<any>(); | 300 | const pathInfo = findDDatabasePath(treeSelectOptions.value, value?.length ? value[value.length - 1] : '') |
| 300 | const handleClassifyChange = (row, value) => { | ||
| 301 | console.log('row2', row, value) | ||
| 302 | const pathInfo = findDDatabasePath(treeSelectOptions.value, value) | ||
| 303 | row.classifyDetailNameRoutes = pathInfo.path; | 301 | row.classifyDetailNameRoutes = pathInfo.path; |
| 304 | row.classifyDetailGuidRoutes = pathInfo.route; | 302 | row.classifyDetailGuidRoutes = pathInfo.route; |
| 305 | // if (!row.classifyDetailGuid) { | 303 | let node = pathInfo.item; |
| 306 | // row.gradeGuid = null; | ||
| 307 | // row.gradeOptions = []; | ||
| 308 | // return; | ||
| 309 | // } | ||
| 310 | // if (gradeInfo.value) { | ||
| 311 | // refGradeGuid.value = findRefGradeGuid(treeSelectOptions.value, row.classifyDetailGuid); | ||
| 312 | // row.classifyDetailName = refGradeGuid.value.classifyName; | ||
| 313 | // getGradeList({ classifyGradeGuid: refGradeGuid.value.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => { | ||
| 314 | // if (res.code === proxy.$passCode) { | ||
| 315 | // row.gradeOptions = res.data.records || []; | ||
| 316 | // } else { | ||
| 317 | // ElMessage.error(res.msg); | ||
| 318 | // } | ||
| 319 | // }); | ||
| 320 | // } | ||
| 321 | }; | ||
| 322 | |||
| 323 | const handleNodeClick = (row, node, data) => { | ||
| 324 | console.log('row1', row, node, data) | ||
| 325 | // 在gradeInfo找到item.guid === row.gradeGuid | ||
| 326 | if (gradeInfo.value) { | 304 | if (gradeInfo.value) { |
| 327 | const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid); | 305 | const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid); |
| 328 | if (matchedItem) { | 306 | if (matchedItem) { |
| ... | @@ -342,8 +320,57 @@ const handleNodeClick = (row, node, data) => { | ... | @@ -342,8 +320,57 @@ const handleNodeClick = (row, node, data) => { |
| 342 | } | 320 | } |
| 343 | }); | 321 | }); |
| 344 | } | 322 | } |
| 323 | }; | ||
| 345 | 324 | ||
| 346 | } | 325 | // 存储分级数据 |
| 326 | const gradeInfo = ref<any>(); | ||
| 327 | // const handleClassifyChange = (row, value) => { | ||
| 328 | // console.log('row2', row, value) | ||
| 329 | // const pathInfo = findDDatabasePath(treeSelectOptions.value, value) | ||
| 330 | // row.classifyDetailNameRoutes = pathInfo.path; | ||
| 331 | // row.classifyDetailGuidRoutes = pathInfo.route; | ||
| 332 | // // if (!row.classifyDetailGuid) { | ||
| 333 | // // row.gradeGuid = null; | ||
| 334 | // // row.gradeOptions = []; | ||
| 335 | // // return; | ||
| 336 | // // } | ||
| 337 | // // if (gradeInfo.value) { | ||
| 338 | // // refGradeGuid.value = findRefGradeGuid(treeSelectOptions.value, row.classifyDetailGuid); | ||
| 339 | // // row.classifyDetailName = refGradeGuid.value.classifyName; | ||
| 340 | // // getGradeList({ classifyGradeGuid: refGradeGuid.value.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => { | ||
| 341 | // // if (res.code === proxy.$passCode) { | ||
| 342 | // // row.gradeOptions = res.data.records || []; | ||
| 343 | // // } else { | ||
| 344 | // // ElMessage.error(res.msg); | ||
| 345 | // // } | ||
| 346 | // // }); | ||
| 347 | // // } | ||
| 348 | // }; | ||
| 349 | |||
| 350 | // const handleNodeClick = (row, node, data) => { | ||
| 351 | // console.log('row1', row, node, data) | ||
| 352 | // // 在gradeInfo找到item.guid === row.gradeGuid | ||
| 353 | // if (gradeInfo.value) { | ||
| 354 | // const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid); | ||
| 355 | // if (matchedItem) { | ||
| 356 | // row.gradeDetailGuid = matchedItem.guid; | ||
| 357 | // row.gradeDetailName = matchedItem.name; | ||
| 358 | // } | ||
| 359 | // } else { | ||
| 360 | // getGradeList({ classifyGradeGuid: node.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => { | ||
| 361 | // if (res.code === proxy.$passCode) { | ||
| 362 | // gradeInfo.value = res.data.records || []; | ||
| 363 | // row.gradeOptions = res.data.records || []; | ||
| 364 | // const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid); | ||
| 365 | // row.gradeDetailGuid = matchedItem.guid; | ||
| 366 | // row.gradeDetailName = matchedItem.name; | ||
| 367 | // } else { | ||
| 368 | // ElMessage.error(res.msg); | ||
| 369 | // } | ||
| 370 | // }); | ||
| 371 | // } | ||
| 372 | |||
| 373 | // } | ||
| 347 | 374 | ||
| 348 | const isPrevious = ref(false); | 375 | const isPrevious = ref(false); |
| 349 | /** 上一步 */ | 376 | /** 上一步 */ |
| ... | @@ -983,7 +1010,7 @@ onActivated(() => { | ... | @@ -983,7 +1010,7 @@ onActivated(() => { |
| 983 | </el-table-column> | 1010 | </el-table-column> |
| 984 | 1011 | ||
| 985 | <!-- 数据库表列 --> | 1012 | <!-- 数据库表列 --> |
| 986 | <el-table-column prop="tableChName" label="数据库表" width="280"> | 1013 | <el-table-column prop="tableChName" label="数据库表" width="200"> |
| 987 | <template #header> | 1014 | <template #header> |
| 988 | <span>主题表名称</span> | 1015 | <span>主题表名称</span> |
| 989 | <span style="color:red;margin-left: 2px;">*</span> | 1016 | <span style="color:red;margin-left: 2px;">*</span> |
| ... | @@ -1165,15 +1192,25 @@ onActivated(() => { | ... | @@ -1165,15 +1192,25 @@ onActivated(() => { |
| 1165 | 1192 | ||
| 1166 | <!-- 分类(不可编辑)classifyName --> | 1193 | <!-- 分类(不可编辑)classifyName --> |
| 1167 | 1194 | ||
| 1168 | <el-table-column prop="classifyDetailNameRoutes" label="分类" width="150" show-overflow-tooltip> | 1195 | <el-table-column prop="classifyDetailNameRoutes" label="分类" width="200" show-overflow-tooltip> |
| 1169 | <template #default="scope"> | 1196 | <template #default="scope"> |
| 1170 | <!-- 如果当前行是编辑状态,显示 tree-select --> | 1197 | <!-- 如果当前行是编辑状态,显示 tree-select --> |
| 1171 | <div v-if="scope.row.isEdit"> | 1198 | <div v-if="scope.row.isEdit"> |
| 1172 | <el-tree-select v-model="scope.row.classifyDetailGuid" :data="treeSelectOptions" | 1199 | <el-cascader |
| 1200 | ref="cascaderRef" v-model="scope.row.classifyDetailGuid" :options="treeSelectOptions" :props="{ | ||
| 1201 | checkStrictly: false, | ||
| 1202 | expandTrigger: 'hover', | ||
| 1203 | label: 'classifyName', | ||
| 1204 | value: 'classifyDetailGuid', | ||
| 1205 | }" | ||
| 1206 | :show-all-levels="true" :disabled="false" | ||
| 1207 | :clearable="true" | ||
| 1208 | @change="val => handleCascaderChange(scope.row, val)" /> | ||
| 1209 | <!-- <el-tree-select v-model="scope.row.classifyDetailGuid" :data="treeSelectOptions" | ||
| 1173 | :props="treeSelectProps" placeholder="请选择分类" clearable filterable | 1210 | :props="treeSelectProps" placeholder="请选择分类" clearable filterable |
| 1174 | @change="(value) => handleClassifyChange(scope.row, value)" | 1211 | @change="(value) => handleClassifyChange(scope.row, value)" |
| 1175 | @node-click="(node, data) => handleNodeClick(scope.row, node, data)"> | 1212 | @node-click="(node, data) => handleNodeClick(scope.row, node, data)"> |
| 1176 | </el-tree-select> | 1213 | </el-tree-select> --> |
| 1177 | </div> | 1214 | </div> |
| 1178 | <!-- 否则直接显示分类名称 --> | 1215 | <!-- 否则直接显示分类名称 --> |
| 1179 | <div v-else> | 1216 | <div v-else> |
| ... | @@ -1360,15 +1397,25 @@ onActivated(() => { | ... | @@ -1360,15 +1397,25 @@ onActivated(() => { |
| 1360 | 1397 | ||
| 1361 | <!-- 分类(不可编辑)classifyName --> | 1398 | <!-- 分类(不可编辑)classifyName --> |
| 1362 | 1399 | ||
| 1363 | <el-table-column prop="classifyDetailNameRoutes" label="分类" width="150" show-overflow-tooltip> | 1400 | <el-table-column prop="classifyDetailNameRoutes" label="分类" width="200" show-overflow-tooltip> |
| 1364 | <template #default="scope"> | 1401 | <template #default="scope"> |
| 1365 | <!-- 如果当前行是编辑状态,显示 tree-select --> | 1402 | <!-- 如果当前行是编辑状态,显示 tree-select --> |
| 1366 | <div v-if="scope.row.isEdit"> | 1403 | <div v-if="scope.row.isEdit"> |
| 1367 | <el-tree-select v-model="scope.row.classifyDetailGuid" :data="treeSelectOptions" | 1404 | <el-cascader |
| 1405 | ref="cascaderRef" v-model="scope.row.classifyDetailGuid" :options="treeSelectOptions" :props="{ | ||
| 1406 | checkStrictly: false, | ||
| 1407 | expandTrigger: 'hover', | ||
| 1408 | label: 'classifyName', | ||
| 1409 | value: 'classifyDetailGuid', | ||
| 1410 | }" | ||
| 1411 | :show-all-levels="true" :disabled="false" | ||
| 1412 | :clearable="true" | ||
| 1413 | @change="val => handleCascaderChange(scope.row, val)" /> | ||
| 1414 | <!-- <el-tree-select v-model="scope.row.classifyDetailGuid" :data="treeSelectOptions" | ||
| 1368 | :props="treeSelectProps" placeholder="请选择分类" clearable filterable | 1415 | :props="treeSelectProps" placeholder="请选择分类" clearable filterable |
| 1369 | @change="(value) => handleClassifyChange(scope.row, value)" | 1416 | @change="(value) => handleClassifyChange(scope.row, value)" |
| 1370 | @node-click="(node, data) => handleNodeClick(scope.row, node, data)"> | 1417 | @node-click="(node, data) => handleNodeClick(scope.row, node, data)"> |
| 1371 | </el-tree-select> | 1418 | </el-tree-select> --> |
| 1372 | </div> | 1419 | </div> |
| 1373 | <!-- 否则直接显示分类名称 --> | 1420 | <!-- 否则直接显示分类名称 --> |
| 1374 | <div v-else> | 1421 | <div v-else> | ... | ... |
| ... | @@ -219,27 +219,27 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [], | ... | @@ -219,27 +219,27 @@ const findDDatabasePath = (data: any[], targetGuid: string, path: string[] = [], |
| 219 | }; | 219 | }; |
| 220 | 220 | ||
| 221 | const gradeInfo = ref<any>(); | 221 | const gradeInfo = ref<any>(); |
| 222 | const handleClassifyChange = (row, value) => { | 222 | // const handleClassifyChange = (row, value) => { |
| 223 | const pathInfo = findDDatabasePath(treeSelectOptions.value, value) | 223 | // const pathInfo = findDDatabasePath(treeSelectOptions.value, value) |
| 224 | row.classifyDetailNameRoutes = pathInfo.path; | 224 | // row.classifyDetailNameRoutes = pathInfo.path; |
| 225 | row.classifyDetailGuidRoutes = pathInfo.route; | 225 | // row.classifyDetailGuidRoutes = pathInfo.route; |
| 226 | // 查找选中的节点 | 226 | // // 查找选中的节点 |
| 227 | // const selectedNode = getTreeNode(treeSelectOptions.value, value); | 227 | // // const selectedNode = getTreeNode(treeSelectOptions.value, value); |
| 228 | // if (selectedNode) { | 228 | // // if (selectedNode) { |
| 229 | // getGradeList({ classifyGradeGuid: selectedNode.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => { | 229 | // // getGradeList({ classifyGradeGuid: selectedNode.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => { |
| 230 | // if (res.code === proxy.$passCode) { | 230 | // // if (res.code === proxy.$passCode) { |
| 231 | // gradeInfo.value = res.data.records || []; | 231 | // // gradeInfo.value = res.data.records || []; |
| 232 | // row.gradeOptions = res.data.records || []; | 232 | // // row.gradeOptions = res.data.records || []; |
| 233 | // } else { | 233 | // // } else { |
| 234 | // ElMessage.error(res.msg); | 234 | // // ElMessage.error(res.msg); |
| 235 | // } | 235 | // // } |
| 236 | // }); | 236 | // // }); |
| 237 | // row.classifyDetailName = selectedNode.classifyName; | 237 | // // row.classifyDetailName = selectedNode.classifyName; |
| 238 | // } else { | 238 | // // } else { |
| 239 | // console.error("未找到对应的节点"); | 239 | // // console.error("未找到对应的节点"); |
| 240 | // row.classifyDetailName = ""; // 重置分类名 | 240 | // // row.classifyDetailName = ""; // 重置分类名 |
| 241 | // } | 241 | // // } |
| 242 | }; | 242 | // }; |
| 243 | 243 | ||
| 244 | const gradeOptions = ref<any>() | 244 | const gradeOptions = ref<any>() |
| 245 | // 获取分级 | 245 | // 获取分级 |
| ... | @@ -253,17 +253,43 @@ const getGrade = async () => { | ... | @@ -253,17 +253,43 @@ const getGrade = async () => { |
| 253 | } | 253 | } |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | const handleNodeClick = (row, node, data) => { | 256 | // const handleNodeClick = (row, node, data) => { |
| 257 | setTimeout(() => { | 257 | // setTimeout(() => { |
| 258 | // 在gradeInfo找到item.guid === row.gradeGuid | 258 | // // 在gradeInfo找到item.guid === row.gradeGuid |
| 259 | // const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid); | ||
| 260 | // if (matchedItem) { | ||
| 261 | // row.gradeDetailGuid = matchedItem.guid; | ||
| 262 | // row.gradeDetailName = matchedItem.name; | ||
| 263 | // } | ||
| 264 | // }, 300); | ||
| 265 | |||
| 266 | // } | ||
| 267 | |||
| 268 | const handleCascaderChange = (row, value) => { | ||
| 269 | const pathInfo = findDDatabasePath(treeSelectOptions.value, value?.length ? value[value.length - 1] : '') | ||
| 270 | row.classifyDetailNameRoutes = pathInfo.path; | ||
| 271 | row.classifyDetailGuidRoutes = pathInfo.route; | ||
| 272 | let node = pathInfo.item; | ||
| 273 | if (gradeInfo.value) { | ||
| 259 | const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid); | 274 | const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid); |
| 260 | if (matchedItem) { | 275 | if (matchedItem) { |
| 261 | row.gradeDetailGuid = matchedItem.guid; | 276 | row.gradeDetailGuid = matchedItem.guid; |
| 262 | row.gradeDetailName = matchedItem.name; | 277 | row.gradeDetailName = matchedItem.name; |
| 263 | } | 278 | } |
| 264 | }, 300); | 279 | } else { |
| 265 | 280 | getGradeList({ classifyGradeGuid: node.refGradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => { | |
| 266 | } | 281 | if (res.code === proxy.$passCode) { |
| 282 | gradeInfo.value = res.data.records || []; | ||
| 283 | row.gradeOptions = res.data.records || []; | ||
| 284 | const matchedItem = gradeInfo.value.find((item) => item.guid === node.gradeGuid); | ||
| 285 | row.gradeDetailGuid = matchedItem.guid; | ||
| 286 | row.gradeDetailName = matchedItem.name; | ||
| 287 | } else { | ||
| 288 | ElMessage.error(res.msg); | ||
| 289 | } | ||
| 290 | }); | ||
| 291 | } | ||
| 292 | }; | ||
| 267 | 293 | ||
| 268 | const getTreeNode = (tree, value) => { | 294 | const getTreeNode = (tree, value) => { |
| 269 | for (const node of tree) { | 295 | for (const node of tree) { |
| ... | @@ -2054,15 +2080,25 @@ const tableSelectFields = computed(() => { | ... | @@ -2054,15 +2080,25 @@ const tableSelectFields = computed(() => { |
| 2054 | <div v-else>{{ scope.row.classifyDetailName || '--' }}</div> | 2080 | <div v-else>{{ scope.row.classifyDetailName || '--' }}</div> |
| 2055 | </template> | 2081 | </template> |
| 2056 | </el-table-column> --> | 2082 | </el-table-column> --> |
| 2057 | <el-table-column prop="classifyDetailNameRoutes" label="分类" width="150" show-overflow-tooltip> | 2083 | <el-table-column prop="classifyDetailNameRoutes" label="分类" width="200" show-overflow-tooltip> |
| 2058 | <template #default="scope"> | 2084 | <template #default="scope"> |
| 2059 | <!-- 如果当前行是编辑状态,显示 tree-select --> | 2085 | <!-- 如果当前行是编辑状态,显示 tree-select --> |
| 2060 | <div v-if="scope.row.isEdit"> | 2086 | <div v-if="scope.row.isEdit"> |
| 2061 | <el-tree-select v-if="scope.row['isEdit']" v-model="scope.row['classifyDetailGuid']" | 2087 | <el-cascader |
| 2088 | ref="cascaderRef" v-model="scope.row.classifyDetailGuid" :options="treeSelectOptions" :props="{ | ||
| 2089 | checkStrictly: false, | ||
| 2090 | expandTrigger: 'hover', | ||
| 2091 | label: 'classifyName', | ||
| 2092 | value: 'classifyDetailGuid', | ||
| 2093 | }" | ||
| 2094 | :show-all-levels="true" :disabled="false" | ||
| 2095 | :clearable="true" | ||
| 2096 | @change="val => handleCascaderChange(scope.row, val)" /> | ||
| 2097 | <!-- <el-tree-select v-if="scope.row['isEdit']" v-model="scope.row['classifyDetailGuid']" | ||
| 2062 | :data="treeSelectOptions" :props="treeSelectProps" placeholder="请选择分类" clearable filterable | 2098 | :data="treeSelectOptions" :props="treeSelectProps" placeholder="请选择分类" clearable filterable |
| 2063 | @change="(value) => handleClassifyChange(scope.row, value)" | 2099 | @change="(value) => handleClassifyChange(scope.row, value)" |
| 2064 | @node-click="(node, data) => handleNodeClick(scope.row, node, data)"> | 2100 | @node-click="(node, data) => handleNodeClick(scope.row, node, data)"> |
| 2065 | </el-tree-select> | 2101 | </el-tree-select> --> |
| 2066 | </div> | 2102 | </div> |
| 2067 | <!-- 否则直接显示分类名称 --> | 2103 | <!-- 否则直接显示分类名称 --> |
| 2068 | <div v-else> | 2104 | <div v-else> | ... | ... |
| ... | @@ -582,8 +582,8 @@ const setUploadInfo = () => { | ... | @@ -582,8 +582,8 @@ const setUploadInfo = () => { |
| 582 | auto: false, | 582 | auto: false, |
| 583 | cover: true, | 583 | cover: true, |
| 584 | fileList: [], | 584 | fileList: [], |
| 585 | accept: '.xlsx, .xls', | 585 | accept: '.xlsx, .xls, .csv', |
| 586 | tips: '当前支持xls、xlsx文件,默认使用第一个sheet' | 586 | tips: '当前支持xls、xlsx、csv文件,默认使用第一个sheet' |
| 587 | } | 587 | } |
| 588 | } | 588 | } |
| 589 | ] | 589 | ] | ... | ... |
-
Please register or sign in to post a comment