29464640 by lihua

二期的策略引用

1 parent 5f0a75ec
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
30 "crypto-js": "^4.2.0", 30 "crypto-js": "^4.2.0",
31 "dayjs": "^1.11.7", 31 "dayjs": "^1.11.7",
32 "echarts": "^5.4.3", 32 "echarts": "^5.4.3",
33 "element-plus": "^2.9.0", 33 "element-plus": "^2.10.5",
34 "eruda": "^3.0.0", 34 "eruda": "^3.0.0",
35 "file-saver": "^2.0.5", 35 "file-saver": "^2.0.5",
36 "hotkeys-js": "^3.10.2", 36 "hotkeys-js": "^3.10.2",
......
...@@ -51,8 +51,8 @@ dependencies: ...@@ -51,8 +51,8 @@ dependencies:
51 specifier: ^5.4.3 51 specifier: ^5.4.3
52 version: 5.5.1 52 version: 5.5.1
53 element-plus: 53 element-plus:
54 specifier: ^2.9.0 54 specifier: ^2.10.5
55 version: 2.9.0(vue@3.5.13) 55 version: 2.10.5(vue@3.5.13)
56 eruda: 56 eruda:
57 specifier: ^3.0.0 57 specifier: ^3.0.0
58 version: 3.4.1 58 version: 3.4.1
...@@ -4066,8 +4066,8 @@ packages: ...@@ -4066,8 +4066,8 @@ packages:
4066 resolution: {integrity: sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ==} 4066 resolution: {integrity: sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ==}
4067 dev: true 4067 dev: true
4068 4068
4069 /element-plus@2.9.0(vue@3.5.13): 4069 /element-plus@2.10.5(vue@3.5.13):
4070 resolution: {integrity: sha512-ccOFXKsauo2dtokAr4OX7gZsb7TuAoVxA2zGRZo5o2yyDDBLBaZxOoFQPoxITSLcHbBfQuNDGK5Iag5hnyKkZA==} 4070 resolution: {integrity: sha512-O9wTDu3Tm51ACVByWrThtBhH4Ygefg1HGY5pyAaxnoIrj8uMN0GtZ4IREwR3Yw/6sM2HyxjrsGI/D46iUVP97A==}
4071 peerDependencies: 4071 peerDependencies:
4072 vue: ^3.2.0 4072 vue: ^3.2.0
4073 dependencies: 4073 dependencies:
......
...@@ -155,8 +155,8 @@ export const getContractDataProduct = (tenantGuid) => request({ ...@@ -155,8 +155,8 @@ export const getContractDataProduct = (tenantGuid) => request({
155 }) 155 })
156 156
157 /** 获取下拉数据产品列表的去重字段 */ 157 /** 获取下拉数据产品列表的去重字段 */
158 export const getDamFieldsByProductGuid = (productGuid, isTds = 'N') => request({ 158 export const getDamFieldsByProductGuid = (productGuid, isTds = 'N', isAnnon = 'N') => request({
159 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/field-by-dam-guid?damGuid=${productGuid}&isTds=${isTds}`, 159 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/field-by-dam-guid?damGuid=${productGuid}&isTds=${isTds}&isAnnon=${isAnnon}`,
160 method: 'get' 160 method: 'get'
161 }) 161 })
162 162
......
...@@ -314,12 +314,21 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -314,12 +314,21 @@ const hanldeTableSelectChange = (val, scope, item) => {
314 if (res?.code == proxy.$passCode) { 314 if (res?.code == proxy.$passCode) {
315 productFieldList.value = res.data || initStrategyData.value; 315 productFieldList.value = res.data || initStrategyData.value;
316 } else { 316 } else {
317 productFieldList.value = []; 317 productFieldList.value = initProductFieldValue.value;
318 res?.msg && proxy.$ElMessage.error(res?.msg)
319 }
320 })
321 getDamFieldsByProductGuid(productItem?.productGuid, isDataUse.value ? 'Y' : 'N', 'Y').then((res: any) => {
322 if (res?.code == proxy.$passCode) {
323 annonFieldsList.value = res.data || initProductFieldValue.value;
324 } else {
325 annonFieldsList.value = initProductFieldValue.value;
318 res?.msg && proxy.$ElMessage.error(res?.msg) 326 res?.msg && proxy.$ElMessage.error(res?.msg)
319 } 327 }
320 }) 328 })
321 } else { 329 } else {
322 productFieldList.value = initProductFieldValue.value; 330 productFieldList.value = initProductFieldValue.value;
331 annonFieldsList.value = initProductFieldValue.value;
323 } 332 }
324 // 连接器只能选择数据提供方的产品,不需要切换了 333 // 连接器只能选择数据提供方的产品,不需要切换了
325 // let nodeInfo = nodeInfoFormRef.value.formInline; 334 // let nodeInfo = nodeInfoFormRef.value.formInline;
...@@ -434,9 +443,15 @@ const constraintOptionsList: any = ref([]); ...@@ -434,9 +443,15 @@ const constraintOptionsList: any = ref([]);
434 /** 策略操作行为下拉列表 */ 443 /** 策略操作行为下拉列表 */
435 const actionOptionsList: any = ref([]); 444 const actionOptionsList: any = ref([]);
436 445
446 /** 限定状态字典下拉列表 */
447 const limitedStateOptionsList: any = ref([]);
448
437 /** 根据选择的数据产品显示限定字段下拉列表 */ 449 /** 根据选择的数据产品显示限定字段下拉列表 */
438 const initProductFieldValue: any = ref([]); 450 const initProductFieldValue: any = ref([]);
451 /** 策略中选择的限定字段列表 */
439 const productFieldList: any = ref([]); 452 const productFieldList: any = ref([]);
453 /** 匿名化选择的限定字段列表 */
454 const annonFieldsList: any = ref([]);
440 455
441 /** 初始化的策略值为空数组 */ 456 /** 初始化的策略值为空数组 */
442 const initStrategyData = ref([]); 457 const initStrategyData = ref([]);
...@@ -462,15 +477,28 @@ const getSubmitInfo = () => { ...@@ -462,15 +477,28 @@ const getSubmitInfo = () => {
462 let v = Object.assign({}, d, { orderNum: index + 1, }); 477 let v = Object.assign({}, d, { orderNum: index + 1, });
463 if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) { 478 if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) {
464 v.constraintValue = d.constraintFieldValue.join(','); 479 v.constraintValue = d.constraintFieldValue.join(',');
480 let fieldList = d.actionEnName == 'anonymize' ? annonFieldsList.value : productFieldList.value;
465 v.additionValue = d.constraintFieldValue?.map(dv => { 481 v.additionValue = d.constraintFieldValue?.map(dv => {
466 return { 482 return {
467 enName: dv, 483 enName: dv,
468 chName: productFieldList?.value.find(p => p.enName == dv)?.chName || dv 484 chName: fieldList.find(p => p.enName == dv)?.chName || dv
469 } 485 }
470 }) 486 })
471 } else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) { 487 } else if (d.constraintEnName == 'limitedState' && d.constraintStateValue) {
488 v.constraintValue = d.constraintStateValue;
489 v.additionValue = [{
490 value: d.constraintStateValue,
491 label: limitedStateOptionsList.value.find(p => p.value == d.constraintStateValue)?.label || d.constraintStateValue
492 }];
493 }
494 else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) {
472 v.constraintValue = d.constraintConnectorValue?.join(','); 495 v.constraintValue = d.constraintConnectorValue?.join(',');
473 v.additionValue = d.additionValue; 496 v.additionValue = d.additionValue;
497 } else if (d.constraintEnName == 'areaAddress' && d.constraintAddressValue?.length) {
498 v.constraintValue = d.constraintAddressValue?.map(dd => {
499 return dd.at(-1);
500 })?.join(',');
501 v.additionValue = d.additionValue;
474 } 502 }
475 return v; 503 return v;
476 }) || []; 504 }) || [];
...@@ -710,8 +738,17 @@ onBeforeMount(() => { ...@@ -710,8 +738,17 @@ onBeforeMount(() => {
710 res?.msg && proxy.$ElMessage.error(res?.msg) 738 res?.msg && proxy.$ElMessage.error(res?.msg)
711 } 739 }
712 }) 740 })
741 getDamFieldsByProductGuid(productGuid, isDataUse.value ? 'Y' : 'N', 'Y').then((res: any) => {
742 if (res?.code == proxy.$passCode) {
743 annonFieldsList.value = res.data || initProductFieldValue.value;
744 } else {
745 annonFieldsList.value = initProductFieldValue.value;
746 res?.msg && proxy.$ElMessage.error(res?.msg)
747 }
748 })
713 } else { 749 } else {
714 productFieldList.value = initProductFieldValue.value; 750 productFieldList.value = initProductFieldValue.value;
751 annonFieldsList.value = initProductFieldValue.value;
715 } 752 }
716 } else { 753 } else {
717 res?.msg && proxy.$ElMessage.error(res?.msg) 754 res?.msg && proxy.$ElMessage.error(res?.msg)
...@@ -785,6 +822,14 @@ onBeforeMount(() => { ...@@ -785,6 +822,14 @@ onBeforeMount(() => {
785 res?.msg && proxy.$ElMessage.error(res?.msg); 822 res?.msg && proxy.$ElMessage.error(res?.msg);
786 } 823 }
787 }) 824 })
825 getParamsList({ dictType: '限定状态' }).then((res: any) => {
826 if (res?.code == proxy.$passCode) {
827 const data = res.data || [];
828 limitedStateOptionsList.value = data;
829 } else {
830 res?.msg && proxy.$ElMessage.error(res?.msg);
831 }
832 })
788 getActionPolicyList().then((res: any) => { 833 getActionPolicyList().then((res: any) => {
789 if (res?.code == proxy.$passCode) { 834 if (res?.code == proxy.$passCode) {
790 const data = res.data || []; 835 const data = res.data || [];
...@@ -863,8 +908,8 @@ onActivated(() => { ...@@ -863,8 +908,8 @@ onActivated(() => {
863 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules" 908 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules"
864 @select-change="handleNodeSelectChange" col="col3" /> 909 @select-change="handleNodeSelectChange" col="col3" />
865 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData" 910 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData"
866 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" 911 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :limit-state-option-list="limitedStateOptionsList"
867 :productFieldList="productFieldList" :constraintOptionsList="constraintOptionsList"></StrategyTable> 912 :productFieldList="productFieldList" :annon-fields-list="annonFieldsList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
868 </ContentWrap> 913 </ContentWrap>
869 </div> 914 </div>
870 <div class="tool_btns"> 915 <div class="tool_btns">
......
...@@ -136,15 +136,27 @@ const btnHandles = ref({ ...@@ -136,15 +136,27 @@ const btnHandles = ref({
136 let v = Object.assign({}, d, { orderNum: index + 1, }); 136 let v = Object.assign({}, d, { orderNum: index + 1, });
137 if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) { 137 if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) {
138 v.constraintValue = d.constraintFieldValue.join(','); 138 v.constraintValue = d.constraintFieldValue.join(',');
139 let fieldList = d.actionEnName == 'anonymize' ? annonFieldsList.value : productFieldList.value;
139 v.additionValue = d.constraintFieldValue?.map(dv => { 140 v.additionValue = d.constraintFieldValue?.map(dv => {
140 return { 141 return {
141 enName: dv, 142 enName: dv,
142 chName: productFieldList?.value.find(p => p.enName == dv)?.chName || dv 143 chName: fieldList.find(p => p.enName == dv)?.chName || dv
143 } 144 }
144 }) 145 })
146 } else if (d.constraintEnName == 'limitedState' && d.constraintStateValue?.length) {
147 v.constraintValue = d.constraintStateValue;
148 v.additionValue = [{
149 value: d.constraintStateValue,
150 label: limitedStateOptionsList.value.find(p => p.value == d.constraintStateValue)?.label || d.constraintStateValue
151 }]
145 } else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) { 152 } else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) {
146 v.constraintValue = d.constraintConnectorValue?.join(','); 153 v.constraintValue = d.constraintConnectorValue?.join(',');
147 v.additionValue = d.additionValue; 154 v.additionValue = d.additionValue;
155 } else if (d.constraintEnName == 'areaAddress' && d.constraintAddressValue?.length) {
156 v.constraintValue = d.constraintAddressValue?.map(dd => {
157 return dd.at(-1);
158 })?.join(',');
159 v.additionValue = d.additionValue;
148 } 160 }
149 return v; 161 return v;
150 }) 162 })
...@@ -946,12 +958,15 @@ const constraintOptionsList: any = ref([]); ...@@ -946,12 +958,15 @@ const constraintOptionsList: any = ref([]);
946 /** 策略操作行为下拉列表 */ 958 /** 策略操作行为下拉列表 */
947 const actionOptionsList: any = ref([]); 959 const actionOptionsList: any = ref([]);
948 960
961 /** 限定状态字典下拉列表 */
962 const limitedStateOptionsList: any = ref([]);
963
949 /** 根据选择的数据产品显示限定字段下拉列表 */ 964 /** 根据选择的数据产品显示限定字段下拉列表 */
950 const initProductFieldValue: any = ref([]); 965 const initProductFieldValue: any = ref([]);
951 const productFieldList: any = ref([]); 966 const productFieldList: any = ref([]);
952 967
953 /** 初始化的策略值为空数组 */ 968 /** 匿名化选择的限定字段列表 */
954 const initStrategyData = ref([]); 969 const annonFieldsList: any = ref([]);
955 970
956 /** 获取第二步合约协商信息 */ 971 /** 获取第二步合约协商信息 */
957 const getStepTwoNegotiateInfo = (loading = true) => { 972 const getStepTwoNegotiateInfo = (loading = true) => {
...@@ -1079,8 +1094,17 @@ onBeforeMount(() => { ...@@ -1079,8 +1094,17 @@ onBeforeMount(() => {
1079 res?.msg && proxy.$ElMessage.error(res?.msg) 1094 res?.msg && proxy.$ElMessage.error(res?.msg)
1080 } 1095 }
1081 }) 1096 })
1097 getDamFieldsByProductGuid(productGuid, provider.executionerGuid != userData.tenantGuid ? 'Y' : 'N', 'Y').then((res: any) => {
1098 if (res?.code == proxy.$passCode) {
1099 annonFieldsList.value = res.data || initProductFieldValue.value;
1100 } else {
1101 annonFieldsList.value = initProductFieldValue.value;
1102 res?.msg && proxy.$ElMessage.error(res?.msg)
1103 }
1104 })
1082 } else { 1105 } else {
1083 productFieldList.value = initProductFieldValue.value; 1106 productFieldList.value = initProductFieldValue.value;
1107 annonFieldsList.value = initProductFieldValue.value;
1084 } 1108 }
1085 } else { 1109 } else {
1086 res?.msg && proxy.$ElMessage.error(res?.msg) 1110 res?.msg && proxy.$ElMessage.error(res?.msg)
...@@ -1097,6 +1121,14 @@ onBeforeMount(() => { ...@@ -1097,6 +1121,14 @@ onBeforeMount(() => {
1097 res?.msg && proxy.$ElMessage.error(res?.msg); 1121 res?.msg && proxy.$ElMessage.error(res?.msg);
1098 } 1122 }
1099 }) 1123 })
1124 getParamsList({ dictType: '限定状态' }).then((res: any) => {
1125 if (res?.code == proxy.$passCode) {
1126 const data = res.data || [];
1127 limitedStateOptionsList.value = data;
1128 } else {
1129 res?.msg && proxy.$ElMessage.error(res?.msg);
1130 }
1131 })
1100 getActionPolicyList().then((res: any) => { 1132 getActionPolicyList().then((res: any) => {
1101 if (res?.code == proxy.$passCode) { 1133 if (res?.code == proxy.$passCode) {
1102 const data = res.data || []; 1134 const data = res.data || [];
...@@ -1318,8 +1350,8 @@ onActivated(() => { ...@@ -1318,8 +1350,8 @@ onActivated(() => {
1318 expandSwicth style="margin-top: 15px" :isExpand="expandPolicyConsult" @expand="(v) => (expandPolicyConsult = v)" 1350 expandSwicth style="margin-top: 15px" :isExpand="expandPolicyConsult" @expand="(v) => (expandPolicyConsult = v)"
1319 description=""> 1351 description="">
1320 <StrategyTable ref="strategyTableEditRef" :show-title="true" :value="consultDetailInfo?.policys" 1352 <StrategyTable ref="strategyTableEditRef" :show-title="true" :value="consultDetailInfo?.policys"
1321 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" 1353 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" :annonFieldsList="annonFieldsList"
1322 :constraintOptionsList="constraintOptionsList"></StrategyTable> 1354 :limit-state-option-list="limitedStateOptionsList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
1323 </ContentWrap> 1355 </ContentWrap>
1324 <ContentWrap v-show="detailType == 'consult' || currentStep == 2" id="history-info-consult" title="协商记录" 1356 <ContentWrap v-show="detailType == 'consult' || currentStep == 2" id="history-info-consult" title="协商记录"
1325 expandSwicth style="margin-top: 15px" :isExpand="expandConsultHistory" 1357 expandSwicth style="margin-top: 15px" :isExpand="expandConsultHistory"
...@@ -1328,7 +1360,7 @@ onActivated(() => { ...@@ -1328,7 +1360,7 @@ onActivated(() => {
1328 <el-timeline-item v-for="(activity, index) in activities" :key="index" :timestamp="activity.timestamp" 1360 <el-timeline-item v-for="(activity, index) in activities" :key="index" :timestamp="activity.timestamp"
1329 :hollow="activity.hollow" :type="activity.type" placement="top"> 1361 :hollow="activity.hollow" :type="activity.type" placement="top">
1330 <div v-for="(child, childIndex) of activity.children" class="row-per" 1362 <div v-for="(child, childIndex) of activity.children" class="row-per"
1331 :style="{ 'margin-top': childIndex > 0 ? '8px' : '0px' }"> 1363 :style="{ 'margin-top': <number>childIndex > 0 ? '8px' : '0px' }">
1332 <div 1364 <div
1333 :class="child.negotiateEntityType == '数据提供方' ? 'label' : (child.negotiateEntityType == '数据服务方' ? 'label2' : 'label1')"> 1365 :class="child.negotiateEntityType == '数据提供方' ? 'label' : (child.negotiateEntityType == '数据服务方' ? 'label2' : 'label1')">
1334 {{ child.negotiateEntityType }} 1366 {{ child.negotiateEntityType }}
......
...@@ -241,7 +241,7 @@ const tablePageChange = (info) => { ...@@ -241,7 +241,7 @@ const tablePageChange = (info) => {
241 getTableData(); 241 getTableData();
242 }; 242 };
243 243
244 const defaultValueInfo = ref({ bizStatus: 'Y' }); 244 const defaultValueInfo = ref({ bizStatus: 'Y', constraintOperatorCodes: [], });
245 245
246 const newCreate = () => { 246 const newCreate = () => {
247 drawerInfo.value.visible = true; 247 drawerInfo.value.visible = true;
...@@ -338,7 +338,7 @@ const classEditFormItems: any = ref([{ ...@@ -338,7 +338,7 @@ const classEditFormItems: any = ref([{
338 tagsTooltip: true, 338 tagsTooltip: true,
339 placeholder: '默认全部', 339 placeholder: '默认全部',
340 field: 'constraintOperatorCodes', 340 field: 'constraintOperatorCodes',
341 default: '', 341 default: [],
342 options: operatorOptionList.value, 342 options: operatorOptionList.value,
343 filterable: true, 343 filterable: true,
344 clearable: true, 344 clearable: true,
...@@ -421,6 +421,8 @@ const drawerBtnClick = async (btn, info) => { ...@@ -421,6 +421,8 @@ const drawerBtnClick = async (btn, info) => {
421 }).map(v => { 421 }).map(v => {
422 return v.value; 422 return v.value;
423 }) 423 })
424 } else {
425 info.constraintOperatorCodes = [];
424 } 426 }
425 drawerInfo.value.footer.btns[1].loading = true; 427 drawerInfo.value.footer.btns[1].loading = true;
426 if (drawerInfo.value.type == 'edit') { 428 if (drawerInfo.value.type == 'edit') {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!