8097a47c by xukangle

Merge branch 'dev_20241202_xukangle' into develop

2 parents ebea27b4 dafaf23e
...@@ -73,6 +73,9 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service ...@@ -73,6 +73,9 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service
73 #新门户接口 73 #新门户接口
74 VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service 74 VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service
75 75
76 # 附件模板
77 VITE_APP_ATTACHMENT_TEMPLATE = ms-daop-personel-service
78
76 #人员服务 79 #人员服务
77 VITE_APP_PERSONAL_URL = 'ms-daop-personel-service' 80 VITE_APP_PERSONAL_URL = 'ms-daop-personel-service'
78 81
......
...@@ -97,6 +97,9 @@ VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal ...@@ -97,6 +97,9 @@ VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
97 #新门户接口 97 #新门户接口
98 VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service 98 VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service
99 99
100 # 附件模板
101 VITE_APP_ATTACHMENT_TEMPLATE = ms-daop-personel-service
102
100 #人员服务 103 #人员服务
101 VITE_APP_PERSONAL_URL = 'ms-daop-personel-service' 104 VITE_APP_PERSONAL_URL = 'ms-daop-personel-service'
102 #数据资产接口地址 105 #数据资产接口地址
......
1 import { ElMessage } from 'element-plus' 1 import { ElMessage } from 'element-plus'
2 import { getDownloadUrl, download } from "@/utils/common"; 2 import { getDownloadUrl, download } from "@/utils/common";
3 import { getImageContent } from "@/api/modules/queryService"; 3 import { getImageContent } from "@/api/modules/queryService";
4 import { getDownFileSignByUrl, obsDownloadRequest, parseAndDecodeUrl } from './obsService';
4 5
5 export const onUploadFilePreview = (file) => { 6 // export const onUploadFilePreview = (file) => {
6 let url = file.url; 7 // let url = file.url;
7 getImageContent(url).then((res: any) => { 8 // getImageContent(url).then((res: any) => {
9 // if (res && !res.msg) {
10 // let name = file.name;
11 // var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : '';
12 // if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览
13 // let fileUrl = <string>getDownloadUrl(res, name, fileSuffix);
14 // let win = window.open(fileUrl, name);
15 // win && (win.document.title = name);
16 // } else {
17 // download(res, name, fileSuffix);
18 // }
19 // } else {
20 // res?.msg && ElMessage.error(res?.msg);
21 // }
22 // })
23 // }
24
25 // export const onUploadFileDownload = (file) => {
26 // let url = file.url;
27 // getImageContent(url).then((res: any) => {
28 // if (res && !res.msg) {
29 // let name = file.name;
30 // var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
31 // download(res, name, fileSuffix);
32 // } else {
33 // res?.msg && ElMessage.error(res?.msg);
34 // }
35 // })
36 // }
37 export const onUploadFileDownload = async (params) => {
38 const {name, url} = params;
39 const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(url).fileName);
40 if (!refSignInfo?.data) {
41 refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
42 return;
43 }
44 obsDownloadRequest(refSignInfo?.data).then((res: any) => {
45 if (res && !res.msg) {
46 var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
47 download(res, name, fileSuffix);
48 } else {
49 res?.msg && ElMessage.error(res?.msg);
50 }
51 })
52 }
53
54 export const onUploadFilePreview = async (params) => {
55 console.log(params, 'params');
56 const {name, url} = params;
57 // let f = formInline.value[item.field].find(i => i.name == file.name);
58 // let url = f.url;
59 let fileName: string = parseAndDecodeUrl(url).fileName;
60 const refSignInfo: any = await getDownFileSignByUrl(fileName);
61 if (!refSignInfo?.data) {
62 refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
63 return;
64 }
65 obsDownloadRequest(refSignInfo?.data).then((res: any) => {
8 if (res && !res.msg) { 66 if (res && !res.msg) {
9 let name = file.name;
10 var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : ''; 67 var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : '';
11 if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览 68 if (fileSuffix === 'png' || fileSuffix === 'jpeg' || fileSuffix === 'jpg' || fileSuffix === 'pdf') { //浏览器可以支持图片和pdf预览
12 let fileUrl = <string>getDownloadUrl(res, name, fileSuffix); 69 let fileUrl = <string>getDownloadUrl(res, name, fileSuffix);
...@@ -18,18 +75,5 @@ export const onUploadFilePreview = (file) => { ...@@ -18,18 +75,5 @@ export const onUploadFilePreview = (file) => {
18 } else { 75 } else {
19 res?.msg && ElMessage.error(res?.msg); 76 res?.msg && ElMessage.error(res?.msg);
20 } 77 }
21 }) 78 });
22 }
23
24 export const onUploadFileDownload = (file) => {
25 let url = file.url;
26 getImageContent(url).then((res: any) => {
27 if (res && !res.msg) {
28 let name = file.name;
29 var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
30 download(res, name, fileSuffix);
31 } else {
32 res?.msg && ElMessage.error(res?.msg);
33 }
34 })
35 } 79 }
......
...@@ -186,6 +186,12 @@ export const getProductTypeList = () => request({ ...@@ -186,6 +186,12 @@ export const getProductTypeList = () => request({
186 method: 'post', 186 method: 'post',
187 data: { paramCode: "PRODUCT_TYPE" } 187 data: { paramCode: "PRODUCT_TYPE" }
188 }) 188 })
189 /**获取模板附件 */
190 export const getTemplateFile = (params) => request({
191 url: `${import.meta.env.VITE_APP_ATTACHMENT_TEMPLATE}/attachment-template/list-attachment?tenantGuid=${params.tenantGuid}`,
192 method: 'get',
193 })
194
189 195
190 // 数据要素乘 196 // 数据要素乘
191 export const dataElements = [{ 197 export const dataElements = [{
...@@ -239,6 +245,9 @@ export const filterVal = (val, type) => { ...@@ -239,6 +245,9 @@ export const filterVal = (val, type) => {
239 case 'Y': 245 case 'Y':
240 approval = '已通过'; 246 approval = '已通过';
241 break; 247 break;
248 case 'N':
249 approval = '草稿中';
250 break;
242 case 'F': 251 case 'F':
243 approval = '通过并结束'; 252 approval = '通过并结束';
244 break; 253 break;
...@@ -252,3 +261,4 @@ export const filterVal = (val, type) => { ...@@ -252,3 +261,4 @@ export const filterVal = (val, type) => {
252 return approval; 261 return approval;
253 } 262 }
254 } 263 }
264
......
...@@ -9,6 +9,8 @@ import { ...@@ -9,6 +9,8 @@ import {
9 } from "@/api/modules/dataAsset"; 9 } from "@/api/modules/dataAsset";
10 import { pinyin } from 'pinyin-pro'; 10 import { pinyin } from 'pinyin-pro';
11 import useUserStore from "@/store/modules/user"; 11 import useUserStore from "@/store/modules/user";
12 import { getDictionaryTree } from '@/api/modules/dataInventory';
13 import { pa } from 'element-plus/es/locale';
12 14
13 const emits = defineEmits([ 15 const emits = defineEmits([
14 "cancelImport", 16 "cancelImport",
...@@ -92,16 +94,36 @@ const getFieldTypeList = () => { ...@@ -92,16 +94,36 @@ const getFieldTypeList = () => {
92 } 94 }
93 95
94 const getParamsListData = () => { 96 const getParamsListData = () => {
95 getParamsList({ 97 const params = {
96 dictType: "业务归属" 98 paramCode: '数据字典类型'
97 }).then((res: any) => { 99 }
100 getDictionaryTree(params).then((res: any) => {
98 paramsList.value = []; 101 paramsList.value = [];
99 if (res.code == proxy.$passCode) { 102 if (res.code == proxy.$passCode) {
100 paramsList.value = res.data || []; 103 res.data.forEach((item: any) => {
104 if (item.children) {
105 item.children.forEach((child: any) => {
106 paramsList.value.push({
107 label: child.name,
108 value: child.guid
109 })
110 })
111 }
112 })
101 } else { 113 } else {
102 proxy.$ElMessage.error(res.msg); 114 proxy.$ElMessage.error(res.msg);
103 } 115 }
104 }) 116 })
117 // getParamsList({
118 // dictType: "业务归属"
119 // }).then((res: any) => {
120 // paramsList.value = [];
121 // if (res.code == proxy.$passCode) {
122 // paramsList.value = res.data || [];
123 // } else {
124 // proxy.$ElMessage.error(res.msg);
125 // }
126 // })
105 } 127 }
106 128
107 const changeStep = (val) => { 129 const changeStep = (val) => {
......
...@@ -129,7 +129,7 @@ const baseInfoFormItems = ref([ ...@@ -129,7 +129,7 @@ const baseInfoFormItems = ref([
129 visible: true 129 visible: true
130 }, 130 },
131 { 131 {
132 label: '权主体', 132 label: '权主体',
133 type: 'input', 133 type: 'input',
134 placeholder: '请输入', 134 placeholder: '请输入',
135 field: 'rightMain', 135 field: 'rightMain',
...@@ -296,6 +296,7 @@ const baseInfoFormRules = ref({ ...@@ -296,6 +296,7 @@ const baseInfoFormRules = ref({
296 propertyDescription: [required('请填写资源描述')], 296 propertyDescription: [required('请填写资源描述')],
297 sceneDescription: [required('请填写应用场景描述')], 297 sceneDescription: [required('请填写应用场景描述')],
298 sceneLimit: [required('请填写应用场景限制')], 298 sceneLimit: [required('请填写应用场景限制')],
299 rightMain: [required('请填写权利主体')],
299 }); 300 });
300 301
301 const getTableFieldPromise: any = ref({}); 302 const getTableFieldPromise: any = ref({});
......
...@@ -317,7 +317,7 @@ const handleCreate = () => { ...@@ -317,7 +317,7 @@ const handleCreate = () => {
317 <div class="type">{{ item.subjectDomainName || item.subjectDomain }}</div> 317 <div class="type">{{ item.subjectDomainName || item.subjectDomain }}</div>
318 <div class="type">{{ item.damTypeName || '--' }}</div> 318 <div class="type">{{ item.damTypeName || '--' }}</div>
319 <div class="type">{{ item.isRegister == 'Y' ? '已登记' : '未登记' }}</div> 319 <div class="type">{{ item.isRegister == 'Y' ? '已登记' : '未登记' }}</div>
320 <div class="type">{{ item.foundMode == '1' ? '自建' : '加工交付' }}</div> 320 <div class="type">{{ item.foundMode ? (item.foundMode === '1' ? '自建' : '加工交付') : '--' }}</div>
321 </div> 321 </div>
322 <div class="desc">{{ item.propertyDescription }}</div> 322 <div class="desc">{{ item.propertyDescription }}</div>
323 <el-popover v-model="cardBtnVisible" placement="bottom" width="96" trigger="click" 323 <el-popover v-model="cardBtnVisible" placement="bottom" width="96" trigger="click"
......
...@@ -31,7 +31,8 @@ import { ...@@ -31,7 +31,8 @@ import {
31 exportDictionaryFileds, 31 exportDictionaryFileds,
32 checkDeleteDictionary, 32 checkDeleteDictionary,
33 checkDeleteDictionaryScheme, 33 checkDeleteDictionaryScheme,
34 checkDictionaryData 34 checkDictionaryData,
35 getNewDataTypeList
35 } from '@/api/modules/dataInventory'; 36 } from '@/api/modules/dataInventory';
36 37
37 const { proxy } = getCurrentInstance() as any; 38 const { proxy } = getCurrentInstance() as any;
...@@ -353,6 +354,10 @@ const editTableInfo = ref({ ...@@ -353,6 +354,10 @@ const editTableInfo = ref({
353 field: 'fieldType', 354 field: 'fieldType',
354 default: '', 355 default: '',
355 options: [], 356 options: [],
357 props: {
358 label: 'label',
359 value: 'value'
360 },
356 clearable: true, 361 clearable: true,
357 required: true 362 required: true
358 }, 363 },
...@@ -603,21 +608,14 @@ const setFormItems = (row: any = null) => { ...@@ -603,21 +608,14 @@ const setFormItems = (row: any = null) => {
603 } 608 }
604 609
605 // 获取数据类型列表 610 // 获取数据类型列表
606 const getDataType = (type) => { 611 const getDataType = () => {
607 let params = { 612 let params = {
608 paramCode: type 613 dictType: "字段类型"
609 } 614 }
610 getParamsList(params).then((res: any) => { 615 getNewDataTypeList(params).then((res: any) => {
611 if (res.code == proxy.$passCode) { 616 if (res.code == proxy.$passCode) {
612 const data = res.data 617 const data = res.data
613 if (type == 'DATA_TYPE') { 618 editTableInfo.value['fieldType'].options = data
614 data.map(item => {
615 item.label = item.paramName
616 item.value = item.paramValue
617 })
618 dataTypeList.value = data
619 editTableInfo.value['fieldType'].options = data
620 }
621 } else { 619 } else {
622 ElMessage({ 620 ElMessage({
623 type: 'error', 621 type: 'error',
...@@ -1751,7 +1749,7 @@ onActivated(() => { ...@@ -1751,7 +1749,7 @@ onActivated(() => {
1751 }) 1749 })
1752 1750
1753 onBeforeMount(() => { 1751 onBeforeMount(() => {
1754 getDataType('DATA_TYPE') 1752 getDataType()
1755 getTreeData() 1753 getTreeData()
1756 }) 1754 })
1757 1755
......
...@@ -83,8 +83,8 @@ const tableInfo = ref({ ...@@ -83,8 +83,8 @@ const tableInfo = ref({
83 } 83 }
84 }, 84 },
85 { 85 {
86 label: '上架状态', field: 'listingStatus', type: 'switch', activeValue: 'Y', inactiveValue: 'N', switchWidth: 28, width: 100, align: 'center', isDisabled: (scope) => { 86 label: '上架状态', field: 'listingStatus', width: 100, getName: (scope) => {
87 return scope.row.approveState != 'Y'; 87 return scope.row.listingStatus == 'Y' ? '已上架' : '未上架';
88 } 88 }
89 }, 89 },
90 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME }, 90 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
...@@ -263,20 +263,36 @@ const tableBtnClick = (scope, btn) => { ...@@ -263,20 +263,36 @@ const tableBtnClick = (scope, btn) => {
263 name: 'productListingDetail', 263 name: 'productListingDetail',
264 query: { 264 query: {
265 guid: row.guid, 265 guid: row.guid,
266 type: 'detail' 266 type: 'detail',
267 name: row.damName,
268 exchangeGuid: row.exchangeGuid ? row.exchangeGuid : ''
267 } 269 }
268 }); 270 });
269 } 271 }
270 if (type == "edit" || type == "redit") { 272 if (type == "edit" || type == "redit") {
271 router.push({ 273 if (row.exchangeGuid) {
272 name: 'productListingDetail', 274 router.push({
273 query: { 275 name: 'productListingDetail',
274 guid: row.guid, 276 query: {
275 type: type == 'edit' ? 'edit' : 'redit', 277 guid: row.guid,
276 case: '2', 278 exchangeName: row.exchangeName,
277 name: row.damName 279 type: type == 'edit' ? 'edit' : 'redit',
278 } 280 case: '1',
279 }); 281 name: row.damName,
282 exchangeGuid: row.exchangeGuid
283 }
284 })
285 } else {
286 router.push({
287 name: 'productListingDetail',
288 query: {
289 guid: row.guid,
290 type: type == 'edit' ? 'edit' : 'redit',
291 case: '2',
292 name: row.damName
293 }
294 });
295 }
280 } 296 }
281 if (type == 'del') { 297 if (type == 'del') {
282 ElMessageBox.confirm(`数据删除后不可恢复,确定是否删除?`, "提示", { 298 ElMessageBox.confirm(`数据删除后不可恢复,确定是否删除?`, "提示", {
...@@ -496,21 +512,27 @@ onBeforeMount(() => { ...@@ -496,21 +512,27 @@ onBeforeMount(() => {
496 512
497 const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href 513 const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href
498 const demandListData: any = ref([ 514 const demandListData: any = ref([
499 { companyName: '北数所', listedNum: 16, processNum: 1235 },
500 { companyName: '深数所', listedNum: 16, processNum: 1235 },
501 { companyName: '苏数所', listedNum: 16, processNum: 1235 },
502 ]); 515 ]);
503 const btnClick = (item) => { 516 const btnClick = (item) => {
504 console.log(item) 517 console.log(item)
505 router.push({ 518 if (item.exchangeGuid) {
506 name: "productListingDetail", 519 router.push({
507 query: { 520 name: "productListingDetail",
508 exchangeGuid: item.exchangeGuid, 521 query: {
509 exchangeName: item.exchangeName, 522 exchangeGuid: item.exchangeGuid,
510 type: 'add', 523 exchangeName: item.exchangeName,
511 groundingPick: '登记得数交所', 524 type: 'add',
512 }, 525 },
513 }); 526 });
527 } else {
528 router.push({
529 name: "productListingDetail",
530 query: {
531 type: 'add',
532 case: '2',
533 },
534 });
535 }
514 } 536 }
515 537
516 538
...@@ -520,10 +542,10 @@ const btnClick = (item) => { ...@@ -520,10 +542,10 @@ const btnClick = (item) => {
520 <div class="container_wrap"> 542 <div class="container_wrap">
521 <div class="table_tool_wrap"> 543 <div class="table_tool_wrap">
522 <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" /> 544 <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" />
523 <div class="tools_btns"> 545 <!-- <div class="tools_btns">
524 <el-button type="primary" @click="toPatn('add')" v-preReClick>新建</el-button> 546 <el-button type="primary" @click="toPatn('add')" v-preReClick>新建</el-button>
525 <el-button type="primary" @click="toPatn1('add', 'add1')" v-preReClick>新建</el-button> 547 <el-button type="primary" @click="toPatn1('add', 'add1')" v-preReClick>新建</el-button>
526 </div> 548 </div> -->
527 </div> 549 </div>
528 <div class="list-content"> 550 <div class="list-content">
529 <div class="card-content" v-for="item in demandListData" :key="item.guid"> 551 <div class="card-content" v-for="item in demandListData" :key="item.guid">
...@@ -544,9 +566,9 @@ const btnClick = (item) => { ...@@ -544,9 +566,9 @@ const btnClick = (item) => {
544 </div> 566 </div>
545 </div> 567 </div>
546 </div> 568 </div>
547 <div class="operator-btn"> 569 <div class="operator-btn" @click="btnClick(item)">
548 <!-- <div class="left-btn borderRight" @click="btnClick(item)">更新模板</div> --> 570 <!-- <div class="left-btn borderRight" @click="btnClick(item)">更新模板</div> -->
549 <div class="left-btn" @click="btnClick(item)">资产登记</div> 571 <div class="left-btn">资产登记</div>
550 </div> 572 </div>
551 </div> 573 </div>
552 </div> 574 </div>
...@@ -571,7 +593,7 @@ const btnClick = (item) => { ...@@ -571,7 +593,7 @@ const btnClick = (item) => {
571 <style scoped lang="scss"> 593 <style scoped lang="scss">
572 .table_tool_wrap { 594 .table_tool_wrap {
573 width: 100%; 595 width: 100%;
574 height: 84px !important; 596 height: 50px !important;
575 padding: 0 8px; 597 padding: 0 8px;
576 598
577 .tools_btns { 599 .tools_btns {
...@@ -644,6 +666,8 @@ const btnClick = (item) => { ...@@ -644,6 +666,8 @@ const btnClick = (item) => {
644 width: 100%; 666 width: 100%;
645 height: 40px; 667 height: 40px;
646 line-height: 40px; 668 line-height: 40px;
669 background: #4fa1a4;
670 color: #fff;
647 cursor: pointer; 671 cursor: pointer;
648 // &::after { 672 // &::after {
649 // content: ''; 673 // content: '';
...@@ -662,9 +686,9 @@ const btnClick = (item) => { ...@@ -662,9 +686,9 @@ const btnClick = (item) => {
662 // text-align: center; 686 // text-align: center;
663 // cursor: pointer; 687 // cursor: pointer;
664 688
665 &:hover { 689 // &:hover {
666 color: #4fa1a4; 690 // color: #4fa1a4;
667 } 691 // }
668 692
669 // } 693 // }
670 } 694 }
......
...@@ -15,7 +15,7 @@ import { changeNum } from '@/utils/common'; ...@@ -15,7 +15,7 @@ import { changeNum } from '@/utils/common';
15 import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common'; 15 import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common';
16 import { getAreaData, getServiceTenants, getSingleList } from "@/api/modules/queryService"; 16 import { getAreaData, getServiceTenants, getSingleList } from "@/api/modules/queryService";
17 import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList, getServiceDetail } from "@/api/modules/dataAsset"; 17 import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList, getServiceDetail } from "@/api/modules/dataAsset";
18 import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway, getDataExchangeProductList } from "@/api/modules/dataProduct"; 18 import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway, getDataExchangeProductList, getTemplateFile } from "@/api/modules/dataProduct";
19 import { getMatchDetail } from "@/api/modules/dataFinance"; 19 import { getMatchDetail } from "@/api/modules/dataFinance";
20 import { useValidator } from '@/hooks/useValidator'; 20 import { useValidator } from '@/hooks/useValidator';
21 import { getCamundaDeploymentId } from "@/api/modules/workFlowService"; 21 import { getCamundaDeploymentId } from "@/api/modules/workFlowService";
...@@ -139,7 +139,7 @@ const exchangeName = computed(() => { ...@@ -139,7 +139,7 @@ const exchangeName = computed(() => {
139 139
140 const listingFormRef = ref(); 140 const listingFormRef = ref();
141 const subForm = ref({}); 141 const subForm = ref({});
142 const formInfo = ref({ 142 const formInfo = ref<any>({
143 id: 'check-form', 143 id: 'check-form',
144 col: 'col3', 144 col: 'col3',
145 items: [ 145 items: [
...@@ -297,7 +297,6 @@ const formInfo = ref({ ...@@ -297,7 +297,6 @@ const formInfo = ref({
297 disabled: false, 297 disabled: false,
298 required: true, 298 required: true,
299 }, 299 },
300
301 { 300 {
302 label: '定价金额', 301 label: '定价金额',
303 type: 'input', 302 type: 'input',
...@@ -324,62 +323,17 @@ const formInfo = ref({ ...@@ -324,62 +323,17 @@ const formInfo = ref({
324 disabled: false, 323 disabled: false,
325 required: true, 324 required: true,
326 }, 325 },
327
328 // {
329 // label: '产品价格',
330 // type: 'checkbox-input-item',
331 // placeholder: '面议',
332 // field: 'isDiscussPersonally',
333 // default: 'Y',
334 // trueValue: 'Y',
335 // falseValue: 'N',
336 // children: [
337 // {
338 // label: '',
339 // type: 'input',
340 // placeholder: '请输入产品参考价',
341 // field: 'productPrice',
342 // default: '',
343 // maxlength: 10,
344 // disabled: false,
345 // clearable: true,
346 // visible: false,
347 // style: { width: '100%', margin: 0 }
348 // }
349 // ],
350 // required: true,
351 // col: 'checkbox-input'
352 // },
353 // {
354 // label: '审核后自动上架',
355 // type: 'switch-checkbox-group',
356 // field: 'autoGrounding',
357 // children: [
358 // {
359 // label: '',
360 // type: 'switch',
361 // field: 'isApproveGrounding',
362 // default: 'Y',
363 // activeValue: 'Y',
364 // inactiveValue: 'N',
365 // visible: true
366 // },
367 // ],
368 // clearable: false,
369 // required: true,
370 // },
371 { 326 {
372 label: "登记数交所", 327 label: "登记数交所",
373 type: "input", 328 type: "input",
374 placeholder: "请输入", 329 placeholder: "请输入",
375 field: "exchangeName", 330 field: "exchangeName",
376 default: exchangeName, 331 default: route.query.exchangeName ? route.query.exchangeName : '',
377 clearable: true, 332 clearable: true,
378 disabled: true, 333 disabled: true,
379 required: true, 334 required: true,
380 visible: true 335 visible: true
381 }, 336 }, {
382 {
383 label: '产品描述', 337 label: '产品描述',
384 type: 'textarea-rich', 338 type: 'textarea-rich',
385 placeholder: '该数据资产主要包含的信息,数据更新方式等', 339 placeholder: '该数据资产主要包含的信息,数据更新方式等',
...@@ -424,7 +378,7 @@ const formInfo = ref({ ...@@ -424,7 +378,7 @@ const formInfo = ref({
424 accept: '.jpg, .png, .jpeg ', 378 accept: '.jpg, .png, .jpeg ',
425 type: 'upload-file', 379 type: 'upload-file',
426 placeholder: '请选择', 380 placeholder: '请选择',
427 field: 'registrationCertificate', 381 field: 'registrationCertificateInfo',
428 default: [], 382 default: [],
429 limit: 1, 383 limit: 1,
430 block: false, 384 block: false,
...@@ -437,7 +391,7 @@ const formInfo = ref({ ...@@ -437,7 +391,7 @@ const formInfo = ref({
437 accept: '.png, .pdf', 391 accept: '.png, .pdf',
438 type: 'upload-file', 392 type: 'upload-file',
439 placeholder: '请选择', 393 placeholder: '请选择',
440 field: 'qualityEvaluationFile', 394 field: 'qualityEvaluationFileInfo',
441 default: [], 395 default: [],
442 limit: 1, 396 limit: 1,
443 block: false, 397 block: false,
...@@ -448,12 +402,12 @@ const formInfo = ref({ ...@@ -448,12 +402,12 @@ const formInfo = ref({
448 label: "质量评估机构", 402 label: "质量评估机构",
449 type: "select", 403 type: "select",
450 placeholder: "请选择", 404 placeholder: "请选择",
451 field: "qualityEvaluationInstitutionGuid", 405 field: "qualityEvaluationInstitution",
452 default: '', 406 default: '',
453 options: [], 407 options: [],
454 props: { 408 props: {
455 value: 'value', 409 value: 'tenantName',
456 label: 'label' 410 label: 'tenantName'
457 }, 411 },
458 allowCreate: true, 412 allowCreate: true,
459 filterable: true, 413 filterable: true,
...@@ -472,7 +426,7 @@ const formInfo = ref({ ...@@ -472,7 +426,7 @@ const formInfo = ref({
472 accept: '.png, .pdf', 426 accept: '.png, .pdf',
473 type: 'upload-file', 427 type: 'upload-file',
474 placeholder: '请选择', 428 placeholder: '请选择',
475 field: 'costAssessmentFile', 429 field: 'costAssessmentFileInfo',
476 default: [], 430 default: [],
477 limit: 1, 431 limit: 1,
478 block: false, 432 block: false,
...@@ -483,11 +437,11 @@ const formInfo = ref({ ...@@ -483,11 +437,11 @@ const formInfo = ref({
483 label: "价值评估机构", 437 label: "价值评估机构",
484 type: "select", 438 type: "select",
485 placeholder: "请选择", 439 placeholder: "请选择",
486 field: "costAssessmentInstitutionGuid", 440 field: "costAssessmentInstitution",
487 default: '', 441 default: '',
488 options: [], 442 options: [],
489 props: { 443 props: {
490 value: 'guid', 444 value: 'tenantName',
491 label: 'tenantName' 445 label: 'tenantName'
492 }, 446 },
493 allowCreate: true, 447 allowCreate: true,
...@@ -503,12 +457,12 @@ const formInfo = ref({ ...@@ -503,12 +457,12 @@ const formInfo = ref({
503 accept: '.png, .pdf', 457 accept: '.png, .pdf',
504 type: 'upload-file', 458 type: 'upload-file',
505 placeholder: '请选择', 459 placeholder: '请选择',
506 field: 'commitmentLetter', 460 field: 'commitmentLetterInfo',
507 templateUrl: 'http://www.baidu.com', 461 templateUrl: 'http://www.baidu.com',
508 default: [], 462 default: [],
509 limit: 1, 463 limit: 1,
510 block: true, 464 block: true,
511 required: false, 465 required: true,
512 visible: true 466 visible: true
513 }, 467 },
514 { 468 {
...@@ -517,12 +471,12 @@ const formInfo = ref({ ...@@ -517,12 +471,12 @@ const formInfo = ref({
517 accept: '.png, .pdf', 471 accept: '.png, .pdf',
518 type: 'upload-file', 472 type: 'upload-file',
519 placeholder: '请选择', 473 placeholder: '请选择',
520 field: 'accreditFile', 474 field: 'accreditFileInfo',
521 templateUrl: 'http://www.baidu.com', 475 templateUrl: 'http://www.baidu.com',
522 default: [], 476 default: [],
523 limit: 1, 477 limit: 1,
524 block: true, 478 block: true,
525 required: false, 479 required: true,
526 visible: true 480 visible: true
527 }, 481 },
528 { 482 {
...@@ -531,12 +485,12 @@ const formInfo = ref({ ...@@ -531,12 +485,12 @@ const formInfo = ref({
531 accept: '.png, .pdf', 485 accept: '.png, .pdf',
532 type: 'upload-file', 486 type: 'upload-file',
533 placeholder: '请选择', 487 placeholder: '请选择',
534 field: 'productDetail', 488 field: 'productDetailInfo',
535 templateUrl: 'http://www.baidu.com', 489 templateUrl: 'http://www.baidu.com',
536 default: [], 490 default: [],
537 limit: 1, 491 limit: 1,
538 block: true, 492 block: true,
539 required: false, 493 required: true,
540 visible: true 494 visible: true
541 }, 495 },
542 { 496 {
...@@ -568,14 +522,29 @@ const formInfo = ref({ ...@@ -568,14 +522,29 @@ const formInfo = ref({
568 priceUnit: [ 522 priceUnit: [
569 { required: true, message: "请选择价格单位", trigger: "change", }, 523 { required: true, message: "请选择价格单位", trigger: "change", },
570 ], 524 ],
525 damType: [
526 { required: true, message: "请选择资产类型", trigger: "change", },
527 ],
528 damCode: [
529 { required: true, message: "请填写证书编号", trigger: "blur", },
530 ],
531 dateRange: [
532 { required: true, message: "请选择数据时间范围", trigger: "change", },
533 ],
534 dataScale: [
535 { required: true, message: "请填写数据规模", trigger: "blur", },
536 ],
537 exchangeName: [
538 { required: true, message: "请填写登记数交所", trigger: "blur", },
539 ],
571 content: [ 540 content: [
572 { 541 {
573 validator: (rule: any, value: any, callback: any) => { 542 validator: (rule: any, value: any, callback: any) => {
574 let formInline = listingFormRef.value.formInline; 543 let formInline = listingFormRef.value.formInline;
575 if (formInline.damType == '1' || formInline.damType == '2') { 544 // if (formInline.damType == '1' || formInline.damType == '2') {
576 callback(); 545 // callback();
577 return; 546 // return;
578 } 547 // }
579 if (!value?.length) { 548 if (!value?.length) {
580 callback(new Error('请填写产品描述')) 549 callback(new Error('请填写产品描述'))
581 } else { 550 } else {
...@@ -584,14 +553,15 @@ const formInfo = ref({ ...@@ -584,14 +553,15 @@ const formInfo = ref({
584 }, trigger: 'change' 553 }, trigger: 'change'
585 }, 554 },
586 ], 555 ],
556
587 feeDesc: [ 557 feeDesc: [
588 { 558 {
589 validator: (rule: any, value: any, callback: any) => { 559 validator: (rule: any, value: any, callback: any) => {
590 let formInline = listingFormRef.value.formInline; 560 let formInline = listingFormRef.value.formInline;
591 if (formInline.damType == '1' || formInline.damType == '2') { 561 // if (formInline.damType == '1' || formInline.damType == '2') {
592 callback(); 562 // callback();
593 return; 563 // return;
594 } 564 // }
595 if (!value?.length) { 565 if (!value?.length) {
596 callback(new Error('请填写收费说明')) 566 callback(new Error('请填写收费说明'))
597 } else { 567 } else {
...@@ -611,6 +581,46 @@ const formInfo = ref({ ...@@ -611,6 +581,46 @@ const formInfo = ref({
611 // }, trigger: 'change' 581 // }, trigger: 'change'
612 // }, 582 // },
613 // ], 583 // ],
584 // 校验承诺函
585 commitmentLetterInfo: [
586 {
587 validator: (rule: any, value: any, callback: any) => {
588 let formInline = listingFormRef.value.formInline;
589 if (!value?.length) {
590 callback(new Error('请上传承诺函'))
591 } else {
592 callback();
593 }
594 }, trigger: 'change'
595 },
596 ],
597 // 校验授权文件
598 accreditFileInfo: [
599 {
600 validator: (rule: any, value: any, callback: any) => {
601 let formInline = listingFormRef.value.formInline;
602 if (!value?.length) {
603 callback(new Error('请上传授权文件'))
604 } else {
605 callback();
606 }
607 }, trigger: 'change'
608 },
609 ],
610 // 校验商品详细介绍
611 productDetailInfo: [
612 {
613 validator: (rule: any, value: any, callback: any) => {
614 let formInline = listingFormRef.value.formInline;
615 if (!value?.length) {
616 callback(new Error('请上传商品详细介绍'))
617 } else {
618 callback();
619 }
620 }, trigger: 'change'
621 },
622 ],
623
614 } 624 }
615 }) 625 })
616 626
...@@ -695,7 +705,7 @@ const getTableInfo = () => { ...@@ -695,7 +705,7 @@ const getTableInfo = () => {
695 }) 705 })
696 } 706 }
697 707
698 const getProductDetail = () => { 708 const getProductDetail = async () => {
699 flowDetailLoading.value = true; 709 flowDetailLoading.value = true;
700 getListingDetail({ guid }).then((res: any) => { 710 getListingDetail({ guid }).then((res: any) => {
701 flowDetailLoading.value = false; 711 flowDetailLoading.value = false;
...@@ -704,7 +714,21 @@ const getProductDetail = () => { ...@@ -704,7 +714,21 @@ const getProductDetail = () => {
704 flowDetail.value = data; 714 flowDetail.value = data;
705 deploymentId.value = data.approveVO.camundaDeploymentId 715 deploymentId.value = data.approveVO.camundaDeploymentId
706 processInstanceId.value = data.approveVO.camundaInstanceId 716 processInstanceId.value = data.approveVO.camundaInstanceId
707 console.log(data, '-----------------'); 717 // if (res.data.qualityEvaluationFile && res.data.qualityEvaluationFile.length) {
718 // flowDetail.value.qualityEvaluationFile = { name: res.data.qualityEvaluationFile[0].name, url: res.data.qualityEvaluationFile[0].url }
719 // }
720 // if (res.data.costAssessmentFile && res.data.costAssessmentFile.length) {
721 // flowDetail.value.costAssessmentFile = { name: res.data.costAssessmentFile[0].name, url: res.data.costAssessmentFile[0].url }
722 // }
723 // if (res.data.commitmentLetter && res.data.commitmentLetter.length) {
724 // flowDetail.value.commitmentLetter = { name: res.data.commitmentLetter[0].name, url: res.data.commitmentLetter[0].url }
725 // }
726 // if (res.data.accreditFile && res.data.accreditFile.length) {
727 // flowDetail.value.accreditFile = { name: res.data.accreditFile[0].name, url: res.data.accreditFile[0].url }
728 // }
729 // if (res.data.productDetail && res.data.productDetail.length) {
730 // flowDetail.value.productDetail = { name: res.data.productDetail[0].name, url: res.data.productDetail[0].url }
731 // }
708 let coverageArea = data.coverageArea || []; 732 let coverageArea = data.coverageArea || [];
709 if (data.coverageArea?.[0]?.[0] == 'all') { 733 if (data.coverageArea?.[0]?.[0] == 'all') {
710 setFormItems({ ...flowDetail.value, coverageArea: coverageArea }, true); 734 setFormItems({ ...flowDetail.value, coverageArea: coverageArea }, true);
...@@ -731,13 +755,16 @@ const getProductDetail = () => { ...@@ -731,13 +755,16 @@ const getProductDetail = () => {
731 message: res.msg, 755 message: res.msg,
732 }); 756 });
733 } 757 }
734 }).catch((res) => { 758 })
735 flowDetailLoading.value = false; 759
736 ElMessage({ 760 // .catch((res) => {
737 type: "error", 761 // flowDetailLoading.value = false;
738 message: '获取详情失败', 762 // console.log(res, '-----------------');
739 }); 763 // ElMessage({
740 }); 764 // type: "error",
765 // message: '获取详情失败',
766 // });
767 // });
741 } 768 }
742 769
743 // 获取审批信息 770 // 获取审批信息
...@@ -879,42 +906,101 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -879,42 +906,101 @@ const submitForm = (btn, formEl, tosub = false) => {
879 } else { 906 } else {
880 if (detailType == 'add') { 907 if (detailType == 'add') {
881 // 上架交易所 908 // 上架交易所
909 console.log(params, '--------上架交易所 ---------');
910 params.immediateApprove = btn.value == 'submit' ? true : false;
911 params.registrationCertificate = params.registrationCertificateInfo.length ? { name: params.registrationCertificateInfo[0].name, url: params.registrationCertificateInfo[0].url } : {};
912 params.accreditFile = params.accreditFileInfo.length ? [params.accreditFileInfo[0].url] : '';
913 params.commitmentLetter = params.commitmentLetterInfo.length ? [params.commitmentLetterInfo[0].url] : [];
914 params.assessmentFile = params.costAssessmentFileInfo.length ? [params.costAssessmentFileInfo[0].url] : [];
915 params.productDetail = params.productDetailInfo.length ? [params.productDetailInfo[0].url] : [];
916 params.evaluationFile = params.qualityEvaluationFileInfo.length ? [params.qualityEvaluationFileInfo[0].url] : [];
917 params.exchangeGuid = route.query.exchangeGuid;
918 params.qualityEvaluationInstitutionGuid = qualityEvaluationData.value.find((item: any) => item.tenantName == params.qualityEvaluationInstitution)?.guid || '';
919 params.costAssessmentInstitutionGuid = costAssessmentData.value.find((item: any) => item.tenantName == params.costAssessmentInstitution)?.guid || '';
920 delete params.exchangeName;
921 delete params.registrationCertificateInfo;
922 delete params.accreditFileInfo;
923 delete params.commitmentLetterInfo;
924 delete params.costAssessmentFileInfo;
925 delete params.productDetailInfo;
926 delete params.qualityEvaluationFileInfo;
927 console.log(params, '-------rwrwerwer----------');
928 listingSave(params).then((res: any) => {
929 if (res.code == proxy.$passCode) {
930 ElMessage({
931 type: "success",
932 message: '提交成功',
933 });
934 flowDetailLoading.value = false;
935 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
936 assetStore.set(true);
937 router.push({
938 name: "productListing",
939 query: {},
940 });
941 } else {
942 ElMessage({
943 type: "error",
944 message: res.msg,
945 });
946 flowDetailLoading.value = false;
947 }
948 }).catch((res) => {
949 ElMessage({
950 type: "error",
951 message: '提交失败',
952 });
953 flowDetailLoading.value = false;
954 });
955 } else {
956 // listingUpdate
957 // 上架交易所
958 params.guid = guid;
882 params.immediateApprove = btn.value == 'submit' ? true : false; 959 params.immediateApprove = btn.value == 'submit' ? true : false;
883 params.accreditFile = params.accreditFile.length ? { name: params.accreditFile[0].name, url: params.accreditFile[0].url } : {}; 960 params.registrationCertificate = params.registrationCertificateInfo.length ? { name: params.registrationCertificateInfo[0].name, url: params.registrationCertificateInfo[0].url } : {};
884 params.commitmentLetter = params.commitmentLetter.length ? { name: params.commitmentLetter[0].name, url: params.commitmentLetter[0].url } : {}; 961 params.accreditFile = params.accreditFileInfo.length ? [params.accreditFileInfo[0].url] : null;
885 params.costAssessmentFile = params.costAssessmentFile.length ? { name: params.costAssessmentFile[0].name, url: params.costAssessmentFile[0].url } : {}; 962 params.commitmentLetter = params.commitmentLetterInfo.length ? [params.commitmentLetterInfo[0].url] : [];
886 params.productDetail = params.productDetail.length ? { name: params.productDetail[0].name, url: params.productDetail[0].url } : {}; 963 params.costAssessmentFile = params.costAssessmentFileInfo.length ? [params.costAssessmentFileInfo[0].url] : [];
887 params.qualityEvaluationFile = params.qualityEvaluationFile.length ? { name: params.qualityEvaluationFile[0].name, url: params.qualityEvaluationFile[0].url } : {}; 964 params.productDetail = params.productDetailInfo.length ? [params.productDetailInfo[0].url] : [];
888 params.registrationCertificate = params.registrationCertificate.length ? { name: params.registrationCertificate[0].name, url: params.registrationCertificate[0].url } : {}; 965 params.evaluationFile = params.qualityEvaluationFileInfo.length ? [params.qualityEvaluationFileInfo[0].url] : [];
889 params.exchangeGuid = route.query.exchangeGuid; 966 params.exchangeGuid = route.query.exchangeGuid;
890 console.log(params, '-----------------'); 967 params.qualityEvaluationInstitutionGuid = qualityEvaluationData.value.find((item: any) => item.tenantName == params.qualityEvaluationInstitution)?.guid || '';
891 // listingSave(params).then((res: any) => { 968 params.costAssessmentInstitutionGuid = costAssessmentData.value.find((item: any) => item.tenantName == params.costAssessmentInstitution)?.guid || '';
892 // if (res.code == proxy.$passCode) { 969 delete params.exchangeName;
893 // ElMessage({ 970 delete params.registrationCertificateInfo;
894 // type: "success", 971 delete params.accreditFileInfo;
895 // message: '提交成功', 972 delete params.commitmentLetterInfo;
896 // }); 973 delete params.costAssessmentFileInfo;
897 // flowDetailLoading.value = false; 974 delete params.productDetailInfo;
898 // userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 975 delete params.qualityEvaluationFileInfo;
899 // assetStore.set(true); 976 console.log(params, '-------rwrwerwer----------');
900 // router.push({ 977 listingUpdate(params).then((res: any) => {
901 // name: "productListing", 978 if (res.code == proxy.$passCode) {
902 // query: {}, 979 ElMessage({
903 // }); 980 type: "success",
904 // } else { 981 message: '提交成功',
905 // ElMessage({ 982 });
906 // type: "error", 983 flowDetailLoading.value = false;
907 // message: res.msg, 984 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
908 // }); 985 assetStore.set(true);
909 // flowDetailLoading.value = false; 986 router.push({
910 // } 987 name: "productListing",
911 // }).catch((res) => { 988 query: {},
912 // ElMessage({ 989 });
913 // type: "error", 990 } else {
914 // message: '提交失败', 991 ElMessage({
915 // }); 992 type: "error",
916 // flowDetailLoading.value = false; 993 message: res.msg,
917 // }); 994 });
995 flowDetailLoading.value = false;
996 }
997 }).catch((res) => {
998 ElMessage({
999 type: "error",
1000 message: '提交失败',
1001 });
1002 flowDetailLoading.value = false;
1003 });
918 } 1004 }
919 } 1005 }
920 1006
...@@ -979,9 +1065,10 @@ const btnClick = (btn) => { ...@@ -979,9 +1065,10 @@ const btnClick = (btn) => {
979 1065
980 const setFormItems = (row: any = null, isDetail = false) => { 1066 const setFormItems = (row: any = null, isDetail = false) => {
981 console.log(row, '--------1---------'); 1067 console.log(row, '--------1---------');
982 formInfo.value.items.map((item: any) => { 1068 formInfo.value.items.forEach((item: any) => {
983 if (item.field == 'productImg') { 1069 if (item.field == 'productImg') {
984 item.default = row ? (row.productPic ? [row.productPic] : row[item.field] || []) : [] 1070 // item.default = row ? (row.productPic ? [row.productPic] : row[item.field] || []) : []
1071 item.default = row.productPic && Object.keys(row.productPic).length ? [row.productPic] : []
985 } else if (item.field == 'coverageAreas') { 1072 } else if (item.field == 'coverageAreas') {
986 if (row) { 1073 if (row) {
987 if (row.coverageAreas == 'Y') { 1074 if (row.coverageAreas == 'Y') {
...@@ -1008,12 +1095,6 @@ const setFormItems = (row: any = null, isDetail = false) => { ...@@ -1008,12 +1095,6 @@ const setFormItems = (row: any = null, isDetail = false) => {
1008 } 1095 }
1009 child.visible = item.default == 'N' 1096 child.visible = item.default == 'N'
1010 }) 1097 })
1011 } else if (item.field == 'isDiscussPersonally') {
1012 item.default = row ? row[item.field] : 'Y'
1013 item.children.map(child => {
1014 child.default = row ? row[child.field] : child.default;
1015 child.visible = item.default == 'N'
1016 })
1017 } else if (item.field == 'dataScale') { 1098 } else if (item.field == 'dataScale') {
1018 if (isDetail) { 1099 if (isDetail) {
1019 item.defaultValue = row.dataScale; 1100 item.defaultValue = row.dataScale;
...@@ -1028,24 +1109,50 @@ const setFormItems = (row: any = null, isDetail = false) => { ...@@ -1028,24 +1109,50 @@ const setFormItems = (row: any = null, isDetail = false) => {
1028 } else { 1109 } else {
1029 item.default = row ? row[item.field] : (item.default || '') 1110 item.default = row ? row[item.field] : (item.default || '')
1030 } 1111 }
1112 } else if (item.field == 'dateRange') {
1113 console.log(row, '--------2-22--------');
1114 if (row.dateRange) {
1115 item.default = row.dateRange;
1116 }
1117 if (row.timeAreaStart && row.timeAreaEnd) {
1118 item.default = [row.timeAreaStart, row.timeAreaEnd];
1119 }
1120 // else {
1121 // item.default = row ? [row.timeAreaStart, row.timeAreaEnd] : null;
1122 // }
1123 } else if (item.field == 'registrationCertificateInfo') {
1124 // item.default = row ? (row.registrationCertificate ? [row.registrationCertificate] : row[item.field] || []) : []
1125 item.default = row.registrationCertificate && Object.keys(row.registrationCertificate).length ? [row.registrationCertificate] : []
1031 } 1126 }
1032 else if (item.field == 'dateRange') { 1127 else if (item.field == 'costAssessmentFileInfo') {
1033 item.default = row ? [row.timeAreaStart, row.timeAreaEnd] : null; 1128 item.default = row ? (row.assessmentFile ? row.assessmentFile : row[item.field] || []) : []
1129 } else if (item.field == 'commitmentLetterInfo') {
1130 item.default = row ? (row.commitmentLetter ? row.commitmentLetter : row[item.field] || []) : []
1131 }
1132 else if (item.field == 'accreditFileInfo') {
1133 item.default = row ? (row.accreditFile ? row.accreditFile : row[item.field] || []) : []
1134 }
1135 else if (item.field == 'productDetailInfo') {
1136 item.default = row ? (row.productDetail ? row.productDetail : row[item.field] || []) : []
1137 }
1138 else if (item.field == 'qualityEvaluationFileInfo') {
1139 item.default = row ? (row.evaluationFile ? row.evaluationFile : row[item.field] || []) : []
1140 }
1141 else {
1142 item.default = row[item.field] !== undefined ? row[item.field] : (item.default || '');
1143 // if (item && item.hasOwnProperty('default')) {
1144 // item.default = row ? row[item.field] : (item.default || '');
1145 // } else {
1146 // console.warn(`Item does not have the 'default' property`);registrationCertificate
1147 // }
1034 } 1148 }
1035 // else {
1036 // if (item && item.hasOwnProperty('default')) {
1037 // item.default = row ? row[item.field] : (item.default || '');
1038 // } else {
1039 // console.warn(`Item does not have the 'default' property`);
1040 // }
1041 // }
1042 }) 1149 })
1043 } 1150 }
1044 1151
1045 const selectChange = async (val, row, info) => { 1152 const selectChange = async (val, row, info) => {
1046 if (row.field == 'damName') { 1153 if (row.field == 'damName') {
1047 const data = row.options.filter(o => o.damName == val); 1154 const data = row.options.filter(o => o.damName == val);
1048 console.log(data, '-----------------'); 1155 console.log(data, '-------123----------');
1049 let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : []; 1156 let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : [];
1050 await setFormItems({ ...info, coverageArea: coverageArea }); 1157 await setFormItems({ ...info, coverageArea: coverageArea });
1051 formInfo.value.items.at(0).default = val; 1158 formInfo.value.items.at(0).default = val;
...@@ -1053,12 +1160,12 @@ const selectChange = async (val, row, info) => { ...@@ -1053,12 +1160,12 @@ const selectChange = async (val, row, info) => {
1053 // formInfo.value.items.at(2).default = data.length ? data[0].subjectDomain : ''; 1160 // formInfo.value.items.at(2).default = data.length ? data[0].subjectDomain : '';
1054 formInfo.value.items.at(2).default = data.length ? data[0].damCode : ''; 1161 formInfo.value.items.at(2).default = data.length ? data[0].damCode : '';
1055 formInfo.value.items.at(4).defaultValue = data.length ? data[0].dataScale : ''; 1162 formInfo.value.items.at(4).defaultValue = data.length ? data[0].dataScale : '';
1056 formInfo.value.items.at(4).default = data.length && data[0].dataScale != null ? changeNum(data[0].dataScale, 0) : '--'; 1163 formInfo.value.items.at(4).default = data.length && data[0].dataScale != null ? changeNum(data[0].dataScale, 0) : '';
1057 formInfo.value.items.at(5).defaultValue = data.length ? data[0].caseNumber : ''; 1164 formInfo.value.items.at(5).defaultValue = data.length ? data[0].caseNumber : '';
1058 formInfo.value.items.at(5).default = data.length && data[0].caseNumber != null ? changeNum(data[0].caseNumber, 0) : '--'; 1165 formInfo.value.items.at(5).default = data.length && data[0].caseNumber != null ? changeNum(data[0].caseNumber, 0) : '';
1059 formInfo.value.items.at(-1).default = data.length ? data[0].damGuid : ''; 1166 formInfo.value.items.at(-1).default = data.length ? data[0].damGuid : '';
1060 formInfo.value.items.at(-3).required = data[0].damType != '1' && data[0].damType != '2'; 1167 // formInfo.value.items.at(-3).required = data[0].damType != '1' && data[0].damType != '2';
1061 formInfo.value.items.at(-4).required = data[0].damType != '1' && data[0].damType != '2'; 1168 // formInfo.value.items.at(-4).required = data[0].damType != '1' && data[0].damType != '2';
1062 if (data.length && data[0].coverageArea?.[0]?.[0] != 'all' && data[0].coverageArea) { 1169 if (data.length && data[0].coverageArea?.[0]?.[0] != 'all' && data[0].coverageArea) {
1063 let p: any = []; 1170 let p: any = [];
1064 data[0].coverageArea.forEach(area => { 1171 data[0].coverageArea.forEach(area => {
...@@ -1181,6 +1288,9 @@ onActivated(() => { ...@@ -1181,6 +1288,9 @@ onActivated(() => {
1181 case 'edit': 1288 case 'edit':
1182 tab.meta.title = `编辑-${damName}`; 1289 tab.meta.title = `编辑-${damName}`;
1183 break; 1290 break;
1291 case 'redit':
1292 tab.meta.title = `编辑-${damName}`;
1293 break;
1184 case 'check': 1294 case 'check':
1185 tab.meta.title = `详情-${damName}`; 1295 tab.meta.title = `详情-${damName}`;
1186 break; 1296 break;
...@@ -1201,7 +1311,7 @@ onBeforeMount(() => { ...@@ -1201,7 +1311,7 @@ onBeforeMount(() => {
1201 // case 1: 数交易所 case 2: 门户 1311 // case 1: 数交易所 case 2: 门户
1202 if (route.query.case == '2') { 1312 if (route.query.case == '2') {
1203 formInfo.value.items.forEach(item => { 1313 formInfo.value.items.forEach(item => {
1204 if (item.field == 'damCode' || item.field == 'exchangeGuids' || item.field == 'registrationCertificate' || item.field == 'qualityEvaluationFile' || item.field == 'qualityEvaluationInstitutionGuid' || item.field == 'costAssessmentFile' || item.field == 'costAssessmentInstitutionGuid' || item.field == 'commitmentLetter' || item.field == 'accreditFile' || item.field == 'productDetail') { 1314 if (item.field == 'damCode' || item.field == 'exchangeName' || item.field == 'registrationCertificateInfo' || item.field == 'qualityEvaluationFileInfo' || item.field == 'qualityEvaluationInstitution' || item.field == 'costAssessmentFileInfo' || item.field == 'costAssessmentInstitution' || item.field == 'commitmentLetterInfo' || item.field == 'accreditFileInfo' || item.field == 'productDetailInfo') {
1205 item.visible = false; 1315 item.visible = false;
1206 } 1316 }
1207 }) 1317 })
...@@ -1291,7 +1401,7 @@ onBeforeMount(() => { ...@@ -1291,7 +1401,7 @@ onBeforeMount(() => {
1291 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => { 1401 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
1292 if (res.code == proxy.$passCode) { 1402 if (res.code == proxy.$passCode) {
1293 qualityEvaluationData.value = res.data.records || []; 1403 qualityEvaluationData.value = res.data.records || [];
1294 let item = formInfo.value.items.find(item => item.field == 'qualityEvaluationInstitutionGuid'); 1404 let item = formInfo.value.items.find(item => item.field == 'qualityEvaluationInstitution');
1295 item && (item.options = qualityEvaluationData.value); 1405 item && (item.options = qualityEvaluationData.value);
1296 } else { 1406 } else {
1297 proxy.$ElMessage.error(res.msg); 1407 proxy.$ElMessage.error(res.msg);
...@@ -1301,7 +1411,7 @@ onBeforeMount(() => { ...@@ -1301,7 +1411,7 @@ onBeforeMount(() => {
1301 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12504" }).then((res: any) => { 1411 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12504" }).then((res: any) => {
1302 if (res.code == proxy.$passCode) { 1412 if (res.code == proxy.$passCode) {
1303 costAssessmentData.value = res.data.records || []; 1413 costAssessmentData.value = res.data.records || [];
1304 let item = formInfo.value.items.find(item => item.field == 'costAssessmentInstitutionGuid'); 1414 let item = formInfo.value.items.find(item => item.field == 'costAssessmentInstitution');
1305 item && (item.options = costAssessmentData.value); 1415 item && (item.options = costAssessmentData.value);
1306 } else { 1416 } else {
1307 proxy.$ElMessage.error(res.msg); 1417 proxy.$ElMessage.error(res.msg);
...@@ -1312,8 +1422,41 @@ onBeforeMount(() => { ...@@ -1312,8 +1422,41 @@ onBeforeMount(() => {
1312 } else { 1422 } else {
1313 getProducts(); 1423 getProducts();
1314 } 1424 }
1425 getTemplateInfo();
1426 })
1427
1428 // 获取模板信息
1429 const getTemplateInfo = () => {
1430 console.log(userData, '--------route.query.exchangeGuid---------');
1431 getTemplateFile({ tenantGuid: userData.tenantGuid }).then((res: any) => {
1432 if (res.code == proxy.$passCode) {
1433
1434 } else {
1435 ElMessage({
1436 type: "error",
1437 message: res.msg,
1438 });
1439 }
1440 })
1441 }
1442
1443 const priceWayInfo = computed(() => {
1444 return pricingMethodList.value.find(item => item.value == flowDetail.value.pricingWay)?.label || '--';
1445 })
1446 const timeRangeInfo = computed(() => {
1447 if (flowDetail.value.timeAreaStart && flowDetail.value.timeAreaEnd) {
1448 const startDate = flowDetail.value.timeAreaStart.split('T')[0];
1449 const endDate = flowDetail.value.timeAreaEnd.split('T')[0];
1450 return `${startDate} - ${endDate}`;
1451 }
1452 return '--';
1453 });
1454 const prcieInfo = computed(() => {
1455 // 还需要把flowDetail.value.productPrice 拼接priceUnitList.value.find(item => item.value == flowDetail.value.priceUnit)?.label
1456 return flowDetail.value.productPrice ? `${flowDetail.value.productPrice} ${priceUnitList.value.find(item => item.value == flowDetail.value.priceUnit)?.label}` : '--';
1315 }) 1457 })
1316 1458
1459
1317 </script> 1460 </script>
1318 1461
1319 <template> 1462 <template>
...@@ -1379,6 +1522,7 @@ onBeforeMount(() => { ...@@ -1379,6 +1522,7 @@ onBeforeMount(() => {
1379 :col="formInfo.col" @selectChange="selectChange" @checkboxChange="checkboxChange" 1522 :col="formInfo.col" @selectChange="selectChange" @checkboxChange="checkboxChange"
1380 @switchChange="switchChange" /> 1523 @switchChange="switchChange" />
1381 </div> 1524 </div>
1525
1382 <div class="list_panel" v-else> 1526 <div class="list_panel" v-else>
1383 <div class="list_item"> 1527 <div class="list_item">
1384 <span class="item_label">数据产品名称:</span> 1528 <span class="item_label">数据产品名称:</span>
...@@ -1388,13 +1532,13 @@ onBeforeMount(() => { ...@@ -1388,13 +1532,13 @@ onBeforeMount(() => {
1388 <span class="item_label">资产类型:</span> 1532 <span class="item_label">资产类型:</span>
1389 <span class="item_value">{{ flowDetail.damTypeName || '--' }}</span> 1533 <span class="item_value">{{ flowDetail.damTypeName || '--' }}</span>
1390 </div> 1534 </div>
1391 <div class="list_item"> 1535 <div class="list_item" v-if="route.query.exchangeGuid">
1392 <span class="item_label">证书编号:</span> 1536 <span class="item_label">证书编号:</span>
1393 <span class="item_value">{{ flowDetail.damCode || '--' }}</span> 1537 <span class="item_value">{{ flowDetail.damCode || '--' }}</span>
1394 </div> 1538 </div>
1395 <div class="list_item"> 1539 <div class="list_item">
1396 <span class="item_label">数据时间范围:</span> 1540 <span class="item_label">数据时间范围:</span>
1397 <span class="item_value">{{ (flowDetail.timeAreaStart - flowDetail.timeAreaEnd) || '--' }}</span> 1541 <span class="item_value">{{ timeRangeInfo || '--' }}</span>
1398 </div> 1542 </div>
1399 <div class="list_item"> 1543 <div class="list_item">
1400 <span class="item_label">交付方式:</span> 1544 <span class="item_label">交付方式:</span>
...@@ -1402,11 +1546,11 @@ onBeforeMount(() => { ...@@ -1402,11 +1546,11 @@ onBeforeMount(() => {
1402 </div> 1546 </div>
1403 <div class="list_item"> 1547 <div class="list_item">
1404 <span class="item_label">定价方式:</span> 1548 <span class="item_label">定价方式:</span>
1405 <span class="item_value">{{ flowDetail.pricingWayName || '--' }}</span> 1549 <span class="item_value">{{ priceWayInfo || '--' }}</span>
1406 </div> 1550 </div>
1407 <div class="list_item"> 1551 <div class="list_item">
1408 <span class="item_label">定价金额:</span> 1552 <span class="item_label">定价金额:</span>
1409 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span> 1553 <span class="item_value">{{ prcieInfo || '--' }}</span>
1410 </div> 1554 </div>
1411 <!-- <div class="list_item"> 1555 <!-- <div class="list_item">
1412 <span class="item_label">所属主题:</span> 1556 <span class="item_label">所属主题:</span>
...@@ -1433,9 +1577,9 @@ onBeforeMount(() => { ...@@ -1433,9 +1577,9 @@ onBeforeMount(() => {
1433 '--') 1577 '--')
1434 }}</span> 1578 }}</span>
1435 </div> --> 1579 </div> -->
1436 <div class="list_item"> 1580 <div class="list_item" v-if="route.query.exchangeGuid">
1437 <span class="item_label">登记数交所:</span> 1581 <span class="item_label">登记数交所:</span>
1438 <span class="item_value">{{ flowDetail.isApproveGrounding == 'Y' ? `自动上架` : '手动上架' }}</span> 1582 <span class="item_value">{{ flowDetail.exchangeName || '--' }}</span>
1439 </div> 1583 </div>
1440 <!-- <div class="list_item is_block"> 1584 <!-- <div class="list_item is_block">
1441 <span class="item_label">上架交易所:</span> 1585 <span class="item_label">上架交易所:</span>
...@@ -1457,7 +1601,7 @@ onBeforeMount(() => { ...@@ -1457,7 +1601,7 @@ onBeforeMount(() => {
1457 <span class="item_label">收费说明:</span> 1601 <span class="item_label">收费说明:</span>
1458 <span class="item_value">{{ flowDetail.feeDesc || '--' }}</span> 1602 <span class="item_value">{{ flowDetail.feeDesc || '--' }}</span>
1459 </div> 1603 </div>
1460 <div class="list_item is_block"> 1604 <div class="list_item1 is_block1">
1461 <div class="file_item" v-if="flowDetail.productPic && flowDetail.productPic.name"> 1605 <div class="file_item" v-if="flowDetail.productPic && flowDetail.productPic.name">
1462 <span class="item_label">产品图片:</span> 1606 <span class="item_label">产品图片:</span>
1463 <span class="item_value"> 1607 <span class="item_value">
...@@ -1499,7 +1643,344 @@ onBeforeMount(() => { ...@@ -1499,7 +1643,344 @@ onBeforeMount(() => {
1499 </div> 1643 </div>
1500 </span> 1644 </span>
1501 </div> 1645 </div>
1646 <div class="file_item" v-else>
1647 <span class="item_label">产品图片:</span>
1648 <span class="item_value">--</span>
1649 </div>
1502 </div> 1650 </div>
1651 <div class="list_item1 is_block1">
1652 <div class="file_item" v-if="route.query.exchangeGuid">
1653 <span class="item_label">登记证照:</span>
1654 <span class="item_value"
1655 v-if="flowDetail.registrationCertificate && flowDetail.registrationCertificate.name">
1656 <div class="file-operate">
1657 <template
1658 v-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'csv'">
1659 <img class="file-img" src="../../assets/images/excel.png" />
1660 </template>
1661 <template
1662 v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
1663 <img class="file-img" src="../../assets/images/word.png" />
1664 </template>
1665 <template
1666 v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
1667 <img class="file-img" src="../../assets/images/zip.png" />
1668 </template>
1669 <template
1670 v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
1671 <img class="file-img" src="../../assets/images/RAR.png" />
1672 </template>
1673 <template
1674 v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
1675 <img class="file-img" src="../../assets/images/PDF.png" />
1676 </template>
1677 <template
1678 v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
1679 <img class="file-img" src="../../assets/images/png.png" />
1680 </template>
1681 <template
1682 v-else-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'">
1683 <img class="file-img" src="../../assets/images/jpg.png" />
1684 </template>
1685 <div class="file-name">{{ flowDetail.registrationCertificate.name }}</div>
1686 <div :style="{ right: '36px' }"
1687 v-if="flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'png' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.registrationCertificate.name.substring(flowDetail.registrationCertificate.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"
1688 class="file-preview" @click="onUploadFilePreview(flowDetail.registrationCertificate)">查看</div>
1689 <div :style="{ right: '0px' }" class="file-preview"
1690 @click="onUploadFileDownload(flowDetail.registrationCertificate)">下载
1691 </div>
1692 </div>
1693 </span>
1694 <span class="item_value" v-else>--</span>
1695 </div>
1696 </div>
1697 <div class="list_item1 is_block1">
1698 <!-- <div class="file_item"
1699 v-if="flowDetail.registrationCertificate && flowDetail.registrationCertificate.name">
1700 <span class="item_label">质量评估报告:</span>
1701 <span class="item_value">
1702 <div class="file-operate">
1703 <template
1704 v-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'csv'">
1705 <img class="file-img" src="../../assets/images/excel.png" />
1706 </template>
1707 <template
1708 v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
1709 <img class="file-img" src="../../assets/images/word.png" />
1710 </template>
1711 <template
1712 v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
1713 <img class="file-img" src="../../assets/images/zip.png" />
1714 </template>
1715 <template
1716 v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
1717 <img class="file-img" src="../../assets/images/RAR.png" />
1718 </template>
1719 <template
1720 v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
1721 <img class="file-img" src="../../assets/images/PDF.png" />
1722 </template>
1723 <template
1724 v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
1725 <img class="file-img" src="../../assets/images/png.png" />
1726 </template>
1727 <template
1728 v-else-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'">
1729 <img class="file-img" src="../../assets/images/jpg.png" />
1730 </template>
1731 <div class="file-name">{{ flowDetail.qualityEvaluationFile[0].name }}</div>
1732 <div :style="{ right: '36px' }"
1733 v-if="flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'png' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.qualityEvaluationFile[0].name.substring(flowDetail.qualityEvaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"
1734 class="file-preview" @click="onUploadFilePreview(flowDetail.qualityEvaluationFile[0])">查看</div>
1735 <div :style="{ right: '0px' }" class="file-preview"
1736 @click="onUploadFileDownload(flowDetail.qualityEvaluationFile[0])">下载</div>
1737 </div>
1738 </span>
1739 </div> -->
1740 <div class="file_item" v-if="route.query.exchangeGuid">
1741 <span class="item_label">质量评估报告:</span>
1742 <span class="item_value">
1743 <div class="file-operate">
1744 <template v-if="flowDetail?.evaluationFile?.length > 0">
1745 <template
1746 v-if="flowDetail.evaluationFile[0].name?.substring(flowDetail.evaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
1747 <img class="file-img" src="../../assets/images/PDF.png" />
1748 </template>
1749 <template
1750 v-else-if="flowDetail.evaluationFile[0].name?.substring(flowDetail.evaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
1751 <img class="file-img" src="../../assets/images/png.png" />
1752 </template>
1753 <template
1754 v-else-if="['jpg', 'jpeg'].includes(flowDetail.evaluationFile[0].name?.substring(flowDetail.evaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase())">
1755 <img class="file-img" src="../../assets/images/jpg.png" />
1756 </template>
1757 <div class="file-name">{{ flowDetail.evaluationFile[0].name }}</div>
1758 <div
1759 v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.evaluationFile[0].name?.substring(flowDetail.evaluationFile[0].name.lastIndexOf('.') + 1).toLowerCase())"
1760 :style="{ right: '36px' }" class="file-preview"
1761 @click="onUploadFilePreview(flowDetail.evaluationFile[0])">
1762 查看
1763 </div>
1764 <div :style="{ right: '0px' }" class="file-preview"
1765 @click="onUploadFileDownload(flowDetail.evaluationFile[0])">
1766 下载
1767 </div>
1768 </template>
1769 <template v-else>
1770 --
1771 </template>
1772 </div>
1773 </span>
1774 </div>
1775 </div>
1776 <div class="list_item1 is_block1">
1777 <div class="file_item" v-if="route.query.exchangeGuid">
1778 <span class="item_label">质量评估机构:</span>
1779 <span class="item_value">
1780 {{ flowDetail.qualityEvaluationInstitution || '--' }}
1781 </span>
1782 </div>
1783 </div>
1784 <div class="list_item1 is_block1">
1785 <!-- <div class="file_item"
1786 v-if="flowDetail.registrationCertificate && flowDetail.registrationCertificate.name">
1787 <span class="item_label">价值评估报告:</span>
1788 <span class="item_value">
1789 <div class="file-operate">
1790 <template
1791 v-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'csv'">
1792 <img class="file-img" src="../../assets/images/excel.png" />
1793 </template>
1794 <template
1795 v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
1796 <img class="file-img" src="../../assets/images/word.png" />
1797 </template>
1798 <template
1799 v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
1800 <img class="file-img" src="../../assets/images/zip.png" />
1801 </template>
1802 <template
1803 v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
1804 <img class="file-img" src="../../assets/images/RAR.png" />
1805 </template>
1806 <template
1807 v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
1808 <img class="file-img" src="../../assets/images/PDF.png" />
1809 </template>
1810 <template
1811 v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
1812 <img class="file-img" src="../../assets/images/png.png" />
1813 </template>
1814 <template
1815 v-else-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'">
1816 <img class="file-img" src="../../assets/images/jpg.png" />
1817 </template>
1818 <div class="file-name">{{ flowDetail.costAssessmentFile[0].name }}</div>
1819 <div :style="{ right: '36px' }"
1820 v-if="flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'png' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || flowDetail.costAssessmentFile[0].name.substring(flowDetail.costAssessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"
1821 class="file-preview" @click="onUploadFilePreview(flowDetail.costAssessmentFile[0])">查看</div>
1822 <div :style="{ right: '0px' }" class="file-preview"
1823 @click="onUploadFileDownload(flowDetail.costAssessmentFile[0])">下载</div>
1824 </div>
1825 </span>
1826 </div> -->
1827 <div class="file_item" v-if="route.query.exchangeGuid">
1828 <span class="item_label">价值评估报告:</span>
1829 <span class="item_value">
1830 <div class="file-operate">
1831 <template v-if="flowDetail?.assessmentFile?.length > 0">
1832 <template
1833 v-if="flowDetail.assessmentFile[0].name?.substring(flowDetail.assessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
1834 <img class="file-img" src="../../assets/images/PDF.png" />
1835 </template>
1836 <template
1837 v-else-if="flowDetail.assessmentFile[0].name?.substring(flowDetail.assessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
1838 <img class="file-img" src="../../assets/images/png.png" />
1839 </template>
1840 <template
1841 v-else-if="['jpg', 'jpeg'].includes(flowDetail.assessmentFile[0].name?.substring(flowDetail.assessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase())">
1842 <img class="file-img" src="../../assets/images/jpg.png" />
1843 </template>
1844 <div class="file-name">{{ flowDetail.assessmentFile[0].name }}</div>
1845 <div
1846 v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.assessmentFile[0].name?.substring(flowDetail.assessmentFile[0].name.lastIndexOf('.') + 1).toLowerCase())"
1847 :style="{ right: '36px' }" class="file-preview"
1848 @click="onUploadFilePreview(flowDetail.assessmentFile[0])">
1849 查看
1850 </div>
1851 <div :style="{ right: '0px' }" class="file-preview"
1852 @click="onUploadFileDownload(flowDetail.assessmentFile[0])">
1853 下载
1854 </div>
1855 </template>
1856 <template v-else>
1857 --
1858 </template>
1859 </div>
1860 </span>
1861 </div>
1862 </div>
1863 <div class="list_item1 is_block1">
1864 <div class="file_item" v-if="route.query.exchangeGuid">
1865 <span class="item_label">价值估评机构:</span>
1866 <span class="item_value">
1867 {{ flowDetail.costAssessmentInstitution || '--' }}
1868 </span>
1869 </div>
1870 </div>
1871
1872 <div class="list_item is_block">
1873 <div class="file_item" v-if="route.query.exchangeGuid">
1874 <span class="item_label">承诺函:</span>
1875 <span class="item_value">
1876 <div class="file-operate">
1877 <template v-if="flowDetail?.commitmentLetter?.length > 0">
1878 <template
1879 v-if="flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
1880 <img class="file-img" src="../../assets/images/PDF.png" />
1881 </template>
1882 <template
1883 v-else-if="flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
1884 <img class="file-img" src="../../assets/images/png.png" />
1885 </template>
1886 <template
1887 v-else-if="['jpg', 'jpeg'].includes(flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase())">
1888 <img class="file-img" src="../../assets/images/jpg.png" />
1889 </template>
1890 <div class="file-name">{{ flowDetail.commitmentLetter[0].name }}</div>
1891 <div
1892 v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.commitmentLetter[0].name?.substring(flowDetail.commitmentLetter[0].name.lastIndexOf('.') + 1).toLowerCase())"
1893 :style="{ right: '36px' }" class="file-preview"
1894 @click="onUploadFilePreview(flowDetail.commitmentLetter[0])">
1895 查看
1896 </div>
1897 <div :style="{ right: '0px' }" class="file-preview"
1898 @click="onUploadFileDownload(flowDetail.commitmentLetter[0])">
1899 下载
1900 </div>
1901 </template>
1902 <template v-else>
1903 --
1904 </template>
1905 </div>
1906 </span>
1907 </div>
1908 </div>
1909 <div class="list_item is_block">
1910 <div class="file_item" v-if="route.query.exchangeGuid">
1911 <span class="item_label">授权文件:</span>
1912 <span class="item_value">
1913 <div class="file-operate">
1914 <template v-if="flowDetail?.accreditFile?.length > 0">
1915 <template
1916 v-if="flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
1917 <img class="file-img" src="../../assets/images/PDF.png" />
1918 </template>
1919 <template
1920 v-else-if="flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
1921 <img class="file-img" src="../../assets/images/png.png" />
1922 </template>
1923 <template
1924 v-else-if="['jpg', 'jpeg'].includes(flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase())">
1925 <img class="file-img" src="../../assets/images/jpg.png" />
1926 </template>
1927 <div class="file-name">{{ flowDetail.accreditFile[0].name }}</div>
1928 <div
1929 v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.accreditFile[0].name?.substring(flowDetail.accreditFile[0].name.lastIndexOf('.') + 1).toLowerCase())"
1930 :style="{ right: '36px' }" class="file-preview"
1931 @click="onUploadFilePreview(flowDetail.accreditFile[0])">
1932 查看
1933 </div>
1934 <div :style="{ right: '0px' }" class="file-preview"
1935 @click="onUploadFileDownload(flowDetail.accreditFile[0])">
1936 下载
1937 </div>
1938 </template>
1939 <template v-else>
1940 --
1941 </template>
1942 </div>
1943 </span>
1944 </div>
1945 </div>
1946 <div class="list_item is_block">
1947 <div class="file_item" v-if="route.query.exchangeGuid">
1948 <span class="item_label">商品详细介绍(盖章版):</span>
1949 <span class="item_value">
1950 <div class="file-operate">
1951 <template v-if="flowDetail?.productDetail?.length > 0">
1952 <template
1953 v-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
1954 <img class="file-img" src="../../assets/images/PDF.png" />
1955 </template>
1956 <template
1957 v-else-if="flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
1958 <img class="file-img" src="../../assets/images/png.png" />
1959 </template>
1960 <template
1961 v-else-if="['jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())">
1962 <img class="file-img" src="../../assets/images/jpg.png" />
1963 </template>
1964 <div class="file-name">{{ flowDetail.productDetail[0].name }}</div>
1965 <div
1966 v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(flowDetail.productDetail[0].name?.substring(flowDetail.productDetail[0].name.lastIndexOf('.') + 1).toLowerCase())"
1967 :style="{ right: '36px' }" class="file-preview"
1968 @click="onUploadFilePreview(flowDetail.productDetail[0])">
1969 查看
1970 </div>
1971 <div :style="{ right: '0px' }" class="file-preview"
1972 @click="onUploadFileDownload(flowDetail.productDetail[0])">
1973 下载
1974 </div>
1975 </template>
1976 <template v-else>
1977 --
1978 </template>
1979 </div>
1980 </span>
1981 </div>
1982 </div>
1983
1503 </div> 1984 </div>
1504 </div> 1985 </div>
1505 </div> 1986 </div>
...@@ -1577,7 +2058,7 @@ onBeforeMount(() => { ...@@ -1577,7 +2058,7 @@ onBeforeMount(() => {
1577 <div class="btns"> 2058 <div class="btns">
1578 <el-button @click="btnClick({ value: 'cancel' })">返回</el-button> 2059 <el-button @click="btnClick({ value: 'cancel' })">返回</el-button>
1579 <el-button @click="btnClick({ value: 'draft' })" 2060 <el-button @click="btnClick({ value: 'draft' })"
1580 v-if="route.query.type == 'add' || route.query.type == 'redit' || route.query.type == 'edit'">保存草稿</el-button> 2061 v-if="route.query.type == 'add' || route.query.type == 'edit'">保存草稿</el-button>
1581 <el-button type="primary" @click="btnClick({ value: 'submit' })">提交流程</el-button> 2062 <el-button type="primary" @click="btnClick({ value: 'submit' })">提交流程</el-button>
1582 </div> 2063 </div>
1583 </div> 2064 </div>
...@@ -1723,6 +2204,74 @@ onBeforeMount(() => { ...@@ -1723,6 +2204,74 @@ onBeforeMount(() => {
1723 } 2204 }
1724 } 2205 }
1725 2206
2207 .list_item1 {
2208 width: 50%;
2209 line-height: 32px;
2210 font-size: 14px;
2211 color: #666666;
2212 display: flex;
2213 justify-content: space-between;
2214
2215 .item_label {
2216 width: 100px;
2217 text-align: right;
2218 }
2219
2220 .file_item {
2221 width: 100%;
2222 display: flex;
2223 justify-content: space-between;
2224 }
2225
2226 .item_value {
2227 color: var(--el-color-regular);
2228 padding: 0 16px;
2229 flex: 1;
2230 text-align: justify;
2231
2232 .file-operate {
2233 display: flex;
2234 align-items: center;
2235 position: relative;
2236
2237 .file-img {
2238 width: 24px;
2239 height: 24px;
2240 }
2241
2242 &:hover {
2243 background-color: #f5f5f5;
2244 }
2245
2246 .file-name {
2247 color: var(--el-color-regular);
2248 margin-left: 4px;
2249 }
2250
2251 .file-preview {
2252 position: absolute;
2253 cursor: pointer;
2254 color: var(--el-color-primary);
2255 margin-right: 8px;
2256 }
2257 }
2258
2259 .area_text+.area_text {
2260 &::before {
2261 content: '、',
2262 }
2263 }
2264 }
2265
2266 // &.is_block {
2267 // width: 100%;
2268
2269 // .item_value {
2270 // white-space: pre-wrap;
2271 // }
2272 // }
2273 }
2274
1726 :deep(.el-form) { 2275 :deep(.el-form) {
1727 width: 100%; 2276 width: 100%;
1728 } 2277 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!