Merge branch 'dev_20241202_xukangle' into develop
Showing
5 changed files
with
105 additions
and
20 deletions
| ... | @@ -418,8 +418,8 @@ const downloadTemplate = async (url) => { | ... | @@ -418,8 +418,8 @@ const downloadTemplate = async (url) => { |
| 418 | } | 418 | } |
| 419 | // 解码文件名 | 419 | // 解码文件名 |
| 420 | name = decodeURIComponent(name); | 420 | name = decodeURIComponent(name); |
| 421 | name = name.replace(/_\d{8}\d{9}_\d+/g, ''); | ||
| 421 | var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; | 422 | var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : ''; |
| 422 | console.log(name, res, fileSuffix, '-------------------name'); | ||
| 423 | download(res, name, fileSuffix); | 423 | download(res, name, fileSuffix); |
| 424 | } else { | 424 | } else { |
| 425 | res?.msg && ElMessage.error(res?.msg); | 425 | res?.msg && ElMessage.error(res?.msg); | ... | ... |
| ... | @@ -299,18 +299,52 @@ const handleCreate = () => { | ... | @@ -299,18 +299,52 @@ const handleCreate = () => { |
| 299 | }); | 299 | }); |
| 300 | }; | 300 | }; |
| 301 | 301 | ||
| 302 | // 定义 ref 和响应式高度 | ||
| 303 | const tableToolsRef = ref<any>(null); | ||
| 304 | const tableToolsHeight = ref<any>(0); | ||
| 305 | |||
| 306 | // 获取 TableTools 的高度 | ||
| 307 | const getTableToolsHeight = () => { | ||
| 308 | const tableToolsElement: any = tableToolsRef.value; | ||
| 309 | if (tableToolsElement) { | ||
| 310 | tableToolsHeight.value = tableToolsElement.offsetHeight - 40; | ||
| 311 | } | ||
| 312 | }; | ||
| 313 | // 在组件挂载后获取初始高度 | ||
| 314 | onMounted(() => { | ||
| 315 | // 获取初始高度 | ||
| 316 | nextTick(() => { | ||
| 317 | getTableToolsHeight(); | ||
| 318 | }); | ||
| 319 | |||
| 320 | // 监听 window resize 事件来更新高度 | ||
| 321 | window.addEventListener('resize', handleWindowResize); | ||
| 322 | }); | ||
| 323 | |||
| 324 | // 在组件卸载前移除监听 | ||
| 325 | onBeforeUnmount(() => { | ||
| 326 | window.removeEventListener('resize', handleWindowResize); | ||
| 327 | }); | ||
| 328 | |||
| 329 | // 处理 window resize 事件 | ||
| 330 | const handleWindowResize = () => { | ||
| 331 | nextTick(() => { | ||
| 332 | getTableToolsHeight(); // 更新 TableTools 高度 | ||
| 333 | }); | ||
| 334 | }; | ||
| 335 | |||
| 302 | </script> | 336 | </script> |
| 303 | 337 | ||
| 304 | <template> | 338 | <template> |
| 305 | <div class="container_wrap"> | 339 | <div class="container_wrap"> |
| 306 | <div class="table_tool_wrap"> | 340 | <div class="table_tool_wrap" ref="tableToolsRef"> |
| 307 | <TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" /> | 341 | <TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" /> |
| 308 | <div class="tools_btns"> | 342 | <div class="tools_btns"> |
| 309 | <el-button type="primary" @click="handleCreate" v-preReClick>新建</el-button> | 343 | <el-button type="primary" @click="handleCreate" v-preReClick>新建</el-button> |
| 310 | </div> | 344 | </div> |
| 311 | </div> | 345 | </div> |
| 312 | <div class="table_panel_wrap" :style="{ height: 'calc(100% - 89px)' }"> | 346 | <div class="table_panel_wrap" :style="{ height: 'calc(100% - 89px)' }"> |
| 313 | <div class="data-content" v-loading="listDataLoading"> | 347 | <div class="data-content" v-loading="listDataLoading" :style="{ height: `calc(100% - ${tableToolsHeight}px)` }"> |
| 314 | <div class="card-content" v-if="listData.length" v-for="item in listData" :key="item.guid" | 348 | <div class="card-content" v-if="listData.length" v-for="item in listData" :key="item.guid" |
| 315 | @click="handleDataClick(item)"> | 349 | @click="handleDataClick(item)"> |
| 316 | <div class="top-dam-img"></div> | 350 | <div class="top-dam-img"></div> |
| ... | @@ -375,7 +409,7 @@ const handleCreate = () => { | ... | @@ -375,7 +409,7 @@ const handleCreate = () => { |
| 375 | } | 409 | } |
| 376 | 410 | ||
| 377 | .data-content { | 411 | .data-content { |
| 378 | height: calc(100% - 44px); | 412 | // height: calc(100% - 44px); |
| 379 | display: flex; | 413 | display: flex; |
| 380 | flex-wrap: wrap; | 414 | flex-wrap: wrap; |
| 381 | gap: 20px 20px; | 415 | gap: 20px 20px; | ... | ... |
| ... | @@ -15,10 +15,11 @@ import { changeNum } from '@/utils/common'; | ... | @@ -15,10 +15,11 @@ import { changeNum } from '@/utils/common'; |
| 15 | import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common'; | 15 | import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common'; |
| 16 | import { getAreaData, getServiceTenants, getSingleList } from "@/api/modules/queryService"; | 16 | import { getAreaData, getServiceTenants, getSingleList } from "@/api/modules/queryService"; |
| 17 | import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList, getServiceDetail } from "@/api/modules/dataAsset"; | 17 | import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList, getServiceDetail } from "@/api/modules/dataAsset"; |
| 18 | import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway, getDataExchangeProductList, getTemplateFile } from "@/api/modules/dataProduct"; | 18 | import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway, getDataExchangeProductList, getTemplateFile, getListingList } 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"; |
| 22 | import { da } from "element-plus/es/locale"; | ||
| 22 | 23 | ||
| 23 | const { required } = useValidator(); | 24 | const { required } = useValidator(); |
| 24 | const route = useRoute(); | 25 | const route = useRoute(); |
| ... | @@ -704,6 +705,11 @@ const getTableInfo = () => { | ... | @@ -704,6 +705,11 @@ const getTableInfo = () => { |
| 704 | getDataExchangeProductList({}).then((res: any) => { | 705 | getDataExchangeProductList({}).then((res: any) => { |
| 705 | if (res.code == proxy.$passCode) { | 706 | if (res.code == proxy.$passCode) { |
| 706 | let data = res.data || []; | 707 | let data = res.data || []; |
| 708 | // 进行去重 去掉data 中在pageLIstInfo.value中已有的数据 | ||
| 709 | |||
| 710 | data = data.filter((item: any) => { | ||
| 711 | return !pageLIstInfo.value.find((pageItem: any) => pageItem.damGuid == item.damGuid) | ||
| 712 | }) | ||
| 707 | formInfo.value.items[0].options = data; | 713 | formInfo.value.items[0].options = data; |
| 708 | } | 714 | } |
| 709 | }) | 715 | }) |
| ... | @@ -1090,7 +1096,7 @@ const btnClick = (btn) => { | ... | @@ -1090,7 +1096,7 @@ const btnClick = (btn) => { |
| 1090 | } else { | 1096 | } else { |
| 1091 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 1097 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 1092 | router.push({ | 1098 | router.push({ |
| 1093 | name: "productListingCheck", | 1099 | name: "productListing", |
| 1094 | query: {}, | 1100 | query: {}, |
| 1095 | }); | 1101 | }); |
| 1096 | } | 1102 | } |
| ... | @@ -1341,7 +1347,7 @@ onActivated(() => { | ... | @@ -1341,7 +1347,7 @@ onActivated(() => { |
| 1341 | const deploymentId = ref(''); | 1347 | const deploymentId = ref(''); |
| 1342 | const qualityEvaluationData = ref<any>(''); | 1348 | const qualityEvaluationData = ref<any>(''); |
| 1343 | const costAssessmentData = ref<any>(''); | 1349 | const costAssessmentData = ref<any>(''); |
| 1344 | onBeforeMount(() => { | 1350 | onBeforeMount(async () => { |
| 1345 | // case 1: 数交易所 case 2: 门户 | 1351 | // case 1: 数交易所 case 2: 门户 |
| 1346 | if (route.query.case == '2') { | 1352 | if (route.query.case == '2') { |
| 1347 | formInfo.value.items.forEach(item => { | 1353 | formInfo.value.items.forEach(item => { |
| ... | @@ -1350,7 +1356,12 @@ onBeforeMount(() => { | ... | @@ -1350,7 +1356,12 @@ onBeforeMount(() => { |
| 1350 | } | 1356 | } |
| 1351 | }) | 1357 | }) |
| 1352 | } | 1358 | } |
| 1353 | 1359 | await getTableData(); | |
| 1360 | if (route.query.exchangeGuid) { | ||
| 1361 | getTableInfo(); | ||
| 1362 | } else { | ||
| 1363 | getProducts(); | ||
| 1364 | } | ||
| 1354 | getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => { | 1365 | getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => { |
| 1355 | if (res?.code == proxy.$passCode) { | 1366 | if (res?.code == proxy.$passCode) { |
| 1356 | parentAreaData.value = res.data ?? []; | 1367 | parentAreaData.value = res.data ?? []; |
| ... | @@ -1452,15 +1463,27 @@ onBeforeMount(() => { | ... | @@ -1452,15 +1463,27 @@ onBeforeMount(() => { |
| 1452 | } | 1463 | } |
| 1453 | }) | 1464 | }) |
| 1454 | if (route.query.exchangeGuid) { | 1465 | if (route.query.exchangeGuid) { |
| 1455 | getTableInfo(); | ||
| 1456 | } else { | ||
| 1457 | getProducts(); | ||
| 1458 | } | ||
| 1459 | if (route.query.exchangeGuid) { | ||
| 1460 | getTemplateInfo(); | 1466 | getTemplateInfo(); |
| 1461 | } | 1467 | } |
| 1468 | |||
| 1462 | }) | 1469 | }) |
| 1463 | 1470 | ||
| 1471 | const pageLIstInfo = ref<any>(); | ||
| 1472 | const getTableData = async () => { | ||
| 1473 | const res: any = await getListingList({ | ||
| 1474 | pageIndex: 1, | ||
| 1475 | pageSize: -1, | ||
| 1476 | }); | ||
| 1477 | if (res.code == proxy.$passCode) { | ||
| 1478 | pageLIstInfo.value = res.data.records || []; | ||
| 1479 | } else { | ||
| 1480 | ElMessage({ | ||
| 1481 | type: "error", | ||
| 1482 | message: res.msg, | ||
| 1483 | }); | ||
| 1484 | } | ||
| 1485 | } | ||
| 1486 | |||
| 1464 | // 获取模板信息 | 1487 | // 获取模板信息 |
| 1465 | const getTemplateInfo = () => { | 1488 | const getTemplateInfo = () => { |
| 1466 | getTemplateFile({ tenantGuid: route.query.exchangeGuid }).then((res: any) => { | 1489 | getTemplateFile({ tenantGuid: route.query.exchangeGuid }).then((res: any) => { |
| ... | @@ -2102,12 +2125,17 @@ const prcieInfo = computed(() => { | ... | @@ -2102,12 +2125,17 @@ const prcieInfo = computed(() => { |
| 2102 | <div class="tool_btns" v-if="detailType == 'add' || detailType == 'edit' || detailType == 'redit'"> | 2125 | <div class="tool_btns" v-if="detailType == 'add' || detailType == 'edit' || detailType == 'redit'"> |
| 2103 | <div class="btns"> | 2126 | <div class="btns"> |
| 2104 | <el-button @click="btnClick({ value: 'cancel' })">返回</el-button> | 2127 | <el-button @click="btnClick({ value: 'cancel' })">返回</el-button> |
| 2105 | <el-button @click="btnClick({ value: 'draft' })" | 2128 | <!-- <el-button @click="btnClick({ value: 'draft' })" |
| 2106 | v-if="route.query.type == 'add' || route.query.type == 'edit'">保存草稿</el-button> | 2129 | v-if="route.query.type == 'add' || route.query.type == 'edit'">保存草稿</el-button> --> |
| 2107 | <el-button type="primary" @click="btnClick({ value: 'submit' })">提交流程</el-button> | 2130 | <el-button type="primary" @click="btnClick({ value: 'submit' })">提交流程</el-button> |
| 2108 | </div> | 2131 | </div> |
| 2109 | </div> | 2132 | </div> |
| 2110 | <div class="tool_btns" v-else-if="detailType == 'check'"> | 2133 | <div class="tool_btns" v-else-if="detailType == 'detail'"> |
| 2134 | <div class="btns"> | ||
| 2135 | <el-button @click="btnClick({ value: 'cancel' })">关闭</el-button> | ||
| 2136 | </div> | ||
| 2137 | </div> | ||
| 2138 | <div class=" tool_btns" v-else-if="detailType == 'check'"> | ||
| 2111 | <div class="btns"> | 2139 | <div class="btns"> |
| 2112 | <el-button plain @click="btnClick({ value: 'cancel' })">关闭</el-button> | 2140 | <el-button plain @click="btnClick({ value: 'cancel' })">关闭</el-button> |
| 2113 | <el-button type="primary" @click="btnClick({ value: 'pass' })" | 2141 | <el-button type="primary" @click="btnClick({ value: 'pass' })" | ... | ... |
| ... | @@ -669,8 +669,30 @@ watch( | ... | @@ -669,8 +669,30 @@ watch( |
| 669 | } | 669 | } |
| 670 | handleChangeTime(daterange.value); | 670 | handleChangeTime(daterange.value); |
| 671 | }, | 671 | }, |
| 672 | |||
| 673 | ); | 672 | ); |
| 673 | const handleDatePickerChange = (val) => { | ||
| 674 | // 更新开始时间和结束时间 | ||
| 675 | startTime.value = val[0]; | ||
| 676 | endTime.value = val[1]; | ||
| 677 | |||
| 678 | // 获取数据表格 | ||
| 679 | getAssetTableData(); | ||
| 680 | |||
| 681 | // 获取统计信息 | ||
| 682 | fetchStatisticsInfo(); | ||
| 683 | |||
| 684 | // 获取质量饼图数据 | ||
| 685 | fetchQualityInfo(); | ||
| 686 | |||
| 687 | // 获取交易和融资数据 | ||
| 688 | getTradeTableData(); | ||
| 689 | getFinancingTableData(); | ||
| 690 | |||
| 691 | // 获取注册文档数据 | ||
| 692 | fetchRegisterUrl(); | ||
| 693 | // 取消选择按钮的 is-active 状态 | ||
| 694 | filterDate.value = ''; | ||
| 695 | }; | ||
| 674 | 696 | ||
| 675 | const startTime = ref() | 697 | const startTime = ref() |
| 676 | const endTime = ref() | 698 | const endTime = ref() |
| ... | @@ -711,7 +733,7 @@ const handleChangeTime = (val) => { | ... | @@ -711,7 +733,7 @@ const handleChangeTime = (val) => { |
| 711 | </div> | 733 | </div> |
| 712 | <el-date-picker v-model="daterange" type="datetimerange" range-separator="至" start-placeholder="开始时间" | 734 | <el-date-picker v-model="daterange" type="datetimerange" range-separator="至" start-placeholder="开始时间" |
| 713 | :clearable="false" end-placeholder="截止时间" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" | 735 | :clearable="false" end-placeholder="截止时间" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" |
| 714 | ref="datePickerRef" /> | 736 | ref="datePickerRef" @change="handleDatePickerChange" /> |
| 715 | </div> | 737 | </div> |
| 716 | </div> | 738 | </div> |
| 717 | <div v-if="userData.tenantType != 1" class="main-content"> | 739 | <div v-if="userData.tenantType != 1" class="main-content"> | ... | ... |
| ... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
| 6 | import { onUploadFilePreview } from '@/api/modules/common'; | 6 | import { onUploadFilePreview } from '@/api/modules/common'; |
| 7 | import { getComplianceInfoPageList, updateComplianceInfo } from '@/api/modules/securityMenu'; | 7 | import { getComplianceInfoPageList, updateComplianceInfo } from '@/api/modules/securityMenu'; |
| 8 | import TableTools from '@/components/Tools/table_tools.vue'; | 8 | import TableTools from '@/components/Tools/table_tools.vue'; |
| 9 | import { TableColumnWidth } from '@/utils/enum'; | ||
| 9 | import { ElMessage } from 'element-plus'; | 10 | import { ElMessage } from 'element-plus'; |
| 10 | const { proxy } = getCurrentInstance() as any; | 11 | const { proxy } = getCurrentInstance() as any; |
| 11 | const dialogLabelFormRef = ref(); | 12 | const dialogLabelFormRef = ref(); |
| ... | @@ -68,7 +69,7 @@ const tableInfo = ref({ | ... | @@ -68,7 +69,7 @@ const tableInfo = ref({ |
| 68 | return scope.row.entryComplianceProgram?.length > 0 ? '预览' : '--'; | 69 | return scope.row.entryComplianceProgram?.length > 0 ? '预览' : '--'; |
| 69 | } | 70 | } |
| 70 | }, | 71 | }, |
| 71 | { label: "操作时间", field: "updateTime", width: 120 }, | 72 | { label: "操作时间", field: "updateTime", width: TableColumnWidth.DATETIME }, |
| 72 | ], | 73 | ], |
| 73 | data: tableDataList.value, | 74 | data: tableDataList.value, |
| 74 | page: { | 75 | page: { |
| ... | @@ -353,7 +354,7 @@ const getTableData = () => { | ... | @@ -353,7 +354,7 @@ const getTableData = () => { |
| 353 | 354 | ||
| 354 | .main_wrap { | 355 | .main_wrap { |
| 355 | height: 100%; | 356 | height: 100%; |
| 356 | padding: 11px 16px 0 16px; | 357 | padding: 11px 8px 0 8px; |
| 357 | 358 | ||
| 358 | .main_wrap-top-area { | 359 | .main_wrap-top-area { |
| 359 | display: flex; | 360 | display: flex; | ... | ... |
-
Please register or sign in to post a comment