From a729411033767f37a4def031376126096611f556 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Fri, 11 Jun 2021 15:29:08 +0800
Subject: [PATCH] 逻辑修改
---
src/views/realTimePolice/real.vue | 30 +++++++++++++++++++++++++-----
src/views/policeTracking/policeTracking.vue | 17 +++++++++++++++--
2 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/src/views/policeTracking/policeTracking.vue b/src/views/policeTracking/policeTracking.vue
index 10348a8..259a212 100644
--- a/src/views/policeTracking/policeTracking.vue
+++ b/src/views/policeTracking/policeTracking.vue
@@ -144,7 +144,7 @@
<el-form-item label="人员编号">
<el-input
disabled="true"
- v-model="form.baname"
+ v-model="form.baid"
autocomplete="off"
></el-input>
</el-form-item>
@@ -153,7 +153,7 @@
<el-form-item label="人员名称">
<el-input
disabled="true"
- v-model="form.baid"
+ v-model="form.baname"
autocomplete="off"
></el-input>
</el-form-item>
@@ -549,6 +549,10 @@
onSubmit() {
var that = this;
+ var userId = JSON.parse(
+ window.localStorage.getItem("群防群控后台管理系统-userInfo")
+ ).content.real_name;
+
if (that.form.securityArr != null && that.form.securityArr != ""){
that.form.jtype = "1";
if (typeof that.form.securityArr != "string"){
@@ -559,6 +563,15 @@
that.form.securityArr = security.substring(0, security.length - 1);
}
+ if (that.form.securityArr == "" || that.form.securityArr == null) {
+ that.form.jtype = "0";
+ that.form.alarmPeople = "";
+ }else {
+ that.form.jtype = "1";
+ //已派发保安
+ that.form.alarmPeople = userId;
+ }
+
axios({
url: '/api/blade-jfpts/alarm/alarm/submit',
method: 'post',
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index c4bddd7..4e22cc7 100644
--- a/src/views/realTimePolice/real.vue
+++ b/src/views/realTimePolice/real.vue
@@ -464,19 +464,25 @@
},
methods: {
rowSave(row, done, loading) {
- var security = "";
- row.securityArr.forEach((item) => {
- security = security + item + ",";
- });
- row.securityArr = security.substring(0, security.length - 1);
+
+ if (typeof row.securityArr != "string") {
+ var security = "";
+ row.securityArr.forEach((item) => {
+ security = security + item + ",";
+ });
+ row.securityArr = security.substring(0, security.length - 1);
+ }
var userId = JSON.parse(
window.localStorage.getItem("群防群控后台管理系统-userInfo")
).content.real_name;
if (row.securityArr == "" || row.securityArr == null) {
row.jtype = "0";
+ row.alarmPeople = "";
}else {
row.jtype = "1";
+ //已派发保安
+ row.alarmPeople = userId;
}
add(row).then(
@@ -494,6 +500,11 @@
);
},
rowUpdate(row, index, done, loading) {
+
+ var userId = JSON.parse(
+ window.localStorage.getItem("群防群控后台管理系统-userInfo")
+ ).content.real_name;
+
if (typeof row.securityArr != "string") {
var security = "";
row.securityArr.forEach((item) => {
@@ -502,6 +513,15 @@
row.securityArr = security.substring(0, security.length - 1);
}
+ if (row.securityArr == "" || row.securityArr == null) {
+ row.jtype = "0";
+ row.alarmPeople = "";
+ }else {
+ row.jtype = "1";
+ //已派发保安
+ row.alarmPeople = userId;
+ }
+
row.coordinate = "";
update(row).then(
() => {
--
Gitblit v1.9.3