|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div id="containerMap" class="containerMap">
|
|
|
<div class="alarm_list">
|
|
|
- <span class="alarm_list_item" v-for="item in alarm_list"><img :src="alarm_type[item.code].icon"/><span>{{ alarm_type[item.code].name }}</span><span class="alarm_item_brager" :style="{'background-color':alarm_type[item.code].bg}">{{ item.count }}</span></span>
|
|
|
+ <span class="alarm_list_item" v-for="item in alarm_curr" @click="showFLowDlg(item)"><img :src="alarm_type[item.code].icon"/><span>{{ alarm_type[item.code].name }}</span><span class="alarm_item_brager" :style="{'background-color':alarm_type[item.code].bg}">{{ item.value }}</span></span>
|
|
|
</div>
|
|
|
<div class="houselist">
|
|
|
<span class="item" @click="toHouse(item)" v-for="item in houselist" :style="{'background-color':alarm_type[item.alarmtype].bg}" >
|
|
|
@@ -22,9 +22,9 @@
|
|
|
<div class="area">
|
|
|
<div class="title"><span class="line"></span><span>流程督办</span><span class="stat_rate">(月)</span></div>
|
|
|
<div class="toolsbtn">
|
|
|
- <div class="toolsbtn_item active">总量</div>
|
|
|
- <div class="toolsbtn_item">闭单量</div>
|
|
|
- <div class="toolsbtn_item">未闭单量</div>
|
|
|
+ <div :class="currFlowType=='total'?'toolsbtn_item active':'toolsbtn_item'" @click="switchFlow('total')">总量</div>
|
|
|
+ <div :class="currFlowType=='closed'?'toolsbtn_item active':'toolsbtn_item'" @click="switchFlow('closed')">闭单量</div>
|
|
|
+ <div :class="currFlowType=='unclosed'?'toolsbtn_item active':'toolsbtn_item'" @click="switchFlow('unclosed')">未闭单量</div>
|
|
|
</div>
|
|
|
<div class="echartsdiv" ref="echarts03" style="height: calc(100% - 69px);"></div>
|
|
|
</div>
|
|
|
@@ -41,11 +41,37 @@
|
|
|
</div>
|
|
|
<house ref="houseComp" />
|
|
|
</div>
|
|
|
+ <el-dialog title="流程列表" v-model="open" width="1024px" append-to-body>
|
|
|
+ <el-table v-loading="loading" :data="fcList" height="460px">
|
|
|
+ <el-table-column label="发起时间" align="center" prop="createTime" />
|
|
|
+ <el-table-column label="流程名称" align="center" prop="flowsName" />
|
|
|
+ <el-table-column label="仓库名称标识" align="center" show-overflow-tooltip prop="house" width="150px"/>
|
|
|
+ <el-table-column label="区域/位置标识" align="center" show-overflow-tooltip prop="area" width="150px"/>
|
|
|
+ <el-table-column label="状态" align="center" prop="status" />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button link type="primary" @click="handleJump(scope.row.journeyUrl)" >详情</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ :total="total"
|
|
|
+ v-model:page="queryParams.page"
|
|
|
+ v-model:limit="queryParams.pageSize"
|
|
|
+ @pagination="getFcList"
|
|
|
+ />
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="open=false">关 闭</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
|
|
import {shallowRef,onMounted} from "vue";
|
|
|
import * as echarts from "echarts";
|
|
|
+import request from '@/utils/request';
|
|
|
import House from './components/housecamer.vue'
|
|
|
import Player from './components/player.vue'
|
|
|
const playercontainer=ref(null)
|
|
|
@@ -57,13 +83,32 @@ const echarts03 = ref(null);
|
|
|
const echars01data = ref(null);
|
|
|
const echars02data = ref(null);
|
|
|
const echars03data = ref(null);
|
|
|
+const alarm_curr=ref(null);
|
|
|
const infoWindowContent = ref(null);
|
|
|
const showInfoWindow = ref(false);
|
|
|
const currentHouseCode = ref('');
|
|
|
const currentHouse = ref({});
|
|
|
const houseComp = ref(null);
|
|
|
+const currFlowType=ref("total");
|
|
|
+const eventFlowData =ref([]);
|
|
|
+const open=ref(false);
|
|
|
+const fcList = ref([]);
|
|
|
+const loading = ref(false);
|
|
|
+const queryParams=ref({
|
|
|
+ page: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ flowid:0,
|
|
|
+});
|
|
|
+const total = ref(0);
|
|
|
let infoWindow = null;
|
|
|
let geocoder = null;
|
|
|
+const typeMapping={
|
|
|
+ "0":"none",
|
|
|
+ "201":"smoke",
|
|
|
+ "195":"fire",
|
|
|
+ "189":"person",
|
|
|
+ "191":"temp"
|
|
|
+}
|
|
|
const alarm_type=ref({
|
|
|
"none":{
|
|
|
name:'行为合规',
|
|
|
@@ -91,41 +136,8 @@ const alarm_type=ref({
|
|
|
bg:'#833dd9'
|
|
|
}
|
|
|
})
|
|
|
-const alarm_list = ref([{
|
|
|
- code:"none",
|
|
|
- count:0
|
|
|
-},{
|
|
|
- code:"smoke",
|
|
|
- count:0
|
|
|
-},{
|
|
|
- code:"fire",
|
|
|
- count:0
|
|
|
-},{
|
|
|
- code:"temp",
|
|
|
- count:0
|
|
|
-},{
|
|
|
- code:"person",
|
|
|
- count:0
|
|
|
-}]);
|
|
|
|
|
|
-const houselist=ref([{
|
|
|
- name:"自贡中心仓库",
|
|
|
- code:"zg",
|
|
|
- city:"510300",
|
|
|
- addr:"自贡市沿滩区金川路东段28号高新仓储物流园一期",
|
|
|
- lnglat:[0,0],
|
|
|
- alarmtype:"none",
|
|
|
- video_url:"http://47.108.159.150:8080/flv/34020000001110000001/34020000001310000055",
|
|
|
-},{
|
|
|
- name:"成都中心仓库",
|
|
|
- code:"cd",
|
|
|
- city:"510100",
|
|
|
- addr:"简阳市石桥镇羊羊小镇大华国际B1栋13楼1322号",
|
|
|
- lnglat:[0,0],
|
|
|
- alarmtype:"smoke",
|
|
|
- camername:"1-10002号摄像头",
|
|
|
- video_url:"http://47.108.159.150:8080/flv/34020000001180000003/34020000001310000051",
|
|
|
-}]);
|
|
|
+const houselist=ref(null);
|
|
|
|
|
|
const initHouseLoca=()=>{
|
|
|
for (let index = 0; index < houselist.value.length; index++) {
|
|
|
@@ -143,7 +155,38 @@ const inHouse=()=>{
|
|
|
if(playercontainer.value!=null){
|
|
|
playercontainer.value.pause();
|
|
|
}
|
|
|
- houseComp.value.load(currentHouse,alarm_type.value);
|
|
|
+ houseComp.value.load(houselist.value,currentHouse,alarm_type.value);
|
|
|
+}
|
|
|
+
|
|
|
+const switchFlow=(key)=> {
|
|
|
+ currFlowType.value = key;
|
|
|
+ loadEchars03();
|
|
|
+}
|
|
|
+
|
|
|
+const showFLowDlg=(flow)=>{
|
|
|
+ if(flow.id==0) return;
|
|
|
+ open.value=true;
|
|
|
+ queryParams.value.page = 1;
|
|
|
+ queryParams.value.pageSize = 10;
|
|
|
+ queryParams.value.flowid = flow.id;
|
|
|
+ getFcList();
|
|
|
+}
|
|
|
+const getFcList=()=>{
|
|
|
+ loading.value = true;
|
|
|
+ fcList.value=[];
|
|
|
+ request({
|
|
|
+ url: '/index/flows/'+queryParams.value.flowid+"?pageNum="+queryParams.value.page+"&pageSize="+queryParams.value.pageSize,
|
|
|
+ method: 'get',
|
|
|
+ data: null
|
|
|
+ }).then(res=>{
|
|
|
+ loading.value = false;
|
|
|
+ fcList.value = res.rows;
|
|
|
+ total.value = res.total;
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const handleJump=(url)=>{
|
|
|
+ window.open(url,"_blank")
|
|
|
}
|
|
|
|
|
|
const getGeoLocation=(houseind,address)=> {
|
|
|
@@ -186,7 +229,7 @@ const addMarker=(houseinfo,lnglat) =>{
|
|
|
currentHouse.value = extdata;
|
|
|
infoWindow.setContent(infoWindowContent.value)
|
|
|
infoWindow.open(map.value,e.target.getPosition());
|
|
|
- playercontainer.value.play(currentHouse.value.video_url)
|
|
|
+ if(currentHouse.value.video_url!="") playercontainer.value.play(currentHouse.value.video_url)
|
|
|
}else{
|
|
|
playercontainer.value.destroy();
|
|
|
document.getElementById(currentHouseCode.value).className = "custom-marker";
|
|
|
@@ -237,8 +280,8 @@ const initMap = () => {
|
|
|
map.value.setStatus({
|
|
|
dragEnable: true, // 是否可拖拽
|
|
|
zoomEnable: true, // 是否可缩放
|
|
|
- })
|
|
|
- initHouseLoca();
|
|
|
+ })
|
|
|
+ initData();
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
console.log('error', e)
|
|
|
@@ -246,49 +289,66 @@ const initMap = () => {
|
|
|
}
|
|
|
|
|
|
const initData = ()=>{
|
|
|
- //模拟数据
|
|
|
- echars01data.value=[{
|
|
|
- code:"none",
|
|
|
- name:alarm_type.value["none"].name,
|
|
|
- value:5,
|
|
|
- rate:Math.round(5/12*100)
|
|
|
- },
|
|
|
- {
|
|
|
- code:"smoke",
|
|
|
- name:alarm_type.value["smoke"].name,
|
|
|
- value:1,
|
|
|
- rate:Math.round(1/12*100)
|
|
|
- },
|
|
|
- {
|
|
|
- code:"fire",
|
|
|
- name:alarm_type.value["fire"].name,
|
|
|
- value:2,
|
|
|
- rate:Math.round(2/12*100)
|
|
|
- },
|
|
|
- {
|
|
|
- code:"temp",
|
|
|
- name:alarm_type.value["temp"].name,
|
|
|
- value:Math.round(1/12*100),
|
|
|
- rate:0
|
|
|
- },
|
|
|
- {
|
|
|
- code:"person",
|
|
|
- name:alarm_type.value["person"].name,
|
|
|
- value:3,
|
|
|
- rate:Math.round(4/12*100)
|
|
|
- },
|
|
|
- ];
|
|
|
- echars02data.value=[
|
|
|
- {date:"01",value:"2"},{date:"02",value:"0"},{date:"03",value:"1"},{date:"04",value:"3"},{date:"05",value:"0"},{date:"06",value:"0"},
|
|
|
- ,{date:"07",value:"0"},{date:"08",value:"0"},{date:"09",value:"0"},{date:"10",value:"1"},{date:"11",value:"0"},{date:"12",value:"0"}
|
|
|
- ];
|
|
|
- echars03data.value=[
|
|
|
- {date:"01",value:"2"},{date:"02",value:"0"},{date:"03",value:"1"},{date:"04",value:"3"},{date:"05",value:"0"},{date:"06",value:"0"},
|
|
|
- ,{date:"07",value:"0"},{date:"08",value:"0"},{date:"09",value:"0"},{date:"10",value:"1"},{date:"11",value:"0"},{date:"12",value:"0"}
|
|
|
- ];
|
|
|
- loadEchars01();
|
|
|
- loadEchars02();
|
|
|
- loadEchars03();
|
|
|
+ //加载仓库列表
|
|
|
+ request({
|
|
|
+ url: '/index/house',
|
|
|
+ method: 'get',
|
|
|
+ data: null
|
|
|
+ }).then(res=>{
|
|
|
+ const userinfo = JSON.parse(sessionStorage.getItem("user")||'{}');
|
|
|
+ if (userinfo.userName!=null) {
|
|
|
+ let tmplst =[];
|
|
|
+ for (let index = 0; index < res.length; index++) {
|
|
|
+ let element = res[index];
|
|
|
+
|
|
|
+ element["lnglat"] = [element.lat||0,element.lng||0];
|
|
|
+ element["alarmtype"] = 'none';
|
|
|
+ element["code"] = element.simpleName;
|
|
|
+ element["name"] = element.houseName;
|
|
|
+ element["addr"] = element.houseAddr;
|
|
|
+ element["alarmtype"] = typeMapping[element.params.alarm];
|
|
|
+ element["video_url"] = "";
|
|
|
+ if(element.params.channel.length>0){
|
|
|
+ element["camername"] = element.params.channel[0].channelName;
|
|
|
+ element["video_url"] = window.VideoServerUrl+"/flv/"+element.params.channel[0].deviceCode+"/"+element.params.channel[0].channelId ;
|
|
|
+ }
|
|
|
+ tmplst.push(element);
|
|
|
+ }
|
|
|
+ houselist.value = tmplst;
|
|
|
+ initHouseLoca();
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const loadStat=()=>{
|
|
|
+ ///index/events
|
|
|
+ request({
|
|
|
+ url: '/index/events',
|
|
|
+ method: 'get',
|
|
|
+ data: null
|
|
|
+ }).then(res=>{
|
|
|
+ let vl=[];
|
|
|
+ for (let k in typeMapping) {
|
|
|
+ vl.push({id:k, code:typeMapping[k],name:alarm_type.value[typeMapping[k]].name,value:res.curr[k]*1});
|
|
|
+ }
|
|
|
+ alarm_curr.value = vl;
|
|
|
+ vl=[];
|
|
|
+ for (let k in typeMapping) {
|
|
|
+ vl.push({code:typeMapping[k],name:alarm_type.value[typeMapping[k]].name,value:res.month[k]*1});
|
|
|
+ }
|
|
|
+ echars01data.value = vl;
|
|
|
+ loadEchars01();
|
|
|
+ vl=[];
|
|
|
+ for (let index = 0; index < res.trade.length; index++) {
|
|
|
+ const element = res.trade[index];
|
|
|
+ vl.push({date:element.date.substr(5),value:element.value})
|
|
|
+ }
|
|
|
+ echars02data.value = vl;
|
|
|
+ loadEchars02();
|
|
|
+
|
|
|
+ eventFlowData.value = res.flow;
|
|
|
+ loadEchars03();
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const loadEchars01=()=>{
|
|
|
@@ -508,6 +568,12 @@ const loadEchars02=()=>{
|
|
|
echarts.init(echarts02.value).setOption(option);
|
|
|
}
|
|
|
const loadEchars03=()=>{
|
|
|
+ let vl=[];
|
|
|
+ for (let index = 0; index < eventFlowData.value.length; index++) {
|
|
|
+ const element = eventFlowData.value[index];
|
|
|
+ vl.push({date:element.date.substr(5),value:element[currFlowType.value]})
|
|
|
+ }
|
|
|
+ echars03data.value = vl;
|
|
|
var gain = 0.9;
|
|
|
var gap = 0;
|
|
|
let maxvalue=0;
|
|
|
@@ -652,19 +718,8 @@ const loadEchars03=()=>{
|
|
|
echarts.init(echarts03.value).setOption(option);
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
- const userinfo = JSON.parse(sessionStorage.getItem("user")||'{}');
|
|
|
- if (userinfo.userName!=null) {
|
|
|
- let tmplst =[];
|
|
|
- for (let index = 0; index < houselist.value.length; index++) {
|
|
|
- const element = houselist.value[index];
|
|
|
- if(userinfo.userName=='admin'|| userinfo.userName=='sc'|| element.code==userinfo.userName){
|
|
|
- tmplst.push(element)
|
|
|
- }
|
|
|
- }
|
|
|
- houselist.value = tmplst;
|
|
|
- }
|
|
|
- initMap();
|
|
|
- initData();
|
|
|
+ loadStat();
|
|
|
+ initMap();
|
|
|
})
|
|
|
</script>
|
|
|
<style>
|
|
|
@@ -816,6 +871,8 @@ onMounted(() => {
|
|
|
height: 260px;
|
|
|
border-radius: 5px;
|
|
|
background: #0000003b;
|
|
|
+ background-image: url('/images/video_bg.png');
|
|
|
+ background-size: contain;
|
|
|
.camername{
|
|
|
height: 26px;
|
|
|
width: auto;
|
|
|
@@ -869,6 +926,7 @@ onMounted(() => {
|
|
|
left: 75px;
|
|
|
top: 40px;
|
|
|
.alarm_list_item{
|
|
|
+ cursor: pointer;
|
|
|
position: relative;
|
|
|
margin: 0 5px;
|
|
|
padding: 6px 20px;
|