1cf03985 by xukangle

Merge branch 'dev_20241202_xukangle' into develop

2 parents 2296e1e9 4b6216c9
...@@ -10,6 +10,15 @@ export const getProductList = (params) => request({ ...@@ -10,6 +10,15 @@ export const getProductList = (params) => request({
10 method: 'get', 10 method: 'get',
11 params 11 params
12 }) 12 })
13 /** 获取数交所产品
14 * @param {Object} params
15 * path: /dam-catalog-table/data-exchange/get-table-select
16 */
17 export const getDataExchangeProductList = (params) => request({
18 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/data-exchange/get-table-select`,
19 method: 'get',
20 params
21 })
13 22
14 /** 获取已添加的数据产品列表 */ 23 /** 获取已添加的数据产品列表 */
15 export const getAddedProductList = (params) => request({ 24 export const getAddedProductList = (params) => request({
...@@ -25,6 +34,13 @@ export const getListingList = (params) => request({ ...@@ -25,6 +34,13 @@ export const getListingList = (params) => request({
25 data: params 34 data: params
26 }) 35 })
27 36
37 /**获取产品上架数量 */
38 export const getListingCount = () => request({
39 url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/product-num`,
40 method: 'post',
41 })
42
43
28 /** 获取数据产品上架详情 */ 44 /** 获取数据产品上架详情 */
29 export const getListingDetail = (params) => request({ 45 export const getListingDetail = (params) => request({
30 url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/detail`, 46 url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/detail`,
...@@ -54,6 +70,13 @@ export const listingUpdate = (params) => request({ ...@@ -54,6 +70,13 @@ export const listingUpdate = (params) => request({
54 data: params 70 data: params
55 }); 71 });
56 72
73 /**门户更新 */
74 export const listingUpdateGateway = (params) => request({
75 url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/update-gateway`,
76 method: 'post',
77 data: params
78 });
79
57 /** 删除数据产品上架信息 */ 80 /** 删除数据产品上架信息 */
58 export const listingDelete = (params) => request({ 81 export const listingDelete = (params) => request({
59 url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/delete`, 82 url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/delete`,
......
...@@ -1353,36 +1353,70 @@ const panelChange = (scope, row) => { ...@@ -1353,36 +1353,70 @@ const panelChange = (scope, row) => {
1353 </template> 1353 </template>
1354 <template #file="{ file }"> 1354 <template #file="{ file }">
1355 <div class="file-operate"> 1355 <div class="file-operate">
1356 <template 1356 <!-- <template
1357 v-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx'"> 1357 v-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx'">
1358 <img class="file-img" src="../../assets/images/excel.png" /> 1358 <img class="file-img" src="../../assets/images/excel.png" />
1359 </template> 1359 </template>
1360 <template 1360 <template
1361 v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"> 1361 v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
1362 <img class="file-img" src="../../assets/images/word.png" /> 1362 <img class="file-img" src="../../assets/images/word.png" />
1363 </template> 1363 </template>
1364 <template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'zip'"> 1364 <template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
1365 <img class="file-img" src="../../assets/images/zip.png" /> 1365 <img class="file-img" src="../../assets/images/zip.png" />
1366 </template> 1366 </template>
1367 <template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'rar'"> 1367 <template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
1368 <img class="file-img" src="../../assets/images/RAR.png" /> 1368 <img class="file-img" src="../../assets/images/RAR.png" />
1369 </template> 1369 </template>
1370 <template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'"> 1370 <template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
1371 <img class="file-img" src="../../assets/images/PDF.png" /> 1371 <img class="file-img" src="../../assets/images/PDF.png" />
1372 </template> 1372 </template>
1373 <template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'png'"> 1373 <template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
1374 <img class="file-img" src="../../assets/images/png.png" /> 1374 <img class="file-img" src="../../assets/images/png.png" />
1375 </template> 1375 </template>
1376 <template 1376 <template
1377 v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"> 1377 v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'">
1378 <img class="file-img" src="../../assets/images/jpg.png" /> 1378 <img class="file-img" src="../../assets/images/jpg.png" />
1379 </template> 1379 </template>
1380 <div class="file-name">
1381 <ellipsis-tooltip :content="file.name" class-name="w100f" :refName="'tooltipOver' + file.name"></ellipsis-tooltip>
1382 </div>
1383 <div :style="{ right: '72px' }" class="file-preview"
1384 v-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'png' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"
1385 @click="onUploadFilePreview(file, item)">查看</div>
1386 <div :style="{ right: '36px' }" class="file-preview" @click="onUploadFileDownload(file, item)">下载
1387 </div>
1388 <div v-if="!item.disabled" :style="{ right: 0 }" class="file-preview" @click="handleUploadFileRemove(file, item)">删除
1389 </div> -->
1390 <template
1391 v-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'xls' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'xlsx'">
1392 <img class="file-img" src="../../assets/images/excel.png" />
1393 </template>
1394 <template
1395 v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'doc' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'docx'">
1396 <img class="file-img" src="../../assets/images/word.png" />
1397 </template>
1398 <template v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'zip'">
1399 <img class="file-img" src="../../assets/images/zip.png" />
1400 </template>
1401 <template v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'rar'">
1402 <img class="file-img" src="../../assets/images/RAR.png" />
1403 </template>
1404 <template v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
1405 <img class="file-img" src="../../assets/images/PDF.png" />
1406 </template>
1407 <template v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
1408 <img class="file-img" src="../../assets/images/png.png" />
1409 </template>
1410 <template
1411 v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'jpg' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'jpeg'">
1412 <img class="file-img" src="../../assets/images/jpg.png" />
1413 </template>
1380 <div class="file-name"> 1414 <div class="file-name">
1381 <ellipsis-tooltip :content="file.name" class-name="w100f" 1415 <ellipsis-tooltip :content="file?.name ?? ''" class-name="w100f"
1382 :refName="'tooltipOver' + file.name"></ellipsis-tooltip> 1416 :refName="'tooltipOver' + file?.name"></ellipsis-tooltip>
1383 </div> 1417 </div>
1384 <div :style="{ right: '72px' }" class="file-preview" 1418 <div :style="{ right: '72px' }" class="file-preview"
1385 v-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'png' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'" 1419 v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() ?? '')"
1386 @click="onUploadFilePreview(file, item)">查看</div> 1420 @click="onUploadFilePreview(file, item)">查看</div>
1387 <div :style="{ right: '36px' }" class="file-preview" @click="onUploadFileDownload(file, item)">下载 1421 <div :style="{ right: '36px' }" class="file-preview" @click="onUploadFileDownload(file, item)">下载
1388 </div> 1422 </div>
......
...@@ -28,7 +28,7 @@ import { ...@@ -28,7 +28,7 @@ import {
28 import { TableColumnWidth } from "@/utils/enum"; 28 import { TableColumnWidth } from "@/utils/enum";
29 import router from "@/router"; 29 import router from "@/router";
30 import { download } from "@/utils/common"; 30 import { download } from "@/utils/common";
31 import { da, sl } from "element-plus/es/locale"; 31
32 32
33 33
34 const currentPath = ref<string[]>([]); 34 const currentPath = ref<string[]>([]);
...@@ -146,7 +146,7 @@ onMounted(async () => { ...@@ -146,7 +146,7 @@ onMounted(async () => {
146 execGuid: execGuidInfo.value.execGuid, 146 execGuid: execGuidInfo.value.execGuid,
147 classifyDetail: classifyDetailGuidInfo.value 147 classifyDetail: classifyDetailGuidInfo.value
148 }); 148 });
149 getDictionaryList(); 149 // getDictionaryList();
150 getSearchTableList(); 150 getSearchTableList();
151 // getLabelListData(); 151 // getLabelListData();
152 getGradeData(refGradeGuid.value); 152 getGradeData(refGradeGuid.value);
...@@ -900,21 +900,22 @@ const classEditFormItems = ref<any>([{ ...@@ -900,21 +900,22 @@ const classEditFormItems = ref<any>([{
900 clearable: true, 900 clearable: true,
901 block: true, 901 block: true,
902 visible: true, 902 visible: true,
903 }, {
904 label: '关联字典',
905 field: 'dictionaryGuid',
906 type: 'select',
907 placeholder: '请选择',
908 default: '',
909 options: [],
910 props: {
911 label: "chName",
912 value: "guid",
913 },
914 filterable: true,
915 clearable: true,
916 required: false
917 }, 903 },
904 //{
905 // label: '关联字典',
906 // field: 'dictionaryGuid',
907 // type: 'select',
908 // placeholder: '请选择',
909 // default: '',
910 // options: [],
911 // props: {
912 // label: "chName",
913 // value: "guid",
914 // },
915 // filterable: true,
916 // clearable: true,
917 // required: false
918 // },
918 { 919 {
919 label: '字段取值范围', 920 label: '字段取值范围',
920 type: 'input', 921 type: 'input',
...@@ -1052,7 +1053,7 @@ const drawerBtnClick = async (btn, info) => { ...@@ -1052,7 +1053,7 @@ const drawerBtnClick = async (btn, info) => {
1052 } else { 1053 } else {
1053 btn.loading = true; 1054 btn.loading = true;
1054 console.log('drawerBtnClick', info); 1055 console.log('drawerBtnClick', info);
1055 const { orderNumLength, orderNum, startNumber, endNumber, fieldValueRange, startValue, endValue, fieldPrecision, dictionaryGuid, isUnique, notNull } = info; 1056 const { orderNumLength, orderNum, startNumber, endNumber, fieldValueRange, startValue, endValue, fieldPrecision, isUnique, notNull } = info;
1056 // 判断长度orderNumLength,orderNum 要么都有值,要么都没有值,不能只有一个有值,一个没有值精确提醒 1057 // 判断长度orderNumLength,orderNum 要么都有值,要么都没有值,不能只有一个有值,一个没有值精确提醒
1057 let fieldLengthCondition: any = ''; 1058 let fieldLengthCondition: any = '';
1058 if ((orderNumLength === 'between' && !startNumber) || (orderNumLength === 'between' && !endNumber)) { 1059 if ((orderNumLength === 'between' && !startNumber) || (orderNumLength === 'between' && !endNumber)) {
...@@ -1091,7 +1092,6 @@ const drawerBtnClick = async (btn, info) => { ...@@ -1091,7 +1092,6 @@ const drawerBtnClick = async (btn, info) => {
1091 if (fieldValueRange) { 1092 if (fieldValueRange) {
1092 param = { 1093 param = {
1093 fieldPrecision, 1094 fieldPrecision,
1094 dictionaryGuid,
1095 isUnique, 1095 isUnique,
1096 notNull, 1096 notNull,
1097 fieldLengthCondition, 1097 fieldLengthCondition,
...@@ -1102,7 +1102,6 @@ const drawerBtnClick = async (btn, info) => { ...@@ -1102,7 +1102,6 @@ const drawerBtnClick = async (btn, info) => {
1102 } else { 1102 } else {
1103 param = { 1103 param = {
1104 fieldPrecision, 1104 fieldPrecision,
1105 dictionaryGuid,
1106 isUnique, 1105 isUnique,
1107 notNull, 1106 notNull,
1108 fieldLengthCondition, 1107 fieldLengthCondition,
......
...@@ -87,7 +87,7 @@ const getDictionaryList = () => { ...@@ -87,7 +87,7 @@ const getDictionaryList = () => {
87 onMounted(async () => { 87 onMounted(async () => {
88 await getFieldTypeData() 88 await getFieldTypeData()
89 await getBizRuleConfigDetailData() 89 await getBizRuleConfigDetailData()
90 getDictionaryList() 90 // getDictionaryList()
91 }) 91 })
92 92
93 93
...@@ -335,7 +335,7 @@ const saveData = async () => { ...@@ -335,7 +335,7 @@ const saveData = async () => {
335 execGuid: router.currentRoute.value.query.execGuid, 335 execGuid: router.currentRoute.value.query.execGuid,
336 fieldLengthCondition: fieldLengthCondition, 336 fieldLengthCondition: fieldLengthCondition,
337 fieldPrecision: item.fieldPrecision, 337 fieldPrecision: item.fieldPrecision,
338 dictionaryGuid: item.dictionaryGuid, 338 // dictionaryGuid: item.dictionaryGuid,
339 isUnique: item.isUnique, 339 isUnique: item.isUnique,
340 notNull: item.notNull, 340 notNull: item.notNull,
341 fieldValueRange: item.fieldValueRange 341 fieldValueRange: item.fieldValueRange
...@@ -348,7 +348,7 @@ const saveData = async () => { ...@@ -348,7 +348,7 @@ const saveData = async () => {
348 execGuid: router.currentRoute.value.query.execGuid, 348 execGuid: router.currentRoute.value.query.execGuid,
349 fieldLengthCondition: fieldLengthCondition, 349 fieldLengthCondition: fieldLengthCondition,
350 fieldPrecision: item.fieldPrecision, 350 fieldPrecision: item.fieldPrecision,
351 dictionaryGuid: item.dictionaryGuid, 351 // dictionaryGuid: item.dictionaryGuid,
352 isUnique: item.isUnique, 352 isUnique: item.isUnique,
353 notNull: item.notNull, 353 notNull: item.notNull,
354 startValue: item.startValue, 354 startValue: item.startValue,
...@@ -627,7 +627,7 @@ const inputLengthKeyUp = (regexp, scope, field, max: any = null, min: any = null ...@@ -627,7 +627,7 @@ const inputLengthKeyUp = (regexp, scope, field, max: any = null, min: any = null
627 </el-table-column> 627 </el-table-column>
628 628
629 <!-- 关联字典(可编辑)el-tree-select 形式下拉形式 --> 629 <!-- 关联字典(可编辑)el-tree-select 形式下拉形式 -->
630 <el-table-column prop="dictionaryGuid" label="关联字典" width="150" align="left" show-overflow-tooltip> 630 <!-- <el-table-column prop="dictionaryGuid" label="关联字典" width="150" align="left" show-overflow-tooltip>
631 <template #default="scope"> 631 <template #default="scope">
632 <span v-if="!scope.row.isEdit">{{ scope.row.dictionaryGuid 632 <span v-if="!scope.row.isEdit">{{ scope.row.dictionaryGuid
633 ? dictionaryList.find((item: any) => item.guid === scope.row.dictionaryGuid)?.chName : '--' }}</span> 633 ? dictionaryList.find((item: any) => item.guid === scope.row.dictionaryGuid)?.chName : '--' }}</span>
...@@ -636,7 +636,7 @@ const inputLengthKeyUp = (regexp, scope, field, max: any = null, min: any = null ...@@ -636,7 +636,7 @@ const inputLengthKeyUp = (regexp, scope, field, max: any = null, min: any = null
636 </el-select> 636 </el-select>
637 </template> 637 </template>
638 638
639 </el-table-column> 639 </el-table-column> -->
640 640
641 <!-- 数据是否唯一(可编辑) --> 641 <!-- 数据是否唯一(可编辑) -->
642 <el-table-column prop="isUnique" label="数据是否唯一" width="150" align="left" show-overflow-tooltip> 642 <el-table-column prop="isUnique" label="数据是否唯一" width="150" align="left" show-overflow-tooltip>
......
...@@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user"; ...@@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 9 import { ElMessage, ElMessageBox } from "element-plus";
10 10
11 import useDataAssetStore from "@/store/modules/dataAsset"; 11 import useDataAssetStore from "@/store/modules/dataAsset";
12 import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList } from "@/api/modules/dataProduct"; 12 import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList, getListingCount } from "@/api/modules/dataProduct";
13 import { TableColumnWidth } from '@/utils/enum'; 13 import { TableColumnWidth } from '@/utils/enum';
14 14
15 import TableTools from "@/components/Tools/table_tools.vue"; 15 import TableTools from "@/components/Tools/table_tools.vue";
...@@ -19,6 +19,7 @@ import { getParamsList } from "@/api/modules/dataAsset"; ...@@ -19,6 +19,7 @@ import { getParamsList } from "@/api/modules/dataAsset";
19 import { 19 import {
20 changeNum, 20 changeNum,
21 } from "@/utils/common"; 21 } from "@/utils/common";
22 import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService";
22 23
23 const { proxy } = getCurrentInstance() as any; 24 const { proxy } = getCurrentInstance() as any;
24 const router = useRouter(); 25 const router = useRouter();
...@@ -98,27 +99,65 @@ const tableInfo = ref({ ...@@ -98,27 +99,65 @@ const tableInfo = ref({
98 actionInfo: { 99 actionInfo: {
99 label: "操作", 100 label: "操作",
100 type: "btn", 101 type: "btn",
101 width: 140, 102 width: 170,
102 btns: (scope) => { 103 btns: (scope) => {
103 let row = scope.row, btnArr: any = []; 104 const { row } = scope;
104 if (row.approveState == 'Y') { 105 const approveVO = row.approveVO || {};
105 if (row.listingStatus == 'Y') { 106 const currentStaffGuid = userData.staffGuid
106 btnArr.splice(0, 0, { label: "详情", value: "detail" }); 107 const bizApproveState = row.bizApproveState;
107 } else { 108 const approveState = approveVO.approveState || null;
108 btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" }); 109 const approveStaffGuids = approveVO.approveStaffGuids || [];
110 const staffGuid = approveVO.staffGuid || '';
111 let isShowCancel = false;
112 let flowState;
113 let list: any = [];
114 if (approveState == 'N') {
115 flowState = 1;
109 } 116 }
110 } else { 117 if (approveState == 'A' && approveStaffGuids.indexOf(currentStaffGuid) > -1) {
111 if (row.approveState == 'A') { 118 flowState = 2;
112 btnArr.splice(0, 0, { label: "详情", value: "detail" });
113 } else {
114 btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
115 } 119 }
120 if ((approveState == 'C' || approveState == 'R') && staffGuid == currentStaffGuid) {
121 flowState = 3;
116 } 122 }
117 return btnArr; 123 if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
118 }, 124 isShowCancel = true;
125 }
126 if (approveState === 'Y') {
127 if (row.listingStatus === 'Y') {
128 list.push({ label: "下架", value: "down" });
129 }
130 if (row.listingStatus === 'N') {
131 list.push({ label: "上架", value: "up" });
132 }
133 }
134 if (flowState === 1) {
135 list = [{ label: "编辑", value: "edit" }, { label: "删除", value: "del" }]
136 }
137 if (flowState === 2) {
138 list = [{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }]
139 }
140 if (flowState === 3) {
141 list.push({ label: "删除", value: "del" })
142 }
143 if (flowState === 3 && bizApproveState != 'D') {
144 list.push({ label: "重新提交", value: "redit" }) //已驳回
145 }
146 if (isShowCancel) {
147 list.push({ label: "撤销", value: "revoke" })
148 }
149 if (flowState !== 1) {
150 list.push({ label: "详情", value: "detail" })
151 }
152
153 return list
119 }, 154 },
155 }
120 }); 156 });
121 157
158
159
160
122 const getTableData = () => { 161 const getTableData = () => {
123 tableInfo.value.loading = true; 162 tableInfo.value.loading = true;
124 getListingList( 163 getListingList(
...@@ -150,8 +189,20 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -150,8 +189,20 @@ const toSearch = (val: any, clear: boolean = false) => {
150 page.value.curr = 1; 189 page.value.curr = 1;
151 tableInfo.value.page.curr = 1; 190 tableInfo.value.page.curr = 1;
152 getTableData(); 191 getTableData();
192 getListingCountData();
153 }; 193 };
154 194
195 // 获取产品上架数量
196 const getListingCountData = () => {
197 getListingCount({}).then((res: any) => {
198 if (res.code == proxy.$passCode) {
199 demandListData.value = res.data || [];
200 } else {
201 proxy.$ElMessage.error(res.msg);
202 }
203 })
204 }
205
155 const tableSwitchBeforeChange = (scope, field, callback) => { 206 const tableSwitchBeforeChange = (scope, field, callback) => {
156 ElMessageBox.confirm( 207 ElMessageBox.confirm(
157 `确定${scope.row[field] == 'Y' ? '下架' : '上架'}该产品吗?`, 208 `确定${scope.row[field] == 'Y' ? '下架' : '上架'}该产品吗?`,
...@@ -198,17 +249,146 @@ const tableSwitchChange = (val, scope, field) => { ...@@ -198,17 +249,146 @@ const tableSwitchChange = (val, scope, field) => {
198 }) 249 })
199 }) 250 })
200 } 251 }
201 252 const approveSuggest = ref();
253 const dialogTitle = ref('通过流程');
254 const dialogVisible = ref(false);
255 //弹窗类型
256 const approveType = ref();
202 const tableBtnClick = (scope, btn) => { 257 const tableBtnClick = (scope, btn) => {
203 const type = btn.value; 258 const type = btn.value;
204 const row = scope.row; 259 const row = scope.row;
205 currTableData.value = row; 260 currTableData.value = row;
206 if (type == "detail" || type === "edit") { 261 if (type == "detail") {
207 toPatn(type); 262 router.push({
208 } else if (type === "delete") { 263 name: 'productListingDetail',
209 open("此操作将永久删除,是否继续?", "warning"); 264 query: {
265 guid: row.guid,
266 type: 'detail'
210 } 267 }
211 }; 268 });
269 }
270 if (type == "edit" || type == "redit") {
271 router.push({
272 name: 'productListingDetail',
273 query: {
274 guid: row.guid,
275 type: type == 'edit' ? 'edit' : 'redit',
276 case: '2',
277 name: row.damName
278 }
279 });
280 }
281 if (type == 'del') {
282 ElMessageBox.confirm(`数据删除后不可恢复,确定是否删除?`, "提示", {
283 confirmButtonText: "确定",
284 cancelButtonText: "取消",
285 type: 'warning',
286 }).then(() => {
287 listingDelete([row.guid]).then((res: any) => {
288 if (res.code == '00000') {
289 ElMessage.success('删除成功')
290 getTableData();
291 } else {
292 ElMessage.error(res.msg)
293 }
294 })
295 });
296 }
297 //撤销
298 if (type == 'revoke') {
299 ElMessageBox.confirm(`撤销后,该流程将不再进行审核,确定这样操作吗?`, "提示", {
300 confirmButtonText: "确定",
301 cancelButtonText: "取消",
302 type: 'warning',
303 }).then(() => {
304 revokeFlowData({
305 guid: row.approveVO.approveGuid,
306 flowType: row.approveVO.flowType,
307 approveStaffGuid: userData.staffGuid,
308
309 }).then((res: any) => {
310 if (res.code == '00000') {
311 ElMessage.success('撤销成功!')
312 getTableData();
313 } else {
314 ElMessage.error(res.msg)
315 }
316 })
317 });
318
319 }
320 if (type == 'pass') {
321 approveSuggest.value = '';
322 approveType.value = 'pass';
323 dialogTitle.value = '通过流程'
324 dialogVisible.value = true;
325 }
326 if (type == 'reject') {
327 approveSuggest.value = '';
328 approveType.value = 'reject';
329 dialogTitle.value = '驳回流程'
330 dialogVisible.value = true;
331 }
332 if (type == 'up') {
333 tableSwitchChange('Y', scope, 'listingStatus')
334 }
335 if (type == 'down') {
336 tableSwitchChange('N', scope, 'listingStatus')
337 }
338 }
339
340 const fullscreenLoading = ref(false);
341 const passSubmit = () => {
342 let row = currTableData.value
343 console.log(row)
344 dialogVisible.value = false;
345 fullscreenLoading.value = true;
346 passFlowData({
347 guid: row.approveVO.approveGuid,
348 flowType: row.approveVO.flowType,
349 approveSuggest: approveSuggest.value,
350 approveStaffGuid: userData.staffGuid,
351 }).then((res: any) => {
352 fullscreenLoading.value = false;
353 if (res.code == '00000') {
354 ElMessage.success('审批通过!')
355 getTableData();
356 } else {
357 ElMessage.error(res.msg)
358 }
359 })
360
361 }
362 const rejectSubmit = () => {
363 if (!approveSuggest.value) return ElMessage.error('请填写驳回理由!')
364 let row = currTableData.value
365 dialogVisible.value = false;
366 fullscreenLoading.value = true;
367 rejectFlowData({
368 guid: row.approveVO.approveGuid,
369 flowType: row.approveVO.flowType,
370 approveSuggest: approveSuggest.value,
371 approveStaffGuid: userData.staffGuid,
372 }).then((res: any) => {
373 if (res.code == '00000') {
374 fullscreenLoading.value = false;
375 ElMessage.success('驳回成功!')
376 getTableData();
377 } else {
378 ElMessage.error(res.msg)
379 }
380 })
381 }
382 // const tableBtnClick = (scope, btn) => {
383 // const type = btn.value;
384 // const row = scope.row;
385 // currTableData.value = row;
386 // if (type == "detail" || type === "edit") {
387 // toPatn(type);
388 // } else if (type === "delete") {
389 // open("此操作将永久删除,是否继续?", "warning");
390 // }
391 // };
212 392
213 const toPatn = (type) => { 393 const toPatn = (type) => {
214 if (type == 'add') { 394 if (type == 'add') {
...@@ -216,7 +396,8 @@ const toPatn = (type) => { ...@@ -216,7 +396,8 @@ const toPatn = (type) => {
216 name: "productListingDetail", 396 name: "productListingDetail",
217 query: { 397 query: {
218 type, 398 type,
219 groundingPick: '门户数据专区' 399 groundingPick: '门户数据专区',
400 case: '2',
220 }, 401 },
221 }); 402 });
222 } else { 403 } else {
...@@ -319,7 +500,17 @@ const demandListData: any = ref([ ...@@ -319,7 +500,17 @@ const demandListData: any = ref([
319 { companyName: '深数所', listedNum: 16, processNum: 1235 }, 500 { companyName: '深数所', listedNum: 16, processNum: 1235 },
320 { companyName: '苏数所', listedNum: 16, processNum: 1235 }, 501 { companyName: '苏数所', listedNum: 16, processNum: 1235 },
321 ]); 502 ]);
322 const btnClick = (btn) => { 503 const btnClick = (item) => {
504 console.log(item)
505 router.push({
506 name: "productListingDetail",
507 query: {
508 exchangeGuid: item.exchangeGuid,
509 exchangeName: item.exchangeName,
510 type: 'add',
511 groundingPick: '登记得数交所',
512 },
513 });
323 } 514 }
324 515
325 516
...@@ -340,21 +531,21 @@ const btnClick = (btn) => { ...@@ -340,21 +531,21 @@ const btnClick = (btn) => {
340 <img class="left-img" :src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo" 531 <img class="left-img" :src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo"
341 alt="" /> 532 alt="" />
342 <div class="right-main"> 533 <div class="right-main">
343 <div class="title">{{ item.companyName ?? '--' }}</div> 534 <div class="title">{{ item.exchangeName ?? '--' }}</div>
344 <div class="count-group"> 535 <div class="count-group">
345 <div class="count-item"> 536 <div class="count-item">
346 <div class="item-label">已上架产品数</div> 537 <div class="item-label">已上架产品数</div>
347 <div class="item-num">{{ changeNum(item.listedNum) }}</div> 538 <div class="item-num">{{ item.listingNum || '--' }}</div>
348 </div> 539 </div>
349 <div class="count-item"> 540 <div class="count-item">
350 <div class="item-label">审批中产品数</div> 541 <div class="item-label">审批中产品数</div>
351 <div class="item-num">{{ changeNum(item.processNum) }}</div> 542 <div class="item-num">{{ item.underReviewNum || '--' }}</div>
352 </div> 543 </div>
353 </div> 544 </div>
354 </div> 545 </div>
355 </div> 546 </div>
356 <div class="operator-btn"> 547 <div class="operator-btn">
357 <div class="left-btn borderRight" @click="btnClick(item)">更新模板</div> 548 <!-- <div class="left-btn borderRight" @click="btnClick(item)">更新模板</div> -->
358 <div class="left-btn" @click="btnClick(item)">资产登记</div> 549 <div class="left-btn" @click="btnClick(item)">资产登记</div>
359 </div> 550 </div>
360 </div> 551 </div>
...@@ -363,6 +554,17 @@ const btnClick = (btn) => { ...@@ -363,6 +554,17 @@ const btnClick = (btn) => {
363 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" 554 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange"
364 @tableSwitchBeforeChange="tableSwitchBeforeChange" /> 555 @tableSwitchBeforeChange="tableSwitchBeforeChange" />
365 </div> 556 </div>
557 <el-dialog v-model="dialogVisible" :title="dialogTitle" width="40%">
558 <el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none">
559 </el-input>
560 <template #footer>
561 <div class="dialog-footer">
562 <el-button @click="dialogVisible = false">取消</el-button>
563 <el-button v-if="approveType == 'pass'" type="primary" @click="passSubmit">通过</el-button>
564 <el-button v-if="approveType == 'reject'" type="primary" @click="rejectSubmit">驳回</el-button>
565 </div>
566 </template>
567 </el-dialog>
366 </div> 568 </div>
367 </template> 569 </template>
368 570
...@@ -385,15 +587,16 @@ const btnClick = (btn) => { ...@@ -385,15 +587,16 @@ const btnClick = (btn) => {
385 587
386 .list-content { 588 .list-content {
387 display: flex; 589 display: flex;
388 justify-content: space-between; 590 justify-content: flex-start;
389 flex-wrap: wrap; 591 flex-wrap: wrap;
390 margin-bottom: 8px; 592 margin-bottom: 8px;
391 padding: 0 8px; 593 padding: 0 8px;
392 594
393 .card-content { 595 .card-content {
394 width: calc(33.33% - 10px); 596 width: 300px;
395 padding: 16px; 597 padding: 16px;
396 box-shadow: 0 0 0 1px #d9d9d9; 598 box-shadow: 0 0 0 1px #d9d9d9;
599 margin-right: 12px;
397 600
398 .header { 601 .header {
399 display: flex; 602 display: flex;
...@@ -433,32 +636,37 @@ const btnClick = (btn) => { ...@@ -433,32 +636,37 @@ const btnClick = (btn) => {
433 636
434 .operator-btn { 637 .operator-btn {
435 display: flex; 638 display: flex;
436 justify-content: space-between; 639 // justify-content: space-between;
640 justify-content: center;
437 align-items: center; 641 align-items: center;
438 box-shadow: 0 0 0 1px #d9d9d9; 642 box-shadow: 0 0 0 1px #d9d9d9;
439 position: relative; 643 position: relative;
440 644 width: 100%;
441 &::after {
442 content: '';
443 width: 0;
444 height: 100%;
445 border-left: 1px solid #d9d9d9;
446 position: absolute;
447 left: 50%;
448 transform: translateX(-50%);
449 }
450
451 >.left-btn {
452 width: 50%;
453 height: 40px; 645 height: 40px;
454 line-height: 40px; 646 line-height: 40px;
455 text-align: center;
456 cursor: pointer; 647 cursor: pointer;
648 // &::after {
649 // content: '';
650 // width: 0;
651 // height: 100%;
652 // border-left: 1px solid #d9d9d9;
653 // position: absolute;
654 // left: 50%;
655 // transform: translateX(-50%);
656 // }
657
658 // >.left-btn {
659 // width: 50%;
660 // height: 40px;
661 // line-height: 40px;
662 // text-align: center;
663 // cursor: pointer;
457 664
458 &:hover { 665 &:hover {
459 color: #4fa1a4; 666 color: #4fa1a4;
460 } 667 }
461 } 668
669 // }
462 } 670 }
463 } 671 }
464 } 672 }
......
...@@ -13,9 +13,9 @@ import useUserStore from "@/store/modules/user"; ...@@ -13,9 +13,9 @@ import useUserStore from "@/store/modules/user";
13 import useDataAssetStore from "@/store/modules/dataAsset"; 13 import useDataAssetStore from "@/store/modules/dataAsset";
14 import { changeNum } from '@/utils/common'; 14 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 } 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 } from "@/api/modules/dataProduct"; 18 import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway, getDataExchangeProductList } 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";
...@@ -95,7 +95,7 @@ const getArea = (node, resolve) => { ...@@ -95,7 +95,7 @@ const getArea = (node, resolve) => {
95 }) 95 })
96 } 96 }
97 } 97 }
98 98 const processInstanceId = ref('');
99 const collapseIcon = ref(false); 99 const collapseIcon = ref(false);
100 const collapseIcon1 = ref(false); 100 const collapseIcon1 = ref(false);
101 const collapseIcon2 = ref(false); 101 const collapseIcon2 = ref(false);
...@@ -133,6 +133,10 @@ const approveTableInfo: any = ref({ ...@@ -133,6 +133,10 @@ const approveTableInfo: any = ref({
133 } 133 }
134 }); 134 });
135 135
136 const exchangeName = computed(() => {
137 return route.query.exchangeName;
138 })
139
136 const listingFormRef = ref(); 140 const listingFormRef = ref();
137 const subForm = ref({}); 141 const subForm = ref({});
138 const formInfo = ref({ 142 const formInfo = ref({
...@@ -182,7 +186,7 @@ const formInfo = ref({ ...@@ -182,7 +186,7 @@ const formInfo = ref({
182 label: "数据时间范围", 186 label: "数据时间范围",
183 type: "date-picker", 187 type: "date-picker",
184 field: "dateRange", 188 field: "dateRange",
185 default: null, 189 default: '',
186 placeholder: "开始时间~结束时间", 190 placeholder: "开始时间~结束时间",
187 clearable: true, 191 clearable: true,
188 required: true, 192 required: true,
...@@ -365,22 +369,13 @@ const formInfo = ref({ ...@@ -365,22 +369,13 @@ const formInfo = ref({
365 // required: true, 369 // required: true,
366 // }, 370 // },
367 { 371 {
368 label: "上架交易所", 372 label: "登记数交所",
369 type: "select", 373 type: "input",
370 placeholder: "请选择", 374 placeholder: "请输入",
371 field: "exchangeGuids", 375 field: "exchangeName",
372 default: [], 376 default: exchangeName,
373 options: exchangeList.value,
374 props: {
375 value: "guid",
376 label: "tenantName",
377 },
378 filterable: true,
379 clearable: true, 377 clearable: true,
380 multiple: true, 378 disabled: true,
381 tagsTooltip: true,
382 collapse: true,
383 disabled: false,
384 required: true, 379 required: true,
385 visible: true 380 visible: true
386 }, 381 },
...@@ -416,8 +411,12 @@ const formInfo = ref({ ...@@ -416,8 +411,12 @@ const formInfo = ref({
416 field: 'productImg', 411 field: 'productImg',
417 default: [], 412 default: [],
418 limit: 1, 413 limit: 1,
419 block: false, 414 block: true,
420 required: false, 415 required: false,
416 // col: 'mr8',
417 // style: {
418 // width: 'calc(33.33% - 20px)!important'
419 // },
421 }, 420 },
422 { 421 {
423 label: '登记证', 422 label: '登记证',
...@@ -425,7 +424,7 @@ const formInfo = ref({ ...@@ -425,7 +424,7 @@ const formInfo = ref({
425 accept: '.jpg, .png, .jpeg ', 424 accept: '.jpg, .png, .jpeg ',
426 type: 'upload-file', 425 type: 'upload-file',
427 placeholder: '请选择', 426 placeholder: '请选择',
428 field: 'registerImg', 427 field: 'registrationCertificate',
429 default: [], 428 default: [],
430 limit: 1, 429 limit: 1,
431 block: false, 430 block: false,
...@@ -438,7 +437,7 @@ const formInfo = ref({ ...@@ -438,7 +437,7 @@ const formInfo = ref({
438 accept: '.png, .pdf', 437 accept: '.png, .pdf',
439 type: 'upload-file', 438 type: 'upload-file',
440 placeholder: '请选择', 439 placeholder: '请选择',
441 field: 'qualityReport', 440 field: 'qualityEvaluationFile',
442 default: [], 441 default: [],
443 limit: 1, 442 limit: 1,
444 block: false, 443 block: false,
...@@ -449,18 +448,23 @@ const formInfo = ref({ ...@@ -449,18 +448,23 @@ const formInfo = ref({
449 label: "质量评估机构", 448 label: "质量评估机构",
450 type: "select", 449 type: "select",
451 placeholder: "请选择", 450 placeholder: "请选择",
452 field: "qualityOrg", 451 field: "qualityEvaluationInstitutionGuid",
453 default: '', 452 default: '',
454 options: [], 453 options: [],
455 props: { 454 props: {
456 value: 'value', 455 value: 'value',
457 label: 'label' 456 label: 'label'
458 }, 457 },
458 allowCreate: true,
459 filterable: true, 459 filterable: true,
460 clearable: true, 460 clearable: true,
461 disabled: false, 461 disabled: false,
462 required: true, 462 required: false,
463 visible: true 463 visible: true,
464 col: 'mr8',
465 style: {
466 width: 'calc(33.33% - 20px)!important'
467 },
464 }, 468 },
465 { 469 {
466 label: '价值评估报告', 470 label: '价值评估报告',
...@@ -468,7 +472,7 @@ const formInfo = ref({ ...@@ -468,7 +472,7 @@ const formInfo = ref({
468 accept: '.png, .pdf', 472 accept: '.png, .pdf',
469 type: 'upload-file', 473 type: 'upload-file',
470 placeholder: '请选择', 474 placeholder: '请选择',
471 field: 'valueReport', 475 field: 'costAssessmentFile',
472 default: [], 476 default: [],
473 limit: 1, 477 limit: 1,
474 block: false, 478 block: false,
...@@ -479,17 +483,18 @@ const formInfo = ref({ ...@@ -479,17 +483,18 @@ const formInfo = ref({
479 label: "价值评估机构", 483 label: "价值评估机构",
480 type: "select", 484 type: "select",
481 placeholder: "请选择", 485 placeholder: "请选择",
482 field: "valueOrg", 486 field: "costAssessmentInstitutionGuid",
483 default: '', 487 default: '',
484 options: [], 488 options: [],
485 props: { 489 props: {
486 value: 'value', 490 value: 'guid',
487 label: 'label' 491 label: 'tenantName'
488 }, 492 },
493 allowCreate: true,
489 filterable: true, 494 filterable: true,
490 clearable: true, 495 clearable: true,
491 disabled: false, 496 disabled: false,
492 required: true, 497 required: false,
493 visible: true 498 visible: true
494 }, 499 },
495 { 500 {
...@@ -498,7 +503,7 @@ const formInfo = ref({ ...@@ -498,7 +503,7 @@ const formInfo = ref({
498 accept: '.png, .pdf', 503 accept: '.png, .pdf',
499 type: 'upload-file', 504 type: 'upload-file',
500 placeholder: '请选择', 505 placeholder: '请选择',
501 field: 'commitment', 506 field: 'commitmentLetter',
502 templateUrl: 'http://www.baidu.com', 507 templateUrl: 'http://www.baidu.com',
503 default: [], 508 default: [],
504 limit: 1, 509 limit: 1,
...@@ -512,7 +517,7 @@ const formInfo = ref({ ...@@ -512,7 +517,7 @@ const formInfo = ref({
512 accept: '.png, .pdf', 517 accept: '.png, .pdf',
513 type: 'upload-file', 518 type: 'upload-file',
514 placeholder: '请选择', 519 placeholder: '请选择',
515 field: 'authorization', 520 field: 'accreditFile',
516 templateUrl: 'http://www.baidu.com', 521 templateUrl: 'http://www.baidu.com',
517 default: [], 522 default: [],
518 limit: 1, 523 limit: 1,
...@@ -681,6 +686,15 @@ const getProducts = () => { ...@@ -681,6 +686,15 @@ const getProducts = () => {
681 }) 686 })
682 } 687 }
683 688
689 const getTableInfo = () => {
690 getDataExchangeProductList({}).then((res: any) => {
691 if (res.code == proxy.$passCode) {
692 let data = res.data || [];
693 formInfo.value.items[0].options = data;
694 }
695 })
696 }
697
684 const getProductDetail = () => { 698 const getProductDetail = () => {
685 flowDetailLoading.value = true; 699 flowDetailLoading.value = true;
686 getListingDetail({ guid }).then((res: any) => { 700 getListingDetail({ guid }).then((res: any) => {
...@@ -688,6 +702,9 @@ const getProductDetail = () => { ...@@ -688,6 +702,9 @@ const getProductDetail = () => {
688 if (res.code == proxy.$passCode) { 702 if (res.code == proxy.$passCode) {
689 const data = res.data || {} 703 const data = res.data || {}
690 flowDetail.value = data; 704 flowDetail.value = data;
705 deploymentId.value = data.approveVO.camundaDeploymentId
706 processInstanceId.value = data.approveVO.camundaInstanceId
707 console.log(data, '-----------------');
691 let coverageArea = data.coverageArea || []; 708 let coverageArea = data.coverageArea || [];
692 if (data.coverageArea?.[0]?.[0] == 'all') { 709 if (data.coverageArea?.[0]?.[0] == 'all') {
693 setFormItems({ ...flowDetail.value, coverageArea: coverageArea }, true); 710 setFormItems({ ...flowDetail.value, coverageArea: coverageArea }, true);
...@@ -795,11 +812,12 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -795,11 +812,12 @@ const submitForm = (btn, formEl, tosub = false) => {
795 params.caseNumber = formInfo.value.items.at(5).defaultValue || formInfo.value.items.at(4).default; 812 params.caseNumber = formInfo.value.items.at(5).defaultValue || formInfo.value.items.at(4).default;
796 params.timeAreaStart = params.dateRange ? params.dateRange[0] : ''; 813 params.timeAreaStart = params.dateRange ? params.dateRange[0] : '';
797 params.timeAreaEnd = params.dateRange ? params.dateRange[1] : ''; 814 params.timeAreaEnd = params.dateRange ? params.dateRange[1] : '';
798 params.groundingPick = [route.query.groundingPick];
799 // 删除dateRange字段 815 // 删除dateRange字段
800 delete params.dateRange; 816 delete params.dateRange;
801 flowDetailLoading.value = true; 817 flowDetailLoading.value = true;
818 if (!route.query.exchangeGuid) {
802 if (detailType == 'add') { 819 if (detailType == 'add') {
820 params.immediateApprove = btn.value == 'submit' ? true : false;
803 listingSavePortal(params).then((res: any) => { 821 listingSavePortal(params).then((res: any) => {
804 if (res.code == proxy.$passCode) { 822 if (res.code == proxy.$passCode) {
805 ElMessage({ 823 ElMessage({
...@@ -829,7 +847,8 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -829,7 +847,8 @@ const submitForm = (btn, formEl, tosub = false) => {
829 }); 847 });
830 } else { 848 } else {
831 params.guid = guid; 849 params.guid = guid;
832 listingUpdate(params).then((res: any) => { 850 params.immediateApprove = btn.value == 'submit' ? true : false;
851 listingUpdateGateway(params).then((res: any) => {
833 if (res.code == proxy.$passCode) { 852 if (res.code == proxy.$passCode) {
834 ElMessage({ 853 ElMessage({
835 type: "success", 854 type: "success",
...@@ -858,6 +877,48 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -858,6 +877,48 @@ const submitForm = (btn, formEl, tosub = false) => {
858 }); 877 });
859 } 878 }
860 } else { 879 } else {
880 if (detailType == 'add') {
881 // 上架交易所
882 params.immediateApprove = btn.value == 'submit' ? true : false;
883 params.accreditFile = params.accreditFile.length ? { name: params.accreditFile[0].name, url: params.accreditFile[0].url } : {};
884 params.commitmentLetter = params.commitmentLetter.length ? { name: params.commitmentLetter[0].name, url: params.commitmentLetter[0].url } : {};
885 params.costAssessmentFile = params.costAssessmentFile.length ? { name: params.costAssessmentFile[0].name, url: params.costAssessmentFile[0].url } : {};
886 params.productDetail = params.productDetail.length ? { name: params.productDetail[0].name, url: params.productDetail[0].url } : {};
887 params.qualityEvaluationFile = params.qualityEvaluationFile.length ? { name: params.qualityEvaluationFile[0].name, url: params.qualityEvaluationFile[0].url } : {};
888 params.registrationCertificate = params.registrationCertificate.length ? { name: params.registrationCertificate[0].name, url: params.registrationCertificate[0].url } : {};
889 params.exchangeGuid = route.query.exchangeGuid;
890 console.log(params, '-----------------');
891 // listingSave(params).then((res: any) => {
892 // if (res.code == proxy.$passCode) {
893 // ElMessage({
894 // type: "success",
895 // message: '提交成功',
896 // });
897 // flowDetailLoading.value = false;
898 // userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
899 // assetStore.set(true);
900 // router.push({
901 // name: "productListing",
902 // query: {},
903 // });
904 // } else {
905 // ElMessage({
906 // type: "error",
907 // message: res.msg,
908 // });
909 // flowDetailLoading.value = false;
910 // }
911 // }).catch((res) => {
912 // ElMessage({
913 // type: "error",
914 // message: '提交失败',
915 // });
916 // flowDetailLoading.value = false;
917 // });
918 }
919 }
920
921 } else {
861 nextTick(() => { 922 nextTick(() => {
862 const isError = document.getElementsByClassName('is-error'); 923 const isError = document.getElementsByClassName('is-error');
863 if (isError[0]) { 924 if (isError[0]) {
...@@ -872,7 +933,7 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -872,7 +933,7 @@ const submitForm = (btn, formEl, tosub = false) => {
872 }; 933 };
873 934
874 const btnClick = (btn) => { 935 const btnClick = (btn) => {
875 if (btn.value == 'submit') { 936 if (btn.value == 'submit' || btn.value == 'draft') {
876 const checkForm = listingFormRef.value; 937 const checkForm = listingFormRef.value;
877 const formEl = checkForm.ruleFormRef; 938 const formEl = checkForm.ruleFormRef;
878 const form = checkForm.formInline; 939 const form = checkForm.formInline;
...@@ -884,7 +945,7 @@ const btnClick = (btn) => { ...@@ -884,7 +945,7 @@ const btnClick = (btn) => {
884 dialogInfo.value.contents = contents.value[btn.value] 945 dialogInfo.value.contents = contents.value[btn.value]
885 dialogInfo.value.visible = true 946 dialogInfo.value.visible = true
886 } else { 947 } else {
887 if (detailType == 'add' || detailType == 'edit') { 948 if (detailType == 'add' || detailType == 'edit' || detailType == 'redit') {
888 ElMessageBox.confirm( 949 ElMessageBox.confirm(
889 "当前页面尚未保存,确定放弃修改吗?", 950 "当前页面尚未保存,确定放弃修改吗?",
890 "提示", 951 "提示",
...@@ -895,7 +956,7 @@ const btnClick = (btn) => { ...@@ -895,7 +956,7 @@ const btnClick = (btn) => {
895 } 956 }
896 ).then(() => { 957 ).then(() => {
897 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 958 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
898 assetStore.set(true); 959 // assetStore.set(true);
899 router.push({ 960 router.push({
900 name: "productListing", 961 name: "productListing",
901 query: {}, 962 query: {},
...@@ -917,6 +978,7 @@ const btnClick = (btn) => { ...@@ -917,6 +978,7 @@ const btnClick = (btn) => {
917 } 978 }
918 979
919 const setFormItems = (row: any = null, isDetail = false) => { 980 const setFormItems = (row: any = null, isDetail = false) => {
981 console.log(row, '--------1---------');
920 formInfo.value.items.map((item: any) => { 982 formInfo.value.items.map((item: any) => {
921 if (item.field == 'productImg') { 983 if (item.field == 'productImg') {
922 item.default = row ? (row.productPic ? [row.productPic] : row[item.field] || []) : [] 984 item.default = row ? (row.productPic ? [row.productPic] : row[item.field] || []) : []
...@@ -966,16 +1028,25 @@ const setFormItems = (row: any = null, isDetail = false) => { ...@@ -966,16 +1028,25 @@ const setFormItems = (row: any = null, isDetail = false) => {
966 } else { 1028 } else {
967 item.default = row ? row[item.field] : (item.default || '') 1029 item.default = row ? row[item.field] : (item.default || '')
968 } 1030 }
969 } else {
970 item.default = row ? row[item.field] : (item.default || '')
971 } 1031 }
1032 else if (item.field == 'dateRange') {
1033 item.default = row ? [row.timeAreaStart, row.timeAreaEnd] : null;
1034 }
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 // }
972 }) 1042 })
973 } 1043 }
974 1044
975 const selectChange = async (val, row, info) => { 1045 const selectChange = async (val, row, info) => {
976 if (row.field == 'damName') { 1046 if (row.field == 'damName') {
977 const data = row.options.filter(o => o.damName == val); 1047 const data = row.options.filter(o => o.damName == val);
978 let coverageArea = data.length ? (data[0].coverageArea || []) : []; 1048 console.log(data, '-----------------');
1049 let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : [];
979 await setFormItems({ ...info, coverageArea: coverageArea }); 1050 await setFormItems({ ...info, coverageArea: coverageArea });
980 formInfo.value.items.at(0).default = val; 1051 formInfo.value.items.at(0).default = val;
981 formInfo.value.items.at(1).default = data.length ? data[0].damType : ''; 1052 formInfo.value.items.at(1).default = data.length ? data[0].damType : '';
...@@ -988,7 +1059,7 @@ const selectChange = async (val, row, info) => { ...@@ -988,7 +1059,7 @@ const selectChange = async (val, row, info) => {
988 formInfo.value.items.at(-1).default = data.length ? data[0].damGuid : ''; 1059 formInfo.value.items.at(-1).default = data.length ? data[0].damGuid : '';
989 formInfo.value.items.at(-3).required = data[0].damType != '1' && data[0].damType != '2'; 1060 formInfo.value.items.at(-3).required = data[0].damType != '1' && data[0].damType != '2';
990 formInfo.value.items.at(-4).required = data[0].damType != '1' && data[0].damType != '2'; 1061 formInfo.value.items.at(-4).required = data[0].damType != '1' && data[0].damType != '2';
991 if (data.length && data[0].coverageArea?.[0]?.[0] != 'all') { 1062 if (data.length && data[0].coverageArea?.[0]?.[0] != 'all' && data[0].coverageArea) {
992 let p: any = []; 1063 let p: any = [];
993 data[0].coverageArea.forEach(area => { 1064 data[0].coverageArea.forEach(area => {
994 if (p.includes(area[0])) { 1065 if (p.includes(area[0])) {
...@@ -1118,16 +1189,19 @@ onActivated(() => { ...@@ -1118,16 +1189,19 @@ onActivated(() => {
1118 break; 1189 break;
1119 } 1190 }
1120 }; 1191 };
1121 if (detailType == 'add' || detailType == 'edit') { 1192 // if ((detailType == 'add' || detailType == 'edit') && !route.query.exchangeGuids) {
1122 getProducts(); 1193 // getProducts();
1123 }; 1194 // };
1124 }) 1195 })
1125 1196
1126 const deploymentId = ref(''); 1197 const deploymentId = ref('');
1198 const qualityEvaluationData = ref<any>('');
1199 const costAssessmentData = ref<any>('');
1127 onBeforeMount(() => { 1200 onBeforeMount(() => {
1128 if (route.query.type == 'add' && !route.query.type1) { 1201 // case 1: 数交易所 case 2: 门户
1202 if (route.query.case == '2') {
1129 formInfo.value.items.forEach(item => { 1203 formInfo.value.items.forEach(item => {
1130 if (item.field == 'damCode' || item.field == 'exchangeGuids' || item.field == 'registerImg' || item.field == 'qualityReport' || item.field == 'qualityOrg' || item.field == 'valueReport' || item.field == 'valueOrg' || item.field == 'commitment' || item.field == 'authorization' || item.field == 'productDetail') { 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') {
1131 item.visible = false; 1205 item.visible = false;
1132 } 1206 }
1133 }) 1207 })
...@@ -1141,11 +1215,11 @@ onBeforeMount(() => { ...@@ -1141,11 +1215,11 @@ onBeforeMount(() => {
1141 }) 1215 })
1142 if (detailType && detailType != 'add') { 1216 if (detailType && detailType != 'add') {
1143 getProductDetail(); 1217 getProductDetail();
1144 if (detailType == 'detail' && dGuid !== undefined) { 1218 // if (detailType == 'detail' && dGuid !== undefined) {
1145 getApplyDeatil(); 1219 // getApplyDeatil();
1146 } 1220 // }
1147 } 1221 }
1148 getApproveData(); 1222 // getApproveData();
1149 getParamsDataList({ dictType: '资产类型' }).then((res: any) => { 1223 getParamsDataList({ dictType: '资产类型' }).then((res: any) => {
1150 if (res.code == proxy.$passCode) { 1224 if (res.code == proxy.$passCode) {
1151 damTypes.value = res.data || []; 1225 damTypes.value = res.data || [];
...@@ -1213,6 +1287,31 @@ onBeforeMount(() => { ...@@ -1213,6 +1287,31 @@ onBeforeMount(() => {
1213 ElMessage.error(res.msg); 1287 ElMessage.error(res.msg);
1214 } 1288 }
1215 }) 1289 })
1290 // 获取质量评估机构
1291 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
1292 if (res.code == proxy.$passCode) {
1293 qualityEvaluationData.value = res.data.records || [];
1294 let item = formInfo.value.items.find(item => item.field == 'qualityEvaluationInstitutionGuid');
1295 item && (item.options = qualityEvaluationData.value);
1296 } else {
1297 proxy.$ElMessage.error(res.msg);
1298 }
1299 })
1300 // 获取价值评估机构
1301 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12504" }).then((res: any) => {
1302 if (res.code == proxy.$passCode) {
1303 costAssessmentData.value = res.data.records || [];
1304 let item = formInfo.value.items.find(item => item.field == 'costAssessmentInstitutionGuid');
1305 item && (item.options = costAssessmentData.value);
1306 } else {
1307 proxy.$ElMessage.error(res.msg);
1308 }
1309 })
1310 if (route.query.exchangeGuid) {
1311 getTableInfo();
1312 } else {
1313 getProducts();
1314 }
1216 }) 1315 })
1217 1316
1218 </script> 1317 </script>
...@@ -1275,7 +1374,7 @@ onBeforeMount(() => { ...@@ -1275,7 +1374,7 @@ onBeforeMount(() => {
1275 </div> 1374 </div>
1276 </div> 1375 </div>
1277 <div class="panel_body" :class="{ collapse: collapseIcon }"> 1376 <div class="panel_body" :class="{ collapse: collapseIcon }">
1278 <div class="list_panel" v-if="detailType == 'add' || detailType == 'edit'"> 1377 <div class="list_panel" v-if="detailType == 'add' || detailType == 'edit' || detailType == 'redit'">
1279 <Form ref="listingFormRef" :itemList="formInfo.items" :formId="formInfo.id" :rules="formInfo.rules" 1378 <Form ref="listingFormRef" :itemList="formInfo.items" :formId="formInfo.id" :rules="formInfo.rules"
1280 :col="formInfo.col" @selectChange="selectChange" @checkboxChange="checkboxChange" 1379 :col="formInfo.col" @selectChange="selectChange" @checkboxChange="checkboxChange"
1281 @switchChange="switchChange" /> 1380 @switchChange="switchChange" />
...@@ -1286,18 +1385,35 @@ onBeforeMount(() => { ...@@ -1286,18 +1385,35 @@ onBeforeMount(() => {
1286 <span class="item_value">{{ flowDetail.damName || '--' }}</span> 1385 <span class="item_value">{{ flowDetail.damName || '--' }}</span>
1287 </div> 1386 </div>
1288 <div class="list_item"> 1387 <div class="list_item">
1289 <span class="item_label">产品类型:</span> 1388 <span class="item_label">资产类型:</span>
1290 <span class="item_value">{{ flowDetail.damTypeName || '--' }}</span> 1389 <span class="item_value">{{ flowDetail.damTypeName || '--' }}</span>
1291 </div> 1390 </div>
1292 <div class="list_item"> 1391 <div class="list_item">
1293 <span class="item_label">所属主题:</span>
1294 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
1295 </div>
1296 <div class="list_item">
1297 <span class="item_label">证书编号:</span> 1392 <span class="item_label">证书编号:</span>
1298 <span class="item_value">{{ flowDetail.damCode || '--' }}</span> 1393 <span class="item_value">{{ flowDetail.damCode || '--' }}</span>
1299 </div> 1394 </div>
1300 <div class="list_item"> 1395 <div class="list_item">
1396 <span class="item_label">数据时间范围:</span>
1397 <span class="item_value">{{ (flowDetail.timeAreaStart - flowDetail.timeAreaEnd) || '--' }}</span>
1398 </div>
1399 <div class="list_item">
1400 <span class="item_label">交付方式:</span>
1401 <span class="item_value">{{ flowDetail.deliveryWayName || '--' }}</span>
1402 </div>
1403 <div class="list_item">
1404 <span class="item_label">定价方式:</span>
1405 <span class="item_value">{{ flowDetail.pricingWayName || '--' }}</span>
1406 </div>
1407 <div class="list_item">
1408 <span class="item_label">定价金额:</span>
1409 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
1410 </div>
1411 <!-- <div class="list_item">
1412 <span class="item_label">所属主题:</span>
1413 <span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
1414 </div> -->
1415
1416 <div class="list_item">
1301 <span class="item_label">数据规模(条):</span> 1417 <span class="item_label">数据规模(条):</span>
1302 <span class="item_value">{{ flowDetail.dataScale != null ? changeNum(flowDetail.dataScale, 0) : '--' 1418 <span class="item_value">{{ flowDetail.dataScale != null ? changeNum(flowDetail.dataScale, 0) : '--'
1303 }}</span> 1419 }}</span>
...@@ -1307,25 +1423,25 @@ onBeforeMount(() => { ...@@ -1307,25 +1423,25 @@ onBeforeMount(() => {
1307 <span class="item_value">{{ flowDetail.caseNumber != null ? changeNum(flowDetail.caseNumber, 0) : '--' 1423 <span class="item_value">{{ flowDetail.caseNumber != null ? changeNum(flowDetail.caseNumber, 0) : '--'
1308 }}</span> 1424 }}</span>
1309 </div> 1425 </div>
1310 <div class="list_item"> 1426 <!-- <div class="list_item">
1311 <span class="item_label">交易方式:</span> 1427 <span class="item_label">交易方式:</span>
1312 <span class="item_value">{{ flowDetail.deliveryWayName || '--' }}</span> 1428 <span class="item_value">{{ flowDetail.deliveryWayName || '--' }}</span>
1313 </div> 1429 </div> -->
1314 <div class="list_item"> 1430 <!-- <div class="list_item">
1315 <span class="item_label">产品价格:</span> 1431 <span class="item_label">产品价格:</span>
1316 <span class="item_value">{{ flowDetail.isDiscussPersonally == 'Y' ? '面议' : (flowDetail.productPrice || 1432 <span class="item_value">{{ flowDetail.isDiscussPersonally == 'Y' ? '面议' : (flowDetail.productPrice ||
1317 '--') 1433 '--')
1318 }}</span> 1434 }}</span>
1319 </div> 1435 </div> -->
1320 <div class="list_item"> 1436 <div class="list_item">
1321 <span class="item_label">审核后上架:</span> 1437 <span class="item_label">登记数交所:</span>
1322 <span class="item_value">{{ flowDetail.isApproveGrounding == 'Y' ? `自动上架` : '手动上架' }}</span> 1438 <span class="item_value">{{ flowDetail.isApproveGrounding == 'Y' ? `自动上架` : '手动上架' }}</span>
1323 </div> 1439 </div>
1324 <div class="list_item is_block"> 1440 <!-- <div class="list_item is_block">
1325 <span class="item_label">上架交易所:</span> 1441 <span class="item_label">上架交易所:</span>
1326 <span class="item_value">{{ !flowDetail.exchangeGuids?.length ? '--' : flowDetail.exchangeNames.join(',') 1442 <span class="item_value">{{ !flowDetail.exchangeGuids?.length ? '--' : flowDetail.exchangeNames.join(',')
1327 }}</span> 1443 }}</span>
1328 </div> 1444 </div> -->
1329 <div class="list_item is_block"> 1445 <div class="list_item is_block">
1330 <span class="item_label">数据覆盖地域:</span> 1446 <span class="item_label">数据覆盖地域:</span>
1331 <span class="item_value" 1447 <span class="item_value"
...@@ -1417,7 +1533,7 @@ onBeforeMount(() => { ...@@ -1417,7 +1533,7 @@ onBeforeMount(() => {
1417 <div class="list_panel"> 1533 <div class="list_panel">
1418 <div class="table_panel_wrap"> 1534 <div class="table_panel_wrap">
1419 <!-- <Table :tableInfo="approveTableInfo" /> --> 1535 <!-- <Table :tableInfo="approveTableInfo" /> -->
1420 <ApprovalProcess v-if="deploymentId" :deploymentId="deploymentId" :definitionId="''"> 1536 <ApprovalProcess v-if="deploymentId" :deploymentId="deploymentId" :processInstanceId="processInstanceId">
1421 </ApprovalProcess> 1537 </ApprovalProcess>
1422 </div> 1538 </div>
1423 </div> 1539 </div>
...@@ -1457,10 +1573,12 @@ onBeforeMount(() => { ...@@ -1457,10 +1573,12 @@ onBeforeMount(() => {
1457 </div> 1573 </div>
1458 </div> 1574 </div>
1459 </div> 1575 </div>
1460 <div class="tool_btns" v-if="detailType == 'add' || detailType == 'edit'"> 1576 <div class="tool_btns" v-if="detailType == 'add' || detailType == 'edit' || detailType == 'redit'">
1461 <div class="btns"> 1577 <div class="btns">
1462 <el-button @click="btnClick({ value: 'cancel' })">取消</el-button> 1578 <el-button @click="btnClick({ value: 'cancel' })">返回</el-button>
1463 <el-button type="primary" @click="btnClick({ value: 'submit' })">提交</el-button> 1579 <el-button @click="btnClick({ value: 'draft' })"
1580 v-if="route.query.type == 'add' || route.query.type == 'redit' || route.query.type == 'edit'">保存草稿</el-button>
1581 <el-button type="primary" @click="btnClick({ value: 'submit' })">提交流程</el-button>
1464 </div> 1582 </div>
1465 </div> 1583 </div>
1466 <div class="tool_btns" v-else-if="detailType == 'check'"> 1584 <div class="tool_btns" v-else-if="detailType == 'check'">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!