|
@@ -163,9 +163,9 @@ export default {
|
|
|
this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
},
|
|
|
toRightList() {
|
|
|
-
|
|
|
- if(this.currentSelectIndex === -1) {
|
|
|
- let fillIndex = -1
|
|
|
+ let fillIndex = -1
|
|
|
+ if(this.currentSelectIndex === -1) { //操作界面没有选择模块时
|
|
|
+
|
|
|
for(let i = 0; i < this.rightTagsList.length; i++) {
|
|
|
if(Object.keys(this.rightTagsList[i]).length === 0) {
|
|
|
fillIndex = i
|
|
@@ -174,11 +174,63 @@ export default {
|
|
|
|
|
|
}
|
|
|
if(fillIndex === 0) {
|
|
|
- this.getRighDetailsTag(fillIndex)
|
|
|
+ console.log('asasas', this.selectLeftTagId.controlType)
|
|
|
+ if(this.selectLeftTagId.controlType != 99) {
|
|
|
+ this.getRighDetailsTag(fillIndex)
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '请选择正确的标签类型',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
} else if (fillIndex === 1) {
|
|
|
- this.getRighDetailsTag(fillIndex)
|
|
|
+ if(this.selectLeftTagId.controlType == 99) {
|
|
|
+ this.rightTagsList.splice(fillIndex, 1, this.selectLeftTagId)
|
|
|
+ this.searchTagList()
|
|
|
+ console.log('this.rightTagsList',this.rightTagsList)
|
|
|
+ this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '请选择正确的标签类型',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ fillIndex = this.currentSelectIndex
|
|
|
+ if(fillIndex === 0) {
|
|
|
+ console.log('asasas', this.selectLeftTagId.controlType)
|
|
|
+ if(this.selectLeftTagId.controlType != 99) {
|
|
|
+ this.getRighDetailsTag(fillIndex)
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '请选择正确的标签类型',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ } else if (fillIndex === 1) {
|
|
|
+ if(this.selectLeftTagId.controlType == 99) {
|
|
|
+ this.rightTagsList.splice(fillIndex, 1, this.selectLeftTagId)
|
|
|
+ this.searchTagList()
|
|
|
+ console.log('this.rightTagsList',this.rightTagsList)
|
|
|
+ this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '请选择正确的标签类型',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -215,25 +267,25 @@ export default {
|
|
|
// "sexType": 3
|
|
|
}
|
|
|
api.detailsTag(param).then((res) =>{
|
|
|
- // if (res.data.code === '0') {
|
|
|
- // this.selectLeftTagId = res.data.data
|
|
|
- // if(this.currentSelectIndex !== -1) {
|
|
|
- // console.log('this.selectLeftTagId',this.selectLeftTagId)
|
|
|
- // // this.rightTagsList[this.currentSelectIndex] = this.selectLeftTagId;
|
|
|
- // this.rightTagsList.splice(this.currentSelectIndex, 1, this.selectLeftTagId)
|
|
|
- // } else {
|
|
|
- // console.log(55656,this.selectLeftTagId)
|
|
|
- // for(let i = 0; i < this.rightTagsList.length; i++) {
|
|
|
- // if(Object.keys(this.rightTagsList[i]).length === 0) {
|
|
|
- // this.rightTagsList.splice(i, 1, this.selectLeftTagId)
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.searchTagList()
|
|
|
- // console.log('this.rightTagsList',this.rightTagsList)
|
|
|
- // this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
- // }
|
|
|
+ if (res.data.code === '0') {
|
|
|
+ this.selectLeftTagId = res.data.data
|
|
|
+ if(this.currentSelectIndex !== -1) {
|
|
|
+ console.log('this.selectLeftTagId',this.selectLeftTagId)
|
|
|
+ // this.rightTagsList[this.currentSelectIndex] = this.selectLeftTagId;
|
|
|
+ this.rightTagsList.splice(this.currentSelectIndex, 1, this.selectLeftTagId)
|
|
|
+ } else {
|
|
|
+ console.log(55656,this.selectLeftTagId)
|
|
|
+ for(let i = 0; i < this.rightTagsList.length; i++) {
|
|
|
+ if(Object.keys(this.rightTagsList[i]).length === 0) {
|
|
|
+ this.rightTagsList.splice(i, 1, this.selectLeftTagId)
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.searchTagList()
|
|
|
+ console.log('this.rightTagsList',this.rightTagsList)
|
|
|
+ this.$emit('changeActionData',this.rightTagsList, false);
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
SelectList(index) {
|