| | |
| | | // 将options配置赋值到data中的option中,避免深浅拷贝的问题所以需要转json之后再赋值 |
| | | const data = JSON.stringify(this.options); |
| | | this.initOptions = JSON.parse(data); |
| | | //console.log(this.initOptions); |
| | | this.initOptions.forEach((item,index) => { |
| | | //console.log(this.initOptions); |
| | | //console.log(this.initOptions); |
| | | if(this.initOptions.length > 0){ |
| | | this.initOptions.forEach((item,index) => { |
| | | if(item.fieldType==='combox') { |
| | | let enumCach = JSON.parse(localStorage.getItem(item.comboxKey)); |
| | | if(enumCach != null) { |
| | |
| | | } |
| | | this.searchFormArrays.push(add) |
| | | }); |
| | | } |
| | | //console.log(this.initOptions); |
| | | //console.log(this.searchFormArrays); |
| | | } |
| | |
| | | resetInput(){ |
| | | const data = JSON.stringify(this.options); |
| | | this.initOptions = JSON.parse(data); |
| | | let array = []; |
| | | this.initOptions.forEach((item,index) => { |
| | | if(this.initOptions.length > 0){ |
| | | let array = []; |
| | | this.initOptions.forEach((item,index) => { |
| | | let add = { |
| | | queryField: String(item.queryField), |
| | | condition:item.fieldType=='text' ? String("_like"):String("_equal"), |
| | |
| | | } |
| | | array.push(add) |
| | | }); |
| | | this.searchFormArrays = array; |
| | | this.searchFormArrays = array; |
| | | } |
| | | //console.log(this.initOptions); |
| | | //console.log(this.searchFormArrays); |
| | | }, |