ee285f11 by lxs

数据资产登记更新

1 parent a04a9a71
...@@ -209,6 +209,7 @@ const getTenantDetail = () => { ...@@ -209,6 +209,7 @@ const getTenantDetail = () => {
209 } 209 }
210 210
211 const setBaseFormItemsValue = (info) => { 211 const setBaseFormItemsValue = (info) => {
212 let attach = info.registerAttachment || {};
212 baseFormItems.value.forEach(item => { 213 baseFormItems.value.forEach(item => {
213 if (item.field == 'coverageArea') { 214 if (item.field == 'coverageArea') {
214 item.default = info.coverageArea; 215 item.default = info.coverageArea;
...@@ -270,34 +271,30 @@ const setBaseFormItemsValue = (info) => { ...@@ -270,34 +271,30 @@ const setBaseFormItemsValue = (info) => {
270 } else { 271 } else {
271 item.children[1].visible = false; 272 item.children[1].visible = false;
272 } 273 }
274 } else if (item.field === 'costAssessmentInstitutionGuid') {
275 item.default = attach.costAssessmentInstitutionGuid ? attach.costAssessmentInstitutionGuid : (attach.costAssessmentInstitution || info.costAssessmentInstitutionGuid);
276 } else if (item.field === 'qualityEvaluationInstitutionGuid') {
277 item.default = attach.qualityEvaluationInstitutionGuid ? attach.qualityEvaluationInstitutionGuid : (attach.qualityEvaluationInstitution || info.qualityEvaluationInstitutionGuid);
273 } 278 }
274 // else if (item.field == 'isEvaluationAssessment') {
275 // item.default = info[item.field];
276 // if (info['isEvaluationAssessment'] === 'Y') {
277 // uploadFormItems.value[2].visible = true;
278 // uploadFormItems.value[3].visible = true
279 // } else {
280 // uploadFormItems.value[2].visible = false;
281 // uploadFormItems.value[3].visible = false
282 // }
283 // }
284 else if (item.field == 'isQualityAssessment') { 279 else if (item.field == 'isQualityAssessment') {
285 item.default = info[item.field]; 280 item.default = info[item.field];
281 let quality = baseFormItems.value.find(item => item.field == 'qualityEvaluationInstitutionGuid');
286 if (info['isQualityAssessment'] === 'Y') { 282 if (info['isQualityAssessment'] === 'Y') {
283 quality && (quality.visible = true);
287 uploadFormItems.value[2].visible = true; 284 uploadFormItems.value[2].visible = true;
288 uploadFormItems.value[3].visible = true;
289 } else { 285 } else {
286 quality && (quality.visible = false);
290 uploadFormItems.value[2].visible = false; 287 uploadFormItems.value[2].visible = false;
291 uploadFormItems.value[3].visible = false;
292 } 288 }
293 } else if (item.field == 'isCostAssessment') { 289 } else if (item.field == 'isCostAssessment') {
294 item.default = info[item.field]; 290 item.default = info[item.field];
291 let quality = baseFormItems.value.find(item => item.field == 'costAssessmentInstitutionGuid');
295 if (info['isCostAssessment'] === 'Y') { 292 if (info['isCostAssessment'] === 'Y') {
296 uploadFormItems.value[4].visible = true; 293 quality && (quality.visible = true);
297 uploadFormItems.value[5].visible = true; 294 uploadFormItems.value[3].visible = true;
298 } else { 295 } else {
299 uploadFormItems.value[4].visible = false; 296 quality && (quality.visible = false);
300 uploadFormItems.value[5].visible = false; 297 uploadFormItems.value[3].visible = false;
301 } 298 }
302 } else { 299 } else {
303 item.default = info[item.field]; 300 item.default = info[item.field];
...@@ -336,10 +333,6 @@ const setUploadFormItemsValue = (info) => { ...@@ -336,10 +333,6 @@ const setUploadFormItemsValue = (info) => {
336 } 333 }
337 item.default = commitmentLetter; 334 item.default = commitmentLetter;
338 item.templateUrl = attachDataInfo.value['commitment-letter']; 335 item.templateUrl = attachDataInfo.value['commitment-letter'];
339 } else if (item.field === 'costAssessmentInstitutionGuid') {
340 item.default = attach.costAssessmentInstitutionGuid ? attach.costAssessmentInstitutionGuid : attach.costAssessmentInstitution;
341 } else if (item.field === 'qualityEvaluationInstitutionGuid') {
342 item.default = attach.qualityEvaluationInstitutionGuid ? attach.qualityEvaluationInstitutionGuid : attach.qualityEvaluationInstitution;
343 } 336 }
344 }); 337 });
345 } 338 }
...@@ -418,202 +411,6 @@ const getRegisterCatalogListData = (dam: any = {}) => { ...@@ -418,202 +411,6 @@ const getRegisterCatalogListData = (dam: any = {}) => {
418 }); 411 });
419 } 412 }
420 413
421 onActivated(() => {
422 // getRegisterCatalogListData();
423 })
424
425 onBeforeMount(() => {
426 restart.value = localStorage.getItem('isRestart') ? true : false;
427 if (guid) {
428 fullscreenLoading.value = true;
429 getRegiaterDetail({ guid: guid }).then((res: any) => {
430 fullscreenLoading.value = false;
431 if (res.code == proxy.$passCode) {
432 const data = res.data || {}
433 let { approveVO } = data;
434 draftDetailInfo.value = data;
435 deploymentId.value = approveVO?.camundaDeploymentId;
436 processInstanceId.value = approveVO?.camundaInstanceId
437 let coverageArea = '';
438 let coverageAreas = [];
439 let damTypeItem = baseFormItems.value.find(item => item.field == 'damType');
440 let dataScaleItem = baseFormItems.value.find(item => item.field == 'dataScale');
441 damTypeItem.disabled = draftDetailInfo.value.damGuid ? true : false;
442 if (registerCatalogList.value.length) {
443 let da = registerCatalogList.value.find(r => r.guid == draftDetailInfo.value.damGuid);
444 if (da && da.dataCount != null) {
445 dataScaleItem.disabled = true;
446 draftDetailInfo.value.dataScale == null && (draftDetailInfo.value.dataScale = da.dataCount);
447 } else {
448 dataScaleItem.disabled = false;
449 }
450 }
451 let subjectItem = baseFormItems.value.find(item => item.field == 'subjectDomain');
452 if (subjectItem) {
453 let tree = draftDetailInfo.value.subjectDomainTree?.[0];
454 if (tree) {
455 if (!tree.children[0]?.children?.[0]?.children) {
456 subjectItem.expandKeys = tree.children[0]?.children?.[0].parentGuids;
457 } else if (!tree.children[0]?.children?.[0]?.children?.[0]?.children) {
458 subjectItem.expandKeys = tree.children[0]?.children?.[0]?.children?.[0]?.parentGuids;
459 }
460 }
461 }
462 if (data.coverageArea?.[0]?.[0] == 'all') {
463 coverageArea = 'all';
464 setBaseFormItemsValue({ ...draftDetailInfo.value, daName: draftDetailInfo.value.damGuid ? draftDetailInfo.value.damGuid : draftDetailInfo.value.daName, coverageArea: coverageArea, coverageAreas: coverageAreas, dateRange: draftDetailInfo.value.dataStartDate ? [draftDetailInfo.value.dataStartDate, draftDetailInfo.value.dataEndDate] : null });
465 } else {
466 coverageAreas = data.coverageArea || [];
467 let p: any = [];
468 data.coverageArea.forEach(area => {
469 if (p.includes(area[0])) {
470 return;
471 }
472 p.push(area[0]);
473 getArea({ value: area[0], level: 1 }, () => { })
474 });
475 let ps: any = []
476 for (const key in getAreaDataPromise.value) {
477 ps.push(getAreaDataPromise.value[key])
478 }
479 Promise.all(ps).then(() => {
480 setBaseFormItemsValue({ ...draftDetailInfo.value, daName: draftDetailInfo.value.damGuid ? draftDetailInfo.value.damGuid : draftDetailInfo.value.daName, coverageArea: coverageArea, coverageAreas: coverageAreas, dateRange: draftDetailInfo.value.dataStartDate ? [draftDetailInfo.value.dataStartDate, draftDetailInfo.value.dataEndDate] : null });
481 });
482 }
483 if (data.exchangeGuid) {
484 getTenantAttach(userData.tenantGuid).then((res: any) => {
485 if (res?.code == proxy.$passCode) {
486 Object.assign(attachDataInfo.value, res.data || {});
487 uploadFormItems.value[0].templateUrl = attachDataInfo.value.register_letter;
488 uploadFormItems.value[1].templateUrl = attachDataInfo.value['commitment-letter'];
489 setUploadFormItemsValue(draftDetailInfo.value);
490 } else {
491 ElMessage.error(res.msg);
492 setUploadFormItemsValue(draftDetailInfo.value);
493 }
494 })
495 setUploadFormItemsValue(draftDetailInfo.value);
496 } else {
497 setUploadFormItemsValue(draftDetailInfo.value);
498 }
499 let officeLocation = draftDetailInfo.value.officeLocation || [];
500 if (officeLocation.length) {
501 let p: any = [];
502 officeLocation.forEach(area => {
503 if (p.includes(area[0])) {
504 return;
505 }
506 p.push(area[0]);
507 getArea1({ value: area[0], level: 1 }, () => { })
508 });
509 let ps: any = []
510 for (const key in getAreaDataPromise.value) {
511 ps.push(getAreaDataPromise.value[key])
512 }
513 Promise.all(ps).then(() => {
514 setPropertyFormItemsValue(draftDetailInfo.value);
515 });
516 } else {
517 setPropertyFormItemsValue(draftDetailInfo.value);
518 }
519 getRegisterCatalogListData({ damName: data.daName, damGuid: data.damGuid });
520 } else {
521 ElMessage.error(res.msg);
522 }
523 });
524 } else {
525 getCamundaDeploymentId('10016').then((res: any) => {
526 if (res.code == proxy.$passCode) {
527 deploymentId.value = res.data;
528 } else {
529 ElMessage.error(res.msg);
530 }
531 })
532 getRegisterCatalogListData();
533 }
534
535 getTenantDetail();
536 getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => {
537 if (res?.code == proxy.$passCode) {
538 parentAreaData.value = res.data ?? [];
539 return parentAreaData.value;
540 }
541 })
542 // getTenantAttach(userData.tenantGuid).then((res: any) => {
543 // if (res?.code == proxy.$passCode) {
544 // console.log(res.data);
545 // Object.assign(attachDataInfo.value, res.data || {});
546 // uploadFormItems.value[2].templateUrl = attachDataInfo.value.quality_evaluation_file;
547 // uploadFormItems.value[3].templateUrl = attachDataInfo.value.cost_assessment_file;
548 // } else {
549 // ElMessage.error(res.msg);
550 // }
551 // })
552 // 获取资产类型
553 getParamsList({ dictType: '资产类型' }).then((res: any) => {
554 if (res.code == proxy.$passCode) {
555 damTypes.value = res.data || [];
556 let item = baseFormItems.value.find(item => item.field == 'damType');
557 item && (item.options = damTypes.value.map(type => {
558 const info = { ...type };
559 if (type.paramValue == '1' || type.paramValue == '2') {
560 info.disabled = true;
561 } else {
562 info.disabled = false;
563 }
564 return info;
565 }));
566 } else {
567 proxy.$ElMessage.error(res.msg);
568 }
569 })
570 // 获取数据资产目录主题
571 getParamsList({ dictType: '数据资产目录主题名称' }).then((res: any) => {
572 if (res.code == proxy.$passCode) {
573 const data = res.data || [];
574 subjectDomainListData.value = data;
575 let item = baseFormItems.value.find(item => item.field == 'subjectDomain');
576 item && (item.options = subjectDomainListData.value);
577 } else {
578 proxy.$ElMessage.error(res.msg);
579 }
580 })
581 // 获取数交所数据
582 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "130" }).then((res: any) => {
583 if (res.code == proxy.$passCode) {
584 const data = res.data.records ?? [];
585 currTenantChanged.value = data;
586 let formItem = baseFormItems.value.find(f => f.field === 'exchangeGuid');
587 formItem.options = currTenantChanged.value;
588 formItem.default = exGuid;
589 serviceTenants.value = data.filter(d => d.guid !== exGuid);
590 let item2 = baseFormItems.value.find(f => f.field === 'rules');
591 item2.children[1].options = serviceTenants.value;
592 } else {
593 proxy.$ElMessage.error(res.msg);
594 }
595 })
596 // 获取质量评估机构
597 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
598 if (res.code == proxy.$passCode) {
599 qualityEvaluationData.value = res.data.records || [];
600 let item = uploadFormItems.value.find(item => item.field == 'qualityEvaluationInstitutionGuid');
601 item && (item.options = qualityEvaluationData.value);
602 } else {
603 proxy.$ElMessage.error(res.msg);
604 }
605 })
606 // 获取价值评估机构
607 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12504" }).then((res: any) => {
608 if (res.code == proxy.$passCode) {
609 costAssessmentData.value = res.data.records || [];
610 let item = uploadFormItems.value.find(item => item.field == 'costAssessmentInstitutionGuid');
611 item && (item.options = costAssessmentData.value);
612 } else {
613 proxy.$ElMessage.error(res.msg);
614 }
615 })
616 });
617 414
618 const tabsInfo = ref({ 415 const tabsInfo = ref({
619 visible: false, 416 visible: false,
...@@ -868,6 +665,26 @@ const baseFormItems: any = ref([ ...@@ -868,6 +665,26 @@ const baseFormItems: any = ref([
868 required: true, 665 required: true,
869 }, 666 },
870 { 667 {
668 label: '质量评估机构',
669 type: 'select',
670 placeholder: '请选择',
671 field: 'qualityEvaluationInstitutionGuid',
672 default: '',
673 options: [],
674 props: {
675 label: 'tenantName',
676 value: 'guid'
677 },
678 required: true,
679 filterable: true,
680 allowCreate: true,
681 clearable: true,
682 style: {
683 width: 'calc(33.33% - 6px)!important'
684 },
685 visible: false,
686 },
687 {
871 label: "是否完成价值评估", 688 label: "是否完成价值评估",
872 type: "radio-group", 689 type: "radio-group",
873 placeholder: "", 690 placeholder: "",
...@@ -886,6 +703,26 @@ const baseFormItems: any = ref([ ...@@ -886,6 +703,26 @@ const baseFormItems: any = ref([
886 required: true, 703 required: true,
887 }, 704 },
888 { 705 {
706 label: '价值评估机构',
707 type: 'select',
708 placeholder: '请选择',
709 field: 'costAssessmentInstitutionGuid',
710 default: '',
711 options: [],
712 props: {
713 label: 'tenantName',
714 value: 'guid'
715 },
716 required: true,
717 filterable: true,
718 allowCreate: true,
719 clearable: true,
720 style: {
721 width: 'calc(33.33% - 6px)!important'
722 },
723 visible: false,
724 },
725 {
889 label: "数据分类", 726 label: "数据分类",
890 type: "radio-group", 727 type: "radio-group",
891 placeholder: "", 728 placeholder: "",
...@@ -1310,6 +1147,12 @@ const baseFormRules = ref({ ...@@ -1310,6 +1147,12 @@ const baseFormRules = ref({
1310 limitApplicationScenarios: [ 1147 limitApplicationScenarios: [
1311 { required: true, trigger: 'blur', message: "请填写数据资产应用限制场景" } 1148 { required: true, trigger: 'blur', message: "请填写数据资产应用限制场景" }
1312 ], 1149 ],
1150 qualityEvaluationInstitutionGuid: [
1151 { required: true, trigger: 'change', message: "请选择质量评估机构" }
1152 ],
1153 costAssessmentInstitutionGuid: [
1154 { required: true, trigger: 'change', message: "请选择价值评估机构" }
1155 ],
1313 }) 1156 })
1314 1157
1315 const baseSelectChange = (val, item, row) => { 1158 const baseSelectChange = (val, item, row) => {
...@@ -1407,6 +1250,10 @@ const baseSelectChange = (val, item, row) => { ...@@ -1407,6 +1250,10 @@ const baseSelectChange = (val, item, row) => {
1407 }); 1250 });
1408 setBaseFormItemsValue(row); 1251 setBaseFormItemsValue(row);
1409 } 1252 }
1253 } else if (item.field == 'qualityEvaluationInstitutionGuid') {
1254 qualityEvaluationInstitution.value = val && item.options.find(o => o.guid == val) ? '' : (val || '');
1255 } else if (item.field == 'costAssessmentInstitutionGuid') {
1256 costAssessmentInstitution.value = val && item.options.find(o => o.guid == val) ? '' : (val || '');
1410 } 1257 }
1411 } 1258 }
1412 1259
...@@ -1753,7 +1600,8 @@ const propertyRadioGroupChange = (val, row, item) => { ...@@ -1753,7 +1600,8 @@ const propertyRadioGroupChange = (val, row, item) => {
1753 } 1600 }
1754 1601
1755 const uploadFormRef = ref(); 1602 const uploadFormRef = ref();
1756 1603 const qualityEvaluationInstitution = ref('');
1604 const costAssessmentInstitution = ref('');
1757 /** 资产内容 */ 1605 /** 资产内容 */
1758 const uploadFormItems: any = ref([ 1606 const uploadFormItems: any = ref([
1759 { 1607 {
...@@ -1765,7 +1613,6 @@ const uploadFormItems: any = ref([ ...@@ -1765,7 +1613,6 @@ const uploadFormItems: any = ref([
1765 default: [], 1613 default: [],
1766 field: 'registerLetter', 1614 field: 'registerLetter',
1767 visible: true, 1615 visible: true,
1768 col: 'col2',
1769 }, 1616 },
1770 { 1617 {
1771 label: '承诺函附件', 1618 label: '承诺函附件',
...@@ -1775,7 +1622,6 @@ const uploadFormItems: any = ref([ ...@@ -1775,7 +1622,6 @@ const uploadFormItems: any = ref([
1775 required: false, 1622 required: false,
1776 default: [], 1623 default: [],
1777 field: 'commitmentLetter', 1624 field: 'commitmentLetter',
1778 col: 'col2',
1779 }, 1625 },
1780 { 1626 {
1781 label: '上传质量评估报告', 1627 label: '上传质量评估报告',
...@@ -1784,61 +1630,19 @@ const uploadFormItems: any = ref([ ...@@ -1784,61 +1630,19 @@ const uploadFormItems: any = ref([
1784 accept: '.png, .pdf', 1630 accept: '.png, .pdf',
1785 required: true, 1631 required: true,
1786 default: [], 1632 default: [],
1787 col: 'mr8',
1788 field: 'evaluationFile', 1633 field: 'evaluationFile',
1789 visible: false, 1634 visible: false,
1790 }, 1635 },
1791 { 1636 {
1792 label: '质量评估机构',
1793 type: 'select',
1794 placeholder: '请选择',
1795 field: 'qualityEvaluationInstitutionGuid',
1796 default: '',
1797 options: [],
1798 props: {
1799 label: 'tenantName',
1800 value: 'guid'
1801 },
1802 required: true,
1803 filterable: true,
1804 allowCreate: true,
1805 clearable: true,
1806 style: {
1807 width: 'calc(33.33% - 6px)!important'
1808 },
1809 visible: false,
1810 },
1811 {
1812 label: '上传价值评估报告', 1637 label: '上传价值评估报告',
1813 tip: '支持扩展名:.png, .pdf,单个文件不得大于5M', 1638 tip: '支持扩展名:.png, .pdf,单个文件不得大于5M',
1814 type: 'upload-file', 1639 type: 'upload-file',
1815 accept: '.png, .pdf', 1640 accept: '.png, .pdf',
1816 required: true, 1641 required: true,
1817 default: [], 1642 default: [],
1818 col: 'mr8',
1819 field: 'assessmentFile', 1643 field: 'assessmentFile',
1820 visible: false, 1644 visible: false,
1821 }, 1645 },
1822 {
1823 label: '价值评估机构',
1824 type: 'select',
1825 placeholder: '请选择',
1826 field: 'costAssessmentInstitutionGuid',
1827 default: '',
1828 options: [],
1829 props: {
1830 label: 'tenantName',
1831 value: 'guid'
1832 },
1833 required: true,
1834 filterable: true,
1835 allowCreate: true,
1836 clearable: true,
1837 style: {
1838 width: 'calc(33.33% - 6px)!important'
1839 },
1840 visible: false,
1841 },
1842 ]); 1646 ]);
1843 1647
1844 const uploadFormRules = ref({ 1648 const uploadFormRules = ref({
...@@ -1851,12 +1655,6 @@ const uploadFormRules = ref({ ...@@ -1851,12 +1655,6 @@ const uploadFormRules = ref({
1851 } 1655 }
1852 }, trigger: 'change' 1656 }, trigger: 'change'
1853 }], 1657 }],
1854 qualityEvaluationInstitutionGuid: [
1855 { required: true, trigger: 'change', message: "请选择质量评估机构" }
1856 ],
1857 costAssessmentInstitutionGuid: [
1858 { required: true, trigger: 'change', message: "请选择价值评估机构" }
1859 ],
1860 evaluationFile: [{ 1658 evaluationFile: [{
1861 validator: (rule: any, value: any, callback: any) => { 1659 validator: (rule: any, value: any, callback: any) => {
1862 if (!value?.length) { 1660 if (!value?.length) {
...@@ -1877,6 +1675,10 @@ const uploadFormRules = ref({ ...@@ -1877,6 +1675,10 @@ const uploadFormRules = ref({
1877 }], 1675 }],
1878 }); 1676 });
1879 1677
1678 const contentRef = ref();
1679 const deploymentId = ref('');
1680 const processInstanceId = ref('');
1681
1880 const cancel = () => { 1682 const cancel = () => {
1881 ElMessageBox.confirm( 1683 ElMessageBox.confirm(
1882 "当前页面尚未保存,确定取消吗?", 1684 "当前页面尚未保存,确定取消吗?",
...@@ -1902,16 +1704,6 @@ const cancel = () => { ...@@ -1902,16 +1704,6 @@ const cancel = () => {
1902 }); 1704 });
1903 } 1705 }
1904 1706
1905 const qualityEvaluationInstitution = ref('');
1906 const costAssessmentInstitution = ref('');
1907 const uploadSelectChange = (val, item, row) => {
1908 if (item.field == 'qualityEvaluationInstitutionGuid') {
1909 qualityEvaluationInstitution.value = val && item.options.find(o => o.guid == val) ? '' : (val || '');
1910 } else {
1911 costAssessmentInstitution.value = val && item.options.find(o => o.guid == val) ? '' : (val || '');
1912 }
1913 }
1914
1915 /** 保存草稿,不用校验。 */ 1707 /** 保存草稿,不用校验。 */
1916 const saveDraft = () => { 1708 const saveDraft = () => {
1917 let params: any = {}; 1709 let params: any = {};
...@@ -1930,6 +1722,9 @@ const saveDraft = () => { ...@@ -1930,6 +1722,9 @@ const saveDraft = () => {
1930 } 1722 }
1931 let propertyFormLine = porpertyInfoFormRef.value.formInline; 1723 let propertyFormLine = porpertyInfoFormRef.value.formInline;
1932 Object.assign(params, propertyFormLine); 1724 Object.assign(params, propertyFormLine);
1725 delete params.qualityEvaluationInstitutionGuid;
1726 delete params.costAssessmentInstitutionGuid;
1727
1933 let uploadFormInline = uploadFormRef.value.formInline; 1728 let uploadFormInline = uploadFormRef.value.formInline;
1934 let registerAttachment: any = { 1729 let registerAttachment: any = {
1935 // fileHash: uploadFormInline.fileHash, 1730 // fileHash: uploadFormInline.fileHash,
...@@ -1961,13 +1756,14 @@ const saveDraft = () => { ...@@ -1961,13 +1756,14 @@ const saveDraft = () => {
1961 if (qualityEvaluationInstitution.value) { 1756 if (qualityEvaluationInstitution.value) {
1962 registerAttachment.qualityEvaluationInstitution = qualityEvaluationInstitution.value 1757 registerAttachment.qualityEvaluationInstitution = qualityEvaluationInstitution.value
1963 } else { 1758 } else {
1964 registerAttachment.qualityEvaluationInstitutionGuid = uploadFormInline.qualityEvaluationInstitutionGuid || '' 1759 registerAttachment.qualityEvaluationInstitutionGuid = baseFormInline.qualityEvaluationInstitutionGuid || ''
1965 } 1760 }
1966 if (costAssessmentInstitution.value) { 1761 if (costAssessmentInstitution.value) {
1967 registerAttachment.costAssessmentInstitution = costAssessmentInstitution.value 1762 registerAttachment.costAssessmentInstitution = costAssessmentInstitution.value
1968 } else { 1763 } else {
1969 registerAttachment.costAssessmentInstitutionGuid = uploadFormInline.costAssessmentInstitutionGuid || '' 1764 registerAttachment.costAssessmentInstitutionGuid = baseFormInline.costAssessmentInstitutionGuid || ''
1970 } 1765 }
1766
1971 Object.assign(params, { 1767 Object.assign(params, {
1972 registerAttachment: registerAttachment, 1768 registerAttachment: registerAttachment,
1973 isSubmit: false, 1769 isSubmit: false,
...@@ -2038,6 +1834,9 @@ const save = () => { ...@@ -2038,6 +1834,9 @@ const save = () => {
2038 } 1834 }
2039 let propertyFormLine = porpertyInfoFormRef.value.formInline; 1835 let propertyFormLine = porpertyInfoFormRef.value.formInline;
2040 Object.assign(params, propertyFormLine); 1836 Object.assign(params, propertyFormLine);
1837 delete params.qualityEvaluationInstitutionGuid;
1838 delete params.costAssessmentInstitutionGuid;
1839
2041 let uploadFormInline = uploadFormRef.value.formInline; 1840 let uploadFormInline = uploadFormRef.value.formInline;
2042 let registerAttachment: any = { 1841 let registerAttachment: any = {
2043 // fileHash: uploadFormInline.fileHash, 1842 // fileHash: uploadFormInline.fileHash,
...@@ -2069,12 +1868,12 @@ const save = () => { ...@@ -2069,12 +1868,12 @@ const save = () => {
2069 if (qualityEvaluationInstitution.value) { 1868 if (qualityEvaluationInstitution.value) {
2070 registerAttachment.qualityEvaluationInstitution = qualityEvaluationInstitution.value 1869 registerAttachment.qualityEvaluationInstitution = qualityEvaluationInstitution.value
2071 } else { 1870 } else {
2072 registerAttachment.qualityEvaluationInstitutionGuid = uploadFormInline.qualityEvaluationInstitutionGuid || '' 1871 registerAttachment.qualityEvaluationInstitutionGuid = baseFormInline.qualityEvaluationInstitutionGuid || ''
2073 } 1872 }
2074 if (costAssessmentInstitution.value) { 1873 if (costAssessmentInstitution.value) {
2075 registerAttachment.costAssessmentInstitution = costAssessmentInstitution.value 1874 registerAttachment.costAssessmentInstitution = costAssessmentInstitution.value
2076 } else { 1875 } else {
2077 registerAttachment.costAssessmentInstitutionGuid = uploadFormInline.costAssessmentInstitutionGuid || '' 1876 registerAttachment.costAssessmentInstitutionGuid = baseFormInline.costAssessmentInstitutionGuid || ''
2078 } 1877 }
2079 Object.assign(params, { 1878 Object.assign(params, {
2080 registerAttachment: registerAttachment, 1879 registerAttachment: registerAttachment,
...@@ -2138,53 +1937,206 @@ const save = () => { ...@@ -2138,53 +1937,206 @@ const save = () => {
2138 }); 1937 });
2139 } 1938 }
2140 1939
2141 const contentRef = ref(); 1940 onActivated(() => {
2142 1941 // getRegisterCatalogListData();
2143 onMounted(() => {
2144 // 添加scroll事件监听, 体验有缺陷。
2145 // contentRef.value.addEventListener("scroll", debounce(() => {
2146 // let tabs = tabsInfo.value.tabs;
2147 // let len = tabs.length;
2148 // let tabH = contentRef.value.offsetHeight;
2149 // for (let i = len - 1; i >= 0; i--) {
2150 // let name = tabs[i].name;
2151 // let dom = document.getElementById(`id-${name}`);
2152 // let top = dom && dom.getBoundingClientRect().top;
2153 // if (top && top > 0 && top <= 300) {
2154 // tabsInfo.value.activeName = name;
2155 // return;
2156 // }
2157 // }
2158 // }, 100));
2159 }) 1942 })
2160 const deploymentId = ref(''); 1943
2161 const processInstanceId = ref(''); 1944 onBeforeMount(() => {
2162 const approveTableInfo: any = ref({ 1945 restart.value = localStorage.getItem('isRestart') ? true : false;
2163 id: 'approve-table', 1946 if (guid) {
2164 rowKey: 'guid', 1947 fullscreenLoading.value = true;
2165 loading: false, 1948 getRegiaterDetail({ guid: guid }).then((res: any) => {
2166 height: null, 1949 fullscreenLoading.value = false;
2167 minHeight: '60px', 1950 if (res.code == proxy.$passCode) {
2168 maxHeight: '300', 1951 const data = res.data || {}
2169 fields: [ 1952 let { approveVO } = data;
2170 { 1953 draftDetailInfo.value = data;
2171 label: "节点", field: "tenantType", width: 140, align: "left", getName: (scope) => { 1954 deploymentId.value = approveVO?.camundaDeploymentId;
2172 let v = scope.row.tenantType; 1955 processInstanceId.value = approveVO?.camundaInstanceId
2173 return v == 1 ? '企业' : (v == 2 ? '服务商' : (v == 3 ? '交易所' : v)); 1956 let coverageArea = '';
1957 let coverageAreas = [];
1958 let damTypeItem = baseFormItems.value.find(item => item.field == 'damType');
1959 let dataScaleItem = baseFormItems.value.find(item => item.field == 'dataScale');
1960 damTypeItem.disabled = draftDetailInfo.value.damGuid ? true : false;
1961 if (registerCatalogList.value.length) {
1962 let da = registerCatalogList.value.find(r => r.guid == draftDetailInfo.value.damGuid);
1963 if (da && da.dataCount != null) {
1964 dataScaleItem.disabled = true;
1965 draftDetailInfo.value.dataScale == null && (draftDetailInfo.value.dataScale = da.dataCount);
1966 } else {
1967 dataScaleItem.disabled = false;
1968 }
1969 }
1970 let subjectItem = baseFormItems.value.find(item => item.field == 'subjectDomain');
1971 if (subjectItem) {
1972 let tree = draftDetailInfo.value.subjectDomainTree?.[0];
1973 if (tree) {
1974 if (!tree.children[0]?.children?.[0]?.children) {
1975 subjectItem.expandKeys = tree.children[0]?.children?.[0].parentGuids;
1976 } else if (!tree.children[0]?.children?.[0]?.children?.[0]?.children) {
1977 subjectItem.expandKeys = tree.children[0]?.children?.[0]?.children?.[0]?.parentGuids;
1978 }
1979 }
1980 }
1981 if (data.coverageArea?.[0]?.[0] == 'all') {
1982 coverageArea = 'all';
1983 setBaseFormItemsValue({ ...draftDetailInfo.value, daName: draftDetailInfo.value.damGuid ? draftDetailInfo.value.damGuid : draftDetailInfo.value.daName, coverageArea: coverageArea, coverageAreas: coverageAreas, dateRange: draftDetailInfo.value.dataStartDate ? [draftDetailInfo.value.dataStartDate, draftDetailInfo.value.dataEndDate] : null });
1984 } else {
1985 coverageAreas = data.coverageArea || [];
1986 let p: any = [];
1987 data.coverageArea.forEach(area => {
1988 if (p.includes(area[0])) {
1989 return;
1990 }
1991 p.push(area[0]);
1992 getArea({ value: area[0], level: 1 }, () => { })
1993 });
1994 let ps: any = []
1995 for (const key in getAreaDataPromise.value) {
1996 ps.push(getAreaDataPromise.value[key])
1997 }
1998 Promise.all(ps).then(() => {
1999 setBaseFormItemsValue({ ...draftDetailInfo.value, daName: draftDetailInfo.value.damGuid ? draftDetailInfo.value.damGuid : draftDetailInfo.value.daName, coverageArea: coverageArea, coverageAreas: coverageAreas, dateRange: draftDetailInfo.value.dataStartDate ? [draftDetailInfo.value.dataStartDate, draftDetailInfo.value.dataEndDate] : null });
2000 });
2001 }
2002 if (data.exchangeGuid) {
2003 getTenantAttach(userData.tenantGuid).then((res: any) => {
2004 if (res?.code == proxy.$passCode) {
2005 Object.assign(attachDataInfo.value, res.data || {});
2006 uploadFormItems.value[0].templateUrl = attachDataInfo.value.register_letter;
2007 uploadFormItems.value[1].templateUrl = attachDataInfo.value['commitment-letter'];
2008 setUploadFormItemsValue(draftDetailInfo.value);
2009 } else {
2010 ElMessage.error(res.msg);
2011 setUploadFormItemsValue(draftDetailInfo.value);
2012 }
2013 })
2014 setUploadFormItemsValue(draftDetailInfo.value);
2015 } else {
2016 setUploadFormItemsValue(draftDetailInfo.value);
2017 }
2018 let officeLocation = draftDetailInfo.value.officeLocation || [];
2019 if (officeLocation.length) {
2020 let p: any = [];
2021 officeLocation.forEach(area => {
2022 if (p.includes(area[0])) {
2023 return;
2024 }
2025 p.push(area[0]);
2026 getArea1({ value: area[0], level: 1 }, () => { })
2027 });
2028 let ps: any = []
2029 for (const key in getAreaDataPromise.value) {
2030 ps.push(getAreaDataPromise.value[key])
2031 }
2032 Promise.all(ps).then(() => {
2033 setPropertyFormItemsValue(draftDetailInfo.value);
2034 });
2035 } else {
2036 setPropertyFormItemsValue(draftDetailInfo.value);
2037 }
2038 getRegisterCatalogListData({ damName: data.daName, damGuid: data.damGuid });
2039 } else {
2040 ElMessage.error(res.msg);
2174 } 2041 }
2175 }, 2042 });
2176 { label: '处理对象', field: 'approvedTenantName', width: 200, align: "left" }, 2043 } else {
2177 { label: "操作时间", field: "approveTime", width: 180 }, 2044 getCamundaDeploymentId('10016').then((res: any) => {
2178 { label: "审批状态", field: "approveState", type: "tag", width: 96, align: 'center' }, 2045 if (res.code == proxy.$passCode) {
2179 { label: "审批原因", field: "approveSuggest", width: 240 } 2046 deploymentId.value = res.data;
2180 ], 2047 } else {
2181 data: [], 2048 ElMessage.error(res.msg);
2182 showPage: false, 2049 }
2183 actionInfo: { 2050 })
2184 show: false 2051 getRegisterCatalogListData();
2185 } 2052 }
2053
2054 getTenantDetail();
2055 getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => {
2056 if (res?.code == proxy.$passCode) {
2057 parentAreaData.value = res.data ?? [];
2058 return parentAreaData.value;
2059 }
2060 })
2061 // getTenantAttach(userData.tenantGuid).then((res: any) => {
2062 // if (res?.code == proxy.$passCode) {
2063 // console.log(res.data);
2064 // Object.assign(attachDataInfo.value, res.data || {});
2065 // uploadFormItems.value[2].templateUrl = attachDataInfo.value.quality_evaluation_file;
2066 // uploadFormItems.value[3].templateUrl = attachDataInfo.value.cost_assessment_file;
2067 // } else {
2068 // ElMessage.error(res.msg);
2069 // }
2070 // })
2071 // 获取资产类型
2072 getParamsList({ dictType: '资产类型' }).then((res: any) => {
2073 if (res.code == proxy.$passCode) {
2074 damTypes.value = res.data || [];
2075 let item = baseFormItems.value.find(item => item.field == 'damType');
2076 item && (item.options = damTypes.value.map(type => {
2077 const info = { ...type };
2078 if (type.paramValue == '1' || type.paramValue == '2') {
2079 info.disabled = true;
2080 } else {
2081 info.disabled = false;
2082 }
2083 return info;
2084 }));
2085 } else {
2086 proxy.$ElMessage.error(res.msg);
2087 }
2088 })
2089 // 获取数据资产目录主题
2090 getParamsList({ dictType: '数据资产目录主题名称' }).then((res: any) => {
2091 if (res.code == proxy.$passCode) {
2092 const data = res.data || [];
2093 subjectDomainListData.value = data;
2094 let item = baseFormItems.value.find(item => item.field == 'subjectDomain');
2095 item && (item.options = subjectDomainListData.value);
2096 } else {
2097 proxy.$ElMessage.error(res.msg);
2098 }
2099 })
2100 // 获取数交所数据
2101 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "130" }).then((res: any) => {
2102 if (res.code == proxy.$passCode) {
2103 const data = res.data.records ?? [];
2104 currTenantChanged.value = data;
2105 let formItem = baseFormItems.value.find(f => f.field === 'exchangeGuid');
2106 formItem.options = currTenantChanged.value;
2107 formItem.default = exGuid;
2108 serviceTenants.value = data.filter(d => d.guid !== exGuid);
2109 let item2 = baseFormItems.value.find(f => f.field === 'rules');
2110 item2.children[1].options = serviceTenants.value;
2111 } else {
2112 proxy.$ElMessage.error(res.msg);
2113 }
2114 })
2115 // 获取质量评估机构
2116 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
2117 if (res.code == proxy.$passCode) {
2118 qualityEvaluationData.value = res.data.records || [];
2119 let item = baseFormItems.value.find(item => item.field == 'qualityEvaluationInstitutionGuid');
2120 item && (item.options = qualityEvaluationData.value);
2121 } else {
2122 proxy.$ElMessage.error(res.msg);
2123 }
2124 })
2125 // 获取价值评估机构
2126 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12504" }).then((res: any) => {
2127 if (res.code == proxy.$passCode) {
2128 costAssessmentData.value = res.data.records || [];
2129 let item = baseFormItems.value.find(item => item.field == 'costAssessmentInstitutionGuid');
2130 item && (item.options = costAssessmentData.value);
2131 } else {
2132 proxy.$ElMessage.error(res.msg);
2133 }
2134 })
2186 }); 2135 });
2187 2136
2137 onMounted(() => {
2138 })
2139
2188 </script> 2140 </script>
2189 2141
2190 <template> 2142 <template>
...@@ -2203,7 +2155,7 @@ const approveTableInfo: any = ref({ ...@@ -2203,7 +2155,7 @@ const approveTableInfo: any = ref({
2203 <ContentWrap id="id-assetContent" title="附件信息" description="" :isExpand="assetContentExpand" expandSwicth 2155 <ContentWrap id="id-assetContent" title="附件信息" description="" :isExpand="assetContentExpand" expandSwicth
2204 style="margin-top: 15px" @expand="(v) => assetContentExpand = v"> 2156 style="margin-top: 15px" @expand="(v) => assetContentExpand = v">
2205 <Form class='uploadForm' ref="uploadFormRef" :itemList="uploadFormItems" formId="upload-form" 2157 <Form class='uploadForm' ref="uploadFormRef" :itemList="uploadFormItems" formId="upload-form"
2206 :rules="uploadFormRules" col="col3" @selectChange="uploadSelectChange" /> 2158 :rules="uploadFormRules" col="col2" />
2207 </ContentWrap> 2159 </ContentWrap>
2208 <ContentWrap id="id-propertyInfo" title="权利信息" description="申报数据资产的权利信息" expandSwicth 2160 <ContentWrap id="id-propertyInfo" title="权利信息" description="申报数据资产的权利信息" expandSwicth
2209 :isExpand="propertyInfoExpand" style="margin-top: 15px" @expand="(v) => propertyInfoExpand = v"> 2161 :isExpand="propertyInfoExpand" style="margin-top: 15px" @expand="(v) => propertyInfoExpand = v">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!