From f25c3e67df9d428351c61236b2bdd515e3c7e9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=8A=B2=E9=BE=99?= <2860996570@qq.com> Date: Tue, 9 Jan 2024 15:18:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bigScreenApi/eventApi.js | 10 +++++++ .../bigScreen/components/mapLeftContent.vue | 28 ++++++++++--------- src/views/components/newEvent/index.vue | 8 +++++- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/api/bigScreenApi/eventApi.js b/src/api/bigScreenApi/eventApi.js index ac4c1d0..d98f41b 100644 --- a/src/api/bigScreenApi/eventApi.js +++ b/src/api/bigScreenApi/eventApi.js @@ -46,4 +46,14 @@ export function tasksummarystat() { url: "/task/summary/stat", method:'get', }) +} + +// 自动提交事件流程 +export function formEnginesaveData(data) { + return request({ + baseURL: process.env.VUE_APP_BASE_API2, + url: "/api/eform/engine/formEngine/saveData", + method:'post', + data + }) } \ No newline at end of file diff --git a/src/views/bigScreen/components/mapLeftContent.vue b/src/views/bigScreen/components/mapLeftContent.vue index 7c3eb6f..04e41ee 100644 --- a/src/views/bigScreen/components/mapLeftContent.vue +++ b/src/views/bigScreen/components/mapLeftContent.vue @@ -16,7 +16,7 @@
· 上报事件总数
-
{{ MYsummarystatdata.total || "" }}
+
{{ MYsummarystatdata.total || "0" }}
@@ -24,7 +24,8 @@
· 已受理事件
-
{{ Fnsummarystat(MYsummarystatdata.records.filter(item => item.status == 1)) }}
+
{{ Fnsummarystat(MYsummarystatdata.records ? MYsummarystatdata.records.filter(item => + item.status == 1) : []) }}
@@ -32,7 +33,8 @@
· 未受理事件
-
{{ Fnsummarystat(MYsummarystatdata.records.filter(item => item.status == 0)) }}
+
{{ Fnsummarystat(MYsummarystatdata.records ? MYsummarystatdata.records.filter(item => + item.status == 0) : []) }}
@@ -45,7 +47,7 @@
· 派发任务总数
-
{{tasksummarystatdata.total || '0'}}
+
{{ tasksummarystatdata.total || '0' }}
@@ -53,7 +55,7 @@
· 已处理任务数量
-
{{tasksummarystatdata.solved || '0'}}
+
{{ tasksummarystatdata.solved || '0' }}
@@ -61,15 +63,15 @@
· 未处理任务数量
-
{{tasksummarystatdata.inProgress || 0}}
+
{{ tasksummarystatdata.inProgress || "0" }}
- +
@@ -87,8 +89,8 @@ export default { components: { titleBox, mapNumber }, data() { return { - perpsonNum:0, - personOnLine:0, + perpsonNum: 0, + personOnLine: 0, peopleArray: [ { title: '李飞' @@ -161,7 +163,7 @@ export default { MYsummarystatdata: { records: [] },//事件统计概况数据 - tasksummarystatdata:{} // 任务概况分类统计 + tasksummarystatdata: {} // 任务概况分类统计 } }, props: ['personLine', 'carLine'], @@ -170,11 +172,11 @@ export default { handler(newPerson) { // console.log(newPerson,'在线人员情况'); this.peopleArray = newPerson - if(newPerson){ + if (newPerson) { this.perpsonNum = newPerson.length; let line = 0; newPerson.forEach(element => { - if(element.status == "1") { + if (element.status == "1") { line += 1 } }); diff --git a/src/views/components/newEvent/index.vue b/src/views/components/newEvent/index.vue index 0b6f569..d6c5ec3 100644 --- a/src/views/components/newEvent/index.vue +++ b/src/views/components/newEvent/index.vue @@ -161,6 +161,8 @@ import diaLog from "../../components/dialog/index.vue" import myUpload from "../myUpload/index.vue" import videoUpload from "../videoFileUpload/index.vue" + +import { formEnginesaveData } from '@/api/bigScreenApi/eventApi.js' import { getQueryViewListPage, eventSaveData @@ -1448,13 +1450,17 @@ export default { }, // 确定按钮 confirm(formName){ + console.log(this.formInline); + this.$refs[formName].validate((valid) => { if(valid){ this.formInline.reportEventObj.imgUrl = this.baseUrl + this.formInline.reportEventObj.imgUrl; this.formInline.reportEventObj.videoUrl = this.baseUrl + this.formInline.reportEventObj.videoUrl; this.formInline.reportEventObj.audioUrl = this.baseUrl + this.formInline.reportEventObj.audioUrl; this.formInline.reportEventObj.meshOccurs = this.formInline.reportEventObj.meshOccurs.join(','); - console.log(this.formInline); + formEnginesaveData(this.formInline).then(res=>{ + console.log(res); + }) } }) // eventSaveData(this.formInfo,{formData:this.formInline}).then(res=>{