a764f068 by xukangle

Merge branch 'dev_20241202_xukangle' into develop

2 parents bd13eda1 066e4995
......@@ -418,8 +418,8 @@ const downloadTemplate = async (url) => {
}
// 解码文件名
name = decodeURIComponent(name);
name = name.replace(/_\d{8}\d{9}_\d+/g, '');
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
console.log(name, res, fileSuffix, '-------------------name');
download(res, name, fileSuffix);
} else {
res?.msg && ElMessage.error(res?.msg);
......@@ -617,7 +617,7 @@ const panelChange = (scope, row) => {
required_mark: item.required,
}">{{
item.label
}}</span>
}}</span>
</span>
<div class="header_title_tooltip" style="width: auto" v-if="item.tooltip">
......@@ -710,7 +710,7 @@ const panelChange = (scope, row) => {
<div class="item_panel" :class="{ is_block: panel.block }" v-for="panel in item.children">
<label :class="{ required_mark: panel.required }">{{
panel.label
}}</label>
}}</label>
<el-checkbox v-if="panel.type == 'checkbox'" v-model="formInline[panel.field]"
:disabled="panel.disabled || readonly" :true-label="panel.trueValue ?? true"
:false-label="panel.falseValue ?? false">{{ panel.placeholder }}</el-checkbox>
......@@ -793,7 +793,7 @@ const panelChange = (scope, row) => {
<span class="item-label" slot="label">
<span v-if="child.label" :class="{ required_mark: child.required }">{{
child.label
}}</span>
}}</span>
</span>
<el-select v-if="child.type == 'select'" v-model="formInline[child.field]"
:placeholder="child.placeholder" :disabled="child.disabled || readonly" :filterable="child.filterable"
......@@ -852,7 +852,7 @@ const panelChange = (scope, row) => {
<span class="item-label" slot="label">
<span :class="{ required_mark: child.required }">{{
child.label
}}</span>
}}</span>
</span>
<el-cascader v-if="child.type == 'cascader'" v-model="formInline[child.field]" :props="child.props"
:options="child.options" :show-all-levels="child.showAllLevels ?? true"
......@@ -895,7 +895,7 @@ const panelChange = (scope, row) => {
<div class="item_panel" v-for="child in item.children">
<label :class="{ required_mark: child.required }">{{
child.label
}}</label>
}}</label>
<div class="tool_item">
<el-select v-model="formInline[child.field]" :class="{ is_block: child.block }"
:placeholder="child.placeholder" :multiple="child.multiple" :collapse-tags="child.collapse"
......@@ -970,7 +970,7 @@ const panelChange = (scope, row) => {
<span class="item-label" slot="label">
<span :class="{ required_mark: child.required }">{{
child.label
}}</span>
}}</span>
</span>
<el-input :class="[child.col, { is_block: child.block }]" v-model="formInline[child.field]"
:rows="child.rows ?? 4" type="textarea" :placeholder="child.placeholder"
......@@ -1026,7 +1026,7 @@ const panelChange = (scope, row) => {
<span class="item-label" slot="label">
<span :class="{ required_mark: child.required }">{{
child.label
}}</span>
}}</span>
</span>
<div class="input_group" :class="[child.col]" v-if="child.type == 'input-group'">
<template v-for="(group, c) in child.children">
......@@ -1035,7 +1035,7 @@ const panelChange = (scope, row) => {
<span class="item-label" slot="label">
<span :class="{ required_mark: group.required }">{{
group.label
}}</span>
}}</span>
</span>
<el-select v-if="group.type == 'select'" v-model="formInline[group.field]"
:placeholder="group.placeholder" :clearable="group.clearable"
......@@ -1176,7 +1176,7 @@ const panelChange = (scope, row) => {
<span class="item-label" slot="label">
<span :class="{ required_mark: child.required }">{{
child.label
}}</span>
}}</span>
</span>
<el-select v-if="child.type == 'select'" v-model="formInline[child.field]"
:placeholder="child.placeholder" :clearable="child.clearable" :disabled="child.disabled || readonly"
......@@ -1227,7 +1227,7 @@ const panelChange = (scope, row) => {
<span class="item-label" slot="label" :class="[child.col]">
<span :class="{ required_mark: child.required }">{{
child.label
}}</span>
}}</span>
</span>
<div class="input_popover_panel" v-if="child.type == 'input-popover-panel'">
<el-popover placement="bottom-start" width="100%" trigger="click" :teleported="false">
......@@ -1281,7 +1281,7 @@ const panelChange = (scope, row) => {
<span class="item-label" slot="label">
<span :class="{ required_mark: child.required }">{{
child.label
}}</span>
}}</span>
</span>
<template v-if="child.type == 'upload-image'">
<el-upload :class="[child.col, 'avatar-uploader', { is_block: child.block }]" action="#"
......
......@@ -299,18 +299,52 @@ const handleCreate = () => {
});
};
// 定义 ref 和响应式高度
const tableToolsRef = ref<any>(null);
const tableToolsHeight = ref<any>(0);
// 获取 TableTools 的高度
const getTableToolsHeight = () => {
const tableToolsElement: any = tableToolsRef.value;
if (tableToolsElement) {
tableToolsHeight.value = tableToolsElement.offsetHeight - 40;
}
};
// 在组件挂载后获取初始高度
onMounted(() => {
// 获取初始高度
nextTick(() => {
getTableToolsHeight();
});
// 监听 window resize 事件来更新高度
window.addEventListener('resize', handleWindowResize);
});
// 在组件卸载前移除监听
onBeforeUnmount(() => {
window.removeEventListener('resize', handleWindowResize);
});
// 处理 window resize 事件
const handleWindowResize = () => {
nextTick(() => {
getTableToolsHeight(); // 更新 TableTools 高度
});
};
</script>
<template>
<div class="container_wrap">
<div class="table_tool_wrap">
<div class="table_tool_wrap" ref="tableToolsRef">
<TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" />
<div class="tools_btns">
<el-button type="primary" @click="handleCreate" v-preReClick>新建</el-button>
</div>
</div>
<div class="table_panel_wrap" :style="{ height: 'calc(100% - 89px)' }">
<div class="data-content" v-loading="listDataLoading">
<div class="data-content" v-loading="listDataLoading" :style="{ height: `calc(100% - ${tableToolsHeight}px)` }">
<div class="card-content" v-if="listData.length" v-for="item in listData" :key="item.guid"
@click="handleDataClick(item)">
<div class="top-dam-img"></div>
......@@ -375,7 +409,7 @@ const handleCreate = () => {
}
.data-content {
height: calc(100% - 44px);
// height: calc(100% - 44px);
display: flex;
flex-wrap: wrap;
gap: 20px 20px;
......
......@@ -15,10 +15,11 @@ import { changeNum } from '@/utils/common';
import { onUploadFilePreview, onUploadFileDownload } from '@/api/modules/common';
import { getAreaData, getServiceTenants, getSingleList } from "@/api/modules/queryService";
import { getApproveList, getTenantApprove, registerApproveAllow, registerApproveBackup, getParamsList, getServiceDetail } from "@/api/modules/dataAsset";
import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway, getDataExchangeProductList, getTemplateFile } from "@/api/modules/dataProduct";
import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway, getDataExchangeProductList, getTemplateFile, getListingList } from "@/api/modules/dataProduct";
import { getMatchDetail } from "@/api/modules/dataFinance";
import { useValidator } from '@/hooks/useValidator';
import { getCamundaDeploymentId } from "@/api/modules/workFlowService";
import { da } from "element-plus/es/locale";
const { required } = useValidator();
const route = useRoute();
......@@ -704,6 +705,11 @@ const getTableInfo = () => {
getDataExchangeProductList({}).then((res: any) => {
if (res.code == proxy.$passCode) {
let data = res.data || [];
// 进行去重 去掉data 中在pageLIstInfo.value中已有的数据
data = data.filter((item: any) => {
return !pageLIstInfo.value.find((pageItem: any) => pageItem.damGuid == item.damGuid)
})
formInfo.value.items[0].options = data;
}
})
......@@ -1090,7 +1096,7 @@ const btnClick = (btn) => {
} else {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
router.push({
name: "productListingCheck",
name: "productListing",
query: {},
});
}
......@@ -1341,7 +1347,7 @@ onActivated(() => {
const deploymentId = ref('');
const qualityEvaluationData = ref<any>('');
const costAssessmentData = ref<any>('');
onBeforeMount(() => {
onBeforeMount(async () => {
// case 1: 数交易所 case 2: 门户
if (route.query.case == '2') {
formInfo.value.items.forEach(item => {
......@@ -1350,7 +1356,12 @@ onBeforeMount(() => {
}
})
}
await getTableData();
if (route.query.exchangeGuid) {
getTableInfo();
} else {
getProducts();
}
getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => {
if (res?.code == proxy.$passCode) {
parentAreaData.value = res.data ?? [];
......@@ -1452,15 +1463,27 @@ onBeforeMount(() => {
}
})
if (route.query.exchangeGuid) {
getTableInfo();
} else {
getProducts();
}
if (route.query.exchangeGuid) {
getTemplateInfo();
}
})
const pageLIstInfo = ref<any>();
const getTableData = async () => {
const res: any = await getListingList({
pageIndex: 1,
pageSize: -1,
});
if (res.code == proxy.$passCode) {
pageLIstInfo.value = res.data.records || [];
} else {
ElMessage({
type: "error",
message: res.msg,
});
}
}
// 获取模板信息
const getTemplateInfo = () => {
getTemplateFile({ tenantGuid: route.query.exchangeGuid }).then((res: any) => {
......@@ -2102,12 +2125,17 @@ const prcieInfo = computed(() => {
<div class="tool_btns" v-if="detailType == 'add' || detailType == 'edit' || detailType == 'redit'">
<div class="btns">
<el-button @click="btnClick({ value: 'cancel' })">返回</el-button>
<el-button @click="btnClick({ value: 'draft' })"
v-if="route.query.type == 'add' || route.query.type == 'edit'">保存草稿</el-button>
<!-- <el-button @click="btnClick({ value: 'draft' })"
v-if="route.query.type == 'add' || route.query.type == 'edit'">保存草稿</el-button> -->
<el-button type="primary" @click="btnClick({ value: 'submit' })">提交流程</el-button>
</div>
</div>
<div class="tool_btns" v-else-if="detailType == 'check'">
<div class="tool_btns" v-else-if="detailType == 'detail'">
<div class="btns">
<el-button @click="btnClick({ value: 'cancel' })">关闭</el-button>
</div>
</div>
<div class=" tool_btns" v-else-if="detailType == 'check'">
<div class="btns">
<el-button plain @click="btnClick({ value: 'cancel' })">关闭</el-button>
<el-button type="primary" @click="btnClick({ value: 'pass' })"
......
......@@ -669,8 +669,30 @@ watch(
}
handleChangeTime(daterange.value);
},
);
const handleDatePickerChange = (val) => {
// 更新开始时间和结束时间
startTime.value = val[0];
endTime.value = val[1];
// 获取数据表格
getAssetTableData();
// 获取统计信息
fetchStatisticsInfo();
// 获取质量饼图数据
fetchQualityInfo();
// 获取交易和融资数据
getTradeTableData();
getFinancingTableData();
// 获取注册文档数据
fetchRegisterUrl();
// 取消选择按钮的 is-active 状态
filterDate.value = '';
};
const startTime = ref()
const endTime = ref()
......@@ -711,7 +733,7 @@ const handleChangeTime = (val) => {
</div>
<el-date-picker v-model="daterange" type="datetimerange" range-separator="至" start-placeholder="开始时间"
:clearable="false" end-placeholder="截止时间" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
ref="datePickerRef" />
ref="datePickerRef" @change="handleDatePickerChange" />
</div>
</div>
<div v-if="userData.tenantType != 1" class="main-content">
......
......@@ -6,6 +6,7 @@
import { onUploadFilePreview } from '@/api/modules/common';
import { getComplianceInfoPageList, updateComplianceInfo } from '@/api/modules/securityMenu';
import TableTools from '@/components/Tools/table_tools.vue';
import { TableColumnWidth } from '@/utils/enum';
import { ElMessage } from 'element-plus';
const { proxy } = getCurrentInstance() as any;
const dialogLabelFormRef = ref();
......@@ -68,7 +69,7 @@ const tableInfo = ref({
return scope.row.entryComplianceProgram?.length > 0 ? '预览' : '--';
}
},
{ label: "操作时间", field: "updateTime", width: 120 },
{ label: "操作时间", field: "updateTime", width: TableColumnWidth.DATETIME },
],
data: tableDataList.value,
page: {
......@@ -353,7 +354,7 @@ const getTableData = () => {
.main_wrap {
height: 100%;
padding: 11px 16px 0 16px;
padding: 11px 8px 0 8px;
.main_wrap-top-area {
display: flex;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!