82df71c3 by lihua

fix: 产品上架编辑

1 parent 6a49606c
...@@ -372,7 +372,7 @@ const formInfo = ref<any>({ ...@@ -372,7 +372,7 @@ const formInfo = ref<any>({
372 limit: 1, 372 limit: 1,
373 block: false, 373 block: false,
374 required: false, 374 required: false,
375 // col: 'mr8', 375 col: 'mr8',
376 // style: { 376 // style: {
377 // width: 'calc(33.33% - 20px)!important' 377 // width: 'calc(33.33% - 20px)!important'
378 // }, 378 // },
...@@ -422,7 +422,7 @@ const formInfo = ref<any>({ ...@@ -422,7 +422,7 @@ const formInfo = ref<any>({
422 visible: true, 422 visible: true,
423 col: 'mr8', 423 col: 'mr8',
424 style: { 424 style: {
425 width: 'calc(33.33% - 16px)!important' 425 // / width: 'calc(50% - 16px)!important'
426 }, 426 },
427 }, 427 },
428 { 428 {
...@@ -637,51 +637,6 @@ const formInfo = ref<any>({ ...@@ -637,51 +637,6 @@ const formInfo = ref<any>({
637 } 637 }
638 }) 638 })
639 639
640 const contents = ref({
641 pass: [
642 {
643 type: 'form',
644 title: '',
645 formInfo: {
646 id: 'batch-pass-form',
647 items: [
648 {
649 label: '',
650 type: "textarea",
651 placeholder: "请填写通过备注(选填)",
652 field: "approveSuggest",
653 clearable: true,
654 maxlength: 400,
655 block: true,
656 col: 'margin_b_0',
657 }
658 ]
659 }
660 }
661 ],
662 reject: [
663 {
664 type: 'form',
665 title: '',
666 formInfo: {
667 id: 'batch-reject-form',
668 items: [
669 {
670 label: '',
671 type: "textarea",
672 placeholder: "请填写驳回理由(必填)",
673 field: "approveSuggest",
674 clearable: true,
675 maxlength: 400,
676 block: true,
677 col: 'margin_b_0',
678 }
679 ]
680 }
681 }
682 ],
683 });
684
685 const getProducts = () => { 640 const getProducts = () => {
686 getProductList({}).then((res: any) => { 641 getProductList({}).then((res: any) => {
687 if (res.code == proxy.$passCode) { 642 if (res.code == proxy.$passCode) {
...@@ -734,6 +689,7 @@ const getProductDetail = async () => { ...@@ -734,6 +689,7 @@ const getProductDetail = async () => {
734 let coverageArea = data.coverageArea || []; 689 let coverageArea = data.coverageArea || [];
735 if (data.coverageArea?.[0]?.[0] == 'all') { 690 if (data.coverageArea?.[0]?.[0] == 'all') {
736 setFormItems({ ...flowDetail.value, coverageArea: coverageArea }, true); 691 setFormItems({ ...flowDetail.value, coverageArea: coverageArea }, true);
692 console.log(formInfo.value.items);
737 } else { 693 } else {
738 let p: any = []; 694 let p: any = [];
739 data.coverageArea.forEach(area => { 695 data.coverageArea.forEach(area => {
...@@ -830,12 +786,6 @@ const submitForm = (btn, formEl, tosub = false) => { ...@@ -830,12 +786,6 @@ const submitForm = (btn, formEl, tosub = false) => {
830 delete params.productImgList; 786 delete params.productImgList;
831 params.coverageArea = subForm.value.coverageAreas == 'Y' ? [['all']] : subForm.value.coverageArea; 787 params.coverageArea = subForm.value.coverageAreas == 'Y' ? [['all']] : subForm.value.coverageArea;
832 params.productPic = subForm.value.productImg.length ? { name: subForm.value.productImg[0].name, url: subForm.value.productImg[0].url } : {}; 788 params.productPic = subForm.value.productImg.length ? { name: subForm.value.productImg[0].name, url: subForm.value.productImg[0].url } : {};
833 // if(subForm.value.isApproveGrounding == 'N'){
834 // params.groundingPick = []
835 // }
836 // if (params.content) {
837 // params.productDesc = truncateHTML(params.content, 400);
838 // }
839 console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------'); 789 console.log(params, formInfo.value.items.at(3).defaultValue, formInfo.value, '-----------------');
840 params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10), 790 params.caseNumber = parseInt(params.caseNumber.replace(/,/g, ''), 10),
841 params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10), 791 params.dataScale = parseInt(params.dataScale.replace(/,/g, ''), 10),
...@@ -1149,7 +1099,7 @@ const btnClick = (btn) => { ...@@ -1149,7 +1099,7 @@ const btnClick = (btn) => {
1149 } 1099 }
1150 ).then(() => { 1100 ).then(() => {
1151 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 1101 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
1152 // assetStore.set(true); 1102 assetStore.set(true);
1153 router.push({ 1103 router.push({
1154 name: "productListing", 1104 name: "productListing",
1155 query: {}, 1105 query: {},
...@@ -1162,6 +1112,7 @@ const btnClick = (btn) => { ...@@ -1162,6 +1112,7 @@ const btnClick = (btn) => {
1162 }); 1112 });
1163 } else { 1113 } else {
1164 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 1114 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
1115 assetStore.set(true);
1165 router.push({ 1116 router.push({
1166 name: "productListing", 1117 name: "productListing",
1167 query: {}, 1118 query: {},
...@@ -1194,7 +1145,7 @@ const setFormItems = (row: any = null, isDetail = false) => { ...@@ -1194,7 +1145,7 @@ const setFormItems = (row: any = null, isDetail = false) => {
1194 } else { 1145 } else {
1195 item.default = row ? row[item.field] : 'N'; 1146 item.default = row ? row[item.field] : 'N';
1196 } 1147 }
1197 item.children.map(child => { 1148 item.children.forEach(child => {
1198 if (row && row.coverageArea?.[0]?.[0] == 'all') { 1149 if (row && row.coverageArea?.[0]?.[0] == 'all') {
1199 child.default = [] 1150 child.default = []
1200 } else { 1151 } else {
...@@ -1323,24 +1274,11 @@ const checkboxChange = async (val, info, row) => { ...@@ -1323,24 +1274,11 @@ const checkboxChange = async (val, info, row) => {
1323 await setFormItems(info); 1274 await setFormItems(info);
1324 } 1275 }
1325 1276
1326 } else if (row.field == 'isDiscussPersonally') {
1327 let formItem = formInfo.value.items.find(i => i.field == 'isDiscussPersonally');
1328 if (formItem) {
1329 formItem.default = info.isDiscussPersonally;
1330 formItem.children[0].visible = info.isDiscussPersonally != 'Y';
1331 await setFormItems(info);
1332 }
1333 } 1277 }
1334 } 1278 }
1335 1279
1336 const switchChange = async (val, info, row) => { 1280 const switchChange = async (val, info, row) => {
1337 if (row.field == 'isApproveGrounding') { 1281
1338 let formItem = formInfo.value.items.find(i => i.field == 'autoGrounding');
1339 if (formItem) {
1340 formItem.children[0].default = val;
1341 setFormItems(info);
1342 }
1343 }
1344 } 1282 }
1345 1283
1346 1284
...@@ -1445,18 +1383,6 @@ onBeforeMount(async () => { ...@@ -1445,18 +1383,6 @@ onBeforeMount(async () => {
1445 proxy.$ElMessage.error(res.msg); 1383 proxy.$ElMessage.error(res.msg);
1446 } 1384 }
1447 }) 1385 })
1448 // getServiceTenants({
1449 // tenantType: 3
1450 // }).then((res: any) => {
1451 // if (res.code == proxy.$passCode) {
1452 // const data = res.data ?? {};
1453 // exchangeList.value = data['3'] || [];
1454 // let formItem = formInfo.value.items.find(f => f.field === 'exchangeGuids');
1455 // formItem && (formItem.options = exchangeList.value);
1456 // } else {
1457 // ElMessage.error(res.msg);
1458 // }
1459 // });
1460 getParamsList({ 1386 getParamsList({
1461 dictType: "数据资产目录主题名称", 1387 dictType: "数据资产目录主题名称",
1462 }).then((res: any) => { 1388 }).then((res: any) => {
...@@ -1499,13 +1425,15 @@ onBeforeMount(async () => { ...@@ -1499,13 +1425,15 @@ onBeforeMount(async () => {
1499 if (route.query.exchangeGuid) { 1425 if (route.query.exchangeGuid) {
1500 getTemplateInfo(); 1426 getTemplateInfo();
1501 } 1427 }
1502 setTimeout(() => { 1428 if (detailType && detailType != 'redit' && detailType != 'edit') {
1503 formInfo.value.items.forEach(item => { 1429 setTimeout(() => {
1504 if (item.field == 'coverageAreas') { 1430 formInfo.value.items.forEach(item => {
1505 item.children[0].visible = true 1431 if (item.field == 'coverageAreas') {
1506 } 1432 item.children[0].visible = true
1507 }) 1433 }
1508 }, 0); 1434 })
1435 }, 0);
1436 }
1509 1437
1510 }) 1438 })
1511 1439
...@@ -2024,12 +1952,12 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -2024,12 +1952,12 @@ const rejectDialogBtnClick = (btn, info) => {
2024 <div class="list_item"> 1952 <div class="list_item">
2025 <span class="item_label">数据规模(条):</span> 1953 <span class="item_label">数据规模(条):</span>
2026 <span class="item_value">{{ flowDetail.dataScale != null ? changeNum(flowDetail.dataScale, 0) : '--' 1954 <span class="item_value">{{ flowDetail.dataScale != null ? changeNum(flowDetail.dataScale, 0) : '--'
2027 }}</span> 1955 }}</span>
2028 </div> 1956 </div>
2029 <div class="list_item"> 1957 <div class="list_item">
2030 <span class="item_label">病例总数(例):</span> 1958 <span class="item_label">病例总数(例):</span>
2031 <span class="item_value">{{ flowDetail.caseNumber != null ? changeNum(flowDetail.caseNumber, 0) : '--' 1959 <span class="item_value">{{ flowDetail.caseNumber != null ? changeNum(flowDetail.caseNumber, 0) : '--'
2032 }}</span> 1960 }}</span>
2033 </div> 1961 </div>
2034 <div class="list_item" v-if="route.query.exchangeGuid"> 1962 <div class="list_item" v-if="route.query.exchangeGuid">
2035 <span class="item_label">登记数交所:</span> 1963 <span class="item_label">登记数交所:</span>
...@@ -2043,7 +1971,7 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -2043,7 +1971,7 @@ const rejectDialogBtnClick = (btn, info) => {
2043 </span> 1971 </span>
2044 <span class="item_value" v-else> 1972 <span class="item_value" v-else>
2045 <span v-for="(cor, c) in flowDetail.coverageAreaName" :key="c" class="area_text">{{ cor.join('/') 1973 <span v-for="(cor, c) in flowDetail.coverageAreaName" :key="c" class="area_text">{{ cor.join('/')
2046 }}</span> 1974 }}</span>
2047 </span> 1975 </span>
2048 </div> 1976 </div>
2049 <div class="list_item is_block"> 1977 <div class="list_item is_block">
...@@ -2316,7 +2244,7 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -2316,7 +2244,7 @@ const rejectDialogBtnClick = (btn, info) => {
2316 </div> 2244 </div>
2317 <div class="list_item is_block"> 2245 <div class="list_item is_block">
2318 <div class="file_item" v-if="route.query.exchangeGuid"> 2246 <div class="file_item" v-if="route.query.exchangeGuid">
2319 <span class="item_label">商品详细介绍(章版):</span> 2247 <span class="item_label">商品详细介绍(章版):</span>
2320 <span class="item_value"> 2248 <span class="item_value">
2321 <div class="file-operate"> 2249 <div class="file-operate">
2322 <template v-if="flowDetail?.productDetail?.length > 0"> 2250 <template v-if="flowDetail?.productDetail?.length > 0">
...@@ -2386,7 +2314,8 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -2386,7 +2314,8 @@ const rejectDialogBtnClick = (btn, info) => {
2386 <div class="list_panel"> 2314 <div class="list_panel">
2387 <div class="table_panel_wrap"> 2315 <div class="table_panel_wrap">
2388 <!-- <Table :tableInfo="approveTableInfo" /> --> 2316 <!-- <Table :tableInfo="approveTableInfo" /> -->
2389 <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId" :processInstanceId="processInstanceId"> 2317 <ApprovalProcess ref="approvalProcessRef" v-if="deploymentId" :deploymentId="deploymentId"
2318 :processInstanceId="processInstanceId">
2390 </ApprovalProcess> 2319 </ApprovalProcess>
2391 </div> 2320 </div>
2392 </div> 2321 </div>
...@@ -2437,10 +2366,10 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -2437,10 +2366,10 @@ const rejectDialogBtnClick = (btn, info) => {
2437 <div class="tool_btns" v-else-if="detailType == 'detail'"> 2366 <div class="tool_btns" v-else-if="detailType == 'detail'">
2438 <div class="btns"> 2367 <div class="btns">
2439 <el-button v-for="btn in toolBtns" :type="btn.type" :plain="btn.plain" @click="btnClick(btn)">{{ btn.label 2368 <el-button v-for="btn in toolBtns" :type="btn.type" :plain="btn.plain" @click="btnClick(btn)">{{ btn.label
2440 }}</el-button> 2369 }}</el-button>
2441 </div> 2370 </div>
2442 </div> 2371 </div>
2443 <el-dialog v-model="dialogVisible" :title="dialogTitle" width="550px" :close-on-click-modal="false" > 2372 <el-dialog v-model="dialogVisible" :title="dialogTitle" width="550px" :close-on-click-modal="false">
2444 <Form ref="passListingFormRef" :itemList="passFormInfo.items" :rules="passFormInfo.rules" /> 2373 <Form ref="passListingFormRef" :itemList="passFormInfo.items" :rules="passFormInfo.rules" />
2445 <el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none" 2374 <el-input type="textarea" :rows="3" maxlength="100" v-model="approveSuggest" resize="none"
2446 :placeholder="dynamicPlaceholder" /> 2375 :placeholder="dynamicPlaceholder" />
...@@ -2825,4 +2754,10 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -2825,4 +2754,10 @@ const rejectDialogBtnClick = (btn, info) => {
2825 } 2754 }
2826 } 2755 }
2827 } 2756 }
2757
2758 :deep(.list_panel) {
2759 .dialog-form-inline.el-form {
2760 align-items: flex-start;
2761 }
2762 }
2828 </style> 2763 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!