47db0e59 by lihua

添加合约创建时选择数据产品

1 parent 32b085d5
...@@ -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
......
...@@ -92,7 +92,7 @@ const beforeLogin = () => { ...@@ -92,7 +92,7 @@ const beforeLogin = () => {
92 <div class="img-provider"></div> 92 <div class="img-provider"></div>
93 <div class="title">数据提供方</div> 93 <div class="title">数据提供方</div>
94 </div> 94 </div>
95 <!-- 只有专区才有 --> 95 <!-- 只有专区的超级管理员才有 -->
96 <!-- <div class="per" :class="selectRole == USERROLE.OPERATION ? 'selected' : ''" @click="selectRole = USERROLE.OPERATION"> 96 <!-- <div class="per" :class="selectRole == USERROLE.OPERATION ? 'selected' : ''" @click="selectRole = USERROLE.OPERATION">
97 <div class="img-operation"></div> 97 <div class="img-operation"></div>
98 <div class="title">平台运营方</div> 98 <div class="title">平台运营方</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 }, {
...@@ -250,7 +250,7 @@ const productTableInfo = ref({ ...@@ -250,7 +250,7 @@ const productTableInfo = ref({
250 default: '', 250 default: '',
251 options: productList.value, 251 options: productList.value,
252 props: { 252 props: {
253 label: 'productNameDesc', 253 label: 'productName',
254 value: 'productId', 254 value: 'productId',
255 disabled: 'disabled' 255 disabled: 'disabled'
256 }, 256 },
...@@ -304,17 +304,16 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -304,17 +304,16 @@ 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 // 连接器只能选择数据提供方的产品,不需要切换了
308 if (scope.$index == 0) { 308 // let nodeInfo = nodeInfoFormRef.value.formInline;
309 nodeInfoFormItems.value.forEach((item, index) => { 309 // nodeInfoFormItems.value.forEach((item, index) => {
310 item.default = nodeInfo[item.field]; 310 // item.default = nodeInfo[item.field];
311 if (index == 1) { 311 // if (index == 1) {
312 item.default = tenantList.value.find(t => t.socialCreditCode == scope.row.dataProductEntityId)?.guid || scope.row.dataProductEntityName; 312 // item.default = tenantList.value.find(t => t.socialCreditCode == scope.row.dataProductEntityId)?.guid || scope.row.dataProductEntityName;
313 } else if (index == 2) { 313 // } else if (index == 2) {
314 item.default = scope.row.dataProductEntityId || ''; 314 // item.default = scope.row.dataProductEntityId || '';
315 } 315 // }
316 }) 316 // })
317 }
318 } 317 }
319 318
320 /** ---------------- 合约策略执行者相关表单信息 ----------------------------------- */ 319 /** ---------------- 合约策略执行者相关表单信息 ----------------------------------- */
...@@ -627,14 +626,15 @@ onBeforeMount(() => { ...@@ -627,14 +626,15 @@ onBeforeMount(() => {
627 let exec = () => { 626 let exec = () => {
628 let userRole = localStorage.getItem('userRole'); 627 let userRole = localStorage.getItem('userRole');
629 if (userRole == USERROLE.PROVIDER) { 628 if (userRole == USERROLE.PROVIDER) {
630 baseInfoFormItems.value[1].disabled = true; 629 // baseInfoFormItems.value[1].disabled = true;
631 baseInfoFormItems.value[1].default = '01'; 630 baseInfoFormItems.value[1].default = '01';
632 productTableInfo.value.editInfo.dataProductId.props.label = 'productName'; 631 productTableInfo.value.editInfo.dataProductId.props.label = 'productName';
633 } else { //可以选点对点。未认证时只能选择中介参与 632 }
634 baseInfoFormItems.value[1].disabled = !currTenantDetailInfo.value.trustedIdentityCredential; 633 // else { //可以选点对点。未认证时只能选择中介参与
635 baseInfoFormItems.value[1].default = !currTenantDetailInfo.value.trustedIdentityCredential ? '02' : '01'; 634 // baseInfoFormItems.value[1].disabled = !currTenantDetailInfo.value.trustedIdentityCredential;
636 productTableInfo.value.editInfo.dataProductId.props.label = 'productNameDesc'; 635 // baseInfoFormItems.value[1].default = !currTenantDetailInfo.value.trustedIdentityCredential ? '02' : '01';
637 } 636 // productTableInfo.value.editInfo.dataProductId.props.label = 'productNameDesc';
637 // }
638 if (route.query.guid) { 638 if (route.query.guid) {
639 fullscreenLoading.value = true; 639 fullscreenLoading.value = true;
640 getContractDetail(route.query.guid).then((res: any) => { 640 getContractDetail(route.query.guid).then((res: any) => {
...@@ -659,10 +659,7 @@ onBeforeMount(() => { ...@@ -659,10 +659,7 @@ onBeforeMount(() => {
659 nodeInfoFormItems.value[4].default = user.executionerGuid; 659 nodeInfoFormItems.value[4].default = user.executionerGuid;
660 nodeInfoFormItems.value[5].default = user.executionerId; 660 nodeInfoFormItems.value[5].default = user.executionerId;
661 if (baseInfoFormItems.value[1].default == '01' && userData.superTubeFlag == 'Y') { 661 if (baseInfoFormItems.value[1].default == '01' && userData.superTubeFlag == 'Y') {
662 productList.value = res.data?.map(d => { 662 productList.value = res.data || [];
663 d.disabled = d.enterpriseName != userData.tenantName; //点对点,只能选择自己公司所属产品
664 return d;
665 }) || [];
666 } 663 }
667 productTableInfo.value.editInfo.dataProductId.options = productList.value; 664 productTableInfo.value.editInfo.dataProductId.options = productList.value;
668 extendData.value = detailInfo.value.contractExpansions || []; 665 extendData.value = detailInfo.value.contractExpansions || [];
...@@ -687,13 +684,9 @@ onBeforeMount(() => { ...@@ -687,13 +684,9 @@ onBeforeMount(() => {
687 nodeInfoFormItems.value[1].default = ''; //如果是中介的话,不能选择自己吧。 684 nodeInfoFormItems.value[1].default = ''; //如果是中介的话,不能选择自己吧。
688 } 685 }
689 } 686 }
690 getContractDataProduct().then((res: any) => { 687 getContractDataProduct(userData.tenantGuid).then((res: any) => {
691 if (res?.code == proxy.$passCode) { 688 if (res?.code == proxy.$passCode) {
692 productList.value = res.data?.map(d => { 689 productList.value = res.data || [];
693 d.productNameDesc = d.productName + '(' + d.enterpriseName + ')';
694 d.disabled = userData.superTubeFlag == 'Y' && baseInfoFormItems.value[1].default == '01' && d.enterpriseName != userData.tenantName; //点对点,只能选择自己公司所属产品
695 return d;
696 }) || [];
697 productTableInfo.value.editInfo.dataProductId.options = productList.value; 690 productTableInfo.value.editInfo.dataProductId.options = productList.value;
698 } else { 691 } else {
699 res?.msg && proxy.$ElMessage.error(res?.msg); 692 res?.msg && proxy.$ElMessage.error(res?.msg);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!