|
@@ -194,11 +194,31 @@ export default {
|
|
|
// cascader变化事件
|
|
|
cascaderChange(val) {
|
|
|
this.inputValue = ''
|
|
|
- let a = this.options.find(item => {
|
|
|
- return item.value == val[0]
|
|
|
- })
|
|
|
- this.isControl = a.children.find(item => {
|
|
|
- return item.value == val[1]
|
|
|
+ console.log(val,this.options)
|
|
|
+ // let a = this.options.find(item => {
|
|
|
+ // return item.value == val[0]
|
|
|
+ // })
|
|
|
+ // this.isControl = a.children.find(item => {
|
|
|
+ // return item.value == val[1]
|
|
|
+ // })
|
|
|
+ var a = JSON.parse(JSON.stringify(this.options))
|
|
|
+ val.forEach((item1,index) => {
|
|
|
+ if (index == val.length - 1) {
|
|
|
+ this.isControl = a.children.find(item => {
|
|
|
+ return item.value == item1
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (index == 0) {
|
|
|
+ a = a.find(item => {
|
|
|
+ return item.value == item1
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ a = a.children.find(item => {
|
|
|
+ return item.value == item1
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
})
|
|
|
this.isControl.placeholder = '请输入检索内容'
|
|
|
if (this.isControl.type == '2') {
|
|
@@ -334,13 +354,13 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
// 给ipc、cpc、upc、loc添加大小类等
|
|
|
- if (['MC', 'CPC', 'UPC', 'LOC'].includes(data[i].value)) {
|
|
|
- for (let j = 0; j < filedObj[data[i].groupBy].children.length; j++) {
|
|
|
- if (!filedObj[data[i].groupBy].children[j].children) {
|
|
|
- filedObj[data[i].groupBy].children[j].children = this.special[filedObj[data[i].groupBy].children[j].value]
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (['MC', 'CPC', 'UPC', 'LOC'].includes(data[i].value)) {
|
|
|
+ // for (let j = 0; j < filedObj[data[i].groupBy].children.length; j++) {
|
|
|
+ // if (!filedObj[data[i].groupBy].children[j].children) {
|
|
|
+ // filedObj[data[i].groupBy].children[j].children = this.special[filedObj[data[i].groupBy].children[j].value]
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
} else {//自定义字段
|
|
|
if (filedObj[data[i].group]) {
|
|
|
filedObj[data[i].group].children.push(data[i])
|