|
|
@@ -3822,54 +3822,39 @@ export default {
|
|
|
},
|
|
|
newimgarr1(val) {
|
|
|
this.show = false;
|
|
|
+ //是否开启图匠识别,(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招)
|
|
|
+ // 拍摄店招时只允许上传一张
|
|
|
+ let photoIdentifyType = val.photoIdentifyType;
|
|
|
if (this.pType == 'D') {
|
|
|
- if (
|
|
|
+ let fileInfoList =
|
|
|
this.collectionItemList[this.indeximg].collectionOptionList[this.childIndex1]
|
|
|
.collectionItems[this.childIndex].collectionOptionList[this.childIndex2]
|
|
|
.collectionItems[this.childIndex3].collectionOptionList[this.childIndex4]
|
|
|
- .collectionItems[this.childIndex5].fileInfoList == null
|
|
|
- ) {
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[
|
|
|
- this.childIndex1
|
|
|
- ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
|
|
|
- this.childIndex3
|
|
|
- ].collectionOptionList[this.childIndex4].collectionItems[this.childIndex5].fileInfoList =
|
|
|
- [];
|
|
|
+ .collectionItems[this.childIndex5].fileInfoList;
|
|
|
+ if (fileInfoList == null) {
|
|
|
+ fileInfoList = [];
|
|
|
+ }
|
|
|
+ if (photoIdentifyType == 1) {
|
|
|
+ fileInfoList = val;
|
|
|
+ } else {
|
|
|
+ fileInfoList.push(val);
|
|
|
}
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[
|
|
|
- this.childIndex1
|
|
|
- ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
|
|
|
- this.childIndex3
|
|
|
- ].collectionOptionList[this.childIndex4].collectionItems[
|
|
|
- this.childIndex5
|
|
|
- ].fileInfoList.push(val);
|
|
|
}
|
|
|
if (this.pType == 'E') {
|
|
|
- if (
|
|
|
+ let fileInfoList =
|
|
|
this.collectionItemList[this.indeximg].collectionOptionList[this.childIndex1]
|
|
|
.collectionItems[this.childIndex].collectionOptionList[this.childIndex2]
|
|
|
.collectionItems[this.childIndex3].collectionOptionList[this.childIndex4]
|
|
|
.collectionItems[this.childIndex5].collectionOptionList[this.childIndex6]
|
|
|
- .collectionItems[this.childIndex7].fileInfoList == null
|
|
|
- ) {
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[
|
|
|
- this.childIndex1
|
|
|
- ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
|
|
|
- this.childIndex3
|
|
|
- ].collectionOptionList[this.childIndex4].collectionItems[
|
|
|
- this.childIndex5
|
|
|
- ].collectionOptionList[this.childIndex6].collectionItems[this.childIndex7].fileInfoList =
|
|
|
- [];
|
|
|
+ .collectionItems[this.childIndex7].fileInfoList;
|
|
|
+ if (fileInfoList == null) {
|
|
|
+ fileInfoList = [];
|
|
|
+ }
|
|
|
+ if (photoIdentifyType == 1) {
|
|
|
+ fileInfoList = val;
|
|
|
+ } else {
|
|
|
+ fileInfoList.push(val);
|
|
|
}
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[
|
|
|
- this.childIndex1
|
|
|
- ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
|
|
|
- this.childIndex3
|
|
|
- ].collectionOptionList[this.childIndex4].collectionItems[
|
|
|
- this.childIndex5
|
|
|
- ].collectionOptionList[this.childIndex6].collectionItems[
|
|
|
- this.childIndex7
|
|
|
- ].fileInfoList.push(val);
|
|
|
}
|
|
|
if (this.pType == 'A' || this.pType == 'B') {
|
|
|
var child = false;
|
|
|
@@ -3888,54 +3873,49 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (child) {
|
|
|
+ let fileInfoList =
|
|
|
+ this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
|
|
|
+ this.childIndex
|
|
|
+ ].fileInfoList;
|
|
|
for (
|
|
|
let childi = 0;
|
|
|
childi < this.collectionItemList[this.indeximg].collectionOptionList.length;
|
|
|
childi++
|
|
|
) {
|
|
|
- if (
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
|
|
|
- this.childIndex
|
|
|
- ].fileInfoList == null ||
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
|
|
|
- this.childIndex
|
|
|
- ].fileInfoList == undefined
|
|
|
- ) {
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
|
|
|
- this.childIndex
|
|
|
- ].fileInfoList = [];
|
|
|
+ if (fileInfoList == null || fileInfoList == undefined) {
|
|
|
+ fileInfoList = [];
|
|
|
+ }
|
|
|
+ if (photoIdentifyType == 1) {
|
|
|
+ fileInfoList = val;
|
|
|
+ } else {
|
|
|
+ fileInfoList.push(val);
|
|
|
}
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
|
|
|
- this.childIndex
|
|
|
- ].fileInfoList.push(val);
|
|
|
}
|
|
|
} else {
|
|
|
- if (
|
|
|
- this.collectionItemList[this.indeximg].fileInfoList == null ||
|
|
|
- this.collectionItemList[this.indeximg].fileInfoList == undefined
|
|
|
- ) {
|
|
|
- this.collectionItemList[this.indeximg].fileInfoList = [];
|
|
|
+ let fileInfoList = this.collectionItemList[this.indeximg].fileInfoList;
|
|
|
+ if (fileInfoList == null || fileInfoList == undefined) {
|
|
|
+ fileInfoList = [];
|
|
|
+ }
|
|
|
+ if (photoIdentifyType == 1) {
|
|
|
+ fileInfoList = val;
|
|
|
+ } else {
|
|
|
+ fileInfoList.push(val);
|
|
|
}
|
|
|
- this.collectionItemList[this.indeximg].fileInfoList.push(val);
|
|
|
}
|
|
|
}
|
|
|
if (this.pType == 'C') {
|
|
|
- if (
|
|
|
+ let fileInfoList =
|
|
|
this.collectionItemList[this.indeximg].collectionOptionList[this.childIndex1]
|
|
|
.collectionItems[this.childIndex].collectionOptionList[this.childIndex2]
|
|
|
- .collectionItems[this.childIndex3].fileInfoList == null
|
|
|
- ) {
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[
|
|
|
- this.childIndex1
|
|
|
- ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
|
|
|
- this.childIndex3
|
|
|
- ].fileInfoList = [];
|
|
|
+ .collectionItems[this.childIndex3].fileInfoList;
|
|
|
+ if (fileInfoList == null) {
|
|
|
+ fileInfoList = [];
|
|
|
+ }
|
|
|
+ if (photoIdentifyType == 1) {
|
|
|
+ fileInfoList = val;
|
|
|
+ } else {
|
|
|
+ fileInfoList.push(val);
|
|
|
}
|
|
|
- this.collectionItemList[this.indeximg].collectionOptionList[
|
|
|
- this.childIndex1
|
|
|
- ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
|
|
|
- this.childIndex3
|
|
|
- ].fileInfoList.push(val);
|
|
|
}
|
|
|
},
|
|
|
zSelectVal(value) {
|