892ef47a by lihua

Revert "产品支持上传文件"

This reverts commit 8e2a3bbb.
1 parent 8e2a3bbb
...@@ -426,35 +426,6 @@ const baseInfoFormItems = ref([ ...@@ -426,35 +426,6 @@ const baseInfoFormItems = ref([
426 required: true, 426 required: true,
427 }, 427 },
428 { 428 {
429 label: '是否文件资源',
430 type: 'radio-group',
431 placeholder: '',
432 field: 'isFileResource',
433 block: false,
434 disabled: false,
435 default: 'N',
436 options: [{
437 value: 'Y',
438 label: '是'
439 }, {
440 value: 'N',
441 label: '否'
442 }],
443 required: true,
444 },
445 {
446 label: '选择文件上传',
447 tip: '',
448 type: 'upload-file',
449 accept: '',
450 required: true,
451 default: [],
452 block: false,
453 field: 'attachments',
454 col: 'col2',
455 visible: false,
456 },
457 {
458 label: '资源描述', 429 label: '资源描述',
459 type: 'textarea', 430 type: 'textarea',
460 placeholder: '该数据资源主要包含的信息,数据更新方式等。', 431 placeholder: '该数据资源主要包含的信息,数据更新方式等。',
...@@ -525,16 +496,7 @@ const baseInfoFormRules = ref({ ...@@ -525,16 +496,7 @@ const baseInfoFormRules = ref({
525 domain: [required('请选择领域')], 496 domain: [required('请选择领域')],
526 scenario: [required('请选择应用场景')], 497 scenario: [required('请选择应用场景')],
527 medDepartmentCode: [required('请选择所属科室')], 498 medDepartmentCode: [required('请选择所属科室')],
528 updateFrequency: [required('请选择更新频率')], 499 updateFrequency: [required('请选择更新频率')]
529 attachments: [{
530 validator: (rule: any, value: any, callback: any) => {
531 if (!value?.length) {
532 callback(new Error('请上传文件'))
533 } else {
534 callback();
535 }
536 }, trigger: 'change'
537 }]
538 }); 500 });
539 501
540 const getTableFieldPromise: any = ref({}); 502 const getTableFieldPromise: any = ref({});
...@@ -703,9 +665,6 @@ const setFormItems = (val) => { ...@@ -703,9 +665,6 @@ const setFormItems = (val) => {
703 item.visible = val['domain'] == '003' 665 item.visible = val['domain'] == '003'
704 } else if (item.field == 'subjectDomain') { 666 } else if (item.field == 'subjectDomain') {
705 item.visible = val['domain'] == '004'; 667 item.visible = val['domain'] == '004';
706 } else if (item.field == 'attachments') {
707 item.visible = val['isFileResource'] == 'Y';
708 item.default = val[item.field] || [];
709 } 668 }
710 }); 669 });
711 } 670 }
...@@ -734,12 +693,6 @@ const handleBaseInfoCheckboxChange = (val, info) => { ...@@ -734,12 +693,6 @@ const handleBaseInfoCheckboxChange = (val, info) => {
734 setFormItems(info); 693 setFormItems(info);
735 } 694 }
736 695
737 const handleBaseInfoRadioChange = (val, info, item) => {
738 if (item.field == 'isFileResource') {
739 setFormItems(info);
740 }
741 }
742
743 /** ------------------- 添加选择数据服务API表格,多选 ---------------------------- */ 696 /** ------------------- 添加选择数据服务API表格,多选 ---------------------------- */
744 const productTableRef = ref(); 697 const productTableRef = ref();
745 const productData: any = ref([]); 698 const productData: any = ref([]);
...@@ -928,11 +881,6 @@ onBeforeMount(() => { ...@@ -928,11 +881,6 @@ onBeforeMount(() => {
928 item.options = domainDictList.value.find(s => s.value == detailInfo.value['domain'])?.childDictList || [] 881 item.options = domainDictList.value.find(s => s.value == detailInfo.value['domain'])?.childDictList || []
929 } else if (item.field == 'medDepartmentCode') { 882 } else if (item.field == 'medDepartmentCode') {
930 item.visible = detailInfo.value['domain'] == '003' 883 item.visible = detailInfo.value['domain'] == '003'
931 } else if (item.field == 'isFileResource') {
932 item.default = detailInfo.value.attachments?.length ? 'Y' : 'N';
933 } else if (item.field == 'attachments') {
934 item.default = detailInfo.value.attachments || [];
935 item.visible = item.default.length > 0;
936 } 884 }
937 if (item.field == 'isCache' || item.field == 'isEncrypField') { 885 if (item.field == 'isCache' || item.field == 'isEncrypField') {
938 item.disabled = true; 886 item.disabled = true;
...@@ -1087,7 +1035,6 @@ const save = () => { ...@@ -1087,7 +1035,6 @@ const save = () => {
1087 baseInfoFormRef.value?.ruleFormRef?.validate((valid, errorItem) => { 1035 baseInfoFormRef.value?.ruleFormRef?.validate((valid, errorItem) => {
1088 if (valid) { 1036 if (valid) {
1089 let params = { ...baseInfoFormRef.value.formInline }; 1037 let params = { ...baseInfoFormRef.value.formInline };
1090 if (params.isFileResource != 'Y') {
1091 let associationApiList: string[] = []; 1038 let associationApiList: string[] = [];
1092 for (const api of productData.value) { 1039 for (const api of productData.value) {
1093 if (!api.apiGuid) { 1040 if (!api.apiGuid) {
...@@ -1122,13 +1069,6 @@ const save = () => { ...@@ -1122,13 +1069,6 @@ const save = () => {
1122 return; 1069 return;
1123 } 1070 }
1124 } 1071 }
1125 }
1126 params.attachments = params.attachments?.map(item => {
1127 return {
1128 name: item.name,
1129 url: item.url
1130 }
1131 }) || [];
1132 if (params.coverageArea == 'all') { 1072 if (params.coverageArea == 'all') {
1133 params.coverageArea = [['all']]; 1073 params.coverageArea = [['all']];
1134 } else if (!params.coverageArea) { 1074 } else if (!params.coverageArea) {
...@@ -1301,9 +1241,9 @@ const handleImportSave = (val) => { ...@@ -1301,9 +1241,9 @@ const handleImportSave = (val) => {
1301 <ContentWrap id="id-baseInfo" title="资源基本信息" description="" :isExpand="baseInfoExpand" :expand-swicth="true" 1241 <ContentWrap id="id-baseInfo" title="资源基本信息" description="" :isExpand="baseInfoExpand" :expand-swicth="true"
1302 class="mb16" @expand="(v) => baseInfoExpand = v"> 1242 class="mb16" @expand="(v) => baseInfoExpand = v">
1303 <Form ref="baseInfoFormRef" :itemList="baseInfoFormItems" formId="base-info-form" :rules="baseInfoFormRules" 1243 <Form ref="baseInfoFormRef" :itemList="baseInfoFormItems" formId="base-info-form" :rules="baseInfoFormRules"
1304 @selectChange="baseSelectChange" @checkboxChange="handleBaseInfoCheckboxChange" @radio-group-change="handleBaseInfoRadioChange" col="col3" /> 1244 @selectChange="baseSelectChange" @checkboxChange="handleBaseInfoCheckboxChange" col="col3" />
1305 </ContentWrap> 1245 </ContentWrap>
1306 <ContentWrap v-if="baseInfoFormRef?.formInline?.damType == '2' && baseInfoFormRef?.formInline?.isFileResource != 'Y'" id="product-info" title="服务包信息" expandSwicth 1246 <ContentWrap v-if="baseInfoFormRef?.formInline?.damType == '2'" id="product-info" title="服务包信息" expandSwicth
1307 style="margin-top: 15px" :isExpand="expandServiceInfo" @expand="(v) => (expandServiceInfo = v)" description="" 1247 style="margin-top: 15px" :isExpand="expandServiceInfo" @expand="(v) => (expandServiceInfo = v)" description=""
1308 class="mb16"> 1248 class="mb16">
1309 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" 1249 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table"
...@@ -1312,7 +1252,7 @@ const handleImportSave = (val) => { ...@@ -1312,7 +1252,7 @@ const handleImportSave = (val) => {
1312 <el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus" v-preReClick>添加服务</el-button> 1252 <el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus" v-preReClick>添加服务</el-button>
1313 </div> 1253 </div>
1314 </ContentWrap> 1254 </ContentWrap>
1315 <ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2' && baseInfoFormRef?.formInline?.isFileResource != 'Y'" id="id-tableInfo" title="资源表" description="" 1255 <ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2'" id="id-tableInfo" title="资源表" description=""
1316 :expand-swicth="true" :isExpand="assetTableInfoExpand" @expand="(v) => assetTableInfoExpand = v"> 1256 :expand-swicth="true" :isExpand="assetTableInfoExpand" @expand="(v) => assetTableInfoExpand = v">
1317 <div v-show="assetDataTableInfo.data.length" class="tools_btns"> 1257 <div v-show="assetDataTableInfo.data.length" class="tools_btns">
1318 <el-button type="primary" @click="handleCreateTable" v-preReClick>添加</el-button> 1258 <el-button type="primary" @click="handleCreateTable" v-preReClick>添加</el-button>
......
...@@ -1425,7 +1425,7 @@ const respParamsTableInfo = ref({ ...@@ -1425,7 +1425,7 @@ const respParamsTableInfo = ref({
1425 </div> 1425 </div>
1426 </div> 1426 </div>
1427 </ContentWrap> 1427 </ContentWrap>
1428 <ContentWrap v-if="productTableInfo.data?.length && !detailInfo.attachments?.length" id="product-info" title="服务包信息" style="margin: 16px 16px 16px"> 1428 <ContentWrap v-if="productTableInfo.data?.length" id="product-info" title="服务包信息" style="margin: 16px 16px 16px">
1429 <Table ref="productTableRef" :tableInfo="productTableInfo" /> 1429 <Table ref="productTableRef" :tableInfo="productTableInfo" />
1430 </ContentWrap> 1430 </ContentWrap>
1431 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px"> 1431 <ContentWrap v-if="isJSZQ" id="id-paramsInfo" title="入参出参信息" description="" style="margin: 16px 16px 16px">
...@@ -1438,59 +1438,7 @@ const respParamsTableInfo = ref({ ...@@ -1438,59 +1438,7 @@ const respParamsTableInfo = ref({
1438 </el-tab-pane> 1438 </el-tab-pane>
1439 </el-tabs> 1439 </el-tabs>
1440 </ContentWrap> 1440 </ContentWrap>
1441 <ContentWrap id="id-table" title="文件资源" v-if="detailInfo.attachments?.length" description="" 1441 <ContentWrap id="id-table" title="资源表" v-if="detailInfo.damCatalogTableInfo?.length" description=""
1442 style="margin: 16px 16px 16px">
1443 <div class="list_panel">
1444 <div class="list_item is_block">
1445 <div class="file_item">
1446 <span class="item_label">其它证明文件:</span>
1447 <span class="item_value">
1448 <span v-for="productDetailItem in (detailInfo.attachments || [])"
1449 :style="{ 'padding-left': '0px', height: '32px', display: 'block' }">
1450 <div class="file-operate">
1451 <template
1452 v-if="productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx' || productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'csv'">
1453 <img class="file-img" src="../../assets/images/excel.png" />
1454 </template>
1455 <template
1456 v-else-if="productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'">
1457 <img class="file-img" src="../../assets/images/word.png" />
1458 </template>
1459 <template v-else-if="productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'zip'">
1460 <img class="file-img" src="../../assets/images/zip.png" />
1461 </template>
1462 <template v-else-if="productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'rar'">
1463 <img class="file-img" src="../../assets/images/RAR.png" />
1464 </template>
1465 <template v-else-if="productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'">
1466 <img class="file-img" src="../../assets/images/PDF.png" />
1467 </template>
1468 <template v-else-if="productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'png'">
1469 <img class="file-img" src="../../assets/images/png.png" />
1470 </template>
1471 <template
1472 v-else-if="productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || productDetailItem.name.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'">
1473 <img class="file-img" src="../../assets/images/jpg.png" />
1474 </template>
1475 <div class="file-name"><ellipsis-tooltip :content="productDetailItem.name ?? ''" class-name="w100f"
1476 refName="tooltipOver"></ellipsis-tooltip></div>
1477 <div
1478 v-if="['pdf', 'png', 'jpg', 'jpeg'].includes(productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase())"
1479 :style="{ right: '36px' }" class="file-preview" @click="onUploadFilePreview(productDetailItem)">
1480 查看
1481 </div>
1482 <div :style="{ right: '0px' }" class="file-preview"
1483 @click="onUploadFileDownload(productDetailItem)">
1484 下载
1485 </div>
1486 </div>
1487 </span>
1488 </span>
1489 </div>
1490 </div>
1491 </div>
1492 </ContentWrap>
1493 <ContentWrap id="id-table" title="资源表" v-if="detailInfo.damCatalogTableInfo?.length && !detailInfo.attachments?.length" description=""
1494 style="margin: 16px 16px 16px"> 1442 style="margin: 16px 16px 16px">
1495 <el-table v-show="!fullscreenLoading" ref="tableRef" :data="detailInfo.damCatalogTableInfo" 1443 <el-table v-show="!fullscreenLoading" ref="tableRef" :data="detailInfo.damCatalogTableInfo"
1496 :highlight-current-row="true" stripe border @expand-change="handleTableExpandChange" max-height="350" 1444 :highlight-current-row="true" stripe border @expand-change="handleTableExpandChange" max-height="350"
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!