更新
This commit is contained in:
@@ -159,19 +159,21 @@
|
|||||||
* @property {Array} productCodeLable: 传入的新列表格式的列表标题
|
* @property {Array} productCodeLable: 传入的新列表格式的列表标题
|
||||||
* @property {Function} setingFn: 调用微信接口获取code 通过code调用服务端接口换取请求头数据
|
* @property {Function} setingFn: 调用微信接口获取code 通过code调用服务端接口换取请求头数据
|
||||||
*/
|
*/
|
||||||
console.log(this.menuList,'打印列表列表')
|
// console.log(this.menuList,'打印列表列表')
|
||||||
this.setingFn()
|
this.setingFn()
|
||||||
setTimeout(()=>{
|
this.areaCodeList = uni.getStorageSync('areaCodeList')
|
||||||
if(this.areaCodeList1.length<1){
|
this.areaCodeList.unshift({areaName:'全部',childList:[{areaName:'',childList:[{areaName:''}]}]})
|
||||||
this.areaCodeList = uni.getStorageSync('areaCodeList')
|
// setTimeout(()=>{
|
||||||
}else{
|
// if(this.areaCodeList1.length<1){
|
||||||
this.areaCodeList = this.areaCodeList1
|
// this.areaCodeList = uni.getStorageSync('areaCodeList')
|
||||||
}
|
// }else{
|
||||||
// this.areaCodeList = this.areaCodeList1
|
// this.areaCodeList = this.areaCodeList1
|
||||||
console.log(this.areaCodeList,this.areaCodeList1,'11111111111111')
|
// }
|
||||||
this.areaCodeList.unshift({areaName:'全部',childList:[{areaName:'',childList:[{areaName:''}]}]})
|
// // this.areaCodeList = this.areaCodeList1
|
||||||
},3000)
|
// console.log(this.areaCodeList,this.areaCodeList1,'11111111111111')
|
||||||
console.log('%c 子组件参数↓','font-size:30px;color:red')
|
// this.areaCodeList.unshift({areaName:'全部',childList:[{areaName:'',childList:[{areaName:''}]}]})
|
||||||
|
// },3000)
|
||||||
|
// console.log('%c 子组件参数↓','font-size:30px;color:red')
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
selectedTitleObj() {
|
selectedTitleObj() {
|
||||||
@@ -206,12 +208,12 @@
|
|||||||
if(this.areaIndex[0] !== val[0]) {
|
if(this.areaIndex[0] !== val[0]) {
|
||||||
// 如果滑动的是第一列数据,让二三列恢复到0
|
// 如果滑动的是第一列数据,让二三列恢复到0
|
||||||
this.areaIndex = [val[0], 0, 0]
|
this.areaIndex = [val[0], 0, 0]
|
||||||
console.log(this.areaCodeList[val[0]].childList[0].areaName,'打印是否[全部]')
|
// console.log(this.areaCodeList[val[0]].childList[0].areaName,'打印是否[全部]')
|
||||||
} else if(this.areaIndex[1] !== val[1]) {
|
} else if(this.areaIndex[1] !== val[1]) {
|
||||||
this.areaIndex[1] = val[1]
|
this.areaIndex[1] = val[1]
|
||||||
// 滑动的是第二列数据
|
// 滑动的是第二列数据
|
||||||
this.areaIndex = [val[0], val[1], 0]
|
this.areaIndex = [val[0], val[1], 0]
|
||||||
console.log(this.areaCodeList[val[0]].childList[val[1]].childList[0].areaName,'打印是否[全部]')
|
// console.log(this.areaCodeList[val[0]].childList[val[1]].childList[0].areaName,'打印是否[全部]')
|
||||||
} else {
|
} else {
|
||||||
this.areaIndex = e.detail.value;
|
this.areaIndex = e.detail.value;
|
||||||
}
|
}
|
||||||
@@ -246,13 +248,13 @@
|
|||||||
this.seleIdex = e + '/'+ w + '/' + j
|
this.seleIdex = e + '/'+ w + '/' + j
|
||||||
}
|
}
|
||||||
// this.oilCode = this.seleIdex
|
// this.oilCode = this.seleIdex
|
||||||
console.log(e,w,j,'aaaaaaaaaaaaaaaaa')
|
// console.log(e,w,j,'aaaaaaaaaaaaaaaaa')
|
||||||
},
|
},
|
||||||
setingFn(){
|
setingFn(){
|
||||||
if(this.productCodeList){
|
if(this.productCodeList){
|
||||||
this.productCodeLable = Object.keys(this.productCodeList)
|
this.productCodeLable = Object.keys(this.productCodeList)
|
||||||
}
|
}
|
||||||
console.log(this.productCodeLable,'ddddddddddddddddddd')
|
// console.log(this.productCodeLable,'ddddddddddddddddddd')
|
||||||
},
|
},
|
||||||
getSelectedObj() {
|
getSelectedObj() {
|
||||||
let obj = {}
|
let obj = {}
|
||||||
@@ -304,7 +306,7 @@
|
|||||||
this.resetSelected(this.menuList[i].detailList,this.menuList[i].key);
|
this.resetSelected(this.menuList[i].detailList,this.menuList[i].key);
|
||||||
titles[this.menuList[i].key] = this.menuList[i].title;
|
titles[this.menuList[i].key] = this.menuList[i].title;
|
||||||
}
|
}
|
||||||
console.log(titles,'*************************')
|
// console.log(titles,'*************************')
|
||||||
let obj = {
|
let obj = {
|
||||||
'result': this.result,
|
'result': this.result,
|
||||||
'titles': titles,
|
'titles': titles,
|
||||||
@@ -384,7 +386,7 @@
|
|||||||
this.$emit('update:menuList', val)
|
this.$emit('update:menuList', val)
|
||||||
},
|
},
|
||||||
menuTabClick(index) {
|
menuTabClick(index) {
|
||||||
console.log(this.menuList,'展开')
|
// console.log(this.menuList,'展开')
|
||||||
this.menuIndex = index;
|
this.menuIndex = index;
|
||||||
this.selectDetailList = this.menuList[index].detailList;
|
this.selectDetailList = this.menuList[index].detailList;
|
||||||
this.selectDetailLists = this.menuList[index].detailLists;
|
this.selectDetailLists = this.menuList[index].detailLists;
|
||||||
@@ -607,14 +609,14 @@
|
|||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
resetSelected(list, key,lists, keys) {
|
resetSelected(list, key,lists, keys) {
|
||||||
console.log('%c 重置方法第二步resetSelected函数参数↓','color:green;font-size:30px')
|
// console.log('%c 重置方法第二步resetSelected函数参数↓','color:green;font-size:30px')
|
||||||
if (typeof this.result[key] == 'object') {
|
if (typeof this.result[key] == 'object') {
|
||||||
this.result[key] = [];
|
this.result[key] = [];
|
||||||
this.selectedTitleObj[key] = list[0].title;
|
this.selectedTitleObj[key] = list[0].title;
|
||||||
} else {
|
} else {
|
||||||
this.result[key] = '';
|
this.result[key] = '';
|
||||||
this.selectedTitleObj[key] = list[0].title;
|
this.selectedTitleObj[key] = list[0].title;
|
||||||
console.log(this.result,'重置之后的数据')
|
// console.log(this.result,'重置之后的数据')
|
||||||
}
|
}
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@@ -630,7 +632,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.result[keys] = '';
|
this.result[keys] = '';
|
||||||
this.selectedTitleObj[key] = lists[0].title;
|
this.selectedTitleObj[key] = lists[0].title;
|
||||||
console.log(this.result,'重置之后的数据')
|
// console.log(this.result,'重置之后的数据')
|
||||||
}
|
}
|
||||||
for (let i = 0; i < lists.length; i++) {
|
for (let i = 0; i < lists.length; i++) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user