|
@ -35,32 +35,29 @@ |
|
|
<span>{{item.label}}</span> |
|
|
<span>{{item.label}}</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="div_category"> |
|
|
|
|
|
<el-scrollbar style="height:98%"> |
|
|
|
|
|
|
|
|
<el-scrollbar style="height:98%"> |
|
|
|
|
|
|
|
|
|
|
|
<div class="div_category"> |
|
|
|
|
|
<div v-for="(item,index) in categoryListshow" |
|
|
<div v-for="(item,index) in categoryListshow" |
|
|
:key="index" |
|
|
:key="index" |
|
|
class="category_item"> |
|
|
class="category_item"> |
|
|
<div class="list_item"> |
|
|
|
|
|
<div v-for="(colItem,colIndex) in item" |
|
|
|
|
|
:key="colIndex" |
|
|
|
|
|
class="list_item_col" |
|
|
|
|
|
@click="handleTo(colItem)"> |
|
|
|
|
|
<img :src="colItem.dataIcon" |
|
|
|
|
|
alt /> |
|
|
|
|
|
<div class="item_content"> |
|
|
|
|
|
<div class="item_label">{{colItem.categoryName}}</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
<div v-for="(colItem,colIndex) in item" |
|
|
|
|
|
:key="colIndex" |
|
|
|
|
|
class="list_item" |
|
|
|
|
|
@click="handleClickCategory(index,colIndex)"> |
|
|
|
|
|
<img :src="colItem.dataIcon" |
|
|
|
|
|
alt /> |
|
|
|
|
|
<span :class="['item_content',colItem.sel?'item_content_sel':'']">{{colItem.categoryName}} |
|
|
|
|
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<div :class="['item_line',{'last_line':index==(categoryListshow.length-1)}]"></div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</el-scrollbar> |
|
|
</el-scrollbar> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="div_info"> |
|
|
<div class="div_info"> |
|
|
<!-- <el-scrollbar style="height:98%"> |
|
|
<!-- <el-scrollbar style="height:98%"> |
|
@ -231,7 +228,6 @@ const vueGis = { |
|
|
name: 'HomeMap', |
|
|
name: 'HomeMap', |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
|
|
|
|
|
|
centerPoint: [],//中心点位置 |
|
|
centerPoint: [],//中心点位置 |
|
|
zoom: 14,//缩放范围:区14 |
|
|
zoom: 14,//缩放范围:区14 |
|
|
minZoom: 1,//最小缩放 |
|
|
minZoom: 1,//最小缩放 |
|
@ -345,8 +341,20 @@ const vueGis = { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//点击类别 |
|
|
//点击类别 |
|
|
handleClickCategory (index) { |
|
|
handleClickCategory (index, colIndex) { |
|
|
|
|
|
this.categoryListshow[index][colIndex].sel = !this.coverageTypesList[index].sel |
|
|
|
|
|
this.categoryList[index].sel = !this.coverageTypesList[index].sel |
|
|
|
|
|
let item = this.coverageTypesList[index] |
|
|
|
|
|
|
|
|
|
|
|
this.$set(this.coverageTypesList, index, item) |
|
|
|
|
|
|
|
|
|
|
|
this.coverageTypes = [] |
|
|
|
|
|
|
|
|
|
|
|
this.coverageTypesList.forEach(element => { |
|
|
|
|
|
if (element.select) { |
|
|
|
|
|
this.coverageTypes.push(element.value) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async loadCategoryList () { |
|
|
async loadCategoryList () { |
|
@ -360,26 +368,189 @@ const vueGis = { |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.categoryList = data |
|
|
// this.categoryList = data |
|
|
|
|
|
this.categoryList = [ |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "0", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "1", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "2", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "3", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "4", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "0", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "1", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "2", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "3", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "4", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "0", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "1", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "2", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "3", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "4", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "0", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "1", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "2", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "3", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "4", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "0", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "1", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "2", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "3", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "4", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "0", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "1", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "2", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "3", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "4", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "0", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "1", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "2", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "3", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "4", |
|
|
|
|
|
categoryName: "机关直属部门" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "0", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "1", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "2", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "3", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
categoryKey: "4", |
|
|
|
|
|
categoryName: "deserunt" |
|
|
|
|
|
}, |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
this.categoryListshow = [] |
|
|
this.categoryListshow = [] |
|
|
let itemArray = [] |
|
|
let itemArray = [] |
|
|
|
|
|
|
|
|
this.categoryList.forEach((item, index) => { |
|
|
this.categoryList.forEach((item, index) => { |
|
|
if (!item.dataIcon) { |
|
|
if (!item.dataIcon) { |
|
|
item.dataIcon = require('../../../../../assets/img/shuju/volunteer3.png') |
|
|
item.dataIcon = require('../../../../../assets/img/shuju/volunteer3.png') |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (index % 4 === 0) {//偶数 |
|
|
item.sel = true |
|
|
itemArray.push(item) |
|
|
|
|
|
} else { |
|
|
|
|
|
itemArray.push(item) |
|
|
|
|
|
this.categoryListshow.push(itemArray) |
|
|
|
|
|
itemArray = [] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let chunk = 4 |
|
|
|
|
|
for (let i = 0, j = this.categoryList.length; i < j; i += chunk) { |
|
|
|
|
|
this.categoryListshow.push(this.categoryList.slice(i, i + chunk)) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(this.categoryListshow) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(msg) |
|
|
this.$message.error(msg) |
|
|