b35fe61c by xukangle

Merge branch 'dev_20241202_xukangle' into develop

2 parents 18c28b7f e2402a3a
...@@ -131,7 +131,19 @@ const routes: RouteRecordRaw[] = [ ...@@ -131,7 +131,19 @@ const routes: RouteRecordRaw[] = [
131 cache: true, 131 cache: true,
132 reuse: true 132 reuse: true
133 } 133 }
134 },
135 {
136 path: 'register-catalog-detail',
137 name: 'costAssessDetail',
138 component: () => import('@/views/data_asset/registerCatalogDetail.vue'),
139 meta: {
140 title: '详情-',
141 sidebar: false,
142 breadcrumb: false,
143 cache: true,
144 reuse: true
134 } 145 }
146 },
135 ], 147 ],
136 }, 148 },
137 { 149 {
......
...@@ -128,6 +128,8 @@ const getDetailInfo = () => { ...@@ -128,6 +128,8 @@ const getDetailInfo = () => {
128 const data = res.data || {}; 128 const data = res.data || {};
129 costAssessDetailInfo.value = data; 129 costAssessDetailInfo.value = data;
130 detailInfo.value = data; 130 detailInfo.value = data;
131 deploymentId.value = data.approveVO.camundaDeploymentId;
132 processInstanceId.value = data.approveVO?.camundaInstanceId;
131 // 需要显示价值评估信息 133 // 需要显示价值评估信息
132 if (data.assessmentMoney != null) { 134 if (data.assessmentMoney != null) {
133 if (tabsInfo.value.tabs.length == 4) { 135 if (tabsInfo.value.tabs.length == 4) {
...@@ -246,29 +248,29 @@ const getDetailInfo = () => { ...@@ -246,29 +248,29 @@ const getDetailInfo = () => {
246 }).catch(() => { 248 }).catch(() => {
247 fullscreenLoading.value = false; 249 fullscreenLoading.value = false;
248 })); 250 }));
249 ps.push(getTenantDetailInfo(userData.tenantGuid).then((res: any) => { 251 // ps.push(getTenantDetailInfo(userData.tenantGuid).then((res: any) => {
250 if (res.code == proxy.$passCode) { 252 // if (res.code == proxy.$passCode) {
251 const data = res.data ?? {}; 253 // const data = res.data ?? {};
252 tentData = { ...tentData, ...data }; 254 // tentData = { ...tentData, ...data };
253 } else { 255 // } else {
254 ElMessage.error(res.msg); 256 // ElMessage.error(res.msg);
255 } 257 // }
256 })); 258 // }));
257 ps.push(getTenantInfo({ tenantName: userData.tenantName }).then((res: any) => { 259 // ps.push(getTenantInfo({ tenantName: userData.tenantName }).then((res: any) => {
258 if (res.code == proxy.$passCode) { 260 // if (res.code == proxy.$passCode) {
259 const data = res.data ?? {}; 261 // const data = res.data ?? {};
260 tentData = { ...tentData, ...data }; 262 // tentData = { ...tentData, ...data };
261 } else { 263 // } else {
262 ElMessage.error(res.msg); 264 // ElMessage.error(res.msg);
263 } 265 // }
264 })) 266 // }))
265 Promise.all(ps).then(() => { 267 Promise.all(ps).then(() => {
266 fullscreenLoading.value = false; 268 fullscreenLoading.value = false;
267 tenantDetail.value = tentData; 269 // tenantDetail.value = tentData;
268 isTextTruncated(); 270 isTextTruncated();
269 }) 271 })
270 } else { 272 } else {
271 let ps: any = [], tentData = {}; 273 let ps: any = []
272 ps.push(getRegiaterDetail({ guid: assetGuid }).then((res: any) => { 274 ps.push(getRegiaterDetail({ guid: assetGuid }).then((res: any) => {
273 if (res.code == proxy.$passCode) { 275 if (res.code == proxy.$passCode) {
274 const data = res.data || {}; 276 const data = res.data || {};
...@@ -282,26 +284,25 @@ const getDetailInfo = () => { ...@@ -282,26 +284,25 @@ const getDetailInfo = () => {
282 ElMessage.error(res.msg); 284 ElMessage.error(res.msg);
283 } 285 }
284 })); 286 }));
285 ps.push(getTenantDetailInfo(userData.tenantGuid).then((res: any) => { 287 // ps.push(getTenantDetailInfo(userData.tenantGuid).then((res: any) => {
286 if (res.code == proxy.$passCode) { 288 // if (res.code == proxy.$passCode) {
287 const data = res.data ?? {}; 289 // const data = res.data ?? {};
288 tentData = { ...tentData, ...data }; 290 // tentData = { ...tentData, ...data };
289 } else { 291 // } else {
290 ElMessage.error(res.msg); 292 // ElMessage.error(res.msg);
291 } 293 // }
292 })); 294 // }));
293 ps.push(getTenantInfo({ tenantName: userData.tenantName }).then((res: any) => { 295 // ps.push(getTenantInfo({ tenantName: userData.tenantName }).then((res: any) => {
294 if (res.code == proxy.$passCode) { 296 // if (res.code == proxy.$passCode) {
295 const data = res.data ?? {}; 297 // const data = res.data ?? {};
296 tentData = { ...tentData, ...data }; 298 // tentData = { ...tentData, ...data };
297 } else { 299 // } else {
298 ElMessage.error(res.msg); 300 // ElMessage.error(res.msg);
299 } 301 // }
300 })) 302 // }))
301 303
302 Promise.all(ps).then(() => { 304 Promise.all(ps).then(() => {
303 fullscreenLoading.value = false; 305 fullscreenLoading.value = false;
304 tenantDetail.value = tentData;
305 }).catch(() => { 306 }).catch(() => {
306 fullscreenLoading.value = false; 307 fullscreenLoading.value = false;
307 }); 308 });
...@@ -322,9 +323,39 @@ const handleExpand = () => { ...@@ -322,9 +323,39 @@ const handleExpand = () => {
322 isExpanded.value = !isExpanded.value; 323 isExpanded.value = !isExpanded.value;
323 } 324 }
324 325
326 // 提取到 onBeforeMount 中的请求
327 const tentData = ref<any>({});
328 const getTenantInformation = () => {
329 const ps: any = [];
330
331 ps.push(getTenantDetailInfo(userData.tenantGuid).then((res: any) => {
332 if (res.code === proxy.$passCode) {
333 const data = res.data ?? {};
334 tentData.value = { ...tentData.value, ...data };
335 } else {
336 ElMessage.error(res.msg);
337 }
338 }));
339
340 ps.push(getTenantInfo({ tenantName: userData.tenantName }).then((res: any) => {
341 if (res.code === proxy.$passCode) {
342 const data = res.data ?? {};
343 tentData.value = { ...tentData.value, ...data };
344 } else {
345 ElMessage.error(res.msg);
346 }
347 }));
348
349 // 这里返回 Promise.all 来等待所有请求完成
350 return Promise.all(ps);
351 };
325 onBeforeMount(() => { 352 onBeforeMount(() => {
326 getDetailInfo(); 353 getDetailInfo();
327 // getTenantDetail(); 354 getTenantInformation().then(() => {
355 tenantDetail.value = { ...tentData.value }; // 将最终的数据赋值给 tenantDetail
356 }).catch(() => {
357 console.log('请求失败');
358 });
328 }); 359 });
329 360
330 onActivated(() => { 361 onActivated(() => {
...@@ -593,7 +624,7 @@ const passDialogTitle = computed(() => { ...@@ -593,7 +624,7 @@ const passDialogTitle = computed(() => {
593 } 624 }
594 }); 625 });
595 626
596 const qualityEvaluateFormItems = ref([ 627 const qualityEvaluateFormItems = ref<any>([
597 { 628 {
598 label: '质量得分', 629 label: '质量得分',
599 type: 'input', 630 type: 'input',
...@@ -953,11 +984,19 @@ const passDialogBtnClick = (btn, info) => { ...@@ -953,11 +984,19 @@ const passDialogBtnClick = (btn, info) => {
953 return; 984 return;
954 } 985 }
955 submitPromise.value = costAssessAllow({ 986 submitPromise.value = costAssessAllow({
956 guid: detailInfo.value.guid, 987 bizGuid: detailInfo.value.guid,
988 flowType: detailInfo.value.approveVO.flowType,
989 approveStaffGuid: userData.staffGuid,
990 guid: detailInfo.value.approveVO.approveGuid,
957 assessmentMoney: info.assessmentMoney, 991 assessmentMoney: info.assessmentMoney,
958 assessmentDate: info.assessmentDate, 992 assessmentDate: info.assessmentDate,
959 assessmentNote: info.assessmentNote, 993 assessmentNote: info.assessmentNote,
960 assessmentFile: info.assessmentFile.map(f => f.url), 994 assessmentFile: info.assessmentFile.map(file => {
995 return {
996 name: file.name,
997 url: file.url
998 }
999 }) || [],
961 }).then((res: any) => { 1000 }).then((res: any) => {
962 submitPromise.value = null; 1001 submitPromise.value = null;
963 if (res?.code == proxy.$passCode) { 1002 if (res?.code == proxy.$passCode) {
...@@ -1303,7 +1342,8 @@ const formattedDate = (dateVal) => { ...@@ -1303,7 +1342,8 @@ const formattedDate = (dateVal) => {
1303 <div class="list_item is_block isFile" :style="{ width: '40%' }" 1342 <div class="list_item is_block isFile" :style="{ width: '40%' }"
1304 v-if="((detailType != 'asset' || assetDetailInfo.isEvaluationAssessment == 'Y') && assetDetailInfo.registerAttachment?.qualityEvaluationFile?.length) || (evaDetailInfo?.qualityEvaluationFile?.length > 0)"> 1343 v-if="((detailType != 'asset' || assetDetailInfo.isEvaluationAssessment == 'Y') && assetDetailInfo.registerAttachment?.qualityEvaluationFile?.length) || (evaDetailInfo?.qualityEvaluationFile?.length > 0)">
1305 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据质量评价收集</span> 1344 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">数据质量评价收集</span>
1306 <span v-for="(item) in (evaDetailInfo?.qualityEvaluationFile || assetDetailInfo.registerAttachment?.qualityEvaluationFile || [])" 1345 <span
1346 v-for="(item) in (evaDetailInfo?.qualityEvaluationFile || assetDetailInfo.registerAttachment?.qualityEvaluationFile || [])"
1307 class="item_value" :style="{ 'padding-left': '0px' }"> 1347 class="item_value" :style="{ 'padding-left': '0px' }">
1308 <div class="file-operate"> 1348 <div class="file-operate">
1309 <template 1349 <template
...@@ -1453,6 +1493,44 @@ const formattedDate = (dateVal) => { ...@@ -1453,6 +1493,44 @@ const formattedDate = (dateVal) => {
1453 </div> 1493 </div>
1454 </span> 1494 </span>
1455 </div> 1495 </div>
1496 <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }"
1497 v-if="(detailType == 'costAssess' && costAssessDetailInfo.costAssessmentFile?.length)">
1498 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">价值评估收集附件</span>
1499 <span v-for="(item) in (costAssessDetailInfo.costAssessmentFile || [])" class="item_value"
1500 :style="{ 'padding-left': '0px' }">
1501 <div class="file-operate">
1502 <template
1503 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'xls' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'xlsx' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'csv'">
1504 <img class="file-img" src="../../assets/images/excel.png" />
1505 </template>
1506 <template
1507 v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'doc' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'docx'">
1508 <img class="file-img" src="../../assets/images/word.png" />
1509 </template>
1510 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'zip'">
1511 <img class="file-img" src="../../assets/images/zip.png" />
1512 </template>
1513 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'rar'">
1514 <img class="file-img" src="../../assets/images/RAR.png" />
1515 </template>
1516 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf'">
1517 <img class="file-img" src="../../assets/images/PDF.png" />
1518 </template>
1519 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'png'">
1520 <img class="file-img" src="../../assets/images/png.png" />
1521 </template>
1522 <template
1523 v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'">
1524 <img class="file-img" src="../../assets/images/jpg.png" />
1525 </template>
1526 <div class="file-name">{{ item.name }}</div>
1527 <div :style="{ right: '36px' }"
1528 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'png' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'"
1529 class="file-preview" @click="onUploadFilePreview(item)">查看</div>
1530 <div :style="{ right: '0px' }" class="file-preview" @click="onUploadFileDownload(item)">下载</div>
1531 </div>
1532 </span>
1533 </div>
1456 <!-- <span 1534 <!-- <span
1457 v-if="tenantDetail.businessLicense?.length || assetDetailInfo.registerAttachment?.commitmentLetter?.length" 1535 v-if="tenantDetail.businessLicense?.length || assetDetailInfo.registerAttachment?.commitmentLetter?.length"
1458 class="small-title" :style="{ marginTop: '10px' }">公司信息</span> --> 1536 class="small-title" :style="{ marginTop: '10px' }">公司信息</span> -->
......
...@@ -41,7 +41,7 @@ const attachDataInfo: any = ref({}); ...@@ -41,7 +41,7 @@ const attachDataInfo: any = ref({});
41 41
42 const tableFields = ref([ 42 const tableFields = ref([
43 { label: "序号", type: "index", width: 56, align: "center" }, 43 { label: "序号", type: "index", width: 56, align: "center" },
44 { label: "资产名称", field: "daName", width: 160, align: "left" }, 44 { label: "资产名称", field: "daName", width: 160, align: "left", type: 'text_btn', value: 'productDetail', columClass: 'text_btn' },
45 { label: "登记时间", field: "registerTime", width: 120 }, 45 { label: "登记时间", field: "registerTime", width: 120 },
46 // { label: "企业名称", field: "tenantName", width: 240, align: "left" }, 46 // { label: "企业名称", field: "tenantName", width: 240, align: "left" },
47 { label: "评估机构", field: "issuingEntityName", width: 250, align: "left" }, 47 { label: "评估机构", field: "issuingEntityName", width: 250, align: "left" },
...@@ -184,6 +184,7 @@ const handleCreate = () => { ...@@ -184,6 +184,7 @@ const handleCreate = () => {
184 ElMessage.warning('当前没有可发起价值评估的资产!'); 184 ElMessage.warning('当前没有可发起价值评估的资产!');
185 return; 185 return;
186 } 186 }
187 formItems.value[4].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
187 formItems.value[0].visible = true; 188 formItems.value[0].visible = true;
188 formItems.value[0].default = ''; 189 formItems.value[0].default = '';
189 formItems.value[1].visible = true; 190 formItems.value[1].visible = true;
...@@ -313,20 +314,20 @@ const tableBtnClick = (scope, btn) => { ...@@ -313,20 +314,20 @@ const tableBtnClick = (scope, btn) => {
313 currTableData.value = row; 314 currTableData.value = row;
314 if (type == "redit") { 315 if (type == "redit") {
315 if (!row.registerGuid) { 316 if (!row.registerGuid) {
316 formItems.value[2].visible = false; 317 formItems.value[2].visible = true;
317 formItems.value[3].visible = false; 318 formItems.value[3].visible = true;
318 formItems.value[4].visible = false; 319 formItems.value[4].visible = true;
319 formItems.value[5].visible = false; 320 formItems.value[5].visible = true;
320 formItems.value[0].visible = false; 321 formItems.value[0].visible = false;
321 formItems.value[0].default = row.damGuid; 322 formItems.value[0].default = row.damGuid;
322 formItems.value[1].default = row.costAssessmentFile || []; 323 formItems.value[1].default = row.costAssessmentFile || [];
323 dialogInfo.value.type = 'reSubmit'; 324 dialogInfo.value.type = 'reSubmit';
324 dialogInfo.value.visible = true; 325 dialogInfo.value.visible = true;
325 } else { 326 } else {
326 formItems.value[2].visible = true; 327 formItems.value[2].visible = false;
327 formItems.value[3].visible = true; 328 formItems.value[3].visible = false;
328 formItems.value[4].visible = true; 329 formItems.value[4].visible = false;
329 formItems.value[5].visible = true; 330 formItems.value[5].visible = false;
330 formItems.value[0].visible = false; 331 formItems.value[0].visible = false;
331 formItems.value[0].default = row.damGuid; 332 formItems.value[0].default = row.damGuid;
332 formItems.value[1].default = row.costAssessmentFile || []; 333 formItems.value[1].default = row.costAssessmentFile || [];
...@@ -371,12 +372,12 @@ const tableBtnClick = (scope, btn) => { ...@@ -371,12 +372,12 @@ const tableBtnClick = (scope, btn) => {
371 } else if (type === 'detail') { // 详情 372 } else if (type === 'detail') { // 详情
372 if (row.registerApproveState == 'Y') { 373 if (row.registerApproveState == 'Y') {
373 router.push({ 374 router.push({
374 name: 'registerDetail', 375 name: 'registerValueDetail',
375 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid } 376 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
376 }); 377 });
377 } else { 378 } else {
378 router.push({ 379 router.push({
379 name: 'evaCatalogDetail', 380 name: 'costAssessDetail',
380 query: { guid: row.damGuid, costAssessGuid: row.guid, type: 'costAssess' } 381 query: { guid: row.damGuid, costAssessGuid: row.guid, type: 'costAssess' }
381 }); 382 });
382 } 383 }
...@@ -560,7 +561,9 @@ const formItems = ref<any>([ ...@@ -560,7 +561,9 @@ const formItems = ref<any>([
560 { 561 {
561 label: '质量评估结果', 562 label: '质量评估结果',
562 type: 'textarea', 563 type: 'textarea',
563 placeholder: '请输入质量评估结果', 564 focusValue: true,
565 example: '示例:本次评估数据资产总体质量得分为99.80分。从评价维度分析,准确性、一致性和可访问性均为 100 分;规范性 99.42 分、完整性 99.50分。',
566 placeholder: `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`,
564 field: 'evaluationNote', 567 field: 'evaluationNote',
565 default: '', 568 default: '',
566 maxlength: 250, 569 maxlength: 250,
...@@ -595,12 +598,41 @@ const formRules = ref({ ...@@ -595,12 +598,41 @@ const formRules = ref({
595 callback(); 598 callback();
596 } 599 }
597 }, trigger: 'change' 600 }, trigger: 'change'
598 }] 601 }],
602 qualityScore: [
603 { required: true, trigger: 'change', message: "请填写质量评分" }
604 ],
605 evaluationRange: [
606 { required: true, trigger: 'change', message: "请填写数据时间范围" }
607 ],
608 evaluationNote: [{
609 validator: (rule: any, value: any, callback: any) => {
610 if (!value) {
611 callback(new Error('请填写质量评价说明'));
612 return;
613 }
614 if (value && value.length > 500) {
615 callback(new Error('请填写小于500个字的质量评价说明'));
616 return;
617 }
618 callback();
619 },
620 trigger: "blur",
621 }],
622 evaluationFile: [{
623 validator: (rule: any, value: any, callback: any) => {
624 if (!value?.length) {
625 callback(new Error('请上传质量报告'))
626 } else {
627 callback();
628 }
629 }, trigger: 'change'
630 }],
599 }); 631 });
600 632
601 const dialogInfo = ref({ 633 const dialogInfo = ref({
602 visible: false, 634 visible: false,
603 size: 510, 635 size: 610,
604 direction: "column", 636 direction: "column",
605 header: { 637 header: {
606 title: "价值评估发起", 638 title: "价值评估发起",
...@@ -717,6 +749,7 @@ const dialogBtnClick = (btn, info) => { ...@@ -717,6 +749,7 @@ const dialogBtnClick = (btn, info) => {
717 dialogInfo.value.visible = false; 749 dialogInfo.value.visible = false;
718 page.value.curr = 1; 750 page.value.curr = 1;
719 getTableData(); 751 getTableData();
752 formItems.value[4].placeholder = `本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`;
720 } else { 753 } else {
721 ElMessage.error(res.msg); 754 ElMessage.error(res.msg);
722 } 755 }
......
...@@ -1492,7 +1492,7 @@ const timeRangeInfo = computed(() => { ...@@ -1492,7 +1492,7 @@ const timeRangeInfo = computed(() => {
1492 if (flowDetail.value.timeAreaStart && flowDetail.value.timeAreaEnd) { 1492 if (flowDetail.value.timeAreaStart && flowDetail.value.timeAreaEnd) {
1493 const startDate = flowDetail.value.timeAreaStart.split('T')[0]; 1493 const startDate = flowDetail.value.timeAreaStart.split('T')[0];
1494 const endDate = flowDetail.value.timeAreaEnd.split('T')[0]; 1494 const endDate = flowDetail.value.timeAreaEnd.split('T')[0];
1495 return `${startDate} - ${endDate}`; 1495 return `${startDate}${endDate}`;
1496 } 1496 }
1497 return '--'; 1497 return '--';
1498 }); 1498 });
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!