dafaf23e by xukangle

update:数据产品上架

1 parent 52a24a57
...@@ -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 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!