|
@@ -102,35 +102,42 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.rightTagsList2 = this.options
|
|
|
- let newArr = []
|
|
|
- for (let i = 0; i < this.rightTagsList2.length; i++) {
|
|
|
- if(this.rightTagsList2[i].tagType == 8) {
|
|
|
- newArr.push({ text: this.rightTagsList2[i].tagName ,type:'input' ,id: i+',,,'})
|
|
|
- } else {
|
|
|
- if(i === 0 ) {
|
|
|
- newArr.push({ text: '' ,type:'input' ,id: i+',,,'})
|
|
|
- }
|
|
|
- newArr.push(this.rightTagsList2[i])
|
|
|
- if(!this.rightTagsList2[i+1] || this.rightTagsList2[i+1]&&this.rightTagsList2[i+1].tagType != 8) {
|
|
|
- newArr.push({ text: '' ,type:'input' ,id: i+',,,,'})
|
|
|
- }
|
|
|
- }
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ let tagList = this.options;
|
|
|
+ if(tagList.length > 0){
|
|
|
+ console.log(99)
|
|
|
+ this.rightTagsList2 = this.options
|
|
|
+ let newArr = []
|
|
|
+ for (let i = 0; i < this.rightTagsList2.length; i++) {
|
|
|
+ if(this.rightTagsList2[i].tagType == 8) {
|
|
|
+ newArr.push({ text: this.rightTagsList2[i].tagName ,type:'input' ,id: i+',,,'})
|
|
|
+ } else {
|
|
|
+ if(i === 0 ) {
|
|
|
+ newArr.push({ text: '' ,type:'input' ,id: i+',,,'})
|
|
|
+ }
|
|
|
+ newArr.push(this.rightTagsList2[i])
|
|
|
+ if(!this.rightTagsList2[i+1] || this.rightTagsList2[i+1]&&this.rightTagsList2[i+1].tagType != 8) {
|
|
|
+ newArr.push({ text: '' ,type:'input' ,id: i+',,,,'})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.rightTagsList2 = newArr
|
|
|
+ this.$emit('changeActionData',this.rightTagsList2, false);
|
|
|
+ this.searchTagList()
|
|
|
}
|
|
|
- this.rightTagsList2 = newArr
|
|
|
- this.$emit('changeActionData',this.rightTagsList2, false);
|
|
|
- this.searchTagList()
|
|
|
+ })
|
|
|
+
|
|
|
// this.leftTagsList = this.pool
|
|
|
// console.log('TAGPOOL', this.pool)
|
|
|
},
|
|
|
watch: {
|
|
|
pool(newVal, preVal) {
|
|
|
this.leftTagsList = newVal
|
|
|
- console.log('sdsadasdasdasdas11111111', newVal,'asds',preVal)
|
|
|
- if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
|
|
|
- console.log('sdsadasdasdasdas')
|
|
|
- // this.leftTagsList = newVal
|
|
|
- }
|
|
|
+ // console.log('sdsadasdasdasdas11111111', newVal,'asds',preVal)
|
|
|
+ // if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
|
|
|
+ // console.log('sdsadasdasdasdas')
|
|
|
+ // // this.leftTagsList = newVal
|
|
|
+ // }
|
|
|
},
|
|
|
searchVal(newVal, preVal){
|
|
|
if(newVal.trim() == ''){
|