df50318c by lihua

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

1 parent 564e281c
...@@ -463,7 +463,7 @@ const getSubmitInfo = () => { ...@@ -463,7 +463,7 @@ const getSubmitInfo = () => {
463 }]; 463 }];
464 params.policys = strategyTableRef.value.strategyData?.map((d, index) => { 464 params.policys = strategyTableRef.value.strategyData?.map((d, index) => {
465 let v = Object.assign({}, d, { orderNum: index + 1, }); 465 let v = Object.assign({}, d, { orderNum: index + 1, });
466 if (d.constraintName == 'dataField' && d.constraintFieldValue?.length) { 466 if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) {
467 v.constraintValue = d.constraintFieldValue.join(','); 467 v.constraintValue = d.constraintFieldValue.join(',');
468 v.additionValue = d.constraintFieldValue?.map(dv => { 468 v.additionValue = d.constraintFieldValue?.map(dv => {
469 return { 469 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();
...@@ -129,7 +130,7 @@ const btnHandles = ref({ ...@@ -129,7 +130,7 @@ const btnHandles = ref({
129 contractGuid: route.query.guid, 130 contractGuid: route.query.guid,
130 policys: strategyTableEditRef.value.strategyData?.map((d, index) => { 131 policys: strategyTableEditRef.value.strategyData?.map((d, index) => {
131 let v = Object.assign({}, d, { orderNum: index + 1, }); 132 let v = Object.assign({}, d, { orderNum: index + 1, });
132 if (d.constraintName == 'dataField' && d.constraintFieldValue?.length) { 133 if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) {
133 v.constraintValue = d.constraintFieldValue.join(','); 134 v.constraintValue = d.constraintFieldValue.join(',');
134 v.additionValue = d.constraintFieldValue?.map(dv => { 135 v.additionValue = d.constraintFieldValue?.map(dv => {
135 return { 136 return {
...@@ -462,7 +463,9 @@ const disableConfirmBtn = computed(() => { ...@@ -462,7 +463,9 @@ const disableConfirmBtn = computed(() => {
462 for (const newItem of newValue) { 463 for (const newItem of newValue) {
463 let oldItem = originValue[index]; 464 let oldItem = originValue[index];
464 if (newItem.action != oldItem.action || newItem.constraintEnName != oldItem.constraintEnName || 465 if (newItem.action != oldItem.action || newItem.constraintEnName != oldItem.constraintEnName ||
465 newItem.constraintOperatorCode != oldItem.constraintOperatorCode || newItem.constraintValue != oldItem.constraintValue) { 466 newItem.constraintOperatorCode != oldItem.constraintOperatorCode || newItem.constraintValue != oldItem.constraintValue || isEqual(newItem.constraintFieldValue, oldItem.constraintFieldValue ||
467 isEqual(newItem.constraintConnectorValue, oldItem.constraintConnectorValue)
468 )) {
466 return true; 469 return true;
467 } 470 }
468 index++; 471 index++;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!