78819132 by lihua

解决数据字段策略传参问题

1 parent f0dcc9c3
...@@ -460,7 +460,7 @@ const getSubmitInfo = () => { ...@@ -460,7 +460,7 @@ const getSubmitInfo = () => {
460 }]; 460 }];
461 params.policys = strategyTableRef.value.strategyData?.map((d, index) => { 461 params.policys = strategyTableRef.value.strategyData?.map((d, index) => {
462 let v = Object.assign({}, d, { orderNum: index + 1, }); 462 let v = Object.assign({}, d, { orderNum: index + 1, });
463 if (d.constraintName == 'dataField' && d.constraintFieldValue?.length) { 463 if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) {
464 v.constraintValue = d.constraintFieldValue.join(','); 464 v.constraintValue = d.constraintFieldValue.join(',');
465 v.additionValue = d.constraintFieldValue?.map(dv => { 465 v.additionValue = d.constraintFieldValue?.map(dv => {
466 return { 466 return {
......
...@@ -40,6 +40,7 @@ import showFile from "./components/showFile.vue"; ...@@ -40,6 +40,7 @@ import showFile from "./components/showFile.vue";
40 import html2pdf from 'html2pdf.js'; 40 import html2pdf from 'html2pdf.js';
41 import { getPathUrl, getUpFileSignByUrl, obsUploadRequest } from "@/api/modules/obsService"; 41 import { getPathUrl, getUpFileSignByUrl, obsUploadRequest } from "@/api/modules/obsService";
42 import { ElMessage } from "element-plus"; 42 import { ElMessage } from "element-plus";
43 import { isEqual } from "lodash-es";
43 44
44 const { required, requiredFiles } = useValidator(); 45 const { required, requiredFiles } = useValidator();
45 const userStore = useUserStore(); 46 const userStore = useUserStore();
...@@ -133,7 +134,7 @@ const btnHandles = ref({ ...@@ -133,7 +134,7 @@ const btnHandles = ref({
133 contractGuid: route.query.guid, 134 contractGuid: route.query.guid,
134 policys: strategyTableEditRef.value.strategyData?.map((d, index) => { 135 policys: strategyTableEditRef.value.strategyData?.map((d, index) => {
135 let v = Object.assign({}, d, { orderNum: index + 1, }); 136 let v = Object.assign({}, d, { orderNum: index + 1, });
136 if (d.constraintName == 'dataField' && d.constraintFieldValue?.length) { 137 if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) {
137 v.constraintValue = d.constraintFieldValue.join(','); 138 v.constraintValue = d.constraintFieldValue.join(',');
138 v.additionValue = d.constraintFieldValue?.map(dv => { 139 v.additionValue = d.constraintFieldValue?.map(dv => {
139 return { 140 return {
...@@ -466,7 +467,9 @@ const disableConfirmBtn = computed(() => { ...@@ -466,7 +467,9 @@ const disableConfirmBtn = computed(() => {
466 for (const newItem of newValue) { 467 for (const newItem of newValue) {
467 let oldItem = originValue[index]; 468 let oldItem = originValue[index];
468 if (newItem.action != oldItem.action || newItem.constraintEnName != oldItem.constraintEnName || 469 if (newItem.action != oldItem.action || newItem.constraintEnName != oldItem.constraintEnName ||
469 newItem.constraintOperatorCode != oldItem.constraintOperatorCode || newItem.constraintValue != oldItem.constraintValue) { 470 newItem.constraintOperatorCode != oldItem.constraintOperatorCode || newItem.constraintValue != oldItem.constraintValue || isEqual(newItem.constraintFieldValue, oldItem.constraintFieldValue ||
471 isEqual(newItem.constraintConnectorValue, oldItem.constraintConnectorValue)
472 )) {
470 return true; 473 return true;
471 } 474 }
472 index++; 475 index++;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!