Commit a3fa35f5 authored by zhangjianqian's avatar zhangjianqian

大屏新增工业用户,修改大屏工商业用户地区排序,照片添加翻页

parent fa52c825
...@@ -133,9 +133,12 @@ public class TScreenStatisticServiceImpl implements TScreenStatisticService{ ...@@ -133,9 +133,12 @@ public class TScreenStatisticServiceImpl implements TScreenStatisticService{
List<Map<String,Object>> userStatistic = screenStatisticMapper.userStatistic(1); List<Map<String,Object>> userStatistic = screenStatisticMapper.userStatistic(1);
result.put("categories", userStatistic.stream().map(item -> item.get("areaName")).collect(Collectors.toList())); result.put("categories", userStatistic.stream().map(item -> item.get("areaName")).collect(Collectors.toList()));
result.put("residential", userStatistic.stream().map(item -> item.get("num")).collect(Collectors.toList())); result.put("residential", userStatistic.stream().map(item -> item.get("num")).collect(Collectors.toList()));
//工商用户统计 //商业用户统计
List<Map<String,Object>> bussinessStatistic = screenStatisticMapper.userStatistic(2); List<Map<String,Object>> bussinessStatistic = screenStatisticMapper.userStatistic(2);
result.put("commercial", bussinessStatistic.stream().map(item -> item.get("num")).collect(Collectors.toList())); result.put("commercial", bussinessStatistic.stream().map(item -> item.get("num")).collect(Collectors.toList()));
//工业用户统计
List<Map<String,Object>> industryStatistic = screenStatisticMapper.userStatistic(3);
result.put("industry", industryStatistic.stream().map(item -> item.get("num")).collect(Collectors.toList()));
return result; return result;
} }
......
...@@ -144,9 +144,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -144,9 +144,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type == 2"> <if test="type == 2">
LEFT JOIN t_business us ON area.id = us.street LEFT JOIN t_business us ON area.id = us.street
</if> </if>
<if test="type == 3">
LEFT JOIN t_industry us ON area.id = us.street
</if>
WHERE area.parent_id = 8 WHERE area.parent_id = 8
GROUP BY area.id GROUP BY area.id
ORDER BY area.id ORDER BY area.sort
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -68,6 +68,10 @@ export default { ...@@ -68,6 +68,10 @@ export default {
this.commercial = Array.isArray(res.data.commercial) this.commercial = Array.isArray(res.data.commercial)
? res.data.commercial ? res.data.commercial
: (res.data.commercial || []).map(Number); : (res.data.commercial || []).map(Number);
this.industry = Array.isArray(res.data.industry)
? res.data.industry
: (res.data.industry || []).map(Number);
this.updateChart(); this.updateChart();
} }
}) })
...@@ -128,18 +132,18 @@ export default { ...@@ -128,18 +132,18 @@ export default {
}, },
}, },
series: [ series: [
// {
// name: "居民用户",
// type: "bar",
// data: this.residential,
// barWidth: 10,
// itemStyle: {
// borderRadius: [2, 2, 0, 0],
// color: "#2fd6ff",
// },
// },
{ {
name: "工商业用户", name: "工业用户",
type: "bar",
data: this.industry,
barWidth: 10,
itemStyle: {
borderRadius: [2, 2, 0, 0],
color: "#2fd6ff",
},
},
{
name: "商业用户",
type: "bar", type: "bar",
data: this.commercial, data: this.commercial,
barWidth: 10, barWidth: 10,
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
v-if="imageList" v-if="imageList"
v-for="img in imageList" v-for="img in imageList"
:src="img" :src="img"
:preview-src-list="[img]" :preview-src-list="imageList"
:z-index="9999" :z-index="9999"
class="picture" class="picture"
/> />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment