不需要支持手动输入新建数据产品
Showing
1 changed file
with
13 additions
and
12 deletions
| ... | @@ -116,7 +116,7 @@ const baseInfoFormItems = ref([ | ... | @@ -116,7 +116,7 @@ const baseInfoFormItems = ref([ |
| 116 | default: '', | 116 | default: '', |
| 117 | required: true, | 117 | required: true, |
| 118 | options: catalogProductList.value, | 118 | options: catalogProductList.value, |
| 119 | allowCreate: true, | 119 | // allowCreate: true,不需要支持输入 |
| 120 | filterable: true, | 120 | filterable: true, |
| 121 | props: { | 121 | props: { |
| 122 | value: 'productId', | 122 | value: 'productId', |
| ... | @@ -237,7 +237,7 @@ const baseInfoFormItems = ref([ | ... | @@ -237,7 +237,7 @@ const baseInfoFormItems = ref([ |
| 237 | options: route.query.dataSources == '1' ? [{ //如果是授权数据则不能选择其余的 | 237 | options: route.query.dataSources == '1' ? [{ //如果是授权数据则不能选择其余的 |
| 238 | value: 1, | 238 | value: 1, |
| 239 | label: '授权数据', | 239 | label: '授权数据', |
| 240 | }]: [{ | 240 | }] : [{ |
| 241 | value: 2, | 241 | value: 2, |
| 242 | label: '自有数据', | 242 | label: '自有数据', |
| 243 | }, | 243 | }, |
| ... | @@ -571,15 +571,14 @@ onBeforeMount(() => { | ... | @@ -571,15 +571,14 @@ onBeforeMount(() => { |
| 571 | baseInfoFormItems.value.forEach((item: any) => { | 571 | baseInfoFormItems.value.forEach((item: any) => { |
| 572 | item.default = detailInfo.value[item.field] == null ? '' : detailInfo.value[item.field]; | 572 | item.default = detailInfo.value[item.field] == null ? '' : detailInfo.value[item.field]; |
| 573 | if (item.field == 'damName') { | 573 | if (item.field == 'damName') { |
| 574 | item.default = item.productCode; | ||
| 574 | if (detailInfo.value?.productCode) { | 575 | if (detailInfo.value?.productCode) { |
| 575 | let item = catalogProductList.value.find(c => c.productId == detailInfo.value?.productCode); | 576 | let item = catalogProductList.value.find(c => c.productId == detailInfo.value?.productCode); |
| 576 | if (!item) { | 577 | !item && catalogProductList.value.push({ |
| 577 | item.default = detailInfo.value.damName; | 578 | productId: detailInfo.value?.productCode, |
| 578 | } else { | 579 | productName: detailInfo.value?.damName, |
| 579 | item.default = item.productCode; | 580 | description: detailInfo.value.propertyDescription |
| 580 | } | 581 | }); |
| 581 | } else { | ||
| 582 | item.default = detailInfo.value.damName; | ||
| 583 | } | 582 | } |
| 584 | } | 583 | } |
| 585 | if (item.field == 'subjectDomain') { | 584 | if (item.field == 'subjectDomain') { |
| ... | @@ -675,9 +674,11 @@ onBeforeMount(() => { | ... | @@ -675,9 +674,11 @@ onBeforeMount(() => { |
| 675 | baseInfoFormItems.value[0].options = catalogProductList.value; | 674 | baseInfoFormItems.value[0].options = catalogProductList.value; |
| 676 | if (detailInfo.value?.productCode) { | 675 | if (detailInfo.value?.productCode) { |
| 677 | let item = catalogProductList.value.find(c => c.productId == detailInfo.value?.productCode); | 676 | let item = catalogProductList.value.find(c => c.productId == detailInfo.value?.productCode); |
| 678 | if (!item) { | 677 | !item && catalogProductList.value.push({ |
| 679 | baseInfoFormItems.value[0].default = detailInfo.value.damName; | 678 | productId: detailInfo.value?.productCode, |
| 680 | } | 679 | productName: detailInfo.value?.damName, |
| 680 | description: detailInfo.value?.propertyDescription | ||
| 681 | }); | ||
| 681 | } | 682 | } |
| 682 | } else { | 683 | } else { |
| 683 | proxy.$ElMessage.error(res.msg); | 684 | proxy.$ElMessage.error(res.msg); | ... | ... |
-
Please register or sign in to post a comment