|
@@ -60,23 +60,38 @@
|
|
|
<el-row>
|
|
|
<el-row class="rightTopTitle"><span>火灾</span></el-row>
|
|
|
<el-row class="rightTopChart">
|
|
|
- <gauge ref="gauge1" :dataMap="0.2" :dataNumber="20" color="#468EFD"></gauge>
|
|
|
+ <gauge ref="gauge1" :dataMap="proptionList.find(val=>val.type === '火灾') && proptionList.find(val=>val.type === '火灾').number/proptionList[4] || 0" :dataNumber="proptionList.find(val=>val.type === '火灾') && proptionList.find(val=>val.type === '火灾').number || 0" color="#468EFD"></gauge>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="rightTopNumber">
|
|
|
+ <span>
|
|
|
+ 同比:{{proptionList.find(val=>val.type === '火灾') && (proptionList.find(val=>val.type === '火灾').radio * 100).toFixed(2) || 0}}%
|
|
|
+ <span :style="{color: proptionList.find(val=>val.type === '火灾') && proptionList.find(val=>val.type === '火灾').sameStatus === 2 ? 'green' : 'red'}">{{proptionList.find(val=>val.type === '火灾') && proptionList.find(val=>val.type === '火灾').sameStatus === 2 ? '↓' : proptionList.find(val=>val.type === '火灾') && proptionList.find(val=>val.type === '火灾').sameStatus === 2?'↑':''}}</span>
|
|
|
+ </span>
|
|
|
</el-row>
|
|
|
- <el-row class="rightTopNumber"><span>同比:14% <span style="color:green;font-wight:800">↓</span></span></el-row>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-row class="rightTopTitle"><span>社会救助</span></el-row>
|
|
|
<el-row class="rightTopChart">
|
|
|
- <gauge ref="gauge2" :dataMap="0.3" :dataNumber="30" color="#06B1B9"></gauge>
|
|
|
+ <gauge ref="gauge2" :dataMap="proptionList.find(val=>val.type === '社会救助') && proptionList.find(val=>val.type === '社会救助').number/proptionList[4] || 0" :dataNumber="proptionList.find(val=>val.type === '社会救助') && proptionList.find(val=>val.type === '社会救助').number || 0" color="#06B1B9"></gauge>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="rightTopNumber">
|
|
|
+ <span>
|
|
|
+ 同比:{{proptionList.find(val=>val.type === '社会救助') && (proptionList.find(val=>val.type === '社会救助').radio * 100).toFixed(2) || 0}}%
|
|
|
+ <span :style="{color: proptionList.find(val=>val.type === '社会救助') && proptionList.find(val=>val.type === '社会救助').sameStatus === 2 ? 'green' : 'red'}">{{proptionList.find(val=>val.type === '社会救助') && proptionList.find(val=>val.type === '社会救助').sameStatus === 2 ? '↓' : proptionList.find(val=>val.type === '社会救助') && proptionList.find(val=>val.type === '社会救助').sameStatus === 2?'↑':''}}</span>
|
|
|
+ </span>
|
|
|
</el-row>
|
|
|
- <el-row class="rightTopNumber"><span>同比:14% <span style="color:green">↓</span></span></el-row>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-row class="rightTopTitle"><span>抢险救援</span></el-row>
|
|
|
<el-row class="rightTopChart">
|
|
|
- <gauge ref="gauge3" :dataMap="0.5" :dataNumber="50" color="#E4951E"></gauge>
|
|
|
+ <gauge ref="gauge3" :dataMap="proptionList.find(val=>val.type === '抢险救援') && proptionList.find(val=>val.type === '抢险救援').number/proptionList[4] || 0" :dataNumber="proptionList.find(val=>val.type === '抢险救援') && proptionList.find(val=>val.type === '抢险救援').number || 0" color="#E4951E"></gauge>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="rightTopNumber">
|
|
|
+ <span>
|
|
|
+ 同比:{{proptionList.find(val=>val.type === '抢险救援') && (proptionList.find(val=>val.type === '抢险救援').radio * 100).toFixed(2) || 0}}%
|
|
|
+ <span :style="{color: proptionList.find(val=>val.type === '抢险救援') && proptionList.find(val=>val.type === '抢险救援').sameStatus === 2 ? 'green' : 'red'}">{{proptionList.find(val=>val.type === '抢险救援') && proptionList.find(val=>val.type === '抢险救援').sameStatus === 2 ? '↓' : proptionList.find(val=>val.type === '抢险救援') && proptionList.find(val=>val.type === '抢险救援').sameStatus === 2?'↑':''}}</span>
|
|
|
+ </span>
|
|
|
</el-row>
|
|
|
- <el-row class="rightTopNumber"><span>同比:14% <span style="color:red">↑</span></span></el-row>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -89,6 +104,7 @@
|
|
|
row-style="height:.425rem;"
|
|
|
cell-style="height:.425rem;box-sizing: border-box;"
|
|
|
style="width: 100%; margin: 0 auto"
|
|
|
+ @row-click="rowClickMap"
|
|
|
>
|
|
|
<el-table-column
|
|
|
show-overflow-tooltip
|
|
@@ -176,99 +192,22 @@ import barChart from "@c/bar";
|
|
|
import lineSmooth from "@c/line-smooth";
|
|
|
import gauge from "@c/gauge";
|
|
|
import linstener from "@c/mixins/linstener";
|
|
|
-import map from "@c/mixins/map-gaode";
|
|
|
+import map from "@c/mixins/map-data";
|
|
|
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- type: "火灾",
|
|
|
- policeTime: "23:00:00",
|
|
|
- alertLevel: "二级",
|
|
|
- address: "闵行区",
|
|
|
- car: "2辆",
|
|
|
- policeCause: "电器火灾",
|
|
|
- department: "吴泾支队",
|
|
|
- status: "1",
|
|
|
- callingUp: "1号",
|
|
|
- equipName: "一七",
|
|
|
- carNumber: "沪X5477应急",
|
|
|
- carStatus: "出动",
|
|
|
- disposeTime: "1:00:00",
|
|
|
- correspondent: "张三",
|
|
|
- commander: "李四",
|
|
|
- firemen: "王五",
|
|
|
- driver: "赵六",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "火灾",
|
|
|
- policeTime: "23:00:00",
|
|
|
- alertLevel: "二级",
|
|
|
- address: "闵行区",
|
|
|
- car: "2辆",
|
|
|
- policeCause: "电器火灾",
|
|
|
- department: "吴泾支队",
|
|
|
- status: "1",
|
|
|
- callingUp: "1号",
|
|
|
- equipName: "一七",
|
|
|
- carNumber: "沪X5477应急",
|
|
|
- carStatus: "出动",
|
|
|
- disposeTime: "1:00:00",
|
|
|
- correspondent: "张三",
|
|
|
- commander: "李四",
|
|
|
- firemen: "王五",
|
|
|
- driver: "赵六",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "火灾",
|
|
|
- policeTime: "23:00:00",
|
|
|
- alertLevel: "二级",
|
|
|
- address: "闵行区",
|
|
|
- car: "2辆",
|
|
|
- policeCause: "电器火灾",
|
|
|
- department: "吴泾支队",
|
|
|
- status: "1",
|
|
|
- callingUp: "1号",
|
|
|
- equipName: "一七",
|
|
|
- carNumber: "沪X5477应急",
|
|
|
- carStatus: "出动",
|
|
|
- disposeTime: "1:00:00",
|
|
|
- correspondent: "张三",
|
|
|
- commander: "李四",
|
|
|
- firemen: "王五",
|
|
|
- driver: "赵六",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "火灾",
|
|
|
- policeTime: "23:00:00",
|
|
|
- alertLevel: "二级",
|
|
|
- address: "闵行区",
|
|
|
- car: "2辆",
|
|
|
- policeCause: "电器火灾",
|
|
|
- department: "吴泾支队",
|
|
|
- status: "1",
|
|
|
- callingUp: "1号",
|
|
|
- equipName: "一七",
|
|
|
- carNumber: "沪X5477应急",
|
|
|
- carStatus: "出动",
|
|
|
- disposeTime: "1:00:00",
|
|
|
- correspondent: "张三",
|
|
|
- commander: "李四",
|
|
|
- firemen: "王五",
|
|
|
- driver: "赵六",
|
|
|
- },
|
|
|
- ],
|
|
|
+ tableData: [],
|
|
|
headerData: [
|
|
|
{ prop: "type", name: "类型" },
|
|
|
- { prop: "policeTime", name: "立案时间" },
|
|
|
- { prop: "alertLevel", name: "警情等级" },
|
|
|
- { prop: "address", name: "案发地址" },
|
|
|
- { prop: "car", name: "调动车辆" },
|
|
|
- { prop: "policeCause", name: "原因" },
|
|
|
- { prop: "department", name: "所属中队" },
|
|
|
- { prop: "status", name: "状况" },
|
|
|
+ { prop: "lasj", name: "立案时间" },
|
|
|
+ { prop: "ajdj", name: "警情等级" },
|
|
|
+ { prop: "afdz", name: "案发地址" },
|
|
|
+ { prop: "cdcl", name: "调动车辆" },
|
|
|
+ { prop: "bcxx", name: "原因" },
|
|
|
+ { prop: "zhongdui", name: "所属中队" },
|
|
|
+ { prop: "ajzt", name: "状况" },
|
|
|
],
|
|
|
isVideo:false,
|
|
|
playerOptions: {
|
|
@@ -301,6 +240,7 @@ export default {
|
|
|
monthList:[],
|
|
|
houseList:[],
|
|
|
proptionList:[],
|
|
|
+ proptionMapList:[],
|
|
|
timeArea: 1,
|
|
|
};
|
|
|
},
|
|
@@ -330,7 +270,8 @@ export default {
|
|
|
this.$axios.get(this.$api.fire.fireType),
|
|
|
]);
|
|
|
if (res[0]) this.fireTypeList = res[0].data;
|
|
|
- // this.getPage();
|
|
|
+ this.getPage();
|
|
|
+ this.getPageMap();
|
|
|
this.getHouse();
|
|
|
this.getProption();
|
|
|
this.getMonth();
|
|
@@ -341,12 +282,106 @@ export default {
|
|
|
"?" +
|
|
|
this.$qs.stringify({
|
|
|
current: 1,
|
|
|
- size: 100,
|
|
|
+ size: 50,
|
|
|
+ })
|
|
|
+ );
|
|
|
+ if (res) this.tableData = res.data.records;
|
|
|
+ },
|
|
|
+ // 实时警情处理
|
|
|
+ async getPageMap() {
|
|
|
+ let res = await this.$axios.get(this.$api.house.pageMap +
|
|
|
+ "?" +
|
|
|
+ this.$qs.stringify({
|
|
|
startTime: this.$store.state.timeList[0] || "",
|
|
|
endTime: this.$store.state.timeList[1] || "",
|
|
|
})
|
|
|
);
|
|
|
- if (res) this.tableData = res.data;
|
|
|
+ if (res){
|
|
|
+ window.jMap.Locate.clearLocate()
|
|
|
+ this.proptionMapList = res.data.records
|
|
|
+ this.addMarker(res.data.records)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async rowClickMap(row){
|
|
|
+ if(this.proptionMapList.every(val=>val.id !== row.id)){
|
|
|
+ this.addMarker([row])
|
|
|
+ window.jMap.goTo({
|
|
|
+ x: Number(row.gisX),
|
|
|
+ y: Number(row.gisY),
|
|
|
+ radius: 1000
|
|
|
+ }, {
|
|
|
+ duration: 3,
|
|
|
+ offset: {
|
|
|
+ heading: -4,
|
|
|
+ pitch: -70,
|
|
|
+ range: 0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.addMarkerInfo(row)
|
|
|
+ },
|
|
|
+ // 创建标点和点击事件
|
|
|
+ addMarker(lnglats) {
|
|
|
+ let target = lnglats.map((val, ind) => {
|
|
|
+ let marker = {
|
|
|
+ id: val.id,
|
|
|
+ attrbutes: val,
|
|
|
+ position: { x: val.gisX, y: val.gisY, z: 0 },
|
|
|
+ // image: { url: icon,width:29.5,height:48.5 },
|
|
|
+ };
|
|
|
+ return marker
|
|
|
+ })
|
|
|
+ console.log(target)
|
|
|
+ window.jMap.Locate.pointLocate(target, {
|
|
|
+ isZoom: false,
|
|
|
+ scaleByDistance: { minScaling: 0, maxScaling: 1, minDistance: 1000, maxDistance: 30000 },
|
|
|
+ click: async (val) => {
|
|
|
+ console.log(val)
|
|
|
+ let res = await this.$axios.get(this.$api.house.one +
|
|
|
+ "?" +
|
|
|
+ this.$qs.stringify({
|
|
|
+ id: val.attrbutes.id,
|
|
|
+ })
|
|
|
+ );
|
|
|
+ if (res){
|
|
|
+ this.addMarkerInfo(res.data)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 标点点击弹窗
|
|
|
+ addMarkerInfo(res) {
|
|
|
+ if (this.oldPopupId && res.id === this.oldPopupId) {
|
|
|
+ window.jMap.Popup.hide();
|
|
|
+ return this.oldPopup = null
|
|
|
+ }
|
|
|
+ window.jMap.Popup.show({
|
|
|
+ id: res.id,
|
|
|
+ //使用自定义窗体
|
|
|
+ position: { x: Number(res.gisX), y: Number(res.gisY), z: Number(0) }, //使用自定义窗体
|
|
|
+ element: `<div class="ysc-dynamic-layer ys-css3-box" onclick="vue.removePopup">
|
|
|
+ <div class="tableTooltip mapTab">
|
|
|
+ <div class="tableTitle">
|
|
|
+ <div>${res.ajlx}</div>
|
|
|
+ </div>
|
|
|
+ <el-row class="tableContent">
|
|
|
+ <div class="max">案发地址:${res.afdz}</div>
|
|
|
+ <div>案件性质:${res.ajxz}</div>
|
|
|
+ <div>案件状态:${res.ajzt}</div>
|
|
|
+ <div class="max">立案时间:${res.lasj}</div>
|
|
|
+ <div>警情等级:${res.ajdj}</div>
|
|
|
+ <div>所属中队:${res.zhongdui}</div>
|
|
|
+ <div>调动车辆:${res.cdcl}</div>
|
|
|
+ <div>状况:${res.ajzt}</div>
|
|
|
+ <div class="max" :title="${res.bcxx}">报警原因:${res.bcxx}</div>
|
|
|
+ <div>死亡人数:${res.qrqk}</div>
|
|
|
+ <div>受伤人数:${res.qrqk}</div>
|
|
|
+ <div class="max">经济损失:${res.qrqk}</div>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>`,
|
|
|
+ }, { isZoom: false, offset: [-170, -310] });
|
|
|
+ this.oldPopup = res.id
|
|
|
},
|
|
|
// 警情时段分布
|
|
|
async getHouse() {
|
|
@@ -364,8 +399,23 @@ export default {
|
|
|
},
|
|
|
// 警情处置情况
|
|
|
async getProption() {
|
|
|
- let res = await this.$axios.get(this.$api.house.alertStatistics);
|
|
|
- if (res) this.proptionList = res.data;
|
|
|
+ let res = await this.$axios.get(this.$api.house.alertStatistics +
|
|
|
+ "?" +
|
|
|
+ this.$qs.stringify({
|
|
|
+ startTime: this.$store.state.timeList[0] || "",
|
|
|
+ endTime: this.$store.state.timeList[1] || "",
|
|
|
+ }));
|
|
|
+ if (res){
|
|
|
+ this.proptionList = res.data;
|
|
|
+ this.proptionList[4] = res.data.reduce((data, rel) => {
|
|
|
+ console.log(data + rel.number)
|
|
|
+ return data + rel.number;
|
|
|
+ }, 0);
|
|
|
+ console.log(this.proptionList[4]);
|
|
|
+ this.$refs.gauge1.getData();
|
|
|
+ this.$refs.gauge2.getData();
|
|
|
+ this.$refs.gauge3.getData();
|
|
|
+ }
|
|
|
},
|
|
|
// 历史警情趋势图
|
|
|
async getMonth() {
|