From 31c88baed206964b075c49e2d2e28924970cde6c Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 20 Mar 2021 18:37:44 +0800
Subject: [PATCH] 追踪页面部分修改,首页跳转实时警情页面做更改
---
src/views/realTimePolice/real.vue | 36 +++--
src/views/policeTracking/policeTracking.vue | 160 +++++++++++++++++++++++---
src/views/home/home.vue | 121 ++++++++++---------
src/page/index/logo.vue | 2
4 files changed, 225 insertions(+), 94 deletions(-)
diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index 25f6b93..56c23f6 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -376,7 +376,6 @@
if (response.data.data.length > 0) {
that.deviceId = response.data.data[0].id;
- console.log(userId, response.data.data[0].alarmId);
if (
response.data.data[0].waringType == "紧急求救" &&
response.data.data[0].alarmId == userId
@@ -682,7 +681,6 @@
that.recorder.start().then(
() => {
// 开始录音
- console.log(111);
},
(error) => {
// 出错了
diff --git a/src/views/home/home.vue b/src/views/home/home.vue
index 4ff2a84..9cf32f0 100644
--- a/src/views/home/home.vue
+++ b/src/views/home/home.vue
@@ -7,74 +7,77 @@
* @LastEditTime: 2021-03-18 10:37:42
-->
<template>
- <iframe v-show="iframeState" id="show-iframe" frameborder=0 name="showHere" scrolling=auto
- src="https://web.byisf.com:18001/bigScreen/view/1349193280059879426"></iframe>
+ <iframe
+ v-show="iframeState"
+ id="show-iframe"
+ frameborder="0"
+ name="showHere"
+ scrolling="auto"
+ src="https://web.byisf.com:18001/bigScreen/view/1349193280059879426"
+ ></iframe>
</template>
<script>
- export default {
- name: "tcgl.vue",
- created() {
- //this.getData();
+export default {
+ name: "tcgl.vue",
+ created() {
+ //this.getData();
+ },
+ data() {
+ return {
+ dialogTableVisible: false,
+ form: {},
+ };
+ },
+ mounted() {
+ window.handleStartAnimalHeat = this.handleStartAnimalHeat;
+ window.handleStartHealthcode = this.handleStartHealthcode;
+ window.handleStartAlarm = this.handleStartAlarm;
+ },
+ methods: {
+ //体温监测分页数据
+ handleStartAnimalHeat(data) {
+ this.$router.push({
+ path: `/animalHeat/animalHeatPage`,
+ query: data[0],
+ });
},
- data() {
- return {
- dialogTableVisible:false,
- form: {},
- }
+ //健康码分页数据
+ handleStartHealthcode(data) {
+ this.$router.push({
+ path: `/healthcode/healthcodePage`,
+ query: data[0],
+ });
},
- mounted() {
- window.handleStartAnimalHeat = this.handleStartAnimalHeat;
- window.handleStartHealthcode = this.handleStartHealthcode;
- window.handleStartAlarm = this.handleStartAlarm;
+ //主动报警(一键求助,电话报警)分页数据
+ handleStartAlarm(data) {
+ this.$router.push({
+ path: `/realTimePolice/index`,
+ query: data[0],
+ });
},
- methods: {
- //体温监测分页数据
- handleStartAnimalHeat(data) {
- this.$router.push({
- path: `/animalHeat/animalHeatPage`,
- query: data[0]
- });
- },
- //健康码分页数据
- handleStartHealthcode(data){
- this.$router.push({
- path: `/healthcode/healthcodePage`,
- query: data[0]
- });
- },
- //主动报警(一键求助,电话报警)分页数据
- handleStartAlarm(data){
- this.$router.push({
- path: `/realTimePolice/index`,
- query: data[0]
- });
- }
- // getData() {
- // var that = this;
- //
- // window.clearTimeout(window.realTimeQuery);
- //
- // window.realTimeQuery = setInterval(function () {
- // //that.dialogTableVisible = true;
- // }, 3000);
- // }
- }
- }
+ // getData() {
+ // var that = this;
+ //
+ // window.clearTimeout(window.realTimeQuery);
+ //
+ // window.realTimeQuery = setInterval(function () {
+ // //that.dialogTableVisible = true;
+ // }, 3000);
+ // }
+ },
+};
</script>
<style>
+#show-iframe {
+ display: block !important;
+ height: 95%;
+}
- #show-iframe {
- display: block !important;
- height: 95%;
-
- }
-
- .avue-main .avue-view {
- height: 100%;
- padding: 0px 5px !important;
- }
-
+.avue-main .avue-view {
+ height: 100%;
+ padding: 0px 5px !important;
+}
</style>
diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index 65d2faf..854477e 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -331,14 +331,17 @@
<div>
<el-image
:src="src"
+ :preview-src-list="srcList"
style="width: 150px; margin-left: 5px"
></el-image>
<el-image
:src="src"
+ :preview-src-list="srcList"
style="width: 150px; margin-left: 5px"
></el-image>
<el-image
:src="src"
+ :preview-src-list="srcList"
style="width: 150px; margin-left: 5px"
></el-image>
</div>
@@ -374,7 +377,12 @@
<el-row :align="center" style="margin-top: 40px">
<el-col :offset="10">
- <el-button @click="onSubmit" type="danger">处理完成</el-button>
+ <el-button
+ @click="onSubmit"
+ :disabled="form.jtype == 2 ? true : false"
+ :type="form.jtype == 2 ? 'info' : 'danger'"
+ >处理完成</el-button
+ >
</el-col>
</el-row>
</el-card>
@@ -412,6 +420,12 @@
},
src:
"https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
+ srcList: [
+ "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
+ "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
+ "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
+ "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
+ ],
form: {},
itemOption: {
menuBtn: false,
@@ -471,37 +485,143 @@
this.getReceivingAlarm();
},
methods: {
- onSubmit() {
- var newAxios = axios.create({
- baseURL: "https://web.byisf.com:18001",
- withCredentials: false,
- headers: {},
- });
+ getDate() {
+ // 当前时间
+ var timestamp = Date.parse(new Date());
+ var serverDate = new Date(timestamp);
- newAxios
+ // 本周周一的时间
+ var mondayTime =
+ timestamp - (serverDate.getDay() - 1) * 24 * 60 * 60 * 1000;
+ var mondayData = new Date(mondayTime);
+ //年
+ var mondayY = mondayData.getFullYear();
+ //月
+ var mondayM =
+ mondayData.getMonth() + 1 < 10
+ ? "0" + (mondayData.getMonth() + 1)
+ : mondayData.getMonth() + 1;
+ //日
+ var mondayD =
+ mondayData.getDate() < 10
+ ? "0" + mondayData.getDate()
+ : mondayData.getDate();
+ // 当前时间
+ var currentData = new Date(timestamp);
+ //年
+ var currentY = currentData.getFullYear();
+ //月
+ var currentM =
+ currentData.getMonth() + 1 < 10
+ ? "0" + (currentData.getMonth() + 1)
+ : currentData.getMonth() + 1;
+ //日
+ var currentD =
+ currentData.getDate() < 10
+ ? "0" + currentData.getDate()
+ : currentData.getDate();
+ //时
+ var currenH =
+ currentData.getHours() < 10
+ ? "0" + currentData.getHours()
+ : currentData.getHours();
+ //分
+ var currenM =
+ currentData.getMinutes() < 10
+ ? "0" + currentData.getMinutes()
+ : currentData.getMinutes();
+ //秒
+ var currenS =
+ currentData.getSeconds() < 10
+ ? "0" + currentData.getSeconds()
+ : currentData.getSeconds();
+
+ return {
+ day: {
+ beginTime: currentY + "-" + currentM + "-" + currentD + " 00:00:00",
+ endTime:
+ currentY +
+ "-" +
+ currentM +
+ "-" +
+ currentD +
+ " " +
+ currenH +
+ ":" +
+ currenM +
+ ":00",
+ },
+ week: {
+ beginTime: mondayY + "-" + mondayM + "-" + mondayD + " 00:00:00",
+ endTime:
+ currentY +
+ "-" +
+ currentM +
+ "-" +
+ currentD +
+ " " +
+ currenH +
+ ":" +
+ currenM +
+ ":00",
+ },
+ month: {
+ beginTime: mondayY + "-" + mondayM + "-01 00:00:00",
+ endTime:
+ currentY +
+ "-" +
+ currentM +
+ "-" +
+ currentD +
+ " " +
+ currenH +
+ ":" +
+ currenM +
+ ":00",
+ },
+ current:
+ currentY +
+ "-" +
+ currentM +
+ "-" +
+ currentD +
+ " " +
+ currenH +
+ ":" +
+ currenM +
+ ":" +
+ currenS,
+ };
+ },
+ onSubmit() {
+ var that = this;
+ axios
.post(
- "/api/blade-jfpts/jingdan/jingdan/updateInfo",
+ "/api/blade-jfpts/alarm/alarm/updateJtype",
{},
{
params: {
- id: this.form.id,
- handleP: this.form.handleP,
- handName: this.form.handName,
- handletype: this.form.handletype,
- type: "2",
+ jid: this.form.id,
+ jtype: 2,
+ rid: this.form.alarmId,
+ bz: this.form.bz,
+ snumber: this.form.alarmId,
+ sname: this.form.alarmPeople,
+ zc: "处理完成",
+ zctime: this.getDate().current,
},
}
)
- .then((res) => {
- if (res.data.msg == "修改成功") {
+ .then(function (res) {
+ if ((res.msg = "修改成功")) {
var arr = [];
- this.$store.state.tags.tagList.forEach((item) => {
- if (item.value != this.$store.state.tags.tag.value) {
+ that.$store.state.tags.tagList.forEach((item) => {
+ if (item.value != that.$store.state.tags.tag.value) {
arr.push(item);
}
});
- this.$store.state.tags.tagList = arr;
- this.$router.go(-1);
+ that.$store.state.tags.tagList = arr;
+ that.$router.go(-1);
}
});
},
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index dccb28a..5ef7533 100644
--- a/src/views/realTimePolice/real.vue
+++ b/src/views/realTimePolice/real.vue
@@ -2,7 +2,7 @@
* @Author: Morpheus
* @Date: 2021-03-17 15:21:33
* @Last Modified by: Morpheus
- * @Last Modified time: 2021-03-20 16:47:06
+ * @Last Modified time: 2021-03-20 18:12:42
*/
<template>
<basic-container>
@@ -812,35 +812,44 @@
};
if (
- this.$router.query &&
- this.$router.query != null &&
- this.$router.query != ""
+ this.$route.query.waringType &&
+ this.$route.query != undefined &&
+ this.$route.query != null &&
+ this.$route.query != ""
) {
- if (this.$router.query.status) {
- this.activeClass = this.$router.query.status;
+ if (
+ this.$route.query.status != undefined &&
+ this.$route.query.status != null &&
+ this.$route.query.status == ""
+ ) {
+ this.activeClass = this.$route.query.status;
this.page.currentPage = 1;
- if (this.$router.query.status == 0) {
+ if (this.$route.query.status == 0) {
params = {
- waringType: this.$router.query.waringType,
+ waringType: this.$route.query.waringType,
beginTime: this.dateTime.day.beginTime,
endTime: this.dateTime.day.endTime,
};
- } else if (this.$router.query.status == 1) {
+ } else if (this.$route.query.status == 1) {
params = {
- waringType: this.$router.query.waringType,
+ waringType: this.$route.query.waringType,
beginTime: this.dateTime.week.beginTime,
endTime: this.dateTime.week.endTime,
};
- } else if (this.$router.query.status == 2) {
+ } else if (this.$route.query.status == 2) {
params = {
- waringType: this.$router.query.waringType,
+ waringType: this.$route.query.waringType,
beginTime: this.dateTime.month.beginTime,
endTime: this.dateTime.month.endTime,
};
}
} else {
+ this.activeClass = 0;
+ this.page.currentPage = 1;
params = {
- waringType: this.$router.query.waringType,
+ waringType: this.$route.query.waringType,
+ beginTime: this.dateTime.day.beginTime,
+ endTime: this.dateTime.day.endTime,
};
}
}
@@ -859,6 +868,7 @@
...this.query,
};
}
+
this.loading = true;
getList(page.currentPage, page.pageSize, values).then((res) => {
const data = res.data.data;
--
Gitblit v1.9.3