不需要支持手动输入新建数据产品
Showing
1 changed file
with
33 additions
and
32 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', |
| ... | @@ -151,7 +151,7 @@ const baseInfoFormItems = ref([ | ... | @@ -151,7 +151,7 @@ const baseInfoFormItems = ref([ |
| 151 | }, | 151 | }, |
| 152 | filterable: true, | 152 | filterable: true, |
| 153 | clearable: true, | 153 | clearable: true, |
| 154 | default: route.query.dataSources == '1' ? JSON.parse(userStore.userData).tenantGuid : JSON.parse(userStore.userData).tenantName, | 154 | default: route.query.dataSources == '1' ? JSON.parse(userStore.userData).tenantGuid : JSON.parse(userStore.userData).tenantName, |
| 155 | required: true, | 155 | required: true, |
| 156 | disabled: route.query.dataSources == '1' ? false : true, | 156 | disabled: route.query.dataSources == '1' ? false : true, |
| 157 | }, | 157 | }, |
| ... | @@ -235,20 +235,20 @@ const baseInfoFormItems = ref([ | ... | @@ -235,20 +235,20 @@ const baseInfoFormItems = ref([ |
| 235 | block: false, | 235 | block: false, |
| 236 | default: route.query.dataSources == '1' ? 1 : 2, | 236 | default: route.query.dataSources == '1' ? 1 : 2, |
| 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 | }, |
| 244 | { | 244 | { |
| 245 | value: 3, | 245 | value: 3, |
| 246 | label: '购买数据', | 246 | label: '购买数据', |
| 247 | }, | 247 | }, |
| 248 | { | 248 | { |
| 249 | value: 4, | 249 | value: 4, |
| 250 | label: '其他来源', | 250 | label: '其他来源', |
| 251 | }], //dataSourcesList | 251 | }], //dataSourcesList |
| 252 | required: true, | 252 | required: true, |
| 253 | }, | 253 | }, |
| 254 | // 是否公共数据 | 254 | // 是否公共数据 |
| ... | @@ -452,7 +452,7 @@ const assetDataTableInfo = ref({ | ... | @@ -452,7 +452,7 @@ const assetDataTableInfo = ref({ |
| 452 | let row = scope.row; | 452 | let row = scope.row; |
| 453 | router.push({ | 453 | router.push({ |
| 454 | path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog/import-file-dam' : '/data-asset/register-catalog/import-file-dam', | 454 | path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog/import-file-dam' : '/data-asset/register-catalog/import-file-dam', |
| 455 | // name: "importFileDam", | 455 | // name: "importFileDam", |
| 456 | query: { | 456 | query: { |
| 457 | bizGuid: row.guid, | 457 | bizGuid: row.guid, |
| 458 | name: row.tableChName, | 458 | name: row.tableChName, |
| ... | @@ -468,7 +468,7 @@ const assetDataTableInfo = ref({ | ... | @@ -468,7 +468,7 @@ const assetDataTableInfo = ref({ |
| 468 | let row = scope.row; | 468 | let row = scope.row; |
| 469 | router.push({ | 469 | router.push({ |
| 470 | path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog/damTableDataView' : '/data-asset/register-catalog/damTableDataView', | 470 | path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog/damTableDataView' : '/data-asset/register-catalog/damTableDataView', |
| 471 | // name: 'damTableDataView', | 471 | // name: 'damTableDataView', |
| 472 | query: { | 472 | query: { |
| 473 | guid: row.guid, | 473 | guid: row.guid, |
| 474 | name: row.tableChName, | 474 | name: row.tableChName, |
| ... | @@ -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); |
| ... | @@ -789,8 +790,8 @@ const save = () => { | ... | @@ -789,8 +790,8 @@ const save = () => { |
| 789 | if (res.code == proxy.$passCode) { | 790 | if (res.code == proxy.$passCode) { |
| 790 | proxy.$ElMessage.success('资源目录编辑提交成功'); | 791 | proxy.$ElMessage.success('资源目录编辑提交成功'); |
| 791 | router.push({ | 792 | router.push({ |
| 792 | // name: 'registerCatalogManagement' | 793 | // name: 'registerCatalogManagement' |
| 793 | path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog' | 794 | path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog' |
| 794 | }); | 795 | }); |
| 795 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 796 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 796 | assetStore.setDamCatalogRefresh(true); | 797 | assetStore.setDamCatalogRefresh(true); |
| ... | @@ -810,13 +811,13 @@ const save = () => { | ... | @@ -810,13 +811,13 @@ const save = () => { |
| 810 | } else { | 811 | } else { |
| 811 | params.rightMainName = rightMainTenantList.value.find(v => v.guid == params.rightMain)?.tenantName; | 812 | params.rightMainName = rightMainTenantList.value.find(v => v.guid == params.rightMain)?.tenantName; |
| 812 | } | 813 | } |
| 813 | // params.rightMain = JSON.parse(userStore.userData).tenantGuid; | 814 | // params.rightMain = JSON.parse(userStore.userData).tenantGuid; |
| 814 | registerCatalogSave(params).then((res: any) => { | 815 | registerCatalogSave(params).then((res: any) => { |
| 815 | fullscreenLoading.value = false; | 816 | fullscreenLoading.value = false; |
| 816 | if (res.code == proxy.$passCode) { | 817 | if (res.code == proxy.$passCode) { |
| 817 | proxy.$ElMessage.success('资源目录新建提交成功'); | 818 | proxy.$ElMessage.success('资源目录新建提交成功'); |
| 818 | router.push({ | 819 | router.push({ |
| 819 | // name: 'registerCatalogManagement' | 820 | // name: 'registerCatalogManagement' |
| 820 | path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog' | 821 | path: route.query.dataSources == '1' ? '/data-asset/authordata-catalog' : '/data-asset/register-catalog' |
| 821 | }); | 822 | }); |
| 822 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | 823 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ... | ... |
-
Please register or sign in to post a comment