c5c48813 by lihua

产品支持数据港产品上架

1 parent 3f1a31c6
......@@ -47,6 +47,7 @@ const isRegisterOptions = ref<any>([
const damTypesOptions = ref<any>([
{ label: "自建", value: 1 },
{ label: "加工交付", value: 2 },
{ label: "可信数据空间", value: 5 },
])
const searchItemList = ref([
{
......@@ -101,7 +102,7 @@ const searchItemList = ref([
placeholder: "产品来源",
clearable: true,
filterable: true,
options: damTypesOptions.value,
options: props.dataSources != 1 ? damTypesOptions.value.slice(0, 2) : damTypesOptions.value,
props: {
value: 'value',
label: 'label'
......@@ -460,7 +461,7 @@ const handleUploadClose = (itemGuid) => {
</div>
<div class="mid-content">
<div class="left">产品来源</div>
<div class="right">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : '加工交付') : '--'
<div class="right">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : (item.foundMode == 2 ? '加工交付' : (item.foundMode == 4 ? '江苏专区' : (item.foundMode == 5 ? '可信数据空间' : '专区')))) : '--'
}}</div>
</div>
<div class="mid-content">
......@@ -469,7 +470,7 @@ const handleUploadClose = (itemGuid) => {
</div>
</div>
<div class="v-bottom">
<el-button plain v-if="!(item.isRegister == 'Y' || item.foundMode == 2)"
<el-button plain v-if="!(item.isRegister == 'Y' || item.foundMode == 2 || item.foundMode == 5)"
@click.stop="tableBtnClick(item, 'delete')">删除</el-button>
<el-button plain v-if="!(item.isRegister == 'Y')" @click.stop="handleDataClick(item)">编辑</el-button>
<el-button plain @click.stop="handleClickUploadBtn(item)" v-if="item.isRegister == 'Y'">上传交付物</el-button>
......
......@@ -92,7 +92,8 @@ const tableInfo = ref({
id: "mapping-table",
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{ label: "数据产品编号", field: "damCode", width: 180 },
{ label: "数据产品编号", field: "productCode", width: 154 },
{ label: "数据证书编号", field: "damCode", width: 154 },
{ label: "数据产品名称", field: "damName", width: 180 },
{
label: "产品类型", field: "damTypeName", width: 100
......
......@@ -63,7 +63,8 @@ const tableInfo = ref({
id: "mapping-table",
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{ label: "数据产品编号", field: "damCode", width: 160 },
{ label: "数据产品编号", field: "productCode", width: 160 },
{ label: "数据证书编号", field: "damCode", width: 160 },
{ label: "数据产品名称", field: "damName", width: 140 },
{
label: "产品类型", field: "damTypeName", width: 100
......
......@@ -183,6 +183,17 @@ const formInfo = ref<any>({
visible: true
},
{
label: '产品编号',
type: 'input',
maxlength: 50,
placeholder: '请输入',
field: 'productCode',
default: '',
disabled: true,
required: false,
visible: false
},
{
label: "数据时间范围",
type: "date-picker",
field: "dateRange",
......@@ -793,6 +804,8 @@ const submitForm = (btn, formEl, tosub = false) => {
params.timeAreaEnd = params.dateRange ? params.dateRange[1] : '';
// 删除dateRange字段
delete params.dateRange;
params.foundMode = currProductInfo.value?.foundMode;
params.productCode = currProductInfo.value?.productCode;
flowDetailLoading.value = true;
if (!route.query.exchangeGuid) {
if (detailType == 'add') {
......@@ -1124,6 +1137,9 @@ const btnClick = (btn) => {
const setFormItems = (row: any = null, isDetail = false) => {
console.log(row, '--------1---------');
formInfo.value.items.forEach((item: any) => {
if (item.field == 'damType') {
item.disabled = row.foundMode != 5;
}
if (item.field == 'productImg') {
// item.default = row ? (row.productPic ? [row.productPic] : row[item.field] || []) : []
item.default = row.productPic && Object.keys(row.productPic).length ? [row.productPic] : []
......@@ -1175,6 +1191,9 @@ const setFormItems = (row: any = null, isDetail = false) => {
if (row.timeAreaStart && row.timeAreaEnd) {
item.default = [row.timeAreaStart, row.timeAreaEnd];
}
if (row.foundMode == 5) {
item.default = []
}
// else {
// item.default = row ? [row.timeAreaStart, row.timeAreaEnd] : null;
// }
......@@ -1218,6 +1237,9 @@ const setFormItems = (row: any = null, isDetail = false) => {
})
}
// 记录当前选中的数据产品
const currProductInfo: any = ref({});
const selectChange = async (val, row, info) => {
if (row.field == 'damName') {
console.log(val, row, info, '--------1123123---------');
......@@ -1226,6 +1248,7 @@ const selectChange = async (val, row, info) => {
}
const data = row.options.filter(o => o.damName == val);
const dataInfo = data.length ? data[0] : {};
currProductInfo.value = dataInfo;
let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : [];
await setFormItems({ ...info, ...dataInfo, coverageArea: coverageArea, content: dataInfo.propertyDescription || dataInfo.sceneDescription || info.content });
// formInfo.value.items.forEach((item: any) => {
......@@ -1250,13 +1273,15 @@ const selectChange = async (val, row, info) => {
formInfo.value.items.at(1).default = data.length ? data[0].damType : '';
// formInfo.value.items.at(2).default = data.length ? data[0].subjectDomain : '';
formInfo.value.items.at(2).default = data.length ? data[0].damCode : '';
formInfo.value.items.at(3).default = data.length ? data[0].productCode : '';
formInfo.value.items.at(3).visible = !!data?.[0]?.productCode;
if (data?.[0]?.dataStartDate) {
formInfo.value.items.at(3).default = [data?.[0]?.dataStartDate, data?.[0]?.dataEndDate];
formInfo.value.items.at(4).default = [data?.[0]?.dataStartDate, data?.[0]?.dataEndDate];
}
formInfo.value.items.at(4).defaultValue = data.length ? data[0].dataScale : '';
formInfo.value.items.at(4).default = data.length && data[0].dataScale != null ? changeNum(data[0].dataScale, 0) : '';
formInfo.value.items.at(5).defaultValue = data.length ? data[0].caseNumber : '';
formInfo.value.items.at(5).default = data.length && data[0].caseNumber != null ? changeNum(data[0].caseNumber, 0) : '';
formInfo.value.items.at(5).defaultValue = data.length ? data[0].dataScale : '';
formInfo.value.items.at(5).default = data.length && data[0].dataScale != null ? changeNum(data[0].dataScale, 0) : '';
formInfo.value.items.at(6).defaultValue = data.length ? data[0].caseNumber : '';
formInfo.value.items.at(6).default = data.length && data[0].caseNumber != null ? changeNum(data[0].caseNumber, 0) : '';
formInfo.value.items.at(-2).default = data.length ? data[0].damGuid : '';
formInfo.value.items.at(-1).default = data.length ? data[0].subjectDomain : '';
// formInfo.value.items.at(-3).required = data[0].damType != '1' && data[0].damType != '2';
......@@ -1279,6 +1304,10 @@ const selectChange = async (val, row, info) => {
setFormItems({ ...fInfo, coverageArea: coverageArea });
});
}
} else if (row.field == 'pricingWay') {
await setFormItems({ ...info });
formInfo.value.items.at(10).visible = val != '4';
formInfo.value.items.at(11).visible = val != '4';
}
}
......@@ -1334,7 +1363,7 @@ onBeforeMount(async () => {
// case 1: 数交易所 case 2: 门户
if (route.query.case == '2') {
formInfo.value.items.forEach(item => {
if (item.field == 'damCode' || item.field == 'exchangeName' || item.field == 'registrationCertificateInfo' || item.field == 'qualityEvaluationFileInfo' || item.field == 'qualityEvaluationInstitution' || item.field == 'costAssessmentFileInfo' || item.field == 'costAssessmentInstitution' || item.field == 'commitmentLetterInfo' || item.field == 'accreditFileInfo' || item.field == 'productDetailInfo') {
if (item.field == 'productCode' || item.field == 'damCode' || item.field == 'exchangeName' || item.field == 'registrationCertificateInfo' || item.field == 'qualityEvaluationFileInfo' || item.field == 'qualityEvaluationInstitution' || item.field == 'costAssessmentFileInfo' || item.field == 'costAssessmentInstitution' || item.field == 'commitmentLetterInfo' || item.field == 'accreditFileInfo' || item.field == 'productDetailInfo') {
item.visible = false;
}
})
......@@ -1929,6 +1958,10 @@ const rejectDialogBtnClick = (btn, info) => {
<span class="item_label">证书编号:</span>
<span class="item_value">{{ flowDetail.damCode || '--' }}</span>
</div>
<div class="list_item" v-if="flowDetail.productCode">
<span class="item_label">产品编号:</span>
<span class="item_value">{{ flowDetail.productCode || '--' }}</span>
</div>
<div class="list_item">
<span class="item_label">数据时间范围:</span>
<span class="item_value">{{ timeRangeInfo || '--' }}</span>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!