ec4b80df by xukangle

数据产品上架

1 parent 6a8718db
......@@ -61,6 +61,13 @@ export const listingUpdate = (params) => request({
data: params
});
/**门户更新 */
export const listingUpdateGateway = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/update-gateway`,
method: 'post',
data: params
});
/** 删除数据产品上架信息 */
export const listingDelete = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/product-grounding/delete`,
......
......@@ -1353,36 +1353,70 @@ const panelChange = (scope, row) => {
</template>
<template #file="{ file }">
<div class="file-operate">
<template
<!-- <template
v-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx'">
<img class="file-img" src="../../assets/images/excel.png" />
</template>
<template
<template
v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
<img class="file-img" src="../../assets/images/word.png" />
</template>
<template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
<template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
<img class="file-img" src="../../assets/images/zip.png" />
</template>
<template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
<template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
<img class="file-img" src="../../assets/images/RAR.png" />
</template>
<template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
<template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
<template v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
<template
v-else-if="file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">
<ellipsis-tooltip :content="file.name" class-name="w100f" :refName="'tooltipOver' + file.name"></ellipsis-tooltip>
</div>
<div :style="{ right: '72px' }" class="file-preview"
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'"
@click="onUploadFilePreview(file, item)">查看</div>
<div :style="{ right: '36px' }" class="file-preview" @click="onUploadFileDownload(file, item)">下载
</div>
<div v-if="!item.disabled" :style="{ right: 0 }" class="file-preview" @click="handleUploadFileRemove(file, item)">删除
</div> -->
<template
v-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'xls' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'xlsx'">
<img class="file-img" src="../../assets/images/excel.png" />
</template>
<template
v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'doc' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'docx'">
<img class="file-img" src="../../assets/images/word.png" />
</template>
<template v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'zip'">
<img class="file-img" src="../../assets/images/zip.png" />
</template>
<template v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'rar'">
<img class="file-img" src="../../assets/images/RAR.png" />
</template>
<template v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'pdf'">
<img class="file-img" src="../../assets/images/PDF.png" />
</template>
<template v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'png'">
<img class="file-img" src="../../assets/images/png.png" />
</template>
<template
v-else-if="file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'jpg' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'jpeg'">
<img class="file-img" src="../../assets/images/jpg.png" />
</template>
<div class="file-name">
<ellipsis-tooltip :content="file.name" class-name="w100f"
:refName="'tooltipOver' + file.name"></ellipsis-tooltip>
<ellipsis-tooltip :content="file?.name ?? ''" class-name="w100f"
:refName="'tooltipOver' + file?.name"></ellipsis-tooltip>
</div>
<div :style="{ right: '72px' }" class="file-preview"
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'"
v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() ?? '')"
@click="onUploadFilePreview(file, item)">查看</div>
<div :style="{ right: '36px' }" class="file-preview" @click="onUploadFileDownload(file, item)">下载
</div>
......
......@@ -123,6 +123,14 @@ const tableInfo = ref({
if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
isShowCancel = true;
}
if (approveState === 'Y') {
if (row.listingStatus === 'Y') {
list.push({ label: "下架", value: "down" });
}
if (row.listingStatus === 'N') {
list.push({ label: "上架", value: "up" });
}
}
if (flowState === 1) {
list = [{ label: "编辑", value: "edit" }, { label: "删除", value: "del" }]
}
......@@ -141,14 +149,7 @@ const tableInfo = ref({
if (flowState !== 1) {
list.push({ label: "详情", value: "detail" })
}
if (approveState === 'Y') {
if (row.listingStatus === 'Y') {
list.push({ label: "下架", value: "down" });
}
if (row.listingStatus === 'N') {
list.push({ label: "上架", value: "up" });
}
}
return list
},
}
......@@ -259,17 +260,21 @@ const tableBtnClick = (scope, btn) => {
currTableData.value = row;
if (type == "detail") {
router.push({
name: 'dataResourceUpDetail',
name: 'productListingDetail',
query: {
guid: row.guid,
type: 'detail'
}
});
}
if (type == "edit" || type == "redit") {
router.push({
name: 'dataResourceUpEdit',
name: 'productListingDetail',
query: {
guid: row.guid,
type: type == 'edit' ? 'edit' : 'redit',
case: '2',
name: row.damName
}
});
}
......@@ -391,7 +396,8 @@ const toPatn = (type) => {
name: "productListingDetail",
query: {
type,
groundingPick: '门户数据专区'
groundingPick: '门户数据专区',
case: '2',
},
});
} else {
......@@ -495,6 +501,7 @@ const demandListData: any = ref([
{ companyName: '苏数所', listedNum: 16, processNum: 1235 },
]);
const btnClick = (btn) => {
console.log(btn)
}
......
......@@ -15,7 +15,7 @@ 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 } from "@/api/modules/dataProduct";
import { getProductList, getAddedProductList, getListingDetail, listingSave, listingUpdate, listingSavePortal, getParamsDataList, listingUpdateGateway } from "@/api/modules/dataProduct";
import { getMatchDetail } from "@/api/modules/dataFinance";
import { useValidator } from '@/hooks/useValidator';
import { getCamundaDeploymentId } from "@/api/modules/workFlowService";
......@@ -416,12 +416,12 @@ const formInfo = ref({
field: 'productImg',
default: [],
limit: 1,
block: false,
block: true,
required: false,
col: 'mr8',
style: {
width: 'calc(33.33% - 20px)!important'
},
// col: 'mr8',
// style: {
// width: 'calc(33.33% - 20px)!important'
// },
},
{
label: '登记证',
......@@ -470,78 +470,78 @@ const formInfo = ref({
width: 'calc(33.33% - 20px)!important'
},
},
{
label: '价值评估报告',
tip: '支持扩展名:.png .pdf',
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'valueReport',
default: [],
limit: 1,
block: false,
required: false,
visible: true
},
{
label: "价值评估机构",
type: "select",
placeholder: "请选择",
field: "valueOrg",
default: '',
options: [],
props: {
value: 'value',
label: 'label'
},
filterable: true,
clearable: true,
disabled: false,
required: false,
visible: true
},
{
label: '承诺函',
tip: '支持扩展名:.png .pdf',
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'commitment',
templateUrl: 'http://www.baidu.com',
default: [],
limit: 1,
block: true,
required: false,
visible: true
},
{
label: '授权文件',
tip: '支持扩展名:.png .pdf',
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'authorization',
templateUrl: 'http://www.baidu.com',
default: [],
limit: 1,
block: true,
required: false,
visible: true
},
{
label: '商品详细介绍(签章版)',
tip: '支持扩展名:.png .pdf',
accept: '.png, .pdf',
type: 'upload-file',
placeholder: '请选择',
field: 'productDetail',
templateUrl: 'http://www.baidu.com',
default: [],
limit: 1,
block: true,
required: false,
visible: true
},
// {
// label: '价值评估报告',
// tip: '支持扩展名:.png .pdf',
// accept: '.png, .pdf',
// type: 'upload-file',
// placeholder: '请选择',
// field: 'valueReport',
// default: [],
// limit: 1,
// block: false,
// required: false,
// visible: true
// },
// {
// label: "价值评估机构",
// type: "select",
// placeholder: "请选择",
// field: "valueOrg",
// default: '',
// options: [],
// props: {
// value: 'value',
// label: 'label'
// },
// filterable: true,
// clearable: true,
// disabled: false,
// required: false,
// visible: true
// },
// {
// label: '承诺函',
// tip: '支持扩展名:.png .pdf',
// accept: '.png, .pdf',
// type: 'upload-file',
// placeholder: '请选择',
// field: 'commitment',
// templateUrl: 'http://www.baidu.com',
// default: [],
// limit: 1,
// block: true,
// required: false,
// visible: true
// },
// {
// label: '授权文件',
// tip: '支持扩展名:.png .pdf',
// accept: '.png, .pdf',
// type: 'upload-file',
// placeholder: '请选择',
// field: 'authorization',
// templateUrl: 'http://www.baidu.com',
// default: [],
// limit: 1,
// block: true,
// required: false,
// visible: true
// },
// {
// label: '商品详细介绍(签章版)',
// tip: '支持扩展名:.png .pdf',
// accept: '.png, .pdf',
// type: 'upload-file',
// placeholder: '请选择',
// field: 'productDetail',
// templateUrl: 'http://www.baidu.com',
// default: [],
// limit: 1,
// block: true,
// required: false,
// visible: true
// },
{
label: "",
type: "input",
......@@ -696,6 +696,7 @@ const getProductDetail = () => {
if (res.code == proxy.$passCode) {
const data = res.data || {}
flowDetail.value = data;
console.log(data, '-----------------');
let coverageArea = data.coverageArea || [];
if (data.coverageArea?.[0]?.[0] == 'all') {
setFormItems({ ...flowDetail.value, coverageArea: coverageArea }, true);
......@@ -839,7 +840,8 @@ const submitForm = (btn, formEl, tosub = false) => {
});
} else {
params.guid = guid;
listingUpdate(params).then((res: any) => {
params.immediateApprove = btn.value == 'submit' ? true : false;
listingUpdateGateway(params).then((res: any) => {
if (res.code == proxy.$passCode) {
ElMessage({
type: "success",
......@@ -894,7 +896,7 @@ const btnClick = (btn) => {
dialogInfo.value.contents = contents.value[btn.value]
dialogInfo.value.visible = true
} else {
if (detailType == 'add' || detailType == 'edit') {
if (detailType == 'add' || detailType == 'edit' || detailType == 'redit') {
ElMessageBox.confirm(
"当前页面尚未保存,确定放弃修改吗?",
"提示",
......@@ -905,7 +907,7 @@ const btnClick = (btn) => {
}
).then(() => {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
assetStore.set(true);
// assetStore.set(true);
router.push({
name: "productListing",
query: {},
......@@ -976,6 +978,8 @@ const setFormItems = (row: any = null, isDetail = false) => {
} else {
item.default = row ? row[item.field] : (item.default || '')
}
} else if (item.field == 'dateRange') {
item.default = row ? [row.timeAreaStart, row.timeAreaEnd] : null;
} else {
item.default = row ? row[item.field] : (item.default || '')
}
......@@ -1137,7 +1141,8 @@ const deploymentId = ref('');
const qualityEvaluationData = ref<any>('');
const costAssessmentData = ref<any>('');
onBeforeMount(() => {
if (route.query.type == 'add' && !route.query.type1) {
// case 1: 数交易所 case 2: 门户
if (route.query.case == '2') {
formInfo.value.items.forEach(item => {
if (item.field == 'damCode' || item.field == 'exchangeGuids' || item.field == 'registrationCertificate' || item.field == 'qualityReport' || item.field == 'qualityOrg' || item.field == 'valueReport' || item.field == 'valueOrg' || item.field == 'commitment' || item.field == 'authorization' || item.field == 'productDetail') {
item.visible = false;
......@@ -1153,11 +1158,11 @@ onBeforeMount(() => {
})
if (detailType && detailType != 'add') {
getProductDetail();
if (detailType == 'detail' && dGuid !== undefined) {
getApplyDeatil();
}
// if (detailType == 'detail' && dGuid !== undefined) {
// getApplyDeatil();
// }
}
getApproveData();
// getApproveData();
getParamsDataList({ dictType: '资产类型' }).then((res: any) => {
if (res.code == proxy.$passCode) {
damTypes.value = res.data || [];
......@@ -1307,7 +1312,7 @@ onBeforeMount(() => {
</div>
</div>
<div class="panel_body" :class="{ collapse: collapseIcon }">
<div class="list_panel" v-if="detailType == 'add' || detailType == 'edit'">
<div class="list_panel" v-if="detailType == 'add' || detailType == 'edit' || detailType == 'redit'">
<Form ref="listingFormRef" :itemList="formInfo.items" :formId="formInfo.id" :rules="formInfo.rules"
:col="formInfo.col" @selectChange="selectChange" @checkboxChange="checkboxChange"
@switchChange="switchChange" />
......@@ -1327,24 +1332,24 @@ onBeforeMount(() => {
</div>
<div class="list_item">
<span class="item_label">数据时间范围:</span>
<span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
<span class="item_value">{{ (flowDetail.timeAreaStart - flowDetail.timeAreaEnd) || '--' }}</span>
</div>
<div class="list_item">
<span class="item_label">交付方式:</span>
<span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
<span class="item_value">{{ flowDetail.deliveryWayName || '--' }}</span>
</div>
<div class="list_item">
<span class="item_label">定价方式:</span>
<span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
<span class="item_value">{{ flowDetail.pricingWayName || '--' }}</span>
</div>
<div class="list_item">
<span class="item_label">定价金额:</span>
<span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
</div>
<div class="list_item">
<!-- <div class="list_item">
<span class="item_label">所属主题:</span>
<span class="item_value">{{ flowDetail.subjectDomainName || '--' }}</span>
</div>
</div> -->
<div class="list_item">
<span class="item_label">数据规模(条):</span>
......@@ -1356,25 +1361,25 @@ onBeforeMount(() => {
<span class="item_value">{{ flowDetail.caseNumber != null ? changeNum(flowDetail.caseNumber, 0) : '--'
}}</span>
</div>
<div class="list_item">
<!-- <div class="list_item">
<span class="item_label">交易方式:</span>
<span class="item_value">{{ flowDetail.deliveryWayName || '--' }}</span>
</div>
<div class="list_item">
</div> -->
<!-- <div class="list_item">
<span class="item_label">产品价格:</span>
<span class="item_value">{{ flowDetail.isDiscussPersonally == 'Y' ? '面议' : (flowDetail.productPrice ||
'--')
}}</span>
</div>
</div> -->
<div class="list_item">
<span class="item_label">登记数交所:</span>
<span class="item_value">{{ flowDetail.isApproveGrounding == 'Y' ? `自动上架` : '手动上架' }}</span>
</div>
<div class="list_item is_block">
<!-- <div class="list_item is_block">
<span class="item_label">上架交易所:</span>
<span class="item_value">{{ !flowDetail.exchangeGuids?.length ? '--' : flowDetail.exchangeNames.join(',')
}}</span>
</div>
</div> -->
<div class="list_item is_block">
<span class="item_label">数据覆盖地域:</span>
<span class="item_value"
......@@ -1506,10 +1511,11 @@ onBeforeMount(() => {
</div>
</div>
</div>
<div class="tool_btns" v-if="detailType == 'add' || detailType == 'edit'">
<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' })">保存草稿</el-button>
<el-button @click="btnClick({ value: 'draft' })"
v-if="route.query.type == 'add' || route.query.type == 'redit' || route.query.type == 'edit'">保存草稿</el-button>
<el-button type="primary" @click="btnClick({ value: 'submit' })">提交流程</el-button>
</div>
</div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!