邓洁 : 注释log

This commit is contained in:
邓洁
2023-12-05 10:48:27 +08:00
parent 20f56b5d8d
commit 0612840cdc
27 changed files with 235 additions and 229 deletions

View File

@@ -16,7 +16,8 @@
</view>
<view class="item-border">
<DropDownItem v-show="activeIndex !== -1" :list="tablist" @cancelDrop="cancelDrop" @getQueryInfo="getQueryInfo"
:type="title[activeIndex]" :activeChoose = "setActiveTag" :key="tablist" ref="dropdownitem" @cancelPageNum="cancelPageNum"/>
:type="title[activeIndex]" :activeChoose="setActiveTag" :key="tablist" ref="dropdownitem"
@cancelPageNum="cancelPageNum" />
</view>
</view>
</template>
@@ -40,8 +41,8 @@
postlist: [
[],
[],
['全部','小于50m²', '50-200m²', '200-600m²', '600-800m²', '800-1000m²', '1000m²以上'],
['全部','面积从大到小', '面积从小到大', '租金从大到小', '租金从小到大']
['全部', '小于50m²', '50-200m²', '200-600m²', '600-800m²', '800-1000m²', '1000m²以上'],
['全部', '面积从大到小', '面积从小到大', '租金从大到小', '租金从小到大']
],
queryInfo: {
region: '',
@@ -56,21 +57,21 @@
// 当前选中的面积下拉列表项
currentAreaActive: 0,
// 当前选中的筛选下拉列表项
currentFilterActive: 0,
currentFilterActive: 0,
};
},
computed: {
tablist: function() {
return this.postlist[this.activeIndex]
},
setActiveTag: function(){
if(this.activeIndex == 0){
setActiveTag: function() {
if (this.activeIndex == 0) {
return this.currentClassActive
}else if(this.activeIndex == 1){
} else if (this.activeIndex == 1) {
return this.currentRegionActive
}else if(this.activeIndex == 2){
} else if (this.activeIndex == 2) {
return this.currentAreaActive
}else if(this.activeIndex == 3){
} else if (this.activeIndex == 3) {
return this.currentFilterActive
}
}
@@ -84,8 +85,8 @@
// this.postlist[3].unshift('全部')
},
watch: {
setActiveTag (reset){
setActiveTag(reset) {
}
},
methods: {
@@ -98,29 +99,29 @@
cancelDrop() {
this.activeIndex = -1;
},
cancelPageNum(){
this.$emit('cancelPageNum')
cancelPageNum() {
this.$emit('cancelPageNum')
},
getQueryInfo(querys) {
console.log(querys, 'getquerysinfo');
// console.log(querys, 'getquerysinfo');
// 修改当前选择的各选项卡下标
// 记忆各下拉框数据
if (this.activeIndex === 0) {
this.currentClassActive = querys.business
}else if (this.activeIndex === 1) {
} else if (this.activeIndex === 1) {
this.currentRegionActive = querys.region
}else if (this.activeIndex === 2) {
} else if (this.activeIndex === 2) {
this.currentAreaActive = querys.areatype
}else if (this.activeIndex === 3) {
} else if (this.activeIndex === 3) {
this.currentFilterActive = querys.sortType
}
// 特殊处理行业、区域
if(querys.business){
if (querys.business) {
querys.business = this.tablist[this.currentClassActive]
}
if(querys.region){
if (querys.region) {
querys.region = this.tablist[this.currentRegionActive]
}
@@ -129,11 +130,11 @@
...querys
}
const query = this.$u.queryParams(this.queryInfo)
console.log(querys, 'dropquery');
// console.log(querys, 'dropquery');
this.$emit('getQueryInfo', this.queryInfo)
},
resetInfo(){
console.log("重置了Dropdown");
resetInfo() {
// console.log("重置了Dropdown");
this.queryInfo = {
region: '',
sortType: '',

View File

@@ -44,60 +44,60 @@
this.$emit('cancelDrop');
},
sendQueryInfo() {
console.log(this.queryInfo);
console.log(this.type);
console.log(this.activeIndex);
// console.log(this.queryInfo);
// console.log(this.type);
// console.log(this.activeIndex);
if (this.type === '行业') {
if(this.list[this.activeIndex] == '全部'){
if (this.list[this.activeIndex] == '全部') {
this.queryInfo = {
business: ''
}
}else{
} else {
this.queryInfo = {
business: this.activeIndex
}
}
} else if (this.type === '区域') {
if(this.list[this.activeIndex] == '全区域'){
if (this.list[this.activeIndex] == '全区域') {
this.queryInfo = {
region: ''
}
}else{
} else {
this.queryInfo = {
region: this.activeIndex
}
}
} else if (this.type === '面积') {
if(this.list[this.activeIndex] == '任意面积'){
if (this.list[this.activeIndex] == '任意面积') {
this.queryInfo = {
areatype: ''
}
}else {
} else {
this.queryInfo = {
areatype: this.activeIndex
}
}
} else if (this.type === '筛选') {
if(this.list[this.activeIndex] == '全部'){
if (this.list[this.activeIndex] == '全部') {
this.queryInfo = {
sortType: ''
}
}else{
} else {
this.queryInfo = {
sortType: this.activeIndex
}
}
}
// 发送queryInfo
console.log(this.queryInfo, 'sendqueryInfo');
this.$emit('getQueryInfo', this.queryInfo);
// console.log(this.queryInfo, 'sendqueryInfo');
this.$emit('getQueryInfo', this.queryInfo);
},
resetQueryInfo(){
console.log("重置了DropdownItem");
resetQueryInfo() {
// console.log("重置了DropdownItem");
this.currentClassActive = 0
this.currentRegionActive = 0
this.currentAreaActive = 0
@@ -170,6 +170,7 @@
border-radius: 0px 0px 20px 20px;
height: 320rpx;
overflow-y: auto;
.item {
border-top: 1px solid #EEEEEE;
font-weight: 500;