78819132 by lihua

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

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