2ee7a970 by lihua

fix: 解决评估机构的问题

1 parent 5e9aa653
...@@ -39,7 +39,7 @@ watch([ ...@@ -39,7 +39,7 @@ watch([
39 ], () => { 39 ], () => {
40 if (settingsStore.settings.app.enableDynamicTitle && settingsStore.title) { 40 if (settingsStore.settings.app.enableDynamicTitle && settingsStore.title) {
41 const title = typeof settingsStore.title === 'function' ? settingsStore.title() : settingsStore.title 41 const title = typeof settingsStore.title === 'function' ? settingsStore.title() : settingsStore.title
42 document.title = `${title}` 42 document.title = `${title} - ${import.meta.env.VITE_APP_TITLE}`
43 } 43 }
44 else { 44 else {
45 document.title = import.meta.env.VITE_APP_TITLE 45 document.title = import.meta.env.VITE_APP_TITLE
......
...@@ -96,6 +96,13 @@ export const getTenantDetailInfo = (params) => request({ ...@@ -96,6 +96,13 @@ export const getTenantDetailInfo = (params) => request({
96 method: 'get' 96 method: 'get'
97 }) 97 })
98 98
99 // 查看人员详情
100 export const getStaffDetailInfo = (params) => request({
101 url: `${import.meta.env.VITE_APP_PERSONAL_URL}/staff/getByGuid/${params}`,
102 method: 'get'
103 })
104
105
99 106
100 /** 107 /**
101 * 日志管理 108 * 日志管理
......
...@@ -13,10 +13,13 @@ import { ...@@ -13,10 +13,13 @@ import {
13 saveQuality, 13 saveQuality,
14 qualityAllow, 14 qualityAllow,
15 deleteQuality, 15 deleteQuality,
16 updatQuality 16 updatQuality,
17 } from "@/api/modules/dataAsset"; 17 } from "@/api/modules/dataAsset";
18 import useUserStore from "@/store/modules/user"; 18 import useUserStore from "@/store/modules/user";
19 import useDataAssetStore from "@/store/modules/dataAsset"; 19 import useDataAssetStore from "@/store/modules/dataAsset";
20 import {
21 getStaffDetailInfo
22 } from "@/api/modules/queryService";
20 import { rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise } from "@/api/modules/workFlowService"; 23 import { rejectFlowData, revokeFlowData, getCamundaDeploymentId, getProcessNodesPromise } from "@/api/modules/workFlowService";
21 24
22 const assetStore = useDataAssetStore(); 25 const assetStore = useDataAssetStore();
...@@ -41,7 +44,7 @@ const tableFields = ref([ ...@@ -41,7 +44,7 @@ const tableFields = ref([
41 44
42 const deploymentId = ref(''); 45 const deploymentId = ref('');
43 46
44 onBeforeMount(() => { 47 onMounted(() => {
45 getCamundaDeploymentId('10018', userData.tenantGuid, userData.staffGuid).then((res: any) => { 48 getCamundaDeploymentId('10018', userData.tenantGuid, userData.staffGuid).then((res: any) => {
46 if (res.code == proxy.$passCode) { 49 if (res.code == proxy.$passCode) {
47 deploymentId.value = res.data; 50 deploymentId.value = res.data;
...@@ -413,57 +416,64 @@ const dialogBtnClick = (btn, info) => { ...@@ -413,57 +416,64 @@ const dialogBtnClick = (btn, info) => {
413 processInstanceId: null, 416 processInstanceId: null,
414 }).then((res: any) => { 417 }).then((res: any) => {
415 if (res?.code == proxy.$passCode) { 418 if (res?.code == proxy.$passCode) {
416 if (dialogInfo.value.type == 'reSubmit') { 419 getStaffDetailInfo(res.data?.[1]?.candidateUsers?.[0]?.staffGuid).then((resUser: any) => {
417 updatQuality({ 420 if (resUser?.code == proxy.$passCode) {
418 guid: currTableData.value.guid, 421 if (dialogInfo.value.type == 'reSubmit') {
419 tenantGuid: userData.tenantGuid, 422 updatQuality({
420 damGuid: currTableData.value.damGuid, 423 guid: currTableData.value.guid,
421 daName: currTableData.value.daName, 424 tenantGuid: userData.tenantGuid,
422 immediateApprove: true, 425 damGuid: currTableData.value.damGuid,
423 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid, 426 daName: currTableData.value.daName,
424 qualityEvaluationFile: info.qualityEvaluationFile?.map(file => { 427 immediateApprove: true,
425 return { 428 evaluationAgencyGuid: resUser.data?.tenantGuid,
426 name: file.name, 429 qualityEvaluationFile: info.qualityEvaluationFile?.map(file => {
427 url: file.url 430 return {
428 } 431 name: file.name,
429 }) || [] 432 url: file.url
430 }).then((res: any) => { 433 }
431 dialogInfo.value.footer.btns[1].loading = false; 434 }) || []
432 if (res?.code == proxy.$passCode) { 435 }).then((res: any) => {
433 ElMessage.success('该资产质量评价重新提交成功'); 436 dialogInfo.value.footer.btns[1].loading = false;
434 dialogInfo.value.visible = false; 437 if (res?.code == proxy.$passCode) {
435 page.value.curr = 1; 438 ElMessage.success('该资产质量评价重新提交成功');
436 getTableData(); 439 dialogInfo.value.visible = false;
440 page.value.curr = 1;
441 getTableData();
442 } else {
443 ElMessage.error(res.msg);
444 }
445 })
437 } else { 446 } else {
438 ElMessage.error(res.msg); 447 let daInfo = assetListData.value.find(a => a.guid == info.damGuid);
448 saveQuality({
449 tenantGuid: userData.tenantGuid,
450 damGuid: info.damGuid,
451 daName: daInfo.damName,
452 immediateApprove: true,
453 evaluationAgencyGuid: resUser.data?.tenantGuid,
454 qualityEvaluationFile: info.qualityEvaluationFile?.map(file => {
455 return {
456 name: file.name,
457 url: file.url
458 }
459 }) || []
460 }).then((res: any) => {
461 dialogInfo.value.footer.btns[1].loading = false;
462 if (res?.code == proxy.$passCode) {
463 ElMessage.success('质量评价发起成功');
464 dialogInfo.value.visible = false;
465 page.value.curr = 1;
466 getTableData();
467 } else {
468 ElMessage.error(res.msg);
469 }
470 })
439 } 471 }
440 }) 472 } else {
441 } else {
442 let daInfo = assetListData.value.find(a => a.guid == info.damGuid);
443 saveQuality({
444 tenantGuid: userData.tenantGuid,
445 damGuid: info.damGuid,
446 daName: daInfo.damName,
447 immediateApprove: true,
448 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
449 qualityEvaluationFile: info.qualityEvaluationFile?.map(file => {
450 return {
451 name: file.name,
452 url: file.url
453 }
454 }) || []
455 }).then((res: any) => {
456 dialogInfo.value.footer.btns[1].loading = false; 473 dialogInfo.value.footer.btns[1].loading = false;
457 if (res?.code == proxy.$passCode) { 474 ElMessage.error(res.msg);
458 ElMessage.success('质量评价发起成功'); 475 }
459 dialogInfo.value.visible = false; 476 })
460 page.value.curr = 1;
461 getTableData();
462 } else {
463 ElMessage.error(res.msg);
464 }
465 })
466 }
467 } else { 477 } else {
468 dialogInfo.value.footer.btns[1].loading = false; 478 dialogInfo.value.footer.btns[1].loading = false;
469 ElMessage.error(res.msg); 479 ElMessage.error(res.msg);
......
...@@ -17,7 +17,7 @@ import { ...@@ -17,7 +17,7 @@ import {
17 costAssessAllow 17 costAssessAllow
18 } from "@/api/modules/dataAsset"; 18 } from "@/api/modules/dataAsset";
19 import { 19 import {
20 getTenantAttach 20 getStaffDetailInfo
21 } from "@/api/modules/queryService"; 21 } from "@/api/modules/queryService";
22 import useUserStore from "@/store/modules/user"; 22 import useUserStore from "@/store/modules/user";
23 import useDataAssetStore from "@/store/modules/dataAsset"; 23 import useDataAssetStore from "@/store/modules/dataAsset";
...@@ -741,106 +741,111 @@ const dialogBtnClick = (btn, info) => { ...@@ -741,106 +741,111 @@ const dialogBtnClick = (btn, info) => {
741 deploymentId: deploymentId.value, 741 deploymentId: deploymentId.value,
742 processInstanceId: null, 742 processInstanceId: null,
743 }).then((res: any) => { 743 }).then((res: any) => {
744 console.log('res', res); 744 getStaffDetailInfo(res.data?.[1]?.candidateUsers?.[0]?.staffGuid).then((resUser: any) => {
745 if (dialogInfo.value.type == 'reSubmit') { 745 if (resUser?.code == proxy.$passCode) {
746 if (reSubmitPromise.value) { 746 if (dialogInfo.value.type == 'reSubmit') {
747 return; 747 if (reSubmitPromise.value) {
748 } 748 return;
749 reSubmitPromise.value = updateCostAssess({
750 guid: currTableData.value.guid,
751 immediateApprove: true,
752 tenantGuid: userData.tenantGuid,
753 daName: currTableData.value.daName,
754 damGuid: currTableData.value.damGuid,
755 costAssessmentFile: info.costAssessmentFile?.map(file => {
756 return {
757 name: file.name,
758 url: file.url
759 }
760 }) || [],
761 evaluationFile: info.evaluationFile?.map(file => {
762 return {
763 name: file.name,
764 url: file.url
765 } 749 }
766 }) || [], 750 reSubmitPromise.value = updateCostAssess({
767 qualityScore: info.qualityScore || null, 751 guid: currTableData.value.guid,
768 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null, 752 immediateApprove: true,
769 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, 753 tenantGuid: userData.tenantGuid,
770 evaluationNote: info.evaluationNote || null, 754 daName: currTableData.value.daName,
771 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid, 755 damGuid: currTableData.value.damGuid,
772 }).then((res: any) => { 756 costAssessmentFile: info.costAssessmentFile?.map(file => {
773 reSubmitPromise.value = null; 757 return {
774 if (res?.code == proxy.$passCode) { 758 name: file.name,
775 ElMessage.success('该资产价值评估重新提交成功'); 759 url: file.url
776 dialogInfo.value.visible = false; 760 }
777 page.value.curr = 1; 761 }) || [],
778 getTableData(); 762 evaluationFile: info.evaluationFile?.map(file => {
779 formItems.value[4].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`; 763 return {
764 name: file.name,
765 url: file.url
766 }
767 }) || [],
768 qualityScore: info.qualityScore || null,
769 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
770 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
771 evaluationNote: info.evaluationNote || null,
772 evaluationAgencyGuid: resUser.data?.tenantGuid,
773 }).then((res: any) => {
774 reSubmitPromise.value = null;
775 if (res?.code == proxy.$passCode) {
776 ElMessage.success('该资产价值评估重新提交成功');
777 dialogInfo.value.visible = false;
778 page.value.curr = 1;
779 getTableData();
780 formItems.value[4].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
781 } else {
782 ElMessage.error(res.msg);
783 }
784 })
780 } else { 785 } else {
781 ElMessage.error(res.msg); 786 if (savePromise.value) {
782 } 787 return;
783 }) 788 }
784 } else { 789 let params: any = {};
785 if (savePromise.value) { 790 let daInfo = assetListData.value.find(a => a.guid == info.registerGuid);
786 return; 791 if (daInfo.qualityEvaluationGuid) {
787 } 792 //通过质量评估发起资产申请
788 let params: any = {}; 793 params = {
789 let daInfo = assetListData.value.find(a => a.guid == info.registerGuid); 794 immediateApprove: true,
790 if (daInfo.qualityEvaluationGuid) { 795 tenantGuid: userData.tenantGuid,
791 //通过质量评估发起资产申请 796 daName: daInfo.damName,
792 params = { 797 damGuid: daInfo.guid,
793 immediateApprove: true, 798 costAssessmentFile: info.costAssessmentFile?.map(file => {
794 tenantGuid: userData.tenantGuid, 799 return {
795 daName: daInfo.damName, 800 name: file.name,
796 damGuid: daInfo.guid, 801 url: file.url
797 costAssessmentFile: info.costAssessmentFile?.map(file => { 802 }
798 return { 803 }) || [],
799 name: file.name, 804 evaluationAgencyGuid: resUser.data?.tenantGuid,
800 url: file.url
801 } 805 }
802 }) || [], 806 } else {
803 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid, 807 //未通过质量评估发起资产申请
804 } 808 params = {
805 } else { 809 immediateApprove: true,
806 //未通过质量评估发起资产申请 810 tenantGuid: userData.tenantGuid,
807 params = { 811 daName: daInfo.damName,
808 immediateApprove: true, 812 damGuid: daInfo.guid,
809 tenantGuid: userData.tenantGuid, 813 costAssessmentFile: info.costAssessmentFile?.map(file => {
810 daName: daInfo.damName, 814 return {
811 damGuid: daInfo.guid, 815 name: file.name,
812 costAssessmentFile: info.costAssessmentFile?.map(file => { 816 url: file.url
813 return { 817 }
814 name: file.name, 818 }) || [],
815 url: file.url 819 evaluationFile: info.evaluationFile?.map(file => {
820 return {
821 name: file.name,
822 url: file.url
823 }
824 }) || [],
825 qualityScore: info.qualityScore,
826 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
827 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
828 evaluationNote: info.evaluationNote,
829 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
816 } 830 }
817 }) || [], 831 }
818 evaluationFile: info.evaluationFile?.map(file => { 832 console.log('daInfo', daInfo, info);
819 return { 833 savePromise.value = saveCostAssess(params).then((res: any) => {
820 name: file.name, 834 savePromise.value = null;
821 url: file.url 835 if (res?.code == proxy.$passCode) {
836 ElMessage.success('价值评估发起成功');
837 dialogInfo.value.visible = false;
838 page.value.curr = 1;
839 getTableData();
840 } else {
841 ElMessage.error(res.msg);
822 } 842 }
823 }) || [], 843 })
824 qualityScore: info.qualityScore,
825 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
826 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
827 evaluationNote: info.evaluationNote,
828 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
829 } 844 }
845 } else {
846 ElMessage.error(res.msg);
830 } 847 }
831 console.log('daInfo', daInfo, info); 848 });
832 savePromise.value = saveCostAssess(params).then((res: any) => {
833 savePromise.value = null;
834 if (res?.code == proxy.$passCode) {
835 ElMessage.success('价值评估发起成功');
836 dialogInfo.value.visible = false;
837 page.value.curr = 1;
838 getTableData();
839 } else {
840 ElMessage.error(res.msg);
841 }
842 })
843 }
844 }) 849 })
845 } else if (btn.value == 'cancel') { 850 } else if (btn.value == 'cancel') {
846 dialogInfo.value.visible = false; 851 dialogInfo.value.visible = false;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!