1274c66b by lihua

支持数据港数据产品上架

1 parent 6df78381
...@@ -49,6 +49,7 @@ const damTypesOptions = ref<any>([ ...@@ -49,6 +49,7 @@ const damTypesOptions = ref<any>([
49 { label: "加工交付", value: 2 }, 49 { label: "加工交付", value: 2 },
50 { label: "专区", value: 3 }, 50 { label: "专区", value: 3 },
51 { label: "江苏专区", value: 4 }, 51 { label: "江苏专区", value: 4 },
52 { label: "数据港", value: 5 },
52 ]) 53 ])
53 const searchItemList = ref([ 54 const searchItemList = ref([
54 { 55 {
...@@ -103,7 +104,7 @@ const searchItemList = ref([ ...@@ -103,7 +104,7 @@ const searchItemList = ref([
103 placeholder: "产品来源", 104 placeholder: "产品来源",
104 clearable: true, 105 clearable: true,
105 filterable: true, 106 filterable: true,
106 options: damTypesOptions.value, 107 options: props.dataSources != 1 ? damTypesOptions.value.slice(0, 2) : damTypesOptions.value,
107 props: { 108 props: {
108 value: 'value', 109 value: 'value',
109 label: 'label' 110 label: 'label'
...@@ -188,7 +189,7 @@ const tableBtnClick = (scope, btn) => { ...@@ -188,7 +189,7 @@ const tableBtnClick = (scope, btn) => {
188 }; 189 };
189 190
190 const handleDataClick = (item) => { 191 const handleDataClick = (item) => {
191 if (item.isRegister == "N" && item.foundMode != 3 && item.foundMode != 4) { 192 if (item.isRegister == "N" && item.foundMode != 3 && item.foundMode != 4 && item.foundMode != 5) {
192 router.push({ 193 router.push({
193 path: props.dataSources == 1 ? '/data-asset/authordata-catalog/register-ctalog-create' : '/data-asset/register-catalog/register-ctalog-create', 194 path: props.dataSources == 1 ? '/data-asset/authordata-catalog/register-ctalog-create' : '/data-asset/register-catalog/register-ctalog-create',
194 // name: "registerCatalogCreate", 195 // name: "registerCatalogCreate",
...@@ -462,7 +463,7 @@ const handleUploadClose = (itemGuid) => { ...@@ -462,7 +463,7 @@ const handleUploadClose = (itemGuid) => {
462 </div> 463 </div>
463 <div class="mid-content"> 464 <div class="mid-content">
464 <div class="left">产品来源</div> 465 <div class="left">产品来源</div>
465 <div class="right">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : (item.foundMode == 2 ? '加工交付' : (item.foundMode == 4 ? '江苏专区' : '专区'))) : '--' 466 <div class="right">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : (item.foundMode == 2 ? '加工交付' : (item.foundMode == 4 ? '江苏专区' : (item.foundMode == 5 ? '数据港' : '专区')))) : '--'
466 }}</div> 467 }}</div>
467 </div> 468 </div>
468 <div class="mid-content"> 469 <div class="mid-content">
...@@ -471,11 +472,11 @@ const handleUploadClose = (itemGuid) => { ...@@ -471,11 +472,11 @@ const handleUploadClose = (itemGuid) => {
471 </div> 472 </div>
472 </div> 473 </div>
473 <div class="v-bottom"> 474 <div class="v-bottom">
474 <el-button plain v-if="!(item.isRegister == 'Y' || item.foundMode == 2) && item.foundMode != 3 && item.foundMode != 4" 475 <el-button plain v-if="!(item.isRegister == 'Y' || item.foundMode == 2) && item.foundMode != 3 && item.foundMode != 4 && item.foundMode != 5"
475 @click.stop="tableBtnClick(item, 'delete')">删除</el-button> 476 @click.stop="tableBtnClick(item, 'delete')">删除</el-button>
476 <el-button plain v-if="!(item.isRegister == 'Y') && item.foundMode != 3 && item.foundMode != 4" @click.stop="handleDataClick(item)">编辑</el-button> 477 <el-button plain v-if="!(item.isRegister == 'Y') && item.foundMode != 3 && item.foundMode != 4 && item.foundMode != 5" @click.stop="handleDataClick(item)">编辑</el-button>
477 <el-button plain @click.stop="handleClickUploadBtn(item)" v-if="item.isRegister == 'Y' && item.foundMode != 3 && item.foundMode != 4">上传交付物</el-button> 478 <el-button plain @click.stop="handleClickUploadBtn(item)" v-if="item.isRegister == 'Y' && item.foundMode != 3 && item.foundMode != 4 && item.foundMode != 5">上传交付物</el-button>
478 <el-button plain @click.stop="handleDataClick(item)" v-if="(item.isRegister == 'Y' || item.foundMode == 3 || item.foundMode == 4)">详情</el-button> 479 <el-button plain @click.stop="handleDataClick(item)" v-if="(item.isRegister == 'Y' || item.foundMode == 3 || item.foundMode == 4 || item.foundMode == 5)">详情</el-button>
479 </div> 480 </div>
480 </div> 481 </div>
481 </div> 482 </div>
......
...@@ -92,7 +92,8 @@ const tableInfo = ref({ ...@@ -92,7 +92,8 @@ const tableInfo = ref({
92 id: "mapping-table", 92 id: "mapping-table",
93 fields: [ 93 fields: [
94 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 94 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
95 { label: "数据产品编号", field: "damCode", width: 180 }, 95 { label: "数据产品编号", field: "productCode", width: 154 },
96 { label: "数据证书编号", field: "damCode", width: 154 },
96 { label: "数据产品名称", field: "damName", width: 180 }, 97 { label: "数据产品名称", field: "damName", width: 180 },
97 { 98 {
98 label: "产品类型", field: "damTypeName", width: 100 99 label: "产品类型", field: "damTypeName", width: 100
......
...@@ -63,7 +63,8 @@ const tableInfo = ref({ ...@@ -63,7 +63,8 @@ const tableInfo = ref({
63 id: "mapping-table", 63 id: "mapping-table",
64 fields: [ 64 fields: [
65 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 65 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
66 { label: "数据产品编号", field: "damCode", width: 160 }, 66 { label: "数据产品编号", field: "productCode", width: 160 },
67 { label: "数据证书编号", field: "damCode", width: 160 },
67 { label: "数据产品名称", field: "damName", width: 140 }, 68 { label: "数据产品名称", field: "damName", width: 140 },
68 { 69 {
69 label: "产品类型", field: "damTypeName", width: 100 70 label: "产品类型", field: "damTypeName", width: 100
......
...@@ -183,6 +183,17 @@ const formInfo = ref<any>({ ...@@ -183,6 +183,17 @@ const formInfo = ref<any>({
183 visible: true 183 visible: true
184 }, 184 },
185 { 185 {
186 label: '产品编号',
187 type: 'input',
188 maxlength: 50,
189 placeholder: '请输入',
190 field: 'productCode',
191 default: '',
192 disabled: true,
193 required: false,
194 visible: false
195 },
196 {
186 label: "数据时间范围", 197 label: "数据时间范围",
187 type: "date-picker", 198 type: "date-picker",
188 field: "dateRange", 199 field: "dateRange",
...@@ -795,6 +806,8 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -795,6 +806,8 @@ const submitForm = (btn, formEl, tosub = false) => {
795 params.timeAreaEnd = params.dateRange ? params.dateRange[1] : ''; 806 params.timeAreaEnd = params.dateRange ? params.dateRange[1] : '';
796 // 删除dateRange字段 807 // 删除dateRange字段
797 delete params.dateRange; 808 delete params.dateRange;
809 params.foundMode = currProductInfo.value?.foundMode;
810 params.productCode = currProductInfo.value?.productCode;
798 flowDetailLoading.value = true; 811 flowDetailLoading.value = true;
799 if (!route.query.exchangeGuid) { 812 if (!route.query.exchangeGuid) {
800 if (detailType == 'add') { 813 if (detailType == 'add') {
...@@ -1126,6 +1139,9 @@ const btnClick = (btn) => { ...@@ -1126,6 +1139,9 @@ const btnClick = (btn) => {
1126 const setFormItems = (row: any = null, isDetail = false) => { 1139 const setFormItems = (row: any = null, isDetail = false) => {
1127 // console.log(row, '--------1---------'); 1140 // console.log(row, '--------1---------');
1128 formInfo.value.items.forEach((item: any) => { 1141 formInfo.value.items.forEach((item: any) => {
1142 if (item.field == 'damType') {
1143 item.disabled = row.foundMode != 5;
1144 }
1129 if (item.field == 'productImg') { 1145 if (item.field == 'productImg') {
1130 // item.default = row ? (row.productPic ? [row.productPic] : row[item.field] || []) : [] 1146 // item.default = row ? (row.productPic ? [row.productPic] : row[item.field] || []) : []
1131 item.default = row.productPic && Object.keys(row.productPic).length ? [row.productPic] : [] 1147 item.default = row.productPic && Object.keys(row.productPic).length ? [row.productPic] : []
...@@ -1177,6 +1193,9 @@ const setFormItems = (row: any = null, isDetail = false) => { ...@@ -1177,6 +1193,9 @@ const setFormItems = (row: any = null, isDetail = false) => {
1177 if (row.timeAreaStart && row.timeAreaEnd) { 1193 if (row.timeAreaStart && row.timeAreaEnd) {
1178 item.default = [row.timeAreaStart, row.timeAreaEnd]; 1194 item.default = [row.timeAreaStart, row.timeAreaEnd];
1179 } 1195 }
1196 if (row.foundMode == 5) {
1197 item.default = []
1198 }
1180 // else { 1199 // else {
1181 // item.default = row ? [row.timeAreaStart, row.timeAreaEnd] : null; 1200 // item.default = row ? [row.timeAreaStart, row.timeAreaEnd] : null;
1182 // } 1201 // }
...@@ -1220,6 +1239,9 @@ const setFormItems = (row: any = null, isDetail = false) => { ...@@ -1220,6 +1239,9 @@ const setFormItems = (row: any = null, isDetail = false) => {
1220 }) 1239 })
1221 } 1240 }
1222 1241
1242 // 记录当前选中的数据产品
1243 const currProductInfo: any = ref({});
1244
1223 const selectChange = async (val, row, info) => { 1245 const selectChange = async (val, row, info) => {
1224 if (row.field == 'damName') { 1246 if (row.field == 'damName') {
1225 // console.log(val, row, info, '--------1123123---------'); 1247 // console.log(val, row, info, '--------1123123---------');
...@@ -1228,6 +1250,7 @@ const selectChange = async (val, row, info) => { ...@@ -1228,6 +1250,7 @@ const selectChange = async (val, row, info) => {
1228 } 1250 }
1229 const data = row.options.filter(o => o.damName == val); 1251 const data = row.options.filter(o => o.damName == val);
1230 const dataInfo = data.length ? data[0] : {}; 1252 const dataInfo = data.length ? data[0] : {};
1253 currProductInfo.value = dataInfo;
1231 let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : []; 1254 let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : [];
1232 await setFormItems({ ...info, ...dataInfo, coverageArea: coverageArea }); 1255 await setFormItems({ ...info, ...dataInfo, coverageArea: coverageArea });
1233 // formInfo.value.items.forEach((item: any) => { 1256 // formInfo.value.items.forEach((item: any) => {
...@@ -1252,13 +1275,15 @@ const selectChange = async (val, row, info) => { ...@@ -1252,13 +1275,15 @@ const selectChange = async (val, row, info) => {
1252 formInfo.value.items.at(1).default = data.length ? data[0].damType : ''; 1275 formInfo.value.items.at(1).default = data.length ? data[0].damType : '';
1253 // formInfo.value.items.at(2).default = data.length ? data[0].subjectDomain : ''; 1276 // formInfo.value.items.at(2).default = data.length ? data[0].subjectDomain : '';
1254 formInfo.value.items.at(2).default = data.length ? data[0].damCode : ''; 1277 formInfo.value.items.at(2).default = data.length ? data[0].damCode : '';
1278 formInfo.value.items.at(3).default = data.length ? data[0].productCode : '';
1279 formInfo.value.items.at(3).visible = !!data?.[0]?.productCode;
1255 if (data?.[0]?.dataStartDate) { 1280 if (data?.[0]?.dataStartDate) {
1256 formInfo.value.items.at(3).default = [data?.[0]?.dataStartDate, data?.[0]?.dataEndDate]; 1281 formInfo.value.items.at(4).default = [data?.[0]?.dataStartDate, data?.[0]?.dataEndDate];
1257 } 1282 }
1258 formInfo.value.items.at(4).defaultValue = data.length ? data[0].dataScale : ''; 1283 formInfo.value.items.at(5).defaultValue = data.length ? data[0].dataScale : '';
1259 formInfo.value.items.at(4).default = data.length && data[0].dataScale != null ? changeNum(data[0].dataScale, 0) : ''; 1284 formInfo.value.items.at(5).default = data.length && data[0].dataScale != null ? changeNum(data[0].dataScale, 0) : '';
1260 formInfo.value.items.at(5).defaultValue = data.length ? data[0].caseNumber : ''; 1285 formInfo.value.items.at(6).defaultValue = data.length ? data[0].caseNumber : '';
1261 formInfo.value.items.at(5).default = data.length && data[0].caseNumber != null ? changeNum(data[0].caseNumber, 0) : ''; 1286 formInfo.value.items.at(6).default = data.length && data[0].caseNumber != null ? changeNum(data[0].caseNumber, 0) : '';
1262 formInfo.value.items.at(-2).default = data.length ? data[0].damGuid : ''; 1287 formInfo.value.items.at(-2).default = data.length ? data[0].damGuid : '';
1263 formInfo.value.items.at(-1).default = data.length ? data[0].subjectDomain : ''; 1288 formInfo.value.items.at(-1).default = data.length ? data[0].subjectDomain : '';
1264 // formInfo.value.items.at(-3).required = data[0].damType != '1' && data[0].damType != '2'; 1289 // formInfo.value.items.at(-3).required = data[0].damType != '1' && data[0].damType != '2';
...@@ -1283,8 +1308,8 @@ const selectChange = async (val, row, info) => { ...@@ -1283,8 +1308,8 @@ const selectChange = async (val, row, info) => {
1283 // } 1308 // }
1284 } else if (row.field == 'pricingWay') { 1309 } else if (row.field == 'pricingWay') {
1285 await setFormItems({ ...info }); 1310 await setFormItems({ ...info });
1286 formInfo.value.items.at(9).visible = val != '4';
1287 formInfo.value.items.at(10).visible = val != '4'; 1311 formInfo.value.items.at(10).visible = val != '4';
1312 formInfo.value.items.at(11).visible = val != '4';
1288 } 1313 }
1289 } 1314 }
1290 1315
...@@ -1340,7 +1365,7 @@ onBeforeMount(async () => { ...@@ -1340,7 +1365,7 @@ onBeforeMount(async () => {
1340 // case 1: 数交易所 case 2: 门户 1365 // case 1: 数交易所 case 2: 门户
1341 if (route.query.case == '2') { 1366 if (route.query.case == '2') {
1342 formInfo.value.items.forEach(item => { 1367 formInfo.value.items.forEach(item => {
1343 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') { 1368 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') {
1344 item.visible = false; 1369 item.visible = false;
1345 } 1370 }
1346 }) 1371 })
...@@ -1935,6 +1960,10 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -1935,6 +1960,10 @@ const rejectDialogBtnClick = (btn, info) => {
1935 <span class="item_label">证书编号:</span> 1960 <span class="item_label">证书编号:</span>
1936 <span class="item_value">{{ flowDetail.damCode || '--' }}</span> 1961 <span class="item_value">{{ flowDetail.damCode || '--' }}</span>
1937 </div> 1962 </div>
1963 <div class="list_item" v-if="flowDetail.productCode">
1964 <span class="item_label">产品编号:</span>
1965 <span class="item_value">{{ flowDetail.productCode || '--' }}</span>
1966 </div>
1938 <div class="list_item"> 1967 <div class="list_item">
1939 <span class="item_label">数据时间范围:</span> 1968 <span class="item_label">数据时间范围:</span>
1940 <span class="item_value">{{ timeRangeInfo || '--' }}</span> 1969 <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!