数据产品选择
Showing
3 changed files
with
27 additions
and
23 deletions
| ... | @@ -149,8 +149,8 @@ export const getContractOverviewTenantList = () => request({ | ... | @@ -149,8 +149,8 @@ export const getContractOverviewTenantList = () => request({ |
| 149 | }); | 149 | }); |
| 150 | 150 | ||
| 151 | /** 获取下拉数据产品列表 */ | 151 | /** 获取下拉数据产品列表 */ |
| 152 | export const getContractDataProduct = () => request({ | 152 | export const getContractDataProduct = (tenantGuid) => request({ |
| 153 | url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract/get-data-product`, | 153 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/get-data-product?tenantGuid=${tenantGuid}`, |
| 154 | method: 'post' | 154 | method: 'post' |
| 155 | }) | 155 | }) |
| 156 | 156 | ... | ... |
| ... | @@ -12,6 +12,7 @@ import { USERROLE } from '@/utils/enum'; | ... | @@ -12,6 +12,7 @@ import { USERROLE } from '@/utils/enum'; |
| 12 | import { ElMessage } from 'element-plus'; | 12 | import { ElMessage } from 'element-plus'; |
| 13 | 13 | ||
| 14 | const userStore = useUserStore() | 14 | const userStore = useUserStore() |
| 15 | const userData = JSON.parse(userStore.userData); | ||
| 15 | const router = useRouter() | 16 | const router = useRouter() |
| 16 | const route = useRoute() | 17 | const route = useRoute() |
| 17 | 18 | ||
| ... | @@ -72,6 +73,7 @@ const beforeLogin = () => { | ... | @@ -72,6 +73,7 @@ const beforeLogin = () => { |
| 72 | } | 73 | } |
| 73 | } | 74 | } |
| 74 | 75 | ||
| 76 | |||
| 75 | </script> | 77 | </script> |
| 76 | 78 | ||
| 77 | <template> | 79 | <template> |
| ... | @@ -93,7 +95,7 @@ const beforeLogin = () => { | ... | @@ -93,7 +95,7 @@ const beforeLogin = () => { |
| 93 | <div class="title">数据提供方</div> | 95 | <div class="title">数据提供方</div> |
| 94 | </div> | 96 | </div> |
| 95 | <!-- 只有专区才有 --> | 97 | <!-- 只有专区才有 --> |
| 96 | <div class="per" :class="selectRole == USERROLE.OPERATION ? 'selected' : ''" @click="selectRole = USERROLE.OPERATION"> | 98 | <div class="per" v-if="userData?.superTubeFlag == 'Y'" :class="selectRole == USERROLE.OPERATION ? 'selected' : ''" @click="selectRole = USERROLE.OPERATION"> |
| 97 | <div class="img-operation"></div> | 99 | <div class="img-operation"></div> |
| 98 | <div class="title">平台运营方</div> | 100 | <div class="title">平台运营方</div> |
| 99 | </div> | 101 | </div> | ... | ... |
| ... | @@ -67,7 +67,7 @@ const baseInfoFormItems = ref([{ | ... | @@ -67,7 +67,7 @@ const baseInfoFormItems = ref([{ |
| 67 | value: 'value', | 67 | value: 'value', |
| 68 | label: 'label' | 68 | label: 'label' |
| 69 | }, | 69 | }, |
| 70 | disabled: false, | 70 | disabled: true, |
| 71 | required: true, | 71 | required: true, |
| 72 | visible: true | 72 | visible: true |
| 73 | }, { | 73 | }, { |
| ... | @@ -304,16 +304,18 @@ const hanldeTableSelectChange = (val, scope, item) => { | ... | @@ -304,16 +304,18 @@ const hanldeTableSelectChange = (val, scope, item) => { |
| 304 | scope.row.dataProductEntityId = productItem?.enterpriseCode; | 304 | scope.row.dataProductEntityId = productItem?.enterpriseCode; |
| 305 | scope.row.dataProductAbstract = productItem?.description; | 305 | scope.row.dataProductAbstract = productItem?.description; |
| 306 | scope.row.dataProductEntityName = productItem?.enterpriseName; | 306 | scope.row.dataProductEntityName = productItem?.enterpriseName; |
| 307 | let nodeInfo = nodeInfoFormRef.value.formInline; | 307 | if (baseInfoFormRef.value?.formInline?.signModeCode == '02') { |
| 308 | if (scope.$index == 0) { | 308 | let nodeInfo = nodeInfoFormRef.value.formInline; |
| 309 | nodeInfoFormItems.value.forEach((item, index) => { | 309 | if (scope.$index == 0) { |
| 310 | item.default = nodeInfo[item.field]; | 310 | nodeInfoFormItems.value.forEach((item, index) => { |
| 311 | if (index == 1) { | 311 | item.default = nodeInfo[item.field]; |
| 312 | item.default = tenantList.value.find(t => t.socialCreditCode == scope.row.dataProductEntityId)?.guid || scope.row.dataProductEntityName; | 312 | if (index == 1) { |
| 313 | } else if (index == 2) { | 313 | item.default = tenantList.value.find(t => t.socialCreditCode == scope.row.dataProductEntityId)?.guid || scope.row.dataProductEntityName; |
| 314 | item.default = scope.row.dataProductEntityId || ''; | 314 | } else if (index == 2) { |
| 315 | } | 315 | item.default = scope.row.dataProductEntityId || ''; |
| 316 | }) | 316 | } |
| 317 | }) | ||
| 318 | } | ||
| 317 | } | 319 | } |
| 318 | } | 320 | } |
| 319 | 321 | ||
| ... | @@ -517,8 +519,8 @@ const submit = () => { | ... | @@ -517,8 +519,8 @@ const submit = () => { |
| 517 | handleLeft('product-info'); | 519 | handleLeft('product-info'); |
| 518 | return; | 520 | return; |
| 519 | } | 521 | } |
| 520 | if (userData.superTubeFlag == 'Y') { //只有主平台模式下需判断 | 522 | if (baseInfoFormRef.value.formInline.signModeCode == '02') { //只有主平台中介模式下需判断 |
| 521 | if (baseInfoFormRef.value.formInline.signModeCode == '02' && index > 0 && productData.value[index].dataProductEntityId != pd.dataProductEntityId) { | 523 | if (index > 0 && productData.value[index].dataProductEntityId != pd.dataProductEntityId) { |
| 522 | proxy.$ElMessage.error('合约标的的数据产品不能来自不同的企业主体'); | 524 | proxy.$ElMessage.error('合约标的的数据产品不能来自不同的企业主体'); |
| 523 | expandInfo.value = true; | 525 | expandInfo.value = true; |
| 524 | handleLeft('product-info'); | 526 | handleLeft('product-info'); |
| ... | @@ -626,13 +628,13 @@ const psLogon = ref(); | ... | @@ -626,13 +628,13 @@ const psLogon = ref(); |
| 626 | onBeforeMount(() => { | 628 | onBeforeMount(() => { |
| 627 | let exec = () => { | 629 | let exec = () => { |
| 628 | let userRole = localStorage.getItem('userRole'); | 630 | let userRole = localStorage.getItem('userRole'); |
| 629 | if (userRole == USERROLE.PROVIDER) { | 631 | if (userRole == USERROLE.PROVIDER) { //数据使用方 |
| 630 | baseInfoFormItems.value[1].disabled = true; | 632 | // baseInfoFormItems.value[1].disabled = true; |
| 631 | baseInfoFormItems.value[1].default = '01'; | 633 | baseInfoFormItems.value[1].default = '01'; |
| 632 | productTableInfo.value.editInfo.dataProductId.props.label = 'productName'; | 634 | productTableInfo.value.editInfo.dataProductId.props.label = 'productName'; |
| 633 | } else { //可以选点对点。未认证时只能选择中介参与 | 635 | } else { //平台运营方可以选择中介参与 |
| 634 | baseInfoFormItems.value[1].disabled = !currTenantDetailInfo.value.trustedIdentityCredential; | 636 | // baseInfoFormItems.value[1].disabled = !currTenantDetailInfo.value.trustedIdentityCredential; |
| 635 | baseInfoFormItems.value[1].default = !currTenantDetailInfo.value.trustedIdentityCredential ? '02' : '01'; | 637 | baseInfoFormItems.value[1].default = '02'; |
| 636 | productTableInfo.value.editInfo.dataProductId.props.label = 'productNameDesc'; | 638 | productTableInfo.value.editInfo.dataProductId.props.label = 'productNameDesc'; |
| 637 | } | 639 | } |
| 638 | if (route.query.guid) { | 640 | if (route.query.guid) { |
| ... | @@ -687,11 +689,11 @@ onBeforeMount(() => { | ... | @@ -687,11 +689,11 @@ onBeforeMount(() => { |
| 687 | nodeInfoFormItems.value[1].default = ''; //如果是中介的话,不能选择自己吧。 | 689 | nodeInfoFormItems.value[1].default = ''; //如果是中介的话,不能选择自己吧。 |
| 688 | } | 690 | } |
| 689 | } | 691 | } |
| 690 | getContractDataProduct().then((res: any) => { | 692 | getContractDataProduct(userData.superTubeFlag == 'Y' && localStorage.getItem('userRole') == USERROLE.OPERATION ? null : userData.tenantGuid).then((res: any) => { |
| 691 | if (res?.code == proxy.$passCode) { | 693 | if (res?.code == proxy.$passCode) { |
| 692 | productList.value = res.data?.map(d => { | 694 | productList.value = res.data?.map(d => { |
| 693 | d.productNameDesc = d.productName + '(' + d.enterpriseName + ')'; | 695 | d.productNameDesc = d.productName + '(' + d.enterpriseName + ')'; |
| 694 | d.disabled = userData.superTubeFlag == 'Y' && baseInfoFormItems.value[1].default == '01' && d.enterpriseName != userData.tenantName; //点对点,只能选择自己公司所属产品 | 696 | // d.disabled = userData.superTubeFlag == 'Y' && baseInfoFormItems.value[1].default == '01' && d.enterpriseName != userData.tenantName; //点对点,只能选择自己公司所属产品 |
| 695 | return d; | 697 | return d; |
| 696 | }) || []; | 698 | }) || []; |
| 697 | productTableInfo.value.editInfo.dataProductId.options = productList.value; | 699 | productTableInfo.value.editInfo.dataProductId.options = productList.value; | ... | ... |
-
Please register or sign in to post a comment