e5656a0c by xukangle

fix

1 parent 9a7bc015
...@@ -106,7 +106,7 @@ export const updatQuality = (params) => request({ ...@@ -106,7 +106,7 @@ export const updatQuality = (params) => request({
106 }) 106 })
107 107
108 /** 获取可以发起资产质量评价的选项列表。 */ 108 /** 获取可以发起资产质量评价的选项列表。 */
109 /** type: 1 质量评价;2 资产评估 */ 109 /** type: 1 质量评价;2 价值评估 */
110 export const getRegisteredList = (type) => request({ 110 export const getRegisteredList = (type) => request({
111 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-valid-list?type=${type}`, 111 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-valid-list?type=${type}`,
112 method: 'get' 112 method: 'get'
......
...@@ -252,6 +252,9 @@ export const filterVal = (val, type) => { ...@@ -252,6 +252,9 @@ export const filterVal = (val, type) => {
252 case 'Y': 252 case 'Y':
253 approval = '已通过'; 253 approval = '已通过';
254 break; 254 break;
255 case 'C':
256 approval = '已撤销';
257 break;
255 case 'N': 258 case 'N':
256 approval = '草稿中'; 259 approval = '草稿中';
257 break; 260 break;
......
...@@ -197,6 +197,13 @@ const inputChange = (val, row) => { ...@@ -197,6 +197,13 @@ const inputChange = (val, row) => {
197 formInline.value[row.field] = val = parseFloat(val || 0).toFixed(2); 197 formInline.value[row.field] = val = parseFloat(val || 0).toFixed(2);
198 } 198 }
199 } 199 }
200 // 新增的 inputType 处理逻辑:integerWithComma
201 if (row.inputType == "integerWithComma") {
202 val = val.replace(/[^\d]/g, ""); // 移除非数字字符
203 val = val.replace(/^0+(?!$)/, ""); // 去除前导零,但保留单个零输入
204 val = val.replace(/\B(?=(\d{3})+(?!\d))/g, ","); // 添加千位分隔符
205 formInline.value[row.field] = val;
206 }
200 if (row.field == "mobileNo") { 207 if (row.field == "mobileNo") {
201 formInline.value.logonUser = formInline.value.mobileNo; 208 formInline.value.logonUser = formInline.value.mobileNo;
202 } 209 }
...@@ -241,6 +248,14 @@ const inputEventChange = (val, item) => { ...@@ -241,6 +248,14 @@ const inputEventChange = (val, item) => {
241 formInline.value[item.field] = formInline.value[item.field].toString().replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3") 248 formInline.value[item.field] = formInline.value[item.field].toString().replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")
242 formInline.value[item.field] = formInline.value[item.field].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,2})?).*$/g, "$1") 249 formInline.value[item.field] = formInline.value[item.field].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,2})?).*$/g, "$1")
243 return; 250 return;
251 } else if (item.inputType == 'integerWithComma') { // 整数,带千位分隔符
252 // 移除非数字字符
253 formInline.value[item.field] = val.replace(/[^\d]/g, "");
254 // 去除前导零
255 formInline.value[item.field] = formInline.value[item.field].replace(/^0+(?!$)/, "");
256 // 添加千位分隔符
257 formInline.value[item.field] = formInline.value[item.field].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
258 return;
244 } 259 }
245 if (item.min != null && (formInline.value[item.field] < item.min)) { 260 if (item.min != null && (formInline.value[item.field] < item.min)) {
246 formInline.value[item.field] = item.min; 261 formInline.value[item.field] = item.min;
...@@ -589,7 +604,7 @@ const panelChange = (scope, row) => { ...@@ -589,7 +604,7 @@ const panelChange = (scope, row) => {
589 required_mark: item.required, 604 required_mark: item.required,
590 }">{{ 605 }">{{
591 item.label 606 item.label
592 }}</span> 607 }}</span>
593 608
594 </span> 609 </span>
595 <div class="header_title_tooltip" style="width: auto" v-if="item.tooltip"> 610 <div class="header_title_tooltip" style="width: auto" v-if="item.tooltip">
...@@ -682,7 +697,7 @@ const panelChange = (scope, row) => { ...@@ -682,7 +697,7 @@ const panelChange = (scope, row) => {
682 <div class="item_panel" :class="{ is_block: panel.block }" v-for="panel in item.children"> 697 <div class="item_panel" :class="{ is_block: panel.block }" v-for="panel in item.children">
683 <label :class="{ required_mark: panel.required }">{{ 698 <label :class="{ required_mark: panel.required }">{{
684 panel.label 699 panel.label
685 }}</label> 700 }}</label>
686 <el-checkbox v-if="panel.type == 'checkbox'" v-model="formInline[panel.field]" 701 <el-checkbox v-if="panel.type == 'checkbox'" v-model="formInline[panel.field]"
687 :disabled="panel.disabled || readonly" :true-label="panel.trueValue ?? true" 702 :disabled="panel.disabled || readonly" :true-label="panel.trueValue ?? true"
688 :false-label="panel.falseValue ?? false">{{ panel.placeholder }}</el-checkbox> 703 :false-label="panel.falseValue ?? false">{{ panel.placeholder }}</el-checkbox>
...@@ -765,7 +780,7 @@ const panelChange = (scope, row) => { ...@@ -765,7 +780,7 @@ const panelChange = (scope, row) => {
765 <span class="item-label" slot="label"> 780 <span class="item-label" slot="label">
766 <span v-if="child.label" :class="{ required_mark: child.required }">{{ 781 <span v-if="child.label" :class="{ required_mark: child.required }">{{
767 child.label 782 child.label
768 }}</span> 783 }}</span>
769 </span> 784 </span>
770 <el-select v-if="child.type == 'select'" v-model="formInline[child.field]" 785 <el-select v-if="child.type == 'select'" v-model="formInline[child.field]"
771 :placeholder="child.placeholder" :disabled="child.disabled || readonly" :filterable="child.filterable" 786 :placeholder="child.placeholder" :disabled="child.disabled || readonly" :filterable="child.filterable"
...@@ -824,7 +839,7 @@ const panelChange = (scope, row) => { ...@@ -824,7 +839,7 @@ const panelChange = (scope, row) => {
824 <span class="item-label" slot="label"> 839 <span class="item-label" slot="label">
825 <span :class="{ required_mark: child.required }">{{ 840 <span :class="{ required_mark: child.required }">{{
826 child.label 841 child.label
827 }}</span> 842 }}</span>
828 </span> 843 </span>
829 <el-cascader v-if="child.type == 'cascader'" v-model="formInline[child.field]" :props="child.props" 844 <el-cascader v-if="child.type == 'cascader'" v-model="formInline[child.field]" :props="child.props"
830 :options="child.options" :show-all-levels="child.showAllLevels ?? true" 845 :options="child.options" :show-all-levels="child.showAllLevels ?? true"
...@@ -867,7 +882,7 @@ const panelChange = (scope, row) => { ...@@ -867,7 +882,7 @@ const panelChange = (scope, row) => {
867 <div class="item_panel" v-for="child in item.children"> 882 <div class="item_panel" v-for="child in item.children">
868 <label :class="{ required_mark: child.required }">{{ 883 <label :class="{ required_mark: child.required }">{{
869 child.label 884 child.label
870 }}</label> 885 }}</label>
871 <div class="tool_item"> 886 <div class="tool_item">
872 <el-select v-model="formInline[child.field]" :class="{ is_block: child.block }" 887 <el-select v-model="formInline[child.field]" :class="{ is_block: child.block }"
873 :placeholder="child.placeholder" :multiple="child.multiple" :collapse-tags="child.collapse" 888 :placeholder="child.placeholder" :multiple="child.multiple" :collapse-tags="child.collapse"
...@@ -942,7 +957,7 @@ const panelChange = (scope, row) => { ...@@ -942,7 +957,7 @@ const panelChange = (scope, row) => {
942 <span class="item-label" slot="label"> 957 <span class="item-label" slot="label">
943 <span :class="{ required_mark: child.required }">{{ 958 <span :class="{ required_mark: child.required }">{{
944 child.label 959 child.label
945 }}</span> 960 }}</span>
946 </span> 961 </span>
947 <el-input :class="[child.col, { is_block: child.block }]" v-model="formInline[child.field]" 962 <el-input :class="[child.col, { is_block: child.block }]" v-model="formInline[child.field]"
948 :rows="child.rows ?? 4" type="textarea" :placeholder="child.placeholder" 963 :rows="child.rows ?? 4" type="textarea" :placeholder="child.placeholder"
...@@ -999,7 +1014,7 @@ const panelChange = (scope, row) => { ...@@ -999,7 +1014,7 @@ const panelChange = (scope, row) => {
999 <span class="item-label" slot="label"> 1014 <span class="item-label" slot="label">
1000 <span :class="{ required_mark: child.required }">{{ 1015 <span :class="{ required_mark: child.required }">{{
1001 child.label 1016 child.label
1002 }}</span> 1017 }}</span>
1003 </span> 1018 </span>
1004 <div class="input_group" :class="[child.col]" v-if="child.type == 'input-group'"> 1019 <div class="input_group" :class="[child.col]" v-if="child.type == 'input-group'">
1005 <template v-for="(group, c) in child.children"> 1020 <template v-for="(group, c) in child.children">
...@@ -1008,7 +1023,7 @@ const panelChange = (scope, row) => { ...@@ -1008,7 +1023,7 @@ const panelChange = (scope, row) => {
1008 <span class="item-label" slot="label"> 1023 <span class="item-label" slot="label">
1009 <span :class="{ required_mark: group.required }">{{ 1024 <span :class="{ required_mark: group.required }">{{
1010 group.label 1025 group.label
1011 }}</span> 1026 }}</span>
1012 </span> 1027 </span>
1013 <el-select v-if="group.type == 'select'" v-model="formInline[group.field]" 1028 <el-select v-if="group.type == 'select'" v-model="formInline[group.field]"
1014 :placeholder="group.placeholder" :clearable="group.clearable" 1029 :placeholder="group.placeholder" :clearable="group.clearable"
...@@ -1149,7 +1164,7 @@ const panelChange = (scope, row) => { ...@@ -1149,7 +1164,7 @@ const panelChange = (scope, row) => {
1149 <span class="item-label" slot="label"> 1164 <span class="item-label" slot="label">
1150 <span :class="{ required_mark: child.required }">{{ 1165 <span :class="{ required_mark: child.required }">{{
1151 child.label 1166 child.label
1152 }}</span> 1167 }}</span>
1153 </span> 1168 </span>
1154 <el-select v-if="child.type == 'select'" v-model="formInline[child.field]" 1169 <el-select v-if="child.type == 'select'" v-model="formInline[child.field]"
1155 :placeholder="child.placeholder" :clearable="child.clearable" :disabled="child.disabled || readonly" 1170 :placeholder="child.placeholder" :clearable="child.clearable" :disabled="child.disabled || readonly"
...@@ -1200,7 +1215,7 @@ const panelChange = (scope, row) => { ...@@ -1200,7 +1215,7 @@ const panelChange = (scope, row) => {
1200 <span class="item-label" slot="label" :class="[child.col]"> 1215 <span class="item-label" slot="label" :class="[child.col]">
1201 <span :class="{ required_mark: child.required }">{{ 1216 <span :class="{ required_mark: child.required }">{{
1202 child.label 1217 child.label
1203 }}</span> 1218 }}</span>
1204 </span> 1219 </span>
1205 <div class="input_popover_panel" v-if="child.type == 'input-popover-panel'"> 1220 <div class="input_popover_panel" v-if="child.type == 'input-popover-panel'">
1206 <el-popover placement="bottom-start" width="100%" trigger="click" :teleported="false"> 1221 <el-popover placement="bottom-start" width="100%" trigger="click" :teleported="false">
...@@ -1254,7 +1269,7 @@ const panelChange = (scope, row) => { ...@@ -1254,7 +1269,7 @@ const panelChange = (scope, row) => {
1254 <span class="item-label" slot="label"> 1269 <span class="item-label" slot="label">
1255 <span :class="{ required_mark: child.required }">{{ 1270 <span :class="{ required_mark: child.required }">{{
1256 child.label 1271 child.label
1257 }}</span> 1272 }}</span>
1258 </span> 1273 </span>
1259 <template v-if="child.type == 'upload-image'"> 1274 <template v-if="child.type == 'upload-image'">
1260 <el-upload :class="[child.col, 'avatar-uploader', { is_block: child.block }]" action="#" 1275 <el-upload :class="[child.col, 'avatar-uploader', { is_block: child.block }]" action="#"
...@@ -1281,7 +1296,8 @@ const panelChange = (scope, row) => { ...@@ -1281,7 +1296,8 @@ const panelChange = (scope, row) => {
1281 <template #trigger> 1296 <template #trigger>
1282 <el-button :disabled="child.disabled" :icon="Upload" class="mr8">上传文件</el-button> 1297 <el-button :disabled="child.disabled" :icon="Upload" class="mr8">上传文件</el-button>
1283 </template> 1298 </template>
1284 <el-button :icon="Download" v-if="child.templateUrl" @click="(child.templateUrl == 'auto' && child.templateClick) ? child.templateClick() : downloadTemplate(child.templateUrl)"> 1299 <el-button :icon="Download" v-if="child.templateUrl"
1300 @click="(child.templateUrl == 'auto' && child.templateClick) ? child.templateClick() : downloadTemplate(child.templateUrl)">
1285 下载模板 1301 下载模板
1286 </el-button> 1302 </el-button>
1287 <template #tip> 1303 <template #tip>
...@@ -1362,7 +1378,8 @@ const panelChange = (scope, row) => { ...@@ -1362,7 +1378,8 @@ const panelChange = (scope, row) => {
1362 <template #trigger> 1378 <template #trigger>
1363 <el-button :disabled="item.disabled" :icon="Upload" class="mr8">上传文件</el-button> 1379 <el-button :disabled="item.disabled" :icon="Upload" class="mr8">上传文件</el-button>
1364 </template> 1380 </template>
1365 <el-button :icon="Download" v-if="item.templateUrl" @click="(item.templateUrl == 'auto' && item.templateClick) ? item.templateClick() : downloadTemplate(item.templateUrl)"> 1381 <el-button :icon="Download" v-if="item.templateUrl"
1382 @click="(item.templateUrl == 'auto' && item.templateClick) ? item.templateClick() : downloadTemplate(item.templateUrl)">
1366 下载模板 1383 下载模板
1367 </el-button> 1384 </el-button>
1368 <template #tip> 1385 <template #tip>
...@@ -2480,9 +2497,9 @@ const panelChange = (scope, row) => { ...@@ -2480,9 +2497,9 @@ const panelChange = (scope, row) => {
2480 margin-right: 8px; 2497 margin-right: 8px;
2481 } 2498 }
2482 2499
2483 .extra-textarea-class { 2500 // .extra-textarea-class {
2484 margin-top: 21px !important; 2501 // margin-top: 21px !important;
2485 } 2502 // }
2486 2503
2487 :deep(.form-and-select) { 2504 :deep(.form-and-select) {
2488 display: flex; 2505 display: flex;
......
...@@ -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, getListingCount, productRejectFlowData } from "@/api/modules/dataProduct"; 12 import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList, getListingCount, productRejectFlowData, listingUpdateGateway, listingSave, listingUpdate } 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";
...@@ -20,6 +20,7 @@ import { ...@@ -20,6 +20,7 @@ import {
20 changeNum, 20 changeNum,
21 } from "@/utils/common"; 21 } from "@/utils/common";
22 import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService"; 22 import { passFlowData, rejectFlowData, revokeFlowData } from "@/api/modules/workFlowService";
23 import { content } from "html2canvas/dist/types/css/property-descriptors/content";
23 24
24 const { proxy } = getCurrentInstance() as any; 25 const { proxy } = getCurrentInstance() as any;
25 const router = useRouter(); 26 const router = useRouter();
...@@ -149,7 +150,6 @@ const tableInfo = ref({ ...@@ -149,7 +150,6 @@ const tableInfo = ref({
149 if (flowState !== 1) { 150 if (flowState !== 1) {
150 list.push({ label: "详情", value: "detail" }) 151 list.push({ label: "详情", value: "detail" })
151 } 152 }
152
153 return list 153 return list
154 }, 154 },
155 } 155 }
...@@ -359,6 +359,92 @@ const tableBtnClick = (scope, btn) => { ...@@ -359,6 +359,92 @@ const tableBtnClick = (scope, btn) => {
359 if (type == 'up') { 359 if (type == 'up') {
360 // tableSwitchChange('Y', scope, 'listingStatus') 360 // tableSwitchChange('Y', scope, 'listingStatus')
361 console.log('上架', scope) 361 console.log('上架', scope)
362 let params: any = {}
363 if (scope.row.exchangeGuid) {
364 // 数交所上架 [params.commitmentLetterInfo[0].url]
365 params = {
366 guid: scope.row.guid,
367 accreditFile: [scope.row.accreditFile[0].url],
368 caseNumber: scope.row.caseNumber,
369 commitmentLetter: [scope.row.commitmentLetter[0].url],
370 content: scope.row.productDesc,
371 costAssessmentInstitution: scope.row.costAssessmentInstitution,
372 costAssessmentInstitutionGuid: scope.row.costAssessmentInstitutionGuid,
373 coverageArea: scope.row.coverageArea,
374 damCode: scope.row.damCode,
375 damGuid: scope.row.damGuid,
376 damName: scope.row.damName,
377 damType: scope.row.damType,
378 dataScale: scope.row.dataScale,
379 deliveryWay: scope.row.deliveryWay,
380 evaluationFile: [scope.row.evaluationFile[0].url],
381 exchangeGuid: scope.row.exchangeGuid,
382 feeDesc: scope.row.feeDesc,
383 immediateApprove: true,
384 priceUnit: scope.row.priceUnit,
385 pricingWay: scope.row.pricingWay,
386 productPic: scope.row.productPic,
387 productPrice: scope.row.productPrice,
388 qualityEvaluationInstitution: scope.row.qualityEvaluationInstitution,
389 qualityEvaluationInstitutionGuid: scope.row.qualityEvaluationInstitutionGuid,
390 timeAreaStart: scope.row.timeAreaStart,
391 timeAreaEnd: scope.row.timeAreaEnd,
392 registrationCertificate: scope.row.registrationCertificate,
393 productDetail: [scope.row.productDetail[0].url],
394 assessmentFile: [scope.row.assessmentFile[0].url],
395 }
396 listingUpdate(params).then((res: any) => {
397 if (res.code == proxy.$passCode) {
398 ElMessage({
399 type: "success",
400 message: '提交成功',
401 });
402 getTableData();
403 } else {
404 ElMessage({
405 type: "error",
406 message: res.msg,
407 });
408 }
409 })
410 } else {
411 // 门户数据专区上架
412 params = {
413 guid: scope.row.guid,
414 caseNumber: scope.row.caseNumber,
415 content: scope.row.productDesc,
416 coverageArea: scope.row.coverageArea,
417 damGuid: scope.row.damGuid,
418 damName: scope.row.damName,
419 damType: scope.row.damType,
420 dataScale: scope.row.dataScale,
421 deliveryWay: scope.row.deliveryWay,
422 feeDesc: scope.row.feeDesc,
423 immediateApprove: true,
424 priceUnit: scope.row.priceUnit,
425 pricingWay: scope.row.pricingWay,
426 productPic: scope.row.productPic,
427 productPrice: scope.row.productPrice,
428 timeAreaStart: scope.row.timeAreaStart,
429 timeAreaEnd: scope.row.timeAreaEnd,
430 }
431 listingUpdateGateway(params).then((res: any) => {
432 if (res.code == proxy.$passCode) {
433 ElMessage({
434 type: "success",
435 message: '提交成功',
436 });
437 getTableData();
438 } else {
439 ElMessage({
440 type: "error",
441 message: res.msg,
442 });
443 }
444 })
445 console.log('上架', scope)
446 }
447
362 } 448 }
363 if (type == 'down') { 449 if (type == 'down') {
364 // 需要二次确认 450 // 需要二次确认
...@@ -394,7 +480,7 @@ const passSubmit = () => { ...@@ -394,7 +480,7 @@ const passSubmit = () => {
394 formInfo.value.items.forEach((item) => { 480 formInfo.value.items.forEach((item) => {
395 assetsSafeInfo.value.forEach((item1) => { 481 assetsSafeInfo.value.forEach((item1) => {
396 if (item.label == item1.label) { 482 if (item.label == item1.label) {
397 complianceInfoMap[`"${item1.value}"`] = listingFormRef.value.formInline[item.field]; 483 complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field];
398 } 484 }
399 }) 485 })
400 }) 486 })
...@@ -404,6 +490,7 @@ const passSubmit = () => { ...@@ -404,6 +490,7 @@ const passSubmit = () => {
404 approveSuggest: approveSuggest.value, 490 approveSuggest: approveSuggest.value,
405 approveStaffGuid: userData.staffGuid, 491 approveStaffGuid: userData.staffGuid,
406 complianceInfoMap: complianceInfoMap, 492 complianceInfoMap: complianceInfoMap,
493 approveState: 'Y',
407 bizGuid: row.approveVO.bizGuid, 494 bizGuid: row.approveVO.bizGuid,
408 }).then((res: any) => { 495 }).then((res: any) => {
409 if (res.code == '00000') { 496 if (res.code == '00000') {
...@@ -444,7 +531,7 @@ const rejectSubmit = async () => { ...@@ -444,7 +531,7 @@ const rejectSubmit = async () => {
444 formInfo.value.items.forEach((item) => { 531 formInfo.value.items.forEach((item) => {
445 assetsSafeInfo.value.forEach((item1) => { 532 assetsSafeInfo.value.forEach((item1) => {
446 if (item.label == item1.label) { 533 if (item.label == item1.label) {
447 complianceInfoMap[`"${item1.value}"`] = listingFormRef.value.formInline[item.field]; 534 complianceInfoMap[item1.value] = listingFormRef.value.formInline[item.field];
448 } 535 }
449 }) 536 })
450 }) 537 })
...@@ -455,6 +542,7 @@ const rejectSubmit = async () => { ...@@ -455,6 +542,7 @@ const rejectSubmit = async () => {
455 approveStaffGuid: userData.staffGuid, 542 approveStaffGuid: userData.staffGuid,
456 complianceInfoMap: complianceInfoMap, 543 complianceInfoMap: complianceInfoMap,
457 bizGuid: row.approveVO.bizGuid, 544 bizGuid: row.approveVO.bizGuid,
545 approveState: 'R'
458 }).then((res: any) => { 546 }).then((res: any) => {
459 if (res.code == '00000') { 547 if (res.code == '00000') {
460 fullscreenLoading.value = false; 548 fullscreenLoading.value = false;
......
...@@ -218,6 +218,7 @@ const formInfo = ref<any>({ ...@@ -218,6 +218,7 @@ const formInfo = ref<any>({
218 field: 'dataScale', 218 field: 'dataScale',
219 maxlength: 19, 219 maxlength: 19,
220 regexp: /\D/g, 220 regexp: /\D/g,
221 inputType: 'integerWithComma',
221 default: '', 222 default: '',
222 disabled: false, 223 disabled: false,
223 required: true 224 required: true
...@@ -227,6 +228,9 @@ const formInfo = ref<any>({ ...@@ -227,6 +228,9 @@ const formInfo = ref<any>({
227 placeholder: '请输入', 228 placeholder: '请输入',
228 field: 'caseNumber', 229 field: 'caseNumber',
229 default: '', 230 default: '',
231 inputType: 'integerWithComma',
232 maxlength: 19,
233 regexp: /\D/g,
230 disabled: false, 234 disabled: false,
231 required: false 235 required: false
232 }, { 236 }, {
...@@ -834,10 +838,10 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -834,10 +838,10 @@ const submitForm = (btn, formEl, tosub = false) => {
834 // if (params.content) { 838 // if (params.content) {
835 // params.productDesc = truncateHTML(params.content, 400); 839 // params.productDesc = truncateHTML(params.content, 400);
836 // } 840 // }
837 console.log(params, formInfo.value.items.at(4).defaultValue, formInfo.value, '-----------------'); 841 console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------');
838 params.dataScale = formInfo.value.items.at(4).defaultValue || formInfo.value.items.at(4).default; 842 params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10),
839 params.caseNumber = formInfo.value.items.at(5).defaultValue || formInfo.value.items.at(4).default; 843 params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10),
840 params.timeAreaStart = params.dateRange ? params.dateRange[0] : ''; 844 params.timeAreaStart = params.dateRange ? params.dateRange[0] : '';
841 params.timeAreaEnd = params.dateRange ? params.dateRange[1] : ''; 845 params.timeAreaEnd = params.dateRange ? params.dateRange[1] : '';
842 // 删除dateRange字段 846 // 删除dateRange字段
843 delete params.dateRange; 847 delete params.dateRange;
...@@ -960,7 +964,7 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -960,7 +964,7 @@ const submitForm = (btn, formEl, tosub = false) => {
960 params.registrationCertificate = params.registrationCertificateInfo.length ? { name: params.registrationCertificateInfo[0].name, url: params.registrationCertificateInfo[0].url } : {}; 964 params.registrationCertificate = params.registrationCertificateInfo.length ? { name: params.registrationCertificateInfo[0].name, url: params.registrationCertificateInfo[0].url } : {};
961 params.accreditFile = params.accreditFileInfo.length ? [params.accreditFileInfo[0].url] : null; 965 params.accreditFile = params.accreditFileInfo.length ? [params.accreditFileInfo[0].url] : null;
962 params.commitmentLetter = params.commitmentLetterInfo.length ? [params.commitmentLetterInfo[0].url] : []; 966 params.commitmentLetter = params.commitmentLetterInfo.length ? [params.commitmentLetterInfo[0].url] : [];
963 params.costAssessmentFile = params.costAssessmentFileInfo.length ? [params.costAssessmentFileInfo[0].url] : []; 967 params.assessmentFile = params.costAssessmentFileInfo.length ? [params.costAssessmentFileInfo[0].url] : [];
964 params.productDetail = params.productDetailInfo.length ? [params.productDetailInfo[0].url] : []; 968 params.productDetail = params.productDetailInfo.length ? [params.productDetailInfo[0].url] : [];
965 params.evaluationFile = params.qualityEvaluationFileInfo.length ? [params.qualityEvaluationFileInfo[0].url] : []; 969 params.evaluationFile = params.qualityEvaluationFileInfo.length ? [params.qualityEvaluationFileInfo[0].url] : [];
966 params.exchangeGuid = route.query.exchangeGuid; 970 params.exchangeGuid = route.query.exchangeGuid;
......
...@@ -18,6 +18,7 @@ import { changeNum } from "@/utils/common"; ...@@ -18,6 +18,7 @@ import { changeNum } from "@/utils/common";
18 import useUserStore from "@/store/modules/user"; 18 import useUserStore from "@/store/modules/user";
19 import Moment from "moment"; 19 import Moment from "moment";
20 import platformIndexNewBigScreen from "./platformIndexNewBigScreen.vue"; 20 import platformIndexNewBigScreen from "./platformIndexNewBigScreen.vue";
21 import { getDownFileSignByUrl, obsDownloadRequest, parseAndDecodeUrl } from "@/api/modules/obsService";
21 // import platformIndex from "./data_asset/platformIndex.vue"; 22 // import platformIndex from "./data_asset/platformIndex.vue";
22 23
23 const router = useRouter(); 24 const router = useRouter();
...@@ -415,7 +416,7 @@ const assetTableRef = ref(); ...@@ -415,7 +416,7 @@ const assetTableRef = ref();
415 const rolltimer = ref(); 416 const rolltimer = ref();
416 417
417 onBeforeMount(() => { 418 onBeforeMount(() => {
418 if (userData.tenantType == 1) { 419 if (userData.tenantType != 1) {
419 // 获取数据表格 420 // 获取数据表格
420 getAssetTableData(); 421 getAssetTableData();
421 422
...@@ -486,6 +487,46 @@ function fetchQualityInfo() { ...@@ -486,6 +487,46 @@ function fetchQualityInfo() {
486 } 487 }
487 488
488 // 获取注册文档 URL 489 // 获取注册文档 URL
490 // function fetchRegisterUrl() {
491 // docUrlLoading.value = true;
492 // getRegisterUrl({
493 // startTime: startTime.value || '',
494 // endTime: endTime.value || '',
495 // }).then((res: any) => {
496 // docUrlLoading.value = false;
497 // if (res.code == proxy.$passCode) {
498 // const data = res.data || [];
499 // if (data.length) {
500 // const promises = data.map(async (d) => {
501 // d.documentTypeDesc = d.documentType === 1 ? 'A证' : d.documentType === 2 ? 'B证' : 'C证';
502
503 // // const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(d.documentFile[0]).fileName);
504 // // if (!refSignInfo?.data) {
505 // // refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
506 // // return;
507 // // }
508 // // const res: any = await obsDownloadRequest(refSignInfo?.data);
509 // return getImageContent(d.documentFile[0]).then((res: any) => (res ? URL.createObjectURL(res) : null));
510 // });
511
512 // Promise.all(promises).then((urls: any[]) => {
513 // docUrl.value = urls;
514 // docUrlList.value = urls.map((url) => [{ url }]);
515 // nextTick(() => {
516 // processImgDesc();
517 // });
518 // });
519 // } else {
520 // docUrl.value = [];
521 // docUrlList.value = [];
522 // }
523 // } else {
524 // ElMessage.error(res.msg);
525 // }
526 // });
527 // }
528
529 // 获取注册文档 URL
489 function fetchRegisterUrl() { 530 function fetchRegisterUrl() {
490 docUrlLoading.value = true; 531 docUrlLoading.value = true;
491 getRegisterUrl({ 532 getRegisterUrl({
...@@ -496,9 +537,19 @@ function fetchRegisterUrl() { ...@@ -496,9 +537,19 @@ function fetchRegisterUrl() {
496 if (res.code == proxy.$passCode) { 537 if (res.code == proxy.$passCode) {
497 const data = res.data || []; 538 const data = res.data || [];
498 if (data.length) { 539 if (data.length) {
499 const promises = data.map((d) => { 540 console.log(data, 'data');
541 const promises = data.map(async (d) => {
500 d.documentTypeDesc = d.documentType === 1 ? 'A证' : d.documentType === 2 ? 'B证' : 'C证'; 542 d.documentTypeDesc = d.documentType === 1 ? 'A证' : d.documentType === 2 ? 'B证' : 'C证';
501 return getImageContent(d.documentFile[0]).then((res: any) => (res ? URL.createObjectURL(res) : null)); 543
544 // 使用注释替换的代码逻辑
545 const refSignInfo: any = await getDownFileSignByUrl(parseAndDecodeUrl(d.documentFile[0]).fileName);
546 if (!refSignInfo?.data) {
547 refSignInfo?.msg && ElMessage.error(refSignInfo?.msg);
548 return null;
549 }
550 const res: any = await obsDownloadRequest(refSignInfo?.data);
551 console.log(res, 'res');
552 return res ? URL.createObjectURL(res) : null;
502 }); 553 });
503 554
504 Promise.all(promises).then((urls: any[]) => { 555 Promise.all(promises).then((urls: any[]) => {
...@@ -518,6 +569,7 @@ function fetchRegisterUrl() { ...@@ -518,6 +569,7 @@ function fetchRegisterUrl() {
518 }); 569 });
519 } 570 }
520 571
572
521 const processImgDesc = () => { 573 const processImgDesc = () => {
522 let domImg = document.getElementById('register-img'); 574 let domImg = document.getElementById('register-img');
523 if (!domImg) { 575 if (!domImg) {
...@@ -648,7 +700,7 @@ const handleChangeTime = (val) => { ...@@ -648,7 +700,7 @@ const handleChangeTime = (val) => {
648 700
649 <template> 701 <template>
650 <div style="width: 100%;height: 100%"> 702 <div style="width: 100%;height: 100%">
651 <div class="right-filter-main" v-if="userData.tenantType == 1"> 703 <div class="right-filter-main" v-if="userData.tenantType != 1">
652 <div class="right-filter"> 704 <div class="right-filter">
653 <div class="filter-btns"> 705 <div class="filter-btns">
654 <div class="btn" :class="{ 'is-active': filterDate == 'today' }" @click="handleFilterClick('today')">今日</div> 706 <div class="btn" :class="{ 'is-active': filterDate == 'today' }" @click="handleFilterClick('today')">今日</div>
...@@ -662,7 +714,7 @@ const handleChangeTime = (val) => { ...@@ -662,7 +714,7 @@ const handleChangeTime = (val) => {
662 ref="datePickerRef" /> 714 ref="datePickerRef" />
663 </div> 715 </div>
664 </div> 716 </div>
665 <div v-if="userData.tenantType == 1" class="main-content"> 717 <div v-if="userData.tenantType != 1" class="main-content">
666 <div class="one-row"> 718 <div class="one-row">
667 <div class="row-per"> 719 <div class="row-per">
668 <div class="header"> 720 <div class="header">
...@@ -778,9 +830,9 @@ const handleChangeTime = (val) => { ...@@ -778,9 +830,9 @@ const handleChangeTime = (val) => {
778 <el-image class="top-img" :src="img.url" :zoom-rate="1.2" :max-scale="10" :min-scale="0.2" 830 <el-image class="top-img" :src="img.url" :zoom-rate="1.2" :max-scale="10" :min-scale="0.2"
779 :preview-src-list="docUrl" :initial-index="i" :preview-teleported="true" /> 831 :preview-src-list="docUrl" :initial-index="i" :preview-teleported="true" />
780 <div class="right-content"> 832 <div class="right-content">
781 <div class="title">{{ docData[i].damName }}</div> 833 <div class="title">{{ docData[i]?.damName || '--' }}</div>
782 <div class="desc">{{ docData[i].applicationScenarios || '--' }}</div> 834 <div class="desc">{{ docData[i]?.applicationScenarios || '--' }}</div>
783 <div class="desc1">{{ docData[i].issuingEntity || '--' }}</div> 835 <div class="desc1">{{ docData[i]?.issuingEntity || '--' }}</div>
784 <!-- <el-tag class="dam-tag">{{ docData[i].documentTypeDesc }}</el-tag> --> 836 <!-- <el-tag class="dam-tag">{{ docData[i].documentTypeDesc }}</el-tag> -->
785 </div> 837 </div>
786 </template> 838 </template>
...@@ -818,7 +870,7 @@ const handleChangeTime = (val) => { ...@@ -818,7 +870,7 @@ const handleChangeTime = (val) => {
818 </div> 870 </div>
819 </div> 871 </div>
820 <!-- <platformIndex v-else-if="userData.tenantType != 1" /> --> 872 <!-- <platformIndex v-else-if="userData.tenantType != 1" /> -->
821 <platformIndexNewBigScreen v-else-if="userData.tenantType != 1" /> 873 <platformIndexNewBigScreen v-else-if="userData.tenantType == 1" />
822 <div v-else class="main-placeholder"> 874 <div v-else class="main-placeholder">
823 <img width="210" height="100" src="../../public/swzl_logo.png" /> 875 <img width="210" height="100" src="../../public/swzl_logo.png" />
824 </div> 876 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!