1274c66b by lihua

支持数据港数据产品上架

1 parent 6df78381
......@@ -49,6 +49,7 @@ const damTypesOptions = ref<any>([
{ label: "加工交付", value: 2 },
{ label: "专区", value: 3 },
{ label: "江苏专区", value: 4 },
{ label: "数据港", value: 5 },
])
const searchItemList = ref([
{
......@@ -103,7 +104,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'
......@@ -188,7 +189,7 @@ const tableBtnClick = (scope, btn) => {
};
const handleDataClick = (item) => {
if (item.isRegister == "N" && item.foundMode != 3 && item.foundMode != 4) {
if (item.isRegister == "N" && item.foundMode != 3 && item.foundMode != 4 && item.foundMode != 5) {
router.push({
path: props.dataSources == 1 ? '/data-asset/authordata-catalog/register-ctalog-create' : '/data-asset/register-catalog/register-ctalog-create',
// name: "registerCatalogCreate",
......@@ -462,7 +463,7 @@ const handleUploadClose = (itemGuid) => {
</div>
<div class="mid-content">
<div class="left">产品来源</div>
<div class="right">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : (item.foundMode == 2 ? '加工交付' : (item.foundMode == 4 ? '江苏专区' : '专区'))) : '--'
<div class="right">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : (item.foundMode == 2 ? '加工交付' : (item.foundMode == 4 ? '江苏专区' : (item.foundMode == 5 ? '数据港' : '专区')))) : '--'
}}</div>
</div>
<div class="mid-content">
......@@ -471,11 +472,11 @@ const handleUploadClose = (itemGuid) => {
</div>
</div>
<div class="v-bottom">
<el-button plain v-if="!(item.isRegister == 'Y' || item.foundMode == 2) && item.foundMode != 3 && item.foundMode != 4"
<el-button plain v-if="!(item.isRegister == 'Y' || item.foundMode == 2) && item.foundMode != 3 && item.foundMode != 4 && item.foundMode != 5"
@click.stop="tableBtnClick(item, 'delete')">删除</el-button>
<el-button plain v-if="!(item.isRegister == 'Y') && item.foundMode != 3 && item.foundMode != 4" @click.stop="handleDataClick(item)">编辑</el-button>
<el-button plain @click.stop="handleClickUploadBtn(item)" v-if="item.isRegister == 'Y' && item.foundMode != 3 && item.foundMode != 4">上传交付物</el-button>
<el-button plain @click.stop="handleDataClick(item)" v-if="(item.isRegister == 'Y' || item.foundMode == 3 || item.foundMode == 4)">详情</el-button>
<el-button plain v-if="!(item.isRegister == 'Y') && item.foundMode != 3 && item.foundMode != 4 && item.foundMode != 5" @click.stop="handleDataClick(item)">编辑</el-button>
<el-button plain @click.stop="handleClickUploadBtn(item)" v-if="item.isRegister == 'Y' && item.foundMode != 3 && item.foundMode != 4 && item.foundMode != 5">上传交付物</el-button>
<el-button plain @click.stop="handleDataClick(item)" v-if="(item.isRegister == 'Y' || item.foundMode == 3 || item.foundMode == 4 || item.foundMode == 5)">详情</el-button>
</div>
</div>
</div>
......
......@@ -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",
......@@ -795,6 +806,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') {
......@@ -1126,6 +1139,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] : []
......@@ -1177,6 +1193,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;
// }
......@@ -1220,6 +1239,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---------');
......@@ -1228,6 +1250,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 });
// formInfo.value.items.forEach((item: any) => {
......@@ -1252,13 +1275,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';
......@@ -1283,8 +1308,8 @@ const selectChange = async (val, row, info) => {
// }
} else if (row.field == 'pricingWay') {
await setFormItems({ ...info });
formInfo.value.items.at(9).visible = val != '4';
formInfo.value.items.at(10).visible = val != '4';
formInfo.value.items.at(11).visible = val != '4';
}
}
......@@ -1340,7 +1365,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;
}
})
......@@ -1935,6 +1960,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!