合约添加逻辑空间接口联调
Showing
5 changed files
with
136 additions
and
25 deletions
| ... | @@ -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).then((res: any) => { | 318 | getDamFieldsByProductGuid(productItem?.productGuid).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 | if (baseInfoFormRef.value?.formInline?.signModeCode == '02') { | 357 | if (baseInfoFormRef.value?.formInline?.signModeCode == '02') { |
| 345 | let nodeInfo = nodeInfoFormRef.value.formInline; | 358 | let nodeInfo = nodeInfoFormRef.value.formInline; |
| ... | @@ -361,6 +374,9 @@ const hanldeTableSelectChange = (val, scope, item) => { | ... | @@ -361,6 +374,9 @@ const hanldeTableSelectChange = (val, scope, item) => { |
| 361 | /** 策略执行者下拉列表 */ | 374 | /** 策略执行者下拉列表 */ |
| 362 | const tenantList: any = ref([]); | 375 | const tenantList: any = ref([]); |
| 363 | 376 | ||
| 377 | /** 数据产品提供方下拉列表 */ | ||
| 378 | const providerTenantList: any = ref([]); | ||
| 379 | |||
| 364 | const nodeInfoFormRef = ref(); | 380 | const nodeInfoFormRef = ref(); |
| 365 | 381 | ||
| 366 | // 策略执行者类型列表 | 382 | // 策略执行者类型列表 |
| ... | @@ -380,7 +396,7 @@ const nodeInfoFormItems = ref([{ | ... | @@ -380,7 +396,7 @@ const nodeInfoFormItems = ref([{ |
| 380 | placeholder: '请选择', | 396 | placeholder: '请选择', |
| 381 | field: 'dataProviderGuid', | 397 | field: 'dataProviderGuid', |
| 382 | default: '', | 398 | default: '', |
| 383 | options: tenantList.value, //先禁用,选择产品后自动带出 | 399 | options: providerTenantList.value, //先禁用,选择产品后自动带出 |
| 384 | props: { | 400 | props: { |
| 385 | value: 'guid', | 401 | value: 'guid', |
| 386 | label: 'tenantName' | 402 | label: 'tenantName' |
| ... | @@ -436,6 +452,16 @@ const nodeInfoFormRules = ref({ | ... | @@ -436,6 +452,16 @@ const nodeInfoFormRules = ref({ |
| 436 | dataUserGuid: [required('请选择数据使用方策略执行者名称')], | 452 | dataUserGuid: [required('请选择数据使用方策略执行者名称')], |
| 437 | }); | 453 | }); |
| 438 | 454 | ||
| 455 | /** 下拉选择框聚焦事件 */ | ||
| 456 | const handleNodeSelectFocus = (item) => { | ||
| 457 | if (item.field == 'dataUserGuid') { | ||
| 458 | if (!productData.value?.[0]?.dataProductId) { | ||
| 459 | proxy.$ElMessage.error('请先选择数据产品'); | ||
| 460 | return; | ||
| 461 | } | ||
| 462 | } | ||
| 463 | } | ||
| 464 | |||
| 439 | const handleNodeSelectChange = (val, row, info) => { | 465 | const handleNodeSelectChange = (val, row, info) => { |
| 440 | if (row.field == 'dataUserGuid') { | 466 | if (row.field == 'dataUserGuid') { |
| 441 | let tenantItem = tenantList.value.find(t => t.guid == val); | 467 | let tenantItem = tenantList.value.find(t => t.guid == val); |
| ... | @@ -448,6 +474,9 @@ const handleNodeSelectChange = (val, row, info) => { | ... | @@ -448,6 +474,9 @@ const handleNodeSelectChange = (val, row, info) => { |
| 448 | 474 | ||
| 449 | const strategyTableRef = ref(); | 475 | const strategyTableRef = ref(); |
| 450 | 476 | ||
| 477 | /** 逻辑空间的策略模板信息,若是逻辑空间不存在,则值为null,若是逻辑空间中未设置模板,则值为[] */ | ||
| 478 | const templateJson: any = ref(null); | ||
| 479 | |||
| 451 | /** 约束运算符字典下拉 */ | 480 | /** 约束运算符字典下拉 */ |
| 452 | const operatorOptionList: any = ref([]); | 481 | const operatorOptionList: any = ref([]); |
| 453 | 482 | ||
| ... | @@ -480,7 +509,7 @@ const getSubmitInfo = () => { | ... | @@ -480,7 +509,7 @@ const getSubmitInfo = () => { |
| 480 | executionerTypeCode: executorTypeList.value[0]?.value, | 509 | executionerTypeCode: executorTypeList.value[0]?.value, |
| 481 | executionerGuid: nodeInfo.dataProviderGuid, | 510 | executionerGuid: nodeInfo.dataProviderGuid, |
| 482 | executionerId: nodeInfo.dataProviderId, | 511 | executionerId: nodeInfo.dataProviderId, |
| 483 | executionerName: tenantList.value.find(t => t.guid == nodeInfo.dataProviderGuid)?.tenantName | 512 | executionerName: providerTenantList.value.find(t => t.guid == nodeInfo.dataProviderGuid)?.tenantName |
| 484 | }, { | 513 | }, { |
| 485 | executionerTypeCode: executorTypeList.value[1]?.value, | 514 | executionerTypeCode: executorTypeList.value[1]?.value, |
| 486 | executionerGuid: nodeInfo.dataUserGuid, | 515 | executionerGuid: nodeInfo.dataUserGuid, |
| ... | @@ -696,7 +725,29 @@ const cancel = () => { | ... | @@ -696,7 +725,29 @@ const cancel = () => { |
| 696 | 725 | ||
| 697 | const detailInfo: any = ref({}); | 726 | const detailInfo: any = ref({}); |
| 698 | 727 | ||
| 699 | const psLogon = ref(); | 728 | const getContractMemberTenantList = (spaceGuid) => { |
| 729 | if (!spaceGuid) { | ||
| 730 | tenantList.value = providerTenantList.value; | ||
| 731 | nodeInfoFormItems.value[4].options = tenantList.value; | ||
| 732 | return; | ||
| 733 | } | ||
| 734 | getContractTenantListBySpaceGuid(spaceGuid).then((res: any) => { | ||
| 735 | if (res.code == proxy.$passCode) { | ||
| 736 | tenantList.value = res.data || []; | ||
| 737 | nodeInfoFormItems.value[4].options = tenantList.value; | ||
| 738 | let dataUserGuid = nodeInfoFormRef.value.formInline.dataUserGuid; | ||
| 739 | if (dataUserGuid && !tenantList.value.some(item => item.guid == dataUserGuid)) { | ||
| 740 | nodeInfoFormItems.value[4].default = ''; | ||
| 741 | nodeInfoFormItems.value[5].default = ''; | ||
| 742 | } | ||
| 743 | } else { | ||
| 744 | tenantList.value = []; | ||
| 745 | nodeInfoFormItems.value[4].default = ''; | ||
| 746 | nodeInfoFormItems.value[5].default = ''; | ||
| 747 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 748 | } | ||
| 749 | }) | ||
| 750 | } | ||
| 700 | 751 | ||
| 701 | onBeforeMount(() => { | 752 | onBeforeMount(() => { |
| 702 | let exec = () => { | 753 | let exec = () => { |
| ... | @@ -765,6 +816,23 @@ onBeforeMount(() => { | ... | @@ -765,6 +816,23 @@ onBeforeMount(() => { |
| 765 | res?.msg && proxy.$ElMessage.error(res?.msg) | 816 | res?.msg && proxy.$ElMessage.error(res?.msg) |
| 766 | } | 817 | } |
| 767 | }) | 818 | }) |
| 819 | let logicSpaceGuid = productData.value?.[0]?.logicSpaceGuid; | ||
| 820 | if (logicSpaceGuid) { | ||
| 821 | // 建议使用方下拉列表企业包含所在的逻辑空间。一个企业可能有多个逻辑空间。或者根据逻辑空间获取成员列表。 | ||
| 822 | // 调用逻辑空间接口,因为策略模板也需要使用。 | ||
| 823 | getContractMemberTenantList(logicSpaceGuid); | ||
| 824 | getContractPolicyTemplateListBySpaceGuid(logicSpaceGuid).then((res: any) => { | ||
| 825 | if (res?.code == proxy.$passCode) { | ||
| 826 | templateJson.value = res.data || []; | ||
| 827 | } else { | ||
| 828 | templateJson.value = []; | ||
| 829 | res?.msg && proxy.$ElMessage.error(res?.msg) | ||
| 830 | } | ||
| 831 | }) | ||
| 832 | } else { | ||
| 833 | getContractMemberTenantList(null); | ||
| 834 | templateJson.value = null; | ||
| 835 | } | ||
| 768 | } else { | 836 | } else { |
| 769 | productFieldList.value = initProductFieldValue.value; | 837 | productFieldList.value = initProductFieldValue.value; |
| 770 | annonFieldsList.value = initProductFieldValue.value; | 838 | annonFieldsList.value = initProductFieldValue.value; |
| ... | @@ -778,8 +846,8 @@ onBeforeMount(() => { | ... | @@ -778,8 +846,8 @@ onBeforeMount(() => { |
| 778 | // 默认点对点,数据使用方可以选择 | 846 | // 默认点对点,数据使用方可以选择 |
| 779 | // nodeInfoFormItems.value[1].disabled = true; | 847 | // nodeInfoFormItems.value[1].disabled = true; |
| 780 | nodeInfoFormItems.value[1].default = userData.tenantGuid; | 848 | nodeInfoFormItems.value[1].default = userData.tenantGuid; |
| 781 | if (tenantList.value.length) { | 849 | if (providerTenantList.value.length) { |
| 782 | let item = tenantList.value.find(t => t.guid == userData.tenantGuid); | 850 | let item = providerTenantList.value.find(t => t.guid == userData.tenantGuid); |
| 783 | nodeInfoFormItems.value[2].default = item?.socialCreditCode; | 851 | nodeInfoFormItems.value[2].default = item?.socialCreditCode; |
| 784 | } | 852 | } |
| 785 | } else { | 853 | } else { |
| ... | @@ -881,11 +949,10 @@ onBeforeMount(() => { | ... | @@ -881,11 +949,10 @@ onBeforeMount(() => { |
| 881 | }) | 949 | }) |
| 882 | getContractTenantList().then((res: any) => { | 950 | getContractTenantList().then((res: any) => { |
| 883 | if (res.code == proxy.$passCode) { | 951 | if (res.code == proxy.$passCode) { |
| 884 | tenantList.value = res.data || []; | 952 | providerTenantList.value = res.data || []; |
| 885 | nodeInfoFormItems.value[1].options = tenantList.value; | 953 | nodeInfoFormItems.value[1].options = providerTenantList.value; |
| 886 | nodeInfoFormItems.value[4].options = tenantList.value; | ||
| 887 | if (nodeInfoFormItems.value[1].default) { | 954 | if (nodeInfoFormItems.value[1].default) { |
| 888 | let item = tenantList.value.find(t => t.guid == nodeInfoFormItems.value[1].default); | 955 | let item = providerTenantList.value.find(t => t.guid == nodeInfoFormItems.value[1].default); |
| 889 | nodeInfoFormItems.value[2].default = item?.socialCreditCode; | 956 | nodeInfoFormItems.value[2].default = item?.socialCreditCode; |
| 890 | } | 957 | } |
| 891 | } else { | 958 | } else { |
| ... | @@ -929,16 +996,18 @@ onActivated(() => { | ... | @@ -929,16 +996,18 @@ onActivated(() => { |
| 929 | @expand="(v) => (expandPolicy = v)" description=""> | 996 | @expand="(v) => (expandPolicy = v)" description=""> |
| 930 | <div class="h-title">策略执行节点</div> | 997 | <div class="h-title">策略执行节点</div> |
| 931 | <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules" | 998 | <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules" |
| 932 | @select-change="handleNodeSelectChange" col="col3" /> | 999 | @select-change="handleNodeSelectChange" @select-focus="handleNodeSelectFocus" col="col3" /> |
| 933 | <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData" | 1000 | <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData" |
| 934 | :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :limit-state-option-list="limitedStateOptionsList" | 1001 | :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :templateJson="templateJson" |
| 935 | :productFieldList="productFieldList" :annon-fields-list="annonFieldsList" :constraintOptionsList="constraintOptionsList"></StrategyTable> | 1002 | :limit-state-option-list="limitedStateOptionsList" :productFieldList="productFieldList" |
| 1003 | :annon-fields-list="annonFieldsList" :constraintOptionsList="constraintOptionsList"></StrategyTable> | ||
| 936 | </ContentWrap> | 1004 | </ContentWrap> |
| 937 | </div> | 1005 | </div> |
| 938 | <div class="tool_btns"> | 1006 | <div class="tool_btns"> |
| 939 | <div class="btns"> | 1007 | <div class="btns"> |
| 940 | <el-button @click="cancel">取消</el-button> | 1008 | <el-button @click="cancel">取消</el-button> |
| 941 | <el-button @click="saveDraft" v-show="route.query.type == 'copy' || (detailInfo?.contractStatus != '00')">保存</el-button> | 1009 | <el-button @click="saveDraft" |
| 1010 | v-show="route.query.type == 'copy' || (detailInfo?.contractStatus != '00')">保存</el-button> | ||
| 942 | <el-button type="primary" @click="submit">合约协商</el-button> | 1011 | <el-button type="primary" @click="submit">合约协商</el-button> |
| 943 | </div> | 1012 | </div> |
| 944 | </div> | 1013 | </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, |
| ... | @@ -969,6 +970,9 @@ const constraintOptionsList: any = ref([]); | ... | @@ -969,6 +970,9 @@ const constraintOptionsList: any = ref([]); |
| 969 | /** 策略操作行为下拉列表 */ | 970 | /** 策略操作行为下拉列表 */ |
| 970 | const actionOptionsList: any = ref([]); | 971 | const actionOptionsList: any = ref([]); |
| 971 | 972 | ||
| 973 | /** 逻辑空间的策略模板信息,若是逻辑空间不存在,则值为null,若是逻辑空间中未设置模板,则值为[] */ | ||
| 974 | const templateJson: any = ref(null); | ||
| 975 | |||
| 972 | /** 限定状态字典下拉列表 */ | 976 | /** 限定状态字典下拉列表 */ |
| 973 | const limitedStateOptionsList: any = ref([]); | 977 | const limitedStateOptionsList: any = ref([]); |
| 974 | 978 | ||
| ... | @@ -1112,6 +1116,19 @@ onBeforeMount(() => { | ... | @@ -1112,6 +1116,19 @@ onBeforeMount(() => { |
| 1112 | res?.msg && proxy.$ElMessage.error(res?.msg) | 1116 | res?.msg && proxy.$ElMessage.error(res?.msg) |
| 1113 | } | 1117 | } |
| 1114 | }) | 1118 | }) |
| 1119 | let logicSpaceGuid = productTableInfo.value.data?.[0]?.logicSpaceGuid; | ||
| 1120 | if (logicSpaceGuid) { | ||
| 1121 | getContractPolicyTemplateListBySpaceGuid(logicSpaceGuid).then((res: any) => { | ||
| 1122 | if (res?.code == proxy.$passCode) { | ||
| 1123 | templateJson.value = res.data || []; | ||
| 1124 | } else { | ||
| 1125 | templateJson.value = []; | ||
| 1126 | res?.msg && proxy.$ElMessage.error(res?.msg) | ||
| 1127 | } | ||
| 1128 | }) | ||
| 1129 | } else { | ||
| 1130 | templateJson.value = null; | ||
| 1131 | } | ||
| 1115 | } else { | 1132 | } else { |
| 1116 | productFieldList.value = initProductFieldValue.value; | 1133 | productFieldList.value = initProductFieldValue.value; |
| 1117 | annonFieldsList.value = initProductFieldValue.value; | 1134 | annonFieldsList.value = initProductFieldValue.value; |
| ... | @@ -1359,7 +1376,7 @@ onActivated(() => { | ... | @@ -1359,7 +1376,7 @@ onActivated(() => { |
| 1359 | <ContentWrap v-show="detailType == 'consult' && currentStep != 1" id="policy-info-consult" title="合约策略" | 1376 | <ContentWrap v-show="detailType == 'consult' && currentStep != 1" id="policy-info-consult" title="合约策略" |
| 1360 | expandSwicth style="margin-top: 15px" :isExpand="expandPolicyConsult" @expand="(v) => (expandPolicyConsult = v)" | 1377 | expandSwicth style="margin-top: 15px" :isExpand="expandPolicyConsult" @expand="(v) => (expandPolicyConsult = v)" |
| 1361 | description=""> | 1378 | description=""> |
| 1362 | <StrategyTable ref="strategyTableEditRef" :show-title="true" :value="consultDetailInfo?.policys" | 1379 | <StrategyTable ref="strategyTableEditRef" :show-title="true" :value="consultDetailInfo?.policys" :template-json="templateJson" |
| 1363 | :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" :annonFieldsList="annonFieldsList" | 1380 | :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" :annonFieldsList="annonFieldsList" |
| 1364 | :limit-state-option-list="limitedStateOptionsList" :constraintOptionsList="constraintOptionsList"></StrategyTable> | 1381 | :limit-state-option-list="limitedStateOptionsList" :constraintOptionsList="constraintOptionsList"></StrategyTable> |
| 1365 | </ContentWrap> | 1382 | </ContentWrap> | ... | ... |
-
Please register or sign in to post a comment