From 57282048850d03ee8db828f586c364577a44f02f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 03 Feb 2021 11:53:53 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue
---
src/views/realTimePolice/real.vue | 36 ++++++++---
vue.config.js | 3
public/realVideo/audio.mp3 | 0
public/map/widgets/map/MapWidget.js | 4 +
public/map/index.html | 7 +
src/views/clientManagement/clientManagement.vue | 92 +++++++++++++++++++-----------
src/page/index/logo.vue | 12 ++--
7 files changed, 101 insertions(+), 53 deletions(-)
diff --git a/public/map/index.html b/public/map/index.html
index 840c1b8..8edea66 100644
--- a/public/map/index.html
+++ b/public/map/index.html
@@ -4,7 +4,7 @@
* @Author: yangsx
* @Date: 2019-11-28 09:50:16
* @LastEditors: song
- * @LastEditTime: 2021-01-29 16:25:05
+ * @LastEditTime: 2021-02-01 17:14:21
-->
<!DOCTYPE html>
<html lang="zh">
@@ -61,9 +61,12 @@
}
function showFun(id) {
- console.log(_AppEvent)
_AppEvent.dispatchAppEvent(_AppEvent.RUN_WIDGET, id);
}
+
+ function dw(x,y) {
+ _AppEvent.dispatchAppEvent("goto", {x:x,y:y});
+ }
</script>
</head>
diff --git a/public/map/widgets/map/MapWidget.js b/public/map/widgets/map/MapWidget.js
index 09e0c91..3b6a8d4 100644
--- a/public/map/widgets/map/MapWidget.js
+++ b/public/map/widgets/map/MapWidget.js
@@ -124,6 +124,10 @@
this._eventHandlers.push(this.map.on("mouse-move", lang.hitch(this, this._onMouseMove)));
AppEvent.addAppEventListener(AppEvent.SWITCH_BASEMAP, lang.hitch(this, this.onSwitchBaseMap));
AppEvent.addAppEventListener(AppEvent.ADD_TOP_MOST_LAYER, lang.hitch(this, this.onAddTopMostLayer));
+ AppEvent.addAppEventListener("goto", lang.hitch(this, this.goto));
+ },
+ goto: function (evt) {
+ this.map.centerAndZoom(new Point(evt.x,evt.y, new SpatialReference({ wkid: 4326 })), 14);
},
onload: function () {
//var listNode = this.map.attribution.listNode;
diff --git a/public/realVideo/audio.mp3 b/public/realVideo/audio.mp3
new file mode 100644
index 0000000..2336787
--- /dev/null
+++ b/public/realVideo/audio.mp3
Binary files differ
diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index 249a1e3..3fe81c5 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -138,10 +138,10 @@
var that = this;
axios({
- url: 'http://192.168.0.102:1888/api/blade-jfpts/alarm/alarm/page?current=1&size=1',
+ url: 'https://s16s652780.51mypc.cn/api/blade-jfpts/alarm/alarm/getLimit',
method: 'get',
}).then(function (response) {
- that.deviceId = response.data.data.records[0].id;
+ that.deviceId = response.data.data[0].id;
//获得最新ID,开启实时报警循环
that.layerRealtime();
});
@@ -152,7 +152,7 @@
window.clearTimeout(window.realTimeQuery);
window.realTimeQuery = setInterval(function () {
axios({
- url: 'http://192.168.0.102:1888/api/blade-jfpts/alarm/alarm/selecttx?id='+that.deviceId,
+ url: 'https://s16s652780.51mypc.cn/api/blade-jfpts/alarm/alarm/selecttx?id='+that.deviceId,
method: 'post',
}).then(function (response) {
if (response.data.data.length > 0){
@@ -181,7 +181,7 @@
});
}else{
axios({
- url: 'http://192.168.0.102:1888/api/blade-jfpts/jingdan/jingdan/submit',
+ url: 'https://s16s652780.51mypc.cn/api/blade-jfpts/jingdan/jingdan/submit',
method: 'post',
data: {
rName: row.rname,
@@ -224,7 +224,7 @@
revoke(row){
var that = this;
axios({
- url: 'http://192.168.0.102:1888/api/blade-jfpts/alarm/alarm/deletejj?id='+row.id,
+ url: 'https://s16s652780.51mypc.cn/api/blade-jfpts/alarm/alarm/deletejj?id='+row.id,
method: 'post',
}).then(function () {
that.dialogTableVisible = false;
@@ -236,7 +236,7 @@
},updateJtyep(row){
var that = this;
axios({
- url: 'http://192.168.0.102:1888/api/blade-jfpts/alarm/alarm/updateJtype?id='+row.id+"&czTime="+row.czTime+"&bz="+row.bz,
+ url: 'https://s16s652780.51mypc.cn/api/blade-jfpts/alarm/alarm/updateJtype?id='+row.id+"&czTime="+row.czTime+"&bz="+row.bz,
method: 'post',
}).then(function () {
});
diff --git a/src/views/clientManagement/clientManagement.vue b/src/views/clientManagement/clientManagement.vue
index 0309872..78c2d1f 100644
--- a/src/views/clientManagement/clientManagement.vue
+++ b/src/views/clientManagement/clientManagement.vue
@@ -51,11 +51,13 @@
</el-tag>
</template>
- <template slot-scope="{ row }" slot="jfzt">
- <el-tag>{{
- row.type == "0" ? "已缴费" : row.type == "1" ? "待缴费" : "无"
+ <template slot-scope="{ row }" slot="expireTime">
+ <span>
+ {{
+ row.expireTime == "" ? row.expireTime : row.expireTime == null ? row.expireTime : row.expireTime.split(" ")[0]
}}
- </el-tag>
+ </span>
+ <i class="el-icon-warning" v-if="row.type == 1"></i>
</template>
</avue-crud>
@@ -75,7 +77,7 @@
</template>
<script>
- import {getList, remove, update, add, getclient, getDeptLazyTree,getAll} from "@/api/client/client";
+ import {getList, remove, update, add, getclient, getDeptLazyTree, getAll} from "@/api/client/client";
import {mapGetters} from "vuex";
export default {
@@ -93,7 +95,7 @@
total: 0
},
dialogTableVisible: false,
- gridData:null,
+ gridData: null,
selectionList: [],
treeDeptId: '',
treeData: [],
@@ -128,7 +130,7 @@
labelWidth: '100',
dialogWidth: 950,
menuWidth: 160,
- size:"mini",
+ size: "mini",
tip: false,
searchShow: true,
searchMenuSpan: 4,
@@ -145,6 +147,27 @@
prop: "deviceName",
searchPlaceholder: "请输入设备名称/编号",
search: true,
+ },
+ {
+ label: "到期时间",
+ prop: "releaseTimeRange",
+ type: "datetime",
+ format: "yyyy-MM-dd hh:mm:ss",
+ valueFormat: "yyyy-MM-dd hh:mm:ss",
+ searchRange: true,
+ searchSpan: 5,
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入时间",
+ trigger: "blur"
+ }
+ ]
},
{
label: "设备编号",
@@ -209,6 +232,10 @@
type: "select",
slot: true,
width: 100,
+ rules: [{
+ required: true,
+ trigger: "blur"
+ }],
dicData: [
{
label: "撤防",
@@ -223,15 +250,8 @@
label: "设备状态",
prop: "dxzt",
slot: true,
- addDisplay:false,
- editDisplay:false,
- }, {
- label: "缴费状态",
- prop: "jfzt",
- width: 100,
- addDisplay:false,
- editDisplay:false,
- slot: true,
+ addDisplay: false,
+ editDisplay: false,
}, {
label: "缴费信息",
prop: "pay",
@@ -251,21 +271,22 @@
label: "安装时间",
prop: "stime",
type: "datetime",
- format: "yyyy-MM-dd hh:mm:ss",
+ format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd hh:mm:ss",
width: 130
}, {
label: "到期时间",
prop: "expireTime",
type: "datetime",
- format: "yyyy-MM-dd hh:mm:ss",
+ slot: true,
+ format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd hh:mm:ss",
- width: 130
+ width: 150
}, {
label: "最后上传时间",
prop: "heartbeat",
type: "datetime",
- format: "yyyy-MM-dd hh:mm:ss",
+ format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd hh:mm:ss",
width: 130
},
@@ -406,12 +427,12 @@
if (releaseTimeRange) {
values = {
...params,
- releaseTime_datege: releaseTimeRange[0],
- releaseTime_datelt: releaseTimeRange[1],
+ beginTime: releaseTimeRange[0],
+ endTime: releaseTimeRange[1],
...this.query
};
values.releaseTimeRange = null;
- }else{
+ } else {
values = {
...params,
...this.query
@@ -424,22 +445,27 @@
var Dqdate = new Date().getTime();
- for(var i = 0;i< data.records.length;i++){
+ for (var i = 0; i < data.records.length; i++) {
var date = new Date(data.records[i].heartbeat).getTime();
if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) {
data.records[i].dxzt = 0;
- }else if(data.records[i].heartbeat == ""){
+ } else if (data.records[i].heartbeat == "") {
data.records[i].dxzt = 0;
- }else{
+ } else {
data.records[i].dxzt = 1;
}
}
+
+ data.records.sort((a,b)=>{
+ return a.dxzt - b.dxzt;
+ });
+
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}, rowStyle({row, column, rowIndex}) {
- if (row.heartbeat != null && row.heartbeat != "" ) {
+ if (row.heartbeat != null && row.heartbeat != "") {
var date = new Date(row.heartbeat).getTime();
var Dqdate = new Date().getTime();
if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) {
@@ -448,16 +474,16 @@
};
}
- }else if(row.heartbeat == ""){
+ } else if (row.heartbeat == "") {
return {
color: "#fe1515"
};
}
},
- payWin(){
+ payWin() {
var that = this;
getAll().then(res => {
- var data =res.data.data;
+ var data = res.data.data;
var lists = [];
var xb = 0;
for (var i = 0; i < data.length; i++) {
@@ -467,7 +493,7 @@
lists.push(data[i]);
}
}
- if (lists.length > 0){
+ if (lists.length > 0) {
that.gridData = lists;
that.dialogTableVisible = true;
}
@@ -479,12 +505,12 @@
</script>
<style>
- .payWin{
+ .payWin {
overflow-y: auto;
height: 350px;
}
- .payWin .el-dialog__body{
+ .payWin .el-dialog__body {
padding-top: 0px !important;
}
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index 11ea728..d633cf1 100644
--- a/src/views/realTimePolice/real.vue
+++ b/src/views/realTimePolice/real.vue
@@ -89,7 +89,7 @@
icon="el-icon-location-outline"
:size="size"
:type="type"
- @click.stop="handleMap()"
+ @click.stop="handleMap(row)"
>定位</el-button
>
</template>
@@ -274,8 +274,18 @@
</el-form>
</el-dialog>
- <el-drawer title="电子地图" append-to-body="true" :visible.sync="showMap">
- <iframe :src="mapUrl" frameborder="0" width="100%" height="100%"></iframe>
+ <el-drawer
+ title="电子地图"
+ append-to-body="true"
+ :visible.sync="showMap"
+ >
+ <iframe
+ id="mapDiv"
+ src="https://s16s652780.51mypc.cn/jfpt/map/index.html"
+ frameborder="0"
+ width="100%"
+ height="100%"
+ ></iframe>
</el-drawer>
</basic-container>
</template>
@@ -294,7 +304,6 @@
data() {
return {
showMap: false,
- mapUrl: "https://s16s652780.51mypc.cn/jfpt/map/index.html",
hls: "",
videoSource: "",
dialogTableVisible: false,
@@ -613,7 +622,6 @@
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
- debugger
const { releaseTimeRange } = this.query;
let values = {
...params
@@ -636,6 +644,11 @@
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
+
+ data.records.sort((a,b)=>{
+ return a.jtype - b.jtype;
+ });
+
this.data = data.records;
this.loading = false;
this.selectionClear();
@@ -761,10 +774,11 @@
handleHistory(row) {
this.$router.push({ path: `/real/history/${row.deviceNumber}` });
},
- handleMap() {
+ handleMap(row) {
this.showMap = true;
- this.mapUrl =
- "https://s16s652780.51mypc.cn/jfpt/map/index.html?openid=PatrolManagement";
+ debugger;
+ var sddsds = document.getElementById("mapDiv");
+ document.getElementById("mapDiv").contentWindow.dw(row.jd,row.wd)
},
handleManage(row) {
this.form = row;
@@ -780,7 +794,7 @@
} else {
axios({
url:
- "http://192.168.0.102:1888/api/blade-jfpts/jingdan/jingdan/submit",
+ "https://s16s652780.51mypc.cn/api/blade-jfpts/jingdan/jingdan/submit",
method: "post",
data: {
rName: row.rname,
@@ -822,7 +836,7 @@
var that = this;
axios({
url:
- "http://192.168.0.102:1888/api/blade-jfpts/alarm/alarm/deletejj?id=" +
+ "https://s16s652780.51mypc.cn/api/blade-jfpts/alarm/alarm/deletejj?id=" +
row.id,
method: "post"
}).then(function() {
@@ -834,7 +848,7 @@
var that = this;
axios({
url:
- "http://192.168.0.102:1888/api/blade-jfpts/alarm/alarm/updateJtype?id=" +
+ "https://s16s652780.51mypc.cn/api/blade-jfpts/alarm/alarm/updateJtype?id=" +
row.id +
"&czTime=" +
row.czTime +
diff --git a/vue.config.js b/vue.config.js
index 1edcbff..803ac04 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -34,7 +34,8 @@
proxy: {
'/api': {
//本地服务接口地址
- target: 'http://192.168.0.102:82/',
+ //target: 'http://192.168.0.102:82/',
+ target: 'https://s16s652780.51mypc.cn/api/',
//远程演示服务地址,可用于直接启动项目
//target: 'https://saber.bladex.vip/api',
ws: true,
--
Gitblit v1.9.3