fd08dd92 by lihua

合约添加逻辑空间接口联调

1 parent 47708ee7
...@@ -222,6 +222,18 @@ export const getContractTenantList = (tenantName = '') => request({ ...@@ -222,6 +222,18 @@ export const getContractTenantList = (tenantName = '') => request({
222 method: 'get' 222 method: 'get'
223 }) 223 })
224 224
225 /** 根据逻辑空间guid获取可选的企业下拉列表,认证过后带标识的 */
226 export const getContractTenantListBySpaceGuid = (spaceGuid) => request({
227 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/logic/user-member-by-space-guid?spaceGuid=${spaceGuid}`,
228 method: 'get'
229 })
230
231 /** 根据逻辑空间guid获取策略模板 */
232 export const getContractPolicyTemplateListBySpaceGuid = (spaceGuid) => request({
233 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/logic/policy-by-space-guid?spaceGuid=${spaceGuid}`,
234 method: 'get'
235 })
236
225 /** 撤回合约 */ 237 /** 撤回合约 */
226 export const cancelContract = (guid) => request({ 238 export const cancelContract = (guid) => request({
227 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract/canal?guid=${guid}`, 239 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract/canal?guid=${guid}`,
......
...@@ -40,6 +40,7 @@ const userStore = useUserStore() ...@@ -40,6 +40,7 @@ const userStore = useUserStore()
40 const emits = defineEmits([ 40 const emits = defineEmits([
41 "radioGroupChange", 41 "radioGroupChange",
42 "selectChange", 42 "selectChange",
43 "selectFocus",
43 "inputChange", 44 "inputChange",
44 "treeSelectLoad", 45 "treeSelectLoad",
45 "treeSelectNodeChange", 46 "treeSelectNodeChange",
...@@ -134,6 +135,10 @@ const richTextChange = (val, item) => { ...@@ -134,6 +135,10 @@ const richTextChange = (val, item) => {
134 formInline.value[item.field] = val; 135 formInline.value[item.field] = val;
135 ruleFormRef.value?.validateField([item.field]); 136 ruleFormRef.value?.validateField([item.field]);
136 } 137 }
138 /** 下拉选择框聚焦事件 */
139 const selectFocus = (item) => {
140 emits("selectFocus", item);
141 }
137 142
138 const selectChange = (val, row) => { 143 const selectChange = (val, row) => {
139 const info = formInline.value; 144 const info = formInline.value;
...@@ -938,7 +943,7 @@ const panelChange = (scope, row) => { ...@@ -938,7 +943,7 @@ const panelChange = (scope, row) => {
938 :collapse-tags="item.collapse ?? false" :collapse-tags-tooltip="item.tagsTooltip ?? false" 943 :collapse-tags="item.collapse ?? false" :collapse-tags-tooltip="item.tagsTooltip ?? false"
939 :max-collapse-tags="item.maxTags ?? 1" :teleported="item.teleported ?? true" 944 :max-collapse-tags="item.maxTags ?? 1" :teleported="item.teleported ?? true"
940 :allow-create="item.allowCreate ?? false" :default-first-option="item.allowCreate ?? false" 945 :allow-create="item.allowCreate ?? false" :default-first-option="item.allowCreate ?? false"
941 :maxlength="item.maxlength ?? 50" @change="(val) => selectChange(val, item)"> 946 :maxlength="item.maxlength ?? 50" @change="(val) => selectChange(val, item)" @focus="selectFocus(item)">
942 <el-option v-for="opt in item.options" :label="item.props?.label ? opt[item.props.label] : opt.label" 947 <el-option v-for="opt in item.options" :label="item.props?.label ? opt[item.props.label] : opt.label"
943 :value="item.props?.value ? opt[item.props.value] : opt.value" :disabled="opt.disabled" /> 948 :value="item.props?.value ? opt[item.props.value] : opt.value" :disabled="opt.disabled" />
944 </el-select> 949 </el-select>
......
...@@ -646,8 +646,16 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => { ...@@ -646,8 +646,16 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
646 /** 弹出模板选择对话框 */ 646 /** 弹出模板选择对话框 */
647 const invokeTemplate = () => { 647 const invokeTemplate = () => {
648 // TODO,判断是否有策略模板信息。 648 // TODO,判断是否有策略模板信息。
649 if (props.templateJson?.length) { 649 if (props.templateJson) {
650 proxy.$openMessageBox("使用模板会覆盖现有策略信息,确定要使用产品所在逻辑空间的模板配置吗?", () => { 650 if (!props.templateJson?.length) {
651 proxy.$ElMessage.warning('当前逻辑空间中未设置策略配置信息');
652 return;
653 }
654 if (!strategyValueInfo.value?.length) {
655 strategyValueInfo.value = transferValueToNew(props.templateJson, true);
656 return;
657 }
658 proxy.$openMessageBox("该操作会覆盖现有策略信息,确定要使用产品所在逻辑空间的策略配置吗?", () => {
651 strategyValueInfo.value = transferValueToNew(props.templateJson, true); 659 strategyValueInfo.value = transferValueToNew(props.templateJson, true);
652 }, () => { 660 }, () => {
653 proxy.$ElMessage.info("已取消"); 661 proxy.$ElMessage.info("已取消");
......
...@@ -11,6 +11,8 @@ import { ...@@ -11,6 +11,8 @@ import {
11 getConstraintPolicyList, 11 getConstraintPolicyList,
12 getContractDataProduct, 12 getContractDataProduct,
13 getContractTenantList, 13 getContractTenantList,
14 getContractTenantListBySpaceGuid,
15 getContractPolicyTemplateListBySpaceGuid,
14 saveContract, 16 saveContract,
15 updateContract, 17 updateContract,
16 getDamFieldsByProductGuid 18 getDamFieldsByProductGuid
...@@ -240,7 +242,7 @@ const productTableInfo = ref({ ...@@ -240,7 +242,7 @@ const productTableInfo = ref({
240 { label: "数据产品编码", field: "dataProductId", width: 261 }, 242 { label: "数据产品编码", field: "dataProductId", width: 261 },
241 { label: "产品类型", field: "dataProductTypeName", width: 100 }, 243 { label: "产品类型", field: "dataProductTypeName", width: 100 },
242 { label: "所属主体名称", field: "dataProductEntityName", width: 200 }, 244 { label: "所属主体名称", field: "dataProductEntityName", width: 200 },
243 { label: "逻辑空间", field: "logicSpaceName", width: 200 }, //TODO,字段名称 245 { label: "逻辑空间", field: "logicSpaceName", width: 200 },
244 { label: "产品简介", field: "dataProductAbstract", width: 240 }, 246 { label: "产品简介", field: "dataProductAbstract", width: 240 },
245 ], 247 ],
246 editInfo: { 248 editInfo: {
...@@ -308,8 +310,8 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -308,8 +310,8 @@ const hanldeTableSelectChange = (val, scope, item) => {
308 scope.row.dataProductGuid = productItem?.productGuid; 310 scope.row.dataProductGuid = productItem?.productGuid;
309 scope.row.dataProductType = productItem?.productType; 311 scope.row.dataProductType = productItem?.productType;
310 scope.row.dataProductTypeName = productItem?.productTypeName; 312 scope.row.dataProductTypeName = productItem?.productTypeName;
311 //TODO,逻辑空间名称
312 scope.row.logicSpaceName = productItem?.logicSpaceName; 313 scope.row.logicSpaceName = productItem?.logicSpaceName;
314 scope.row.logicSpaceGuid = productItem?.logicSpaceGuid;
313 /** 选择了产品,需要重新查询去重字段 */ 315 /** 选择了产品,需要重新查询去重字段 */
314 if (productItem?.productGuid) { 316 if (productItem?.productGuid) {
315 getDamFieldsByProductGuid(productItem?.productGuid, isDataUse.value ? 'Y' : 'N').then((res: any) => { 317 getDamFieldsByProductGuid(productItem?.productGuid, isDataUse.value ? 'Y' : 'N').then((res: any) => {
...@@ -328,17 +330,28 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -328,17 +330,28 @@ const hanldeTableSelectChange = (val, scope, item) => {
328 res?.msg && proxy.$ElMessage.error(res?.msg) 330 res?.msg && proxy.$ElMessage.error(res?.msg)
329 } 331 }
330 }) 332 })
331 // TODO,需要重新更新数据使用方的下拉列表,如果逻辑空间是空值,则可以选择所有企业,否则只能选择逻辑空间下的成员企业。 333 // 需要重新更新数据使用方的下拉列表,如果逻辑空间是空值,则可以选择所有企业,否则只能选择逻辑空间下的成员企业。
332 if (productItem?.logicSpaceName) { 334 if (productItem?.logicSpaceGuid) {
333 // 建议使用方下拉列表企业包含所在的逻辑空间。一个企业可能有多个逻辑空间。或者根据逻辑空间获取成员列表。 335 // 建议使用方下拉列表企业包含所在的逻辑空间。一个企业可能有多个逻辑空间。或者根据逻辑空间获取成员列表。
334 // tenantList.value.filter();
335 // 调用逻辑空间接口,因为策略模板也需要使用。 336 // 调用逻辑空间接口,因为策略模板也需要使用。
336 //templateJson.value = res.data; 337 getContractMemberTenantList(productItem?.logicSpaceGuid);
338 getContractPolicyTemplateListBySpaceGuid(productItem?.logicSpaceGuid).then((res: any) => {
339 if (res?.code == proxy.$passCode) {
340 templateJson.value = res.data || [];
341 } else {
342 templateJson.value = [];
343 res?.msg && proxy.$ElMessage.error(res?.msg)
344 }
345 })
346 } else {
347 getContractMemberTenantList(null);
348 templateJson.value = null;
337 } 349 }
338 } else { 350 } else {
339 productFieldList.value = initProductFieldValue.value; 351 productFieldList.value = initProductFieldValue.value;
340 annonFieldsList.value = initProductFieldValue.value; 352 annonFieldsList.value = initProductFieldValue.value;
341 // TODO,需要更新数据使用方下拉列表 353 getContractMemberTenantList(null);
354 templateJson.value = null;
342 } 355 }
343 // 连接器只能选择数据提供方的产品,不需要切换了 356 // 连接器只能选择数据提供方的产品,不需要切换了
344 // let nodeInfo = nodeInfoFormRef.value.formInline; 357 // let nodeInfo = nodeInfoFormRef.value.formInline;
...@@ -357,6 +370,9 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -357,6 +370,9 @@ const hanldeTableSelectChange = (val, scope, item) => {
357 /** 策略执行者下拉列表 */ 370 /** 策略执行者下拉列表 */
358 const tenantList: any = ref([]); 371 const tenantList: any = ref([]);
359 372
373 /** 数据产品提供方下拉列表 */
374 const providerTenantList: any = ref([]);
375
360 const nodeInfoFormRef = ref(); 376 const nodeInfoFormRef = ref();
361 377
362 // 策略执行者类型列表 378 // 策略执行者类型列表
...@@ -376,7 +392,7 @@ const nodeInfoFormItems = ref([{ ...@@ -376,7 +392,7 @@ const nodeInfoFormItems = ref([{
376 placeholder: '请选择', 392 placeholder: '请选择',
377 field: 'dataProviderGuid', 393 field: 'dataProviderGuid',
378 default: '', 394 default: '',
379 options: tenantList.value, //先禁用,选择产品后自动带出 395 options: providerTenantList.value, //先禁用,选择产品后自动带出
380 props: { 396 props: {
381 value: 'guid', 397 value: 'guid',
382 label: 'tenantName' 398 label: 'tenantName'
...@@ -432,6 +448,16 @@ const nodeInfoFormRules = ref({ ...@@ -432,6 +448,16 @@ const nodeInfoFormRules = ref({
432 dataUserGuid: [required('请选择数据使用方策略执行者名称')], 448 dataUserGuid: [required('请选择数据使用方策略执行者名称')],
433 }); 449 });
434 450
451 /** 下拉选择框聚焦事件 */
452 const handleNodeSelectFocus = (item) => {
453 if (item.field == 'dataUserGuid') {
454 if (!productData.value?.[0]?.dataProductId) {
455 proxy.$ElMessage.error('请先选择数据产品');
456 return;
457 }
458 }
459 }
460
435 const handleNodeSelectChange = (val, row, info) => { 461 const handleNodeSelectChange = (val, row, info) => {
436 if (row.field == 'dataUserGuid') { 462 if (row.field == 'dataUserGuid') {
437 let tenantItem = tenantList.value.find(t => t.guid == val); 463 let tenantItem = tenantList.value.find(t => t.guid == val);
...@@ -444,6 +470,9 @@ const handleNodeSelectChange = (val, row, info) => { ...@@ -444,6 +470,9 @@ const handleNodeSelectChange = (val, row, info) => {
444 470
445 const strategyTableRef = ref(); 471 const strategyTableRef = ref();
446 472
473 /** 逻辑空间的策略模板信息,若是逻辑空间不存在,则值为null,若是逻辑空间中未设置模板,则值为[] */
474 const templateJson: any = ref(null);
475
447 /** 约束运算符字典下拉 */ 476 /** 约束运算符字典下拉 */
448 const operatorOptionList: any = ref([]); 477 const operatorOptionList: any = ref([]);
449 478
...@@ -476,7 +505,7 @@ const getSubmitInfo = () => { ...@@ -476,7 +505,7 @@ const getSubmitInfo = () => {
476 executionerTypeCode: executorTypeList.value[0]?.value, 505 executionerTypeCode: executorTypeList.value[0]?.value,
477 executionerGuid: nodeInfo.dataProviderGuid, 506 executionerGuid: nodeInfo.dataProviderGuid,
478 executionerId: nodeInfo.dataProviderId, 507 executionerId: nodeInfo.dataProviderId,
479 executionerName: tenantList.value.find(t => t.guid == nodeInfo.dataProviderGuid)?.tenantName 508 executionerName: providerTenantList.value.find(t => t.guid == nodeInfo.dataProviderGuid)?.tenantName
480 }, { 509 }, {
481 executionerTypeCode: executorTypeList.value[1]?.value, 510 executionerTypeCode: executorTypeList.value[1]?.value,
482 executionerGuid: nodeInfo.dataUserGuid, 511 executionerGuid: nodeInfo.dataUserGuid,
...@@ -501,7 +530,7 @@ const getSubmitInfo = () => { ...@@ -501,7 +530,7 @@ const getSubmitInfo = () => {
501 label: limitedStateOptionsList.value.find(p => p.value == d.constraintStateValue)?.label || d.constraintStateValue 530 label: limitedStateOptionsList.value.find(p => p.value == d.constraintStateValue)?.label || d.constraintStateValue
502 }]; 531 }];
503 } 532 }
504 else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) { 533 else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) {
505 v.constraintValue = d.constraintConnectorValue?.join(','); 534 v.constraintValue = d.constraintConnectorValue?.join(',');
506 v.additionValue = d.additionValue; 535 v.additionValue = d.additionValue;
507 } else if (d.constraintEnName == 'areaAddress' && d.constraintAddressValue?.length) { 536 } else if (d.constraintEnName == 'areaAddress' && d.constraintAddressValue?.length) {
...@@ -692,7 +721,29 @@ const cancel = () => { ...@@ -692,7 +721,29 @@ const cancel = () => {
692 721
693 const detailInfo: any = ref({}); 722 const detailInfo: any = ref({});
694 723
695 const psLogon = ref(); 724 const getContractMemberTenantList = (spaceGuid) => {
725 if (!spaceGuid) {
726 tenantList.value = providerTenantList.value;
727 nodeInfoFormItems.value[4].options = tenantList.value;
728 return;
729 }
730 getContractTenantListBySpaceGuid(spaceGuid).then((res: any) => {
731 if (res.code == proxy.$passCode) {
732 tenantList.value = res.data || [];
733 nodeInfoFormItems.value[4].options = tenantList.value;
734 let dataUserGuid = nodeInfoFormRef.value.formInline.dataUserGuid;
735 if (dataUserGuid && !tenantList.value.some(item => item.guid == dataUserGuid)) {
736 nodeInfoFormItems.value[4].default = '';
737 nodeInfoFormItems.value[5].default = '';
738 }
739 } else {
740 tenantList.value = [];
741 nodeInfoFormItems.value[4].default = '';
742 nodeInfoFormItems.value[5].default = '';
743 res?.msg && proxy.$ElMessage.error(res.msg);
744 }
745 })
746 }
696 747
697 onBeforeMount(() => { 748 onBeforeMount(() => {
698 let exec = () => { 749 let exec = () => {
...@@ -715,7 +766,7 @@ onBeforeMount(() => { ...@@ -715,7 +766,7 @@ onBeforeMount(() => {
715 detailInfo.value = res.data || {}; 766 detailInfo.value = res.data || {};
716 baseInfoFormItems.value.forEach(item => { 767 baseInfoFormItems.value.forEach(item => {
717 item.default = detailInfo.value[item.field]; 768 item.default = detailInfo.value[item.field];
718 if (item.default && route.query.type == 'copy' && item.field == 'contractName') { 769 if (item.default && route.query.type == 'copy' && item.field == 'contractName') {
719 item.default = item.default + '_copy'; 770 item.default = item.default + '_copy';
720 } 771 }
721 }); 772 });
...@@ -759,6 +810,23 @@ onBeforeMount(() => { ...@@ -759,6 +810,23 @@ onBeforeMount(() => {
759 res?.msg && proxy.$ElMessage.error(res?.msg) 810 res?.msg && proxy.$ElMessage.error(res?.msg)
760 } 811 }
761 }) 812 })
813 let logicSpaceGuid = productData.value?.[0]?.logicSpaceGuid;
814 if (logicSpaceGuid) {
815 // 建议使用方下拉列表企业包含所在的逻辑空间。一个企业可能有多个逻辑空间。或者根据逻辑空间获取成员列表。
816 // 调用逻辑空间接口,因为策略模板也需要使用。
817 getContractMemberTenantList(logicSpaceGuid);
818 getContractPolicyTemplateListBySpaceGuid(logicSpaceGuid).then((res: any) => {
819 if (res?.code == proxy.$passCode) {
820 templateJson.value = res.data || [];
821 } else {
822 templateJson.value = [];
823 res?.msg && proxy.$ElMessage.error(res?.msg)
824 }
825 })
826 } else {
827 getContractMemberTenantList(null);
828 templateJson.value = null;
829 }
762 } else { 830 } else {
763 productFieldList.value = initProductFieldValue.value; 831 productFieldList.value = initProductFieldValue.value;
764 annonFieldsList.value = initProductFieldValue.value; 832 annonFieldsList.value = initProductFieldValue.value;
...@@ -772,8 +840,8 @@ onBeforeMount(() => { ...@@ -772,8 +840,8 @@ onBeforeMount(() => {
772 // 默认点对点,数据使用方可以选择 840 // 默认点对点,数据使用方可以选择
773 // nodeInfoFormItems.value[1].disabled = true; 841 // nodeInfoFormItems.value[1].disabled = true;
774 nodeInfoFormItems.value[1].default = userData.tenantGuid; 842 nodeInfoFormItems.value[1].default = userData.tenantGuid;
775 if (tenantList.value.length) { 843 if (providerTenantList.value.length) {
776 let item = tenantList.value.find(t => t.guid == userData.tenantGuid); 844 let item = providerTenantList.value.find(t => t.guid == userData.tenantGuid);
777 nodeInfoFormItems.value[2].default = item?.socialCreditCode; 845 nodeInfoFormItems.value[2].default = item?.socialCreditCode;
778 } 846 }
779 } else { 847 } else {
...@@ -871,11 +939,10 @@ onBeforeMount(() => { ...@@ -871,11 +939,10 @@ onBeforeMount(() => {
871 }) 939 })
872 getContractTenantList().then((res: any) => { 940 getContractTenantList().then((res: any) => {
873 if (res.code == proxy.$passCode) { 941 if (res.code == proxy.$passCode) {
874 tenantList.value = res.data || []; 942 providerTenantList.value = res.data || [];
875 nodeInfoFormItems.value[1].options = tenantList.value; 943 nodeInfoFormItems.value[1].options = providerTenantList.value;
876 nodeInfoFormItems.value[4].options = tenantList.value;
877 if (nodeInfoFormItems.value[1].default) { 944 if (nodeInfoFormItems.value[1].default) {
878 let item = tenantList.value.find(t => t.guid == nodeInfoFormItems.value[1].default); 945 let item = providerTenantList.value.find(t => t.guid == nodeInfoFormItems.value[1].default);
879 nodeInfoFormItems.value[2].default = item?.socialCreditCode; 946 nodeInfoFormItems.value[2].default = item?.socialCreditCode;
880 } 947 }
881 } else { 948 } else {
...@@ -888,8 +955,8 @@ onActivated(() => { ...@@ -888,8 +955,8 @@ onActivated(() => {
888 if (route.query.guid) { 955 if (route.query.guid) {
889 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); 956 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
890 if (tab) { 957 if (tab) {
891 document.title = route.query.type == 'copy' ? `复制合约-${route.query.name}` : `编辑合约-${route.query.name}`; 958 document.title = route.query.type == 'copy' ? `复制合约-${route.query.name}` : `编辑合约-${route.query.name}`;
892 tab.meta.title = route.query.type == 'copy' ? `复制合约-${route.query.name}` : `编辑合约-${route.query.name}`; 959 tab.meta.title = route.query.type == 'copy' ? `复制合约-${route.query.name}` : `编辑合约-${route.query.name}`;
893 } 960 }
894 } 961 }
895 }) 962 })
...@@ -919,16 +986,18 @@ onActivated(() => { ...@@ -919,16 +986,18 @@ onActivated(() => {
919 @expand="(v) => (expandPolicy = v)" description=""> 986 @expand="(v) => (expandPolicy = v)" description="">
920 <div class="h-title">策略执行节点</div> 987 <div class="h-title">策略执行节点</div>
921 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules" 988 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules"
922 @select-change="handleNodeSelectChange" col="col3" /> 989 @select-change="handleNodeSelectChange" @select-focus="handleNodeSelectFocus" col="col3" />
923 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData" 990 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData"
924 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :limit-state-option-list="limitedStateOptionsList" 991 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :templateJson="templateJson"
925 :productFieldList="productFieldList" :annon-fields-list="annonFieldsList" :constraintOptionsList="constraintOptionsList"></StrategyTable> 992 :limit-state-option-list="limitedStateOptionsList" :productFieldList="productFieldList"
993 :annon-fields-list="annonFieldsList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
926 </ContentWrap> 994 </ContentWrap>
927 </div> 995 </div>
928 <div class="tool_btns"> 996 <div class="tool_btns">
929 <div class="btns"> 997 <div class="btns">
930 <el-button @click="cancel">取消</el-button> 998 <el-button @click="cancel">取消</el-button>
931 <el-button @click="saveDraft" v-show="route.query.type == 'copy' || (detailInfo?.contractStatus != '00')">保存</el-button> 999 <el-button @click="saveDraft"
1000 v-show="route.query.type == 'copy' || (detailInfo?.contractStatus != '00')">保存</el-button>
932 <el-button type="primary" @click="submit">合约协商</el-button> 1001 <el-button type="primary" @click="submit">合约协商</el-button>
933 </div> 1002 </div>
934 </div> 1003 </div>
......
...@@ -18,7 +18,8 @@ import { ...@@ -18,7 +18,8 @@ import {
18 terminateContract, 18 terminateContract,
19 getTerminateDetailInfo, 19 getTerminateDetailInfo,
20 getSignatureFile, 20 getSignatureFile,
21 getDamFieldsByProductGuid 21 getDamFieldsByProductGuid,
22 getContractPolicyTemplateListBySpaceGuid
22 } from "@/api/modules/dataSmartContract"; 23 } from "@/api/modules/dataSmartContract";
23 import { 24 import {
24 tagMethod, 25 tagMethod,
...@@ -909,6 +910,9 @@ const constraintOptionsList: any = ref([]); ...@@ -909,6 +910,9 @@ const constraintOptionsList: any = ref([]);
909 /** 策略操作行为下拉列表 */ 910 /** 策略操作行为下拉列表 */
910 const actionOptionsList: any = ref([]); 911 const actionOptionsList: any = ref([]);
911 912
913 /** 逻辑空间的策略模板信息,若是逻辑空间不存在,则值为null,若是逻辑空间中未设置模板,则值为[] */
914 const templateJson: any = ref(null);
915
912 /** 限定状态字典下拉列表 */ 916 /** 限定状态字典下拉列表 */
913 const limitedStateOptionsList: any = ref([]); 917 const limitedStateOptionsList: any = ref([]);
914 918
...@@ -1053,6 +1057,19 @@ onBeforeMount(() => { ...@@ -1053,6 +1057,19 @@ onBeforeMount(() => {
1053 res?.msg && proxy.$ElMessage.error(res?.msg) 1057 res?.msg && proxy.$ElMessage.error(res?.msg)
1054 } 1058 }
1055 }) 1059 })
1060 let logicSpaceGuid = productTableInfo.value.data?.[0]?.logicSpaceGuid;
1061 if (logicSpaceGuid) {
1062 getContractPolicyTemplateListBySpaceGuid(logicSpaceGuid).then((res: any) => {
1063 if (res?.code == proxy.$passCode) {
1064 templateJson.value = res.data || [];
1065 } else {
1066 templateJson.value = [];
1067 res?.msg && proxy.$ElMessage.error(res?.msg)
1068 }
1069 })
1070 } else {
1071 templateJson.value = null;
1072 }
1056 } else { 1073 } else {
1057 productFieldList.value = initProductFieldValue.value; 1074 productFieldList.value = initProductFieldValue.value;
1058 annonFieldsList.value = initProductFieldValue.value; 1075 annonFieldsList.value = initProductFieldValue.value;
...@@ -1300,7 +1317,7 @@ onActivated(() => { ...@@ -1300,7 +1317,7 @@ onActivated(() => {
1300 <ContentWrap v-show="detailType == 'consult' && currentStep != 1" id="policy-info-consult" title="合约策略" 1317 <ContentWrap v-show="detailType == 'consult' && currentStep != 1" id="policy-info-consult" title="合约策略"
1301 expandSwicth style="margin-top: 15px" :isExpand="expandPolicyConsult" @expand="(v) => (expandPolicyConsult = v)" 1318 expandSwicth style="margin-top: 15px" :isExpand="expandPolicyConsult" @expand="(v) => (expandPolicyConsult = v)"
1302 description=""> 1319 description="">
1303 <StrategyTable ref="strategyTableEditRef" :show-title="true" :value="consultDetailInfo?.policys" 1320 <StrategyTable ref="strategyTableEditRef" :show-title="true" :value="consultDetailInfo?.policys" :template-json="templateJson"
1304 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" :annonFieldsList="annonFieldsList" 1321 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" :annonFieldsList="annonFieldsList"
1305 :limit-state-option-list="limitedStateOptionsList" :constraintOptionsList="constraintOptionsList"></StrategyTable> 1322 :limit-state-option-list="limitedStateOptionsList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
1306 </ContentWrap> 1323 </ContentWrap>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!