59e7815d by lihua

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

1 parent 4d5113b7
...@@ -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
...@@ -241,7 +243,7 @@ const productTableInfo = ref({ ...@@ -241,7 +243,7 @@ const productTableInfo = ref({
241 { label: "数据产品编码", field: "dataProductId", width: 261 }, 243 { label: "数据产品编码", field: "dataProductId", width: 261 },
242 { label: "产品类型", field: "dataProductTypeName", width: 100 }, 244 { label: "产品类型", field: "dataProductTypeName", width: 100 },
243 { label: "所属主体名称", field: "dataProductEntityName", width: 200 }, 245 { label: "所属主体名称", field: "dataProductEntityName", width: 200 },
244 { label: "逻辑空间", field: "logicSpaceName", width: 200 }, //TODO,字段名称 246 { label: "逻辑空间", field: "logicSpaceName", width: 200 },
245 { label: "产品简介", field: "dataProductAbstract", width: 240 }, 247 { label: "产品简介", field: "dataProductAbstract", width: 240 },
246 ], 248 ],
247 editInfo: { 249 editInfo: {
...@@ -309,8 +311,8 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -309,8 +311,8 @@ const hanldeTableSelectChange = (val, scope, item) => {
309 scope.row.dataProductGuid = productItem?.productGuid; 311 scope.row.dataProductGuid = productItem?.productGuid;
310 scope.row.dataProductType = productItem?.productType; 312 scope.row.dataProductType = productItem?.productType;
311 scope.row.dataProductTypeName = productItem?.productTypeName; 313 scope.row.dataProductTypeName = productItem?.productTypeName;
312 //TODO,逻辑空间名称
313 scope.row.logicSpaceName = productItem?.logicSpaceName; 314 scope.row.logicSpaceName = productItem?.logicSpaceName;
315 scope.row.logicSpaceGuid = productItem?.logicSpaceGuid;
314 /** 选择了产品,需要重新查询去重字段 */ 316 /** 选择了产品,需要重新查询去重字段 */
315 if (productItem?.productGuid) { 317 if (productItem?.productGuid) {
316 getDamFieldsByProductGuid(productItem?.productGuid, isDataUse.value ? 'Y' : 'N').then((res: any) => { 318 getDamFieldsByProductGuid(productItem?.productGuid, isDataUse.value ? 'Y' : 'N').then((res: any) => {
...@@ -329,17 +331,28 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -329,17 +331,28 @@ const hanldeTableSelectChange = (val, scope, item) => {
329 res?.msg && proxy.$ElMessage.error(res?.msg) 331 res?.msg && proxy.$ElMessage.error(res?.msg)
330 } 332 }
331 }) 333 })
332 // TODO,需要重新更新数据使用方的下拉列表,如果逻辑空间是空值,则可以选择所有企业,否则只能选择逻辑空间下的成员企业。 334 // 需要重新更新数据使用方的下拉列表,如果逻辑空间是空值,则可以选择所有企业,否则只能选择逻辑空间下的成员企业。
333 if (productItem?.logicSpaceName) { 335 if (productItem?.logicSpaceGuid) {
334 // 建议使用方下拉列表企业包含所在的逻辑空间。一个企业可能有多个逻辑空间。或者根据逻辑空间获取成员列表。 336 // 建议使用方下拉列表企业包含所在的逻辑空间。一个企业可能有多个逻辑空间。或者根据逻辑空间获取成员列表。
335 // tenantList.value.filter();
336 // 调用逻辑空间接口,因为策略模板也需要使用。 337 // 调用逻辑空间接口,因为策略模板也需要使用。
337 //templateJson.value = res.data; 338 getContractMemberTenantList(productItem?.logicSpaceGuid);
339 getContractPolicyTemplateListBySpaceGuid(productItem?.logicSpaceGuid).then((res: any) => {
340 if (res?.code == proxy.$passCode) {
341 templateJson.value = res.data || [];
342 } else {
343 templateJson.value = [];
344 res?.msg && proxy.$ElMessage.error(res?.msg)
345 }
346 })
347 } else {
348 getContractMemberTenantList(null);
349 templateJson.value = null;
338 } 350 }
339 } else { 351 } else {
340 productFieldList.value = initProductFieldValue.value; 352 productFieldList.value = initProductFieldValue.value;
341 annonFieldsList.value = initProductFieldValue.value; 353 annonFieldsList.value = initProductFieldValue.value;
342 // TODO,需要更新数据使用方下拉列表 354 getContractMemberTenantList(null);
355 templateJson.value = null;
343 } 356 }
344 // 连接器只能选择数据提供方的产品,不需要切换了 357 // 连接器只能选择数据提供方的产品,不需要切换了
345 // let nodeInfo = nodeInfoFormRef.value.formInline; 358 // let nodeInfo = nodeInfoFormRef.value.formInline;
...@@ -358,6 +371,9 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -358,6 +371,9 @@ const hanldeTableSelectChange = (val, scope, item) => {
358 /** 策略执行者下拉列表 */ 371 /** 策略执行者下拉列表 */
359 const tenantList: any = ref([]); 372 const tenantList: any = ref([]);
360 373
374 /** 数据产品提供方下拉列表 */
375 const providerTenantList: any = ref([]);
376
361 const nodeInfoFormRef = ref(); 377 const nodeInfoFormRef = ref();
362 378
363 // 策略执行者类型列表 379 // 策略执行者类型列表
...@@ -377,7 +393,7 @@ const nodeInfoFormItems = ref([{ ...@@ -377,7 +393,7 @@ const nodeInfoFormItems = ref([{
377 placeholder: '请选择', 393 placeholder: '请选择',
378 field: 'dataProviderGuid', 394 field: 'dataProviderGuid',
379 default: '', 395 default: '',
380 options: tenantList.value, //先禁用,选择产品后自动带出 396 options: providerTenantList.value, //先禁用,选择产品后自动带出
381 props: { 397 props: {
382 value: 'guid', 398 value: 'guid',
383 label: 'tenantName' 399 label: 'tenantName'
...@@ -433,6 +449,16 @@ const nodeInfoFormRules = ref({ ...@@ -433,6 +449,16 @@ const nodeInfoFormRules = ref({
433 dataUserGuid: [required('请选择数据使用方策略执行者名称')], 449 dataUserGuid: [required('请选择数据使用方策略执行者名称')],
434 }); 450 });
435 451
452 /** 下拉选择框聚焦事件 */
453 const handleNodeSelectFocus = (item) => {
454 if (item.field == 'dataUserGuid') {
455 if (!productData.value?.[0]?.dataProductId) {
456 proxy.$ElMessage.error('请先选择数据产品');
457 return;
458 }
459 }
460 }
461
436 const handleNodeSelectChange = (val, row, info) => { 462 const handleNodeSelectChange = (val, row, info) => {
437 if (row.field == 'dataUserGuid') { 463 if (row.field == 'dataUserGuid') {
438 let tenantItem = tenantList.value.find(t => t.guid == val); 464 let tenantItem = tenantList.value.find(t => t.guid == val);
...@@ -445,6 +471,9 @@ const handleNodeSelectChange = (val, row, info) => { ...@@ -445,6 +471,9 @@ const handleNodeSelectChange = (val, row, info) => {
445 471
446 const strategyTableRef = ref(); 472 const strategyTableRef = ref();
447 473
474 /** 逻辑空间的策略模板信息,若是逻辑空间不存在,则值为null,若是逻辑空间中未设置模板,则值为[] */
475 const templateJson: any = ref(null);
476
448 /** 约束运算符字典下拉 */ 477 /** 约束运算符字典下拉 */
449 const operatorOptionList: any = ref([]); 478 const operatorOptionList: any = ref([]);
450 479
...@@ -477,7 +506,7 @@ const getSubmitInfo = () => { ...@@ -477,7 +506,7 @@ const getSubmitInfo = () => {
477 executionerTypeCode: executorTypeList.value[0]?.value, 506 executionerTypeCode: executorTypeList.value[0]?.value,
478 executionerGuid: nodeInfo.dataProviderGuid, 507 executionerGuid: nodeInfo.dataProviderGuid,
479 executionerId: nodeInfo.dataProviderId, 508 executionerId: nodeInfo.dataProviderId,
480 executionerName: tenantList.value.find(t => t.guid == nodeInfo.dataProviderGuid)?.tenantName 509 executionerName: providerTenantList.value.find(t => t.guid == nodeInfo.dataProviderGuid)?.tenantName
481 }, { 510 }, {
482 executionerTypeCode: executorTypeList.value[1]?.value, 511 executionerTypeCode: executorTypeList.value[1]?.value,
483 executionerGuid: nodeInfo.dataUserGuid, 512 executionerGuid: nodeInfo.dataUserGuid,
...@@ -502,7 +531,7 @@ const getSubmitInfo = () => { ...@@ -502,7 +531,7 @@ const getSubmitInfo = () => {
502 label: limitedStateOptionsList.value.find(p => p.value == d.constraintStateValue)?.label || d.constraintStateValue 531 label: limitedStateOptionsList.value.find(p => p.value == d.constraintStateValue)?.label || d.constraintStateValue
503 }]; 532 }];
504 } 533 }
505 else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) { 534 else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) {
506 v.constraintValue = d.constraintConnectorValue?.join(','); 535 v.constraintValue = d.constraintConnectorValue?.join(',');
507 v.additionValue = d.additionValue; 536 v.additionValue = d.additionValue;
508 } else if (d.constraintEnName == 'areaAddress' && d.constraintAddressValue?.length) { 537 } else if (d.constraintEnName == 'areaAddress' && d.constraintAddressValue?.length) {
...@@ -693,7 +722,29 @@ const cancel = () => { ...@@ -693,7 +722,29 @@ const cancel = () => {
693 722
694 const detailInfo: any = ref({}); 723 const detailInfo: any = ref({});
695 724
696 const psLogon = ref(); 725 const getContractMemberTenantList = (spaceGuid) => {
726 if (!spaceGuid) {
727 tenantList.value = providerTenantList.value;
728 nodeInfoFormItems.value[4].options = tenantList.value;
729 return;
730 }
731 getContractTenantListBySpaceGuid(spaceGuid).then((res: any) => {
732 if (res.code == proxy.$passCode) {
733 tenantList.value = res.data || [];
734 nodeInfoFormItems.value[4].options = tenantList.value;
735 let dataUserGuid = nodeInfoFormRef.value.formInline.dataUserGuid;
736 if (dataUserGuid && !tenantList.value.some(item => item.guid == dataUserGuid)) {
737 nodeInfoFormItems.value[4].default = '';
738 nodeInfoFormItems.value[5].default = '';
739 }
740 } else {
741 tenantList.value = [];
742 nodeInfoFormItems.value[4].default = '';
743 nodeInfoFormItems.value[5].default = '';
744 res?.msg && proxy.$ElMessage.error(res.msg);
745 }
746 })
747 }
697 748
698 onBeforeMount(() => { 749 onBeforeMount(() => {
699 let exec = () => { 750 let exec = () => {
...@@ -716,7 +767,7 @@ onBeforeMount(() => { ...@@ -716,7 +767,7 @@ onBeforeMount(() => {
716 detailInfo.value = res.data || {}; 767 detailInfo.value = res.data || {};
717 baseInfoFormItems.value.forEach(item => { 768 baseInfoFormItems.value.forEach(item => {
718 item.default = detailInfo.value[item.field]; 769 item.default = detailInfo.value[item.field];
719 if (item.default && route.query.type == 'copy' && item.field == 'contractName') { 770 if (item.default && route.query.type == 'copy' && item.field == 'contractName') {
720 item.default = item.default + '_copy'; 771 item.default = item.default + '_copy';
721 } 772 }
722 }); 773 });
...@@ -760,6 +811,23 @@ onBeforeMount(() => { ...@@ -760,6 +811,23 @@ onBeforeMount(() => {
760 res?.msg && proxy.$ElMessage.error(res?.msg) 811 res?.msg && proxy.$ElMessage.error(res?.msg)
761 } 812 }
762 }) 813 })
814 let logicSpaceGuid = productData.value?.[0]?.logicSpaceGuid;
815 if (logicSpaceGuid) {
816 // 建议使用方下拉列表企业包含所在的逻辑空间。一个企业可能有多个逻辑空间。或者根据逻辑空间获取成员列表。
817 // 调用逻辑空间接口,因为策略模板也需要使用。
818 getContractMemberTenantList(logicSpaceGuid);
819 getContractPolicyTemplateListBySpaceGuid(logicSpaceGuid).then((res: any) => {
820 if (res?.code == proxy.$passCode) {
821 templateJson.value = res.data || [];
822 } else {
823 templateJson.value = [];
824 res?.msg && proxy.$ElMessage.error(res?.msg)
825 }
826 })
827 } else {
828 getContractMemberTenantList(null);
829 templateJson.value = null;
830 }
763 } else { 831 } else {
764 productFieldList.value = initProductFieldValue.value; 832 productFieldList.value = initProductFieldValue.value;
765 annonFieldsList.value = initProductFieldValue.value; 833 annonFieldsList.value = initProductFieldValue.value;
...@@ -773,8 +841,8 @@ onBeforeMount(() => { ...@@ -773,8 +841,8 @@ onBeforeMount(() => {
773 // 默认点对点,数据使用方可以选择 841 // 默认点对点,数据使用方可以选择
774 // nodeInfoFormItems.value[1].disabled = true; 842 // nodeInfoFormItems.value[1].disabled = true;
775 nodeInfoFormItems.value[1].default = userData.tenantGuid; 843 nodeInfoFormItems.value[1].default = userData.tenantGuid;
776 if (tenantList.value.length) { 844 if (providerTenantList.value.length) {
777 let item = tenantList.value.find(t => t.guid == userData.tenantGuid); 845 let item = providerTenantList.value.find(t => t.guid == userData.tenantGuid);
778 nodeInfoFormItems.value[2].default = item?.socialCreditCode; 846 nodeInfoFormItems.value[2].default = item?.socialCreditCode;
779 } 847 }
780 } else { 848 } else {
...@@ -872,11 +940,10 @@ onBeforeMount(() => { ...@@ -872,11 +940,10 @@ onBeforeMount(() => {
872 }) 940 })
873 getContractTenantList().then((res: any) => { 941 getContractTenantList().then((res: any) => {
874 if (res.code == proxy.$passCode) { 942 if (res.code == proxy.$passCode) {
875 tenantList.value = res.data || []; 943 providerTenantList.value = res.data || [];
876 nodeInfoFormItems.value[1].options = tenantList.value; 944 nodeInfoFormItems.value[1].options = providerTenantList.value;
877 nodeInfoFormItems.value[4].options = tenantList.value;
878 if (nodeInfoFormItems.value[1].default) { 945 if (nodeInfoFormItems.value[1].default) {
879 let item = tenantList.value.find(t => t.guid == nodeInfoFormItems.value[1].default); 946 let item = providerTenantList.value.find(t => t.guid == nodeInfoFormItems.value[1].default);
880 nodeInfoFormItems.value[2].default = item?.socialCreditCode; 947 nodeInfoFormItems.value[2].default = item?.socialCreditCode;
881 } 948 }
882 } else { 949 } else {
...@@ -889,8 +956,8 @@ onActivated(() => { ...@@ -889,8 +956,8 @@ onActivated(() => {
889 if (route.query.guid) { 956 if (route.query.guid) {
890 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath); 957 let tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === fullPath);
891 if (tab) { 958 if (tab) {
892 document.title = route.query.type == 'copy' ? `复制合约-${route.query.name}` : `编辑合约-${route.query.name}`; 959 document.title = route.query.type == 'copy' ? `复制合约-${route.query.name}` : `编辑合约-${route.query.name}`;
893 tab.meta.title = route.query.type == 'copy' ? `复制合约-${route.query.name}` : `编辑合约-${route.query.name}`; 960 tab.meta.title = route.query.type == 'copy' ? `复制合约-${route.query.name}` : `编辑合约-${route.query.name}`;
894 } 961 }
895 } 962 }
896 }) 963 })
...@@ -920,16 +987,18 @@ onActivated(() => { ...@@ -920,16 +987,18 @@ onActivated(() => {
920 @expand="(v) => (expandPolicy = v)" description=""> 987 @expand="(v) => (expandPolicy = v)" description="">
921 <div class="h-title">策略执行节点</div> 988 <div class="h-title">策略执行节点</div>
922 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules" 989 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules"
923 @select-change="handleNodeSelectChange" col="col3" /> 990 @select-change="handleNodeSelectChange" @select-focus="handleNodeSelectFocus" col="col3" />
924 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData" 991 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData"
925 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :limit-state-option-list="limitedStateOptionsList" 992 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :templateJson="templateJson"
926 :productFieldList="productFieldList" :annon-fields-list="annonFieldsList" :constraintOptionsList="constraintOptionsList"></StrategyTable> 993 :limit-state-option-list="limitedStateOptionsList" :productFieldList="productFieldList"
994 :annon-fields-list="annonFieldsList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
927 </ContentWrap> 995 </ContentWrap>
928 </div> 996 </div>
929 <div class="tool_btns"> 997 <div class="tool_btns">
930 <div class="btns"> 998 <div class="btns">
931 <el-button @click="cancel">取消</el-button> 999 <el-button @click="cancel">取消</el-button>
932 <el-button @click="saveDraft" v-show="route.query.type == 'copy' || (detailInfo?.contractStatus != '00')">保存</el-button> 1000 <el-button @click="saveDraft"
1001 v-show="route.query.type == 'copy' || (detailInfo?.contractStatus != '00')">保存</el-button>
933 <el-button type="primary" @click="submit">合约协商</el-button> 1002 <el-button type="primary" @click="submit">合约协商</el-button>
934 </div> 1003 </div>
935 </div> 1004 </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,
...@@ -973,6 +974,9 @@ const constraintOptionsList: any = ref([]); ...@@ -973,6 +974,9 @@ const constraintOptionsList: any = ref([]);
973 /** 策略操作行为下拉列表 */ 974 /** 策略操作行为下拉列表 */
974 const actionOptionsList: any = ref([]); 975 const actionOptionsList: any = ref([]);
975 976
977 /** 逻辑空间的策略模板信息,若是逻辑空间不存在,则值为null,若是逻辑空间中未设置模板,则值为[] */
978 const templateJson: any = ref(null);
979
976 /** 限定状态字典下拉列表 */ 980 /** 限定状态字典下拉列表 */
977 const limitedStateOptionsList: any = ref([]); 981 const limitedStateOptionsList: any = ref([]);
978 982
...@@ -1117,6 +1121,19 @@ onBeforeMount(() => { ...@@ -1117,6 +1121,19 @@ onBeforeMount(() => {
1117 res?.msg && proxy.$ElMessage.error(res?.msg) 1121 res?.msg && proxy.$ElMessage.error(res?.msg)
1118 } 1122 }
1119 }) 1123 })
1124 let logicSpaceGuid = productTableInfo.value.data?.[0]?.logicSpaceGuid;
1125 if (logicSpaceGuid) {
1126 getContractPolicyTemplateListBySpaceGuid(logicSpaceGuid).then((res: any) => {
1127 if (res?.code == proxy.$passCode) {
1128 templateJson.value = res.data || [];
1129 } else {
1130 templateJson.value = [];
1131 res?.msg && proxy.$ElMessage.error(res?.msg)
1132 }
1133 })
1134 } else {
1135 templateJson.value = null;
1136 }
1120 } else { 1137 } else {
1121 productFieldList.value = initProductFieldValue.value; 1138 productFieldList.value = initProductFieldValue.value;
1122 annonFieldsList.value = initProductFieldValue.value; 1139 annonFieldsList.value = initProductFieldValue.value;
...@@ -1364,7 +1381,7 @@ onActivated(() => { ...@@ -1364,7 +1381,7 @@ onActivated(() => {
1364 <ContentWrap v-show="detailType == 'consult' && currentStep != 1" id="policy-info-consult" title="合约策略" 1381 <ContentWrap v-show="detailType == 'consult' && currentStep != 1" id="policy-info-consult" title="合约策略"
1365 expandSwicth style="margin-top: 15px" :isExpand="expandPolicyConsult" @expand="(v) => (expandPolicyConsult = v)" 1382 expandSwicth style="margin-top: 15px" :isExpand="expandPolicyConsult" @expand="(v) => (expandPolicyConsult = v)"
1366 description=""> 1383 description="">
1367 <StrategyTable ref="strategyTableEditRef" :show-title="true" :value="consultDetailInfo?.policys" 1384 <StrategyTable ref="strategyTableEditRef" :show-title="true" :value="consultDetailInfo?.policys" :template-json="templateJson"
1368 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" :annonFieldsList="annonFieldsList" 1385 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" :annonFieldsList="annonFieldsList"
1369 :limit-state-option-list="limitedStateOptionsList" :constraintOptionsList="constraintOptionsList"></StrategyTable> 1386 :limit-state-option-list="limitedStateOptionsList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
1370 </ContentWrap> 1387 </ContentWrap>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!