Commit 7f757649 by 匡雅琴

1.50.0开发

1 parent 14ecaa10
...@@ -1591,16 +1591,6 @@ ...@@ -1591,16 +1591,6 @@
"integrity": "sha1-MgmlHKSkrVQaO409am1bg6JIWTU=", "integrity": "sha1-MgmlHKSkrVQaO409am1bg6JIWTU=",
"dev": true "dev": true
}, },
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"bluebird": { "bluebird": {
"version": "3.5.1", "version": "3.5.1",
"resolved": "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.1.tgz", "resolved": "http://registry.npm.taobao.org/bluebird/download/bluebird-3.5.1.tgz",
...@@ -3494,6 +3484,15 @@ ...@@ -3494,6 +3484,15 @@
"safer-buffer": "^2.1.0" "safer-buffer": "^2.1.0"
} }
}, },
"echarts": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.5.0.tgz",
"integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==",
"requires": {
"tslib": "2.3.0",
"zrender": "5.5.0"
}
},
"editions": { "editions": {
"version": "1.3.4", "version": "1.3.4",
"resolved": "http://registry.npm.taobao.org/editions/download/editions-1.3.4.tgz", "resolved": "http://registry.npm.taobao.org/editions/download/editions-1.3.4.tgz",
...@@ -4227,13 +4226,6 @@ ...@@ -4227,13 +4226,6 @@
"schema-utils": "^0.4.5" "schema-utils": "^0.4.5"
} }
}, },
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"filename-regex": { "filename-regex": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.1.tgz", "resolved": "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.1.tgz",
...@@ -4462,9 +4454,8 @@ ...@@ -4462,9 +4454,8 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"bindings": "^1.5.0", "nan": "^2.3.0",
"nan": "^2.12.1", "node-pre-gyp": "^0.6.39"
"node-pre-gyp": "*"
}, },
"dependencies": { "dependencies": {
"abbrev": { "abbrev": {
...@@ -12999,6 +12990,11 @@ ...@@ -12999,6 +12990,11 @@
"integrity": "sha1-Antp+oIyJeVRys4+8DsR9qs3wdc=", "integrity": "sha1-Antp+oIyJeVRys4+8DsR9qs3wdc=",
"dev": true "dev": true
}, },
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"tty-browserify": { "tty-browserify": {
"version": "0.0.0", "version": "0.0.0",
"resolved": "http://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz", "resolved": "http://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz",
...@@ -14914,6 +14910,14 @@ ...@@ -14914,6 +14910,14 @@
} }
} }
} }
},
"zrender": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.5.0.tgz",
"integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==",
"requires": {
"tslib": "2.3.0"
}
} }
} }
} }
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"chart.js": "^2.7.2", "chart.js": "^2.7.2",
"clipboard": "^2.0.4", "clipboard": "^2.0.4",
"downloadjs": "^1.4.7", "downloadjs": "^1.4.7",
"echarts": "^5.5.0",
"element-ui": "^2.13.2", "element-ui": "^2.13.2",
"es6-promise": "^4.2.4", "es6-promise": "^4.2.4",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
......
...@@ -170,3 +170,23 @@ export const GET_HISTORY_LOCATION = params => { ...@@ -170,3 +170,23 @@ export const GET_HISTORY_LOCATION = params => {
export const GET_RESIDENT_LOCATION = params => { export const GET_RESIDENT_LOCATION = params => {
return request(params, '/trialdrive/monitor/residentList', 'get') return request(params, '/trialdrive/monitor/residentList', 'get')
} }
// 风险评估设备停留点查询
export const GET_STAY_POINTLIST = params => {
return request(params, '/trialdrive/riskAssessment/getStayPointList', 'get')
}
// 风险评估获取车辆基本信息
export const GET_BASIC_INFORMATION = params => {
return request(params, '/trialdrive/riskAssessment/getBasicInformation', 'get')
}
// 风险评估设备预测家庭地址和预测工作地址查询
export const GET_RESIDENT_INFORMATION = params => {
return request(params, '/trialdrive/riskAssessment/getResidentInformation', 'get')
}
// 风险评估设备警情数据查询
export const GET_ALARM_POINTLIST = params => {
return request(params, '/trialdrive/riskAssessment/getAlarmInformation', 'get')
}
// 风险评估用户行为数据查询
export const GET_USER_BEHAVIOR_INFORMATION = params => {
return request(params, '/trialdrive/riskAssessment/getUserBehaviorInformation', 'get')
}
\ No newline at end of file \ No newline at end of file
...@@ -647,3 +647,7 @@ ...@@ -647,3 +647,7 @@
opacity: 0.8; opacity: 0.8;
} }
} }
.resident_btn_hidden {
display: none;
}
\ No newline at end of file \ No newline at end of file
<template>
<div>
<div :id="domId" style="width: 100%;" :style="{ height }"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'BarLineChart',
props: {
height: {
type: String
},
domId: {
type: String,
default: 'bar-line'
},
dataList: {
type: Array,
default: () => []
},
xAxisData: {
type: Array,
default: () => ['1', '2', '3', '4', '5', '6']
}
},
data() {
return {
barLineOptions: null,
}
},
mounted() {
this.barLineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.barLineDom)
},
methods: {
drawBarLine() {
console.log(this.xAxisData);
console.log(this.dataList);
this.barLineOptions = {
xAxis: {
type: 'category',
name: '周',
boundaryGap: true,//坐标轴两边留白
data: this.xAxisData,
axisLabel: { //坐标轴刻度标签的相关设置。
interval: 0,//设置为 1,表示『隔一个标签显示一个标签』
// margin:15,
textStyle: {
color: '#FFFFFF',
fontSize: 12,
}
},
},
yAxis: {
type: 'value',
name: '公里',
boundaryGap: true,//坐标轴两边留白
min: 0,
max: 1500,
interval: 300,
axisLabel: {
interval: 0,
margin: 2,
textStyle: {
color: '#FFFFFF',
fontSize: 12,
},
},
splitLine: {
lineStyle: {
color: '#ffffff00;',
},
},
grid: {
left: '15%'
},
},
series: [
{
name: 'usecar',
type: 'line',
symbol: "circle",
symbolSize: 0,
itemStyle: {
normal: {
color: '#419fff',
lineStyle: {
color: "#1890FF",
width: 3
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: 'rgba(65,159,255,0)'
}, {
offset: 1,
color: 'rgba(65,159,255,0.19)'
}]),
}
}
},
data: this.dataList
},
]
};
this[this.domId].setOption(this.barLineOptions)
},
}
}
</script>
<style scoped lang="scss"></style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="pie-box">
<div :id="id" :style="{ height: height }" class="pie-chart"></div>
<div>{{ list.length ? list[0].advise : '无' }}
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'PieChart',
props: {
id: {
type: String,
default: ''
},
height: {
type: String,
default: '8.54vh'
},
list: {
type: Array,
default: () => [
// {
// alarmName: "防拆报警",
// alarmLevel: 20,
// }
]
},
},
data() {
return {
option: '',
echartsPie: '',
mTime: '',
viewData: [],
text: '',
subtext: '',
currentIndex: -1,
mainValue: 0,
numDesc: '',
descColor: ''
}
},
watch: {
list: {
handler(newVal) {
if (newVal.length > 0) {
this.initData()
this.$nextTick(() => {
this.draw()
})
}
},
immediate: true
}
},
mounted() { },
methods: {
// 初始化数据
initData() {
const { list, keys } = this
this.viewData = []
// list.forEach(item => {
// this.viewData.push({
// name: item[keys[0]],
// value: item[keys[1]],
// avarage: item[keys[2]]
// })
// })
},
draw() {
if (this.mTime) clearInterval(this.mTime)
this.echartsPie = echarts.init(document.getElementById(this.id))
console.log(this.list);
// 指定图表的配置项和数据
var storedList = this.list;
const pointerData = this.list.length ? this.list[0].alarmLevel : 0
this.option = {
backgroundColor: "",
series: [{
type: "gauge",
radius: '80%',
startAngle: 225,
endAngle: -45,
splitNumber: 50,
title: {
color: 'red',
},
splitLine: {
show: false,
length: 15,
distance: -10,
lineStyle: {
color: "#fff",
width: 1
}
},
detail: {
show: true,
offsetCenter: [0, 60],
fontSize: 12,
formatter: function(val) {
if (!storedList.length) {
return `{无警情<br/>无风险}`;
} else {
return `${storedList[0].alarmLevel}级警情`;
}
},
textStyle: {
fontSize: 12,
color: '#ffffff',
top: '80%',
},
},
// 仪表盘的线,颜色值为一个数组
axisLine: {
show: true,
// 两端是否设置为圆角;在5.0之后的版本有效
roundCap: true,
lineStyle: {
width: 15,
opacity: 1,
color: [
[pointerData / 100, {
x: 0,
y: 1,
x1: 1,
y1: 0,
colorStops: [{
offset: 0,
color: '#4ED5D7'
},
{
offset: 0.3,
color: '#58D068'
},
{
offset: 0.5,
color: '#FBD924'
},
{
offset: 0.8,
color: '#F38906'
}, {
offset: 1,
color: '#F23204'
}]
}],
[1, "#46495E"]
]
}
},
// 仪表盘刻度标签
axisLabel: {
show: false,
color: "rgba(84, 108, 198, 0.65)",
fontSize: 14,
distance: 20,
formatter: val => {
const num = Math.floor(val);
return num % 20 === 0 ? num : "";
}
},
// 刻度
axisTick: {
show: false
},
// 指针,此设置仅对5.0以上的版本生效
anchor: {
show: true,
icon: "circle",
showAbove: true,
size: 15,
itemStyle: {
borderWidth: 3,
borderColor: "#FFFFFF"
}
},
data: [pointerData]
}
]
};
this.echartsPie.setOption(this.option)
},
// 事件触发
emitEvent(data) {
this.echartsPie.setOption(this.option)
this.$emit('pieAction', data)
},
highlightPie() {
// 取消所有高亮并高亮当前图形
// 遍历饼图数据,取消所有图形的高亮效果
for (var idx in this.option.series[0].data) {
this.echartsPie.dispatchAction({
type: 'downplay',
seriesIndex: 0,
dataIndex: idx
})
}
// 高亮当前图形
this.echartsPie.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: this.currentIndex
})
this.descColor = this.option.color[this.currentIndex]
},
// 高亮
pieActive() {
const dataLen = this.option.series[0].data.length
this.currentIndex = (this.currentIndex + 1) % dataLen
this.highlightPie()
this.emitEvent(this.viewData[this.currentIndex])
}
}
}
</script>
<style lang="scss" scoped>
.pie-box {
background: #181C36;
font-weight: 500;
font-size: 12px;
color: #A3A4AF;
text-align: center;
.center-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
max-width: 40%;
&-num-color {
color: #fff;
}
&-num {
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// font-size: 0.6vw;
--step: 0;
counter-reset: count var(--step);
z-index: var(--step);
transition: --step 0.5s;
&::before {
content: counter(count);
}
}
&-desc {
font-size: 0.5vw;
color: #606266;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
animation: rotateIn 3s infinite;
}
}
.content-desc {
display: flex;
align-items: center;
font-size: 8px;
color: #c8c8c8;
text-align: center;
font-weight: 400;
position: absolute;
top: 91%;
left: 50%;
transform: translateX(-50%);
text-align: center;
height: 14px !important;
white-space: nowrap;
&-icon {
width: 8px;
height: 4px;
border-radius: 2px;
margin-right: 4px;
}
}
}
@property --step {
syntax: '<integer>';
inherits: false;
initial-value: 15;
}
@keyframes rotateIn {
from {
transform: rotateY(0turn);
}
to {
transform: rotateY(-1turn);
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -446,6 +446,7 @@ export default { ...@@ -446,6 +446,7 @@ export default {
pageSize: 10, pageSize: 10,
loadingMore: false, loadingMore: false,
placeholderText: "请输入6位以上车架号", placeholderText: "请输入6位以上车架号",
vidCode: undefined
}; };
}, },
computed: { computed: {
...@@ -936,6 +937,7 @@ export default { ...@@ -936,6 +937,7 @@ export default {
if (!list || list.length <= 0) { if (!list || list.length <= 0) {
return false; return false;
} }
this.vidCode = list[0].vid;
for (var i = 0, len = list.length; i < len; i++) { for (var i = 0, len = list.length; i < len; i++) {
_this.handleSelect(list[i]); _this.handleSelect(list[i]);
} }
...@@ -1221,6 +1223,7 @@ export default { ...@@ -1221,6 +1223,7 @@ export default {
item = this.filterGpsBase(item); item = this.filterGpsBase(item);
item.isSource = relItem.source; item.isSource = relItem.source;
item.vidCode = this.vidCode
}); });
this.monitorList = Object.assign({}, this.monitorList); this.monitorList = Object.assign({}, this.monitorList);
let drawData = data.filter( let drawData = data.filter(
......
...@@ -205,6 +205,13 @@ const routes = [ ...@@ -205,6 +205,13 @@ const routes = [
component: monitor component: monitor
}, },
{ {
path: 'alarmAnalysis',
name: 'alarmAnlaysis',
meta: { title: '警情分析' },
component: () => import('pages/monitor/alarmAnalysis.vue'),
notMenu: true,
},
{
path: 'zoneCar', path: 'zoneCar',
name: 'zoneCar', name: 'zoneCar',
meta: { title: '区域查车' }, meta: { title: '区域查车' },
......
...@@ -153,7 +153,6 @@ const monitor = { ...@@ -153,7 +153,6 @@ const monitor = {
const MAP = mapService.map; const MAP = mapService.map;
this.data = data; this.data = data;
const transferObj = [] const transferObj = []
data.forEach((item) => { data.forEach((item) => {
if (item.gpsLocation && item.gpsLocation.elat && item.gpsLocation.elng) { if (item.gpsLocation && item.gpsLocation.elat && item.gpsLocation.elng) {
transferObj.push(item.gpsLocation) transferObj.push(item.gpsLocation)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!