+
{
}
const findProcessTypeIndex = (index) => {
- if(index < 0){
+ if (index < 0) {
return index;
}
let processType = 0;
@@ -565,8 +566,8 @@ const findProcessTypeIndex = (index) => {
// 找到最后一个位置
if (that.propOrderByList[i].shape === ShapeType.vueShapeImage) {
processType++;
- console.log("@@@@@@",index,i)
- if(index === i){
+ console.log("@@@@@@", index, i)
+ if (index === i) {
return processType
}
}
@@ -574,7 +575,7 @@ const findProcessTypeIndex = (index) => {
return processType;
}
-const washingInfoListByType = (type,index = -1) => {
+const washingInfoListByType = (type, index = -1) => {
const typeIndex = findProcessTypeIndex(index);
return that.washingInfoList.filter(item => {
if (item.type === type && (typeIndex < 0 || (item.processType === `${typeIndex}`))) {
@@ -840,7 +841,7 @@ const queryUseLabel = (label) => {
}
})
//
- console.log("lables",that.propInfo)
+ console.log("lables", that.propInfo)
}
})
ProductCareItemApi.queryList({
@@ -884,7 +885,7 @@ const showPng = () => {
...that.propInfo || {},
...that.restInfo || {},
};
- console.log("that.propInfo",that.propInfo)
+ console.log("that.propInfo", that.propInfo)
that.propOrderByList = info.propOrderByList;
loading.value = false;
}, {
@@ -937,8 +938,12 @@ const checkPropInfo = (info) => {
return new Promise((resolve, reject) => {
let newInfo = cloneDeep(info)
let newInfo2 = cloneDeep(info)
+ const keys = [];
+
+ for (let i = 0; i < that.propOrderByList.length; i++) {
+ keys.push(that.propOrderByList[i].key);
+ }
- const keys = Object.keys(newInfo);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
// 合并相同语言的文字
@@ -1212,21 +1217,20 @@ const checkPropInfo = (info) => {
// 查询所有的icon
const dis = [];
- const keys = Object.keys(that.propInfo);
for (let i = 0; i < keys.length; i++) {
const tmpKey2 = keys[i]
if (that.propInfo[tmpKey2].groupType === GroupTypeEnum.ICON) {
- if(that.propInfo[tmpKey2].dataInfo[0].showLabel){
- if( dis.includes(that.propInfo[tmpKey2].dataInfo[0].showLabel)){
- useMessage().notifyError(`${that.propInfo[tmpKey2].groupName}中第${i + 1}项重复`);
- that.errorList.push({
- key: `${tmpKey2}_${0}`,
- message: "数据重复"
- })
- reject("数据重复")
- return
+ if (that.propInfo[tmpKey2].dataInfo[0].showLabel) {
+ if (dis.includes(that.propInfo[tmpKey2].dataInfo[0].showLabel)) {
+ useMessage().notifyError(`${that.propInfo[tmpKey2].groupName}中第${i + 1}项重复`);
+ that.errorList.push({
+ key: `${tmpKey2}_${0}`,
+ message: "数据重复"
+ })
+ reject("数据重复")
+ return
}
- dis.push(that.propInfo[keys[i]].dataInfo[0].showLabel)
+ dis.push(that.propInfo[keys[i]].dataInfo[0].showLabel)
}
}
@@ -1236,7 +1240,7 @@ const checkPropInfo = (info) => {
for (let i = 0; i < infoList.length; i++) {
mapping[infoList[i].label] = infoList[i].langMapping;
}
- const keyList = Object.keys(newInfo);
+ const keyList = keys;
const allIcon = [];
for (let j = 0; j < keyList.length; j++) {
for (let k = 0; k < newInfo[keyList[j]].dataInfo.length; k++) {
@@ -1276,7 +1280,7 @@ const checkPropInfo = (info) => {
for (let j = 0; j < newArr.length; j++) {
// 如果没有选择的不显示
if (newArr[j].label && newArr[j].showLabel) {
- newArr[j].label = i === 0 ? mergeLabelStr : ''
+ newArr[j].label = mergeLabelStr
resArr.push(newArr[j])
}
}