812919fd by lihua

1.02版本提交

1 parent c4d5a5f7
...@@ -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%' }">
......
...@@ -16,7 +16,8 @@ import { ...@@ -16,7 +16,8 @@ import {
16 getTenantList 16 getTenantList
17 } from "@/api/modules/dataAsset"; 17 } from "@/api/modules/dataAsset";
18 import { 18 import {
19 getStaffDetailInfo 19 getStaffDetailInfo,
20 getSingleList
20 } from "@/api/modules/queryService"; 21 } from "@/api/modules/queryService";
21 import useUserStore from "@/store/modules/user"; 22 import useUserStore from "@/store/modules/user";
22 import useDataAssetStore from "@/store/modules/dataAsset"; 23 import useDataAssetStore from "@/store/modules/dataAsset";
...@@ -59,11 +60,8 @@ onBeforeMount(() => { ...@@ -59,11 +60,8 @@ onBeforeMount(() => {
59 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" }) 60 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" })
60 tableInfo.value.fields = tableFields.value; 61 tableInfo.value.fields = tableFields.value;
61 } 62 }
62 getTenantList({ 63 // 获取价值评估机构
63 bizState: 'Y', 64 getSingleList({ pageIndex: -1, pageSize: -1, bizState: 'Y', tenantType: "12504" }).then((res: any) => {
64 pageSize: -1
65 }).then((res: any) => {
66 tenantList.value = [];
67 if (res.code == proxy.$passCode) { 65 if (res.code == proxy.$passCode) {
68 tenantList.value = res.data?.records || []; 66 tenantList.value = res.data?.records || [];
69 formItems.value[1].options = tenantList.value; 67 formItems.value[1].options = tenantList.value;
...@@ -171,7 +169,7 @@ const handleCreate = () => { ...@@ -171,7 +169,7 @@ const handleCreate = () => {
171 formItems.value[0].default = ''; 169 formItems.value[0].default = '';
172 formItems.value[1].visible = !needApprove.value; 170 formItems.value[1].visible = !needApprove.value;
173 formItems.value[1].default = ''; 171 formItems.value[1].default = '';
174 formItems.value[2].visible = true; 172 formItems.value[2].visible = needApprove.value;
175 formItems.value[2].default = []; 173 formItems.value[2].default = [];
176 formItems.value[3].visible = false; 174 formItems.value[3].visible = false;
177 formItems.value[3].default = ''; 175 formItems.value[3].default = '';
...@@ -193,6 +191,18 @@ const handleCreate = () => { ...@@ -193,6 +191,18 @@ const handleCreate = () => {
193 } 191 }
194 }) 192 })
195 } 193 }
194 if (!needApprove.value) {
195 passFormItems.value[0].default = '';
196 passFormItems.value[1].default = null;
197 passFormItems.value[2].default = '';
198 passFormItems.value[3].default = [];
199 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
200 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
201 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
202 } else {
203 dialogInfo.value.contents[0].formInfo.items = formItems.value;
204 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
205 }
196 } else { 206 } else {
197 proxy.$ElMessage.error(res1.msg); 207 proxy.$ElMessage.error(res1.msg);
198 } 208 }
...@@ -240,7 +250,7 @@ const getTableBtns = (row) => { ...@@ -240,7 +250,7 @@ const getTableBtns = (row) => {
240 const approveVO = row.approveVO; 250 const approveVO = row.approveVO;
241 if (!approveVO && row.isApprove == 'N') { 251 if (!approveVO && row.isApprove == 'N') {
242 btnsArr.push({ label: "编辑", value: "redit" }); 252 btnsArr.push({ label: "编辑", value: "redit" });
243 btnsArr.push({ label: "删除", value: "del" }); 253 btnsArr.push({ label: "删除", value: "delete" });
244 btnsArr.push({ label: "详情", value: "detail" }); 254 btnsArr.push({ label: "详情", value: "detail" });
245 return btnsArr; 255 return btnsArr;
246 } 256 }
...@@ -308,12 +318,18 @@ const tableBtnClick = (scope, btn) => { ...@@ -308,12 +318,18 @@ const tableBtnClick = (scope, btn) => {
308 formItems.value[1].visible = !needApprove.value; 318 formItems.value[1].visible = !needApprove.value;
309 formItems.value[1].default = row.evaluationAgencyGuid; 319 formItems.value[1].default = row.evaluationAgencyGuid;
310 formItems.value[2].default = row.costAssessmentFile || []; 320 formItems.value[2].default = row.costAssessmentFile || [];
321 formItems.value[2].visible = needApprove.value;
311 // formItems.value[2].default = row.qualityScore; 322 // formItems.value[2].default = row.qualityScore;
312 formItems.value[5].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; 323
324 if (row.dataStartDate) {
325 formItems.value[4].disabled = true;
326 passFormItems.value[1].default = [row.dataStartDate, row.dataEndDate];
327 } else {
328 formItems.value[4].disabled = false;
329 formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
330 }
313 // formItems.value[4].default = row.evaluationNote; 331 // formItems.value[4].default = row.evaluationNote;
314 // formItems.value[5].default = row.evaluationFile || []; 332 // formItems.value[5].default = row.evaluationFile || [];
315 dialogInfo.value.type = 'reSubmit';
316 dialogInfo.value.visible = true;
317 } 333 }
318 if (!row.qualityEvaluationGuid) { 334 if (!row.qualityEvaluationGuid) {
319 formItems.value[3].visible = true; 335 formItems.value[3].visible = true;
...@@ -324,14 +340,33 @@ const tableBtnClick = (scope, btn) => { ...@@ -324,14 +340,33 @@ const tableBtnClick = (scope, btn) => {
324 formItems.value[0].default = row.damGuid; 340 formItems.value[0].default = row.damGuid;
325 formItems.value[1].visible = !needApprove.value; 341 formItems.value[1].visible = !needApprove.value;
326 formItems.value[1].default = row.evaluationAgencyGuid; 342 formItems.value[1].default = row.evaluationAgencyGuid;
343 formItems.value[2].visible = needApprove.value;
327 formItems.value[2].default = row.costAssessmentFile || []; 344 formItems.value[2].default = row.costAssessmentFile || [];
328 formItems.value[3].default = changeNum(row.qualityScore || 0, 2); 345 formItems.value[3].default = changeNum(row.qualityScore || 0, 2);
329 formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : ''; 346 if (row.dataStartDate) {
347 formItems.value[4].disabled = true;
348 passFormItems.value[1].default = [row.dataStartDate, row.dataEndDate];
349 } else {
350 formItems.value[4].disabled = false;
351 formItems.value[4].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
352 }
330 formItems.value[5].default = row.evaluationNote; 353 formItems.value[5].default = row.evaluationNote;
331 formItems.value[6].default = row.evaluationFile || []; 354 formItems.value[6].default = row.evaluationFile || [];
332 dialogInfo.value.type = 'reSubmit';
333 dialogInfo.value.visible = true;
334 } 355 }
356 if (!needApprove.value) {
357 passFormItems.value[0].default = row['assessmentMoney'] || '';
358 passFormItems.value[1].default = row.assessmentDate;
359 passFormItems.value[2].default = row.assessmentNote || '';
360 passFormItems.value[3].default = row.assessmentFile || [];
361 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
362 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
363 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
364 } else {
365 dialogInfo.value.contents[0].formInfo.items = formItems.value;
366 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
367 }
368 dialogInfo.value.type = 'reSubmit';
369 dialogInfo.value.visible = true;
335 } else { 370 } else {
336 proxy.$ElMessage.error(res1.msg); 371 proxy.$ElMessage.error(res1.msg);
337 } 372 }
...@@ -628,7 +663,9 @@ const handleSelectChange = (val, row, info) => { ...@@ -628,7 +663,9 @@ const handleSelectChange = (val, row, info) => {
628 if (row.field != 'registerGuid') { 663 if (row.field != 'registerGuid') {
629 return; 664 return;
630 } 665 }
631 let qualityEvaluationGuid = assetListData.value.find(item => item.guid == val)?.qualityEvaluationGuid; 666
667 let selectDam = val && assetListData.value.find(item => item.guid == val);
668 let qualityEvaluationGuid = selectDam?.qualityEvaluationGuid;
632 if (!qualityEvaluationGuid) { 669 if (!qualityEvaluationGuid) {
633 formItems.value[0].default = val; 670 formItems.value[0].default = val;
634 formItems.value[1].default = info.evaluationAgencyGuid; 671 formItems.value[1].default = info.evaluationAgencyGuid;
...@@ -637,6 +674,21 @@ const handleSelectChange = (val, row, info) => { ...@@ -637,6 +674,21 @@ const handleSelectChange = (val, row, info) => {
637 formItems.value[4].visible = true; 674 formItems.value[4].visible = true;
638 formItems.value[5].visible = true; 675 formItems.value[5].visible = true;
639 formItems.value[6].visible = true; 676 formItems.value[6].visible = true;
677 formItems.value.forEach(item => {
678 item.default = info[item.field];
679 if (item.field == 'evaluationFile') {
680 item.default = item.default || [];
681 } else if (item.field == 'evaluationRange') {
682 item.disabled = !!selectDam?.dataStartDate;
683 item.default = selectDam?.dataStartDate ? [selectDam.dataStartDate, selectDam.dataEndDate] : null;
684 }
685 })
686 passFormItems.value.forEach(item => {
687 item.default = info[item.field];
688 if (item.field == 'assessmentFile') {
689 item.default = item.default || [];
690 }
691 })
640 } else { 692 } else {
641 formItems.value[0].default = val; 693 formItems.value[0].default = val;
642 formItems.value[1].default = info.evaluationAgencyGuid; 694 formItems.value[1].default = info.evaluationAgencyGuid;
...@@ -645,10 +697,45 @@ const handleSelectChange = (val, row, info) => { ...@@ -645,10 +697,45 @@ const handleSelectChange = (val, row, info) => {
645 formItems.value[4].visible = false; 697 formItems.value[4].visible = false;
646 formItems.value[5].visible = false; 698 formItems.value[5].visible = false;
647 formItems.value[6].visible = false; 699 formItems.value[6].visible = false;
700 formItems.value.forEach(item => {
701 item.default = info[item.field];
702 if (item.field == 'evaluationFile') {
703 item.default = [];
704 } else if (item.field == 'evaluationRange') {
705 item.disabled = !!selectDam?.dataStartDate;
706 item.default = selectDam?.dataStartDate ? [selectDam.dataStartDate, selectDam.dataEndDate] : null;
707 }
708 })
709 passFormItems.value.forEach(item => {
710 item.default = info[item.field];
711 if (item.field == 'assessmentFile') {
712 item.default = item.default || [];
713 }
714 })
648 } 715 }
649 716
650 } 717 }
651 718
719 const dialogInputChange = (val, item, info) => {
720 if (item.field != 'assessmentMoney' && item.field != 'assessmentDate' && item.field != 'qualityScore') {
721 return;
722 }
723 passDialogInputChange(val, item, info);
724 formItems.value.forEach(item => {
725 item.default = info[item.field];
726 })
727 passFormItems.value.forEach(item => {
728 item.default = info[item.field];
729 })
730 if (!needApprove.value) {
731 dialogInfo.value.contents[0].formInfo.items = formItems.value.concat(passFormItems.value);
732 dialogInfo.value.contents[0].formInfo.rules = Object.assign({}, formRules.value, passFormRules.value);
733 } else {
734 dialogInfo.value.contents[0].formInfo.items = formItems.value;
735 dialogInfo.value.contents[0].formInfo.rules = formRules.value;
736 }
737 }
738
652 const passDialogInputChange = (val, item, inlineValue) => { 739 const passDialogInputChange = (val, item, inlineValue) => {
653 console.log('val', val, item, inlineValue); 740 console.log('val', val, item, inlineValue);
654 if (item.field == 'assessmentMoney') { 741 if (item.field == 'assessmentMoney') {
...@@ -668,6 +755,8 @@ const passDialogInputChange = (val, item, inlineValue) => { ...@@ -668,6 +755,8 @@ const passDialogInputChange = (val, item, inlineValue) => {
668 let M = (val?.getMonth() + 1 < 10 ? '0' + (val?.getMonth() + 1) : val?.getMonth() + 1); 755 let M = (val?.getMonth() + 1 < 10 ? '0' + (val?.getMonth() + 1) : val?.getMonth() + 1);
669 let D = (val?.getDate() + 1 < 10 ? '0' + val?.getDate() : val?.getDate()); 756 let D = (val?.getDate() + 1 < 10 ? '0' + val?.getDate() : val?.getDate());
670 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${inlineValue.assessmentMoney ? inlineValue.assessmentMoney : '***'}元。本次评估结论在评估基准日后一年内有效,即自${val ? `${val?.getFullYear()}${M}${D}日至${val?.getFullYear() + 1}${M}${D}` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`; 757 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${inlineValue.assessmentMoney ? inlineValue.assessmentMoney : '***'}元。本次评估结论在评估基准日后一年内有效,即自${val ? `${val?.getFullYear()}${M}${D}日至${val?.getFullYear() + 1}${M}${D}` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
758 } else if (item.field == 'qualityScore') {
759 formItems.value[5].placeholder = `本次评估数据资产总体质量得分为${val}分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
671 } 760 }
672 } 761 }
673 762
...@@ -704,6 +793,15 @@ const dialogBtnClick = (btn, info) => { ...@@ -704,6 +793,15 @@ const dialogBtnClick = (btn, info) => {
704 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, 793 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
705 evaluationNote: info.evaluationNote || null, 794 evaluationNote: info.evaluationNote || null,
706 evaluationAgencyGuid: info.evaluationAgencyGuid, 795 evaluationAgencyGuid: info.evaluationAgencyGuid,
796 assessmentMoney: info.assessmentMoney,
797 assessmentDate: info.assessmentDate,
798 assessmentNote: info.assessmentNote,
799 assessmentFile: info.assessmentFile.map(file => {
800 return {
801 name: file.name,
802 url: file.url
803 }
804 }) || []
707 }).then((res: any) => { 805 }).then((res: any) => {
708 dialogInfo.value.footer.btns[1].loading = false; 806 dialogInfo.value.footer.btns[1].loading = false;
709 if (res?.code == proxy.$passCode) { 807 if (res?.code == proxy.$passCode) {
...@@ -733,6 +831,15 @@ const dialogBtnClick = (btn, info) => { ...@@ -733,6 +831,15 @@ const dialogBtnClick = (btn, info) => {
733 } 831 }
734 }) || [], 832 }) || [],
735 evaluationAgencyGuid: info.evaluationAgencyGuid, 833 evaluationAgencyGuid: info.evaluationAgencyGuid,
834 assessmentMoney: info.assessmentMoney,
835 assessmentDate: info.assessmentDate,
836 assessmentNote: info.assessmentNote,
837 assessmentFile: info.assessmentFile.map(file => {
838 return {
839 name: file.name,
840 url: file.url
841 }
842 }) || []
736 } 843 }
737 } else { 844 } else {
738 //未通过质量评估发起资产申请 845 //未通过质量评估发起资产申请
...@@ -758,6 +865,15 @@ const dialogBtnClick = (btn, info) => { ...@@ -758,6 +865,15 @@ const dialogBtnClick = (btn, info) => {
758 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, 865 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
759 evaluationNote: info.evaluationNote, 866 evaluationNote: info.evaluationNote,
760 evaluationAgencyGuid: info.evaluationAgencyGuid, 867 evaluationAgencyGuid: info.evaluationAgencyGuid,
868 assessmentMoney: info.assessmentMoney,
869 assessmentDate: info.assessmentDate,
870 assessmentNote: info.assessmentNote,
871 assessmentFile: info.assessmentFile.map(file => {
872 return {
873 name: file.name,
874 url: file.url
875 }
876 }) || []
761 } 877 }
762 } 878 }
763 saveCostAssess(params).then((res: any) => { 879 saveCostAssess(params).then((res: any) => {
...@@ -1219,7 +1335,8 @@ const passCommonDialogBtnClick = (btn, info) => { ...@@ -1219,7 +1335,8 @@ const passCommonDialogBtnClick = (btn, info) => {
1219 <div class="table_panel_wrap"> 1335 <div class="table_panel_wrap">
1220 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 1336 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
1221 </div> 1337 </div>
1222 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @selectChange="handleSelectChange" /> 1338 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" @selectChange="handleSelectChange"
1339 @inputChange="dialogInputChange" />
1223 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" /> 1340 <Dialog :dialogInfo="passDialogInfo" @btnClick="passDialogBtnClick" @inputChange="passDialogInputChange" />
1224 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" /> 1341 <Dialog :dialogInfo="rejectDialogInfo" @btnClick="rejectDialogBtnClick" />
1225 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" /> 1342 <Dialog :dialogInfo="passCommonDialogInfo" @btnClick="passCommonDialogBtnClick" />
......
...@@ -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 ]
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!