From 67e458c2fd0f2515ae12a2b2d50371e1211ad936 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 13 Mar 2021 17:09:45 +0800
Subject: [PATCH] 部分接口调整,样式调整,警情分发调整
---
public/map/widgets/alertSecurity/template.html | 1
public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js | 16
public/map/widgets/alertSecurity/config.js | 13 +
public/map/widgets/analysisAndJudgment/template.html | 9
public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.js | 6
public/map/widgets/alertSecurity/AlertSecurity.js | 275 +++++++++++++++++++++
src/styles/distribution.scss | 8
public/map/core/manager/widgetsmanager.js | 8
public/map/widgets/alertSecurity/AlertSecurity.css | 0
src/styles/common.scss | 2
src/views/distribution/index.vue | 423 +++++++++++++++++++------------
11 files changed, 580 insertions(+), 181 deletions(-)
diff --git a/public/map/core/manager/widgetsmanager.js b/public/map/core/manager/widgetsmanager.js
index 6dfcfc8..1aacfa5 100644
--- a/public/map/core/manager/widgetsmanager.js
+++ b/public/map/core/manager/widgetsmanager.js
@@ -130,6 +130,14 @@
"actived": false
},
{
+ "label": "分发处置",
+ "id": "AlertSecurity",
+ "widgetClass": "widgets/alertSecurity/AlertSecurity",
+ "type": "sider",
+ "cssPath": "widgets/alertSecurity/AlertSecurity.css",
+ "actived": false
+ },
+ {
"label": "洪水风险",
"id": "MapBrowseWidgetCopy",
"widgetClass": "widgets/mapBrowsecopy/MapBrowseWidgetCopy",
diff --git a/public/map/widgets/alertSecurity/AlertSecurity.css b/public/map/widgets/alertSecurity/AlertSecurity.css
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/public/map/widgets/alertSecurity/AlertSecurity.css
diff --git a/public/map/widgets/alertSecurity/AlertSecurity.js b/public/map/widgets/alertSecurity/AlertSecurity.js
new file mode 100644
index 0000000..662b2c2
--- /dev/null
+++ b/public/map/widgets/alertSecurity/AlertSecurity.js
@@ -0,0 +1,275 @@
+/*
+ * @Description:
+ * @Version: 1.0
+ * @Author: yangsx
+ * @Date: 2019-12-09 19:01:40
+ * @LastEditors: yangsx
+ * @LastEditTime: 2019-12-14 14:44:57
+ */
+define([
+ "dojo",
+ "dojo/_base/declare",
+ "dojo/_base/lang",
+ "base/BaseWidget",
+ "dojo/text!widgets/alertSecurity/template.html",
+ "base/AppEvent",
+ "base/ConfigData",
+ "widgets/alertSecurity/config",
+ "dojo/dom",
+ "dojo/dom-construct",
+ "dojo/dom-attr",
+ "dojo/dom-style",
+ "dojo/on",
+ "esri/layers/ArcGISDynamicMapServiceLayer",
+ "esri/layers/ArcGISTiledMapServiceLayer",
+ "esri/layers/FeatureLayer",
+ "controls/tab/TabControl",
+ "esri/dijit/SymbolStyler",
+ "esri/styles/basic",
+ "dojo/_base/array",
+ "esri/InfoTemplate",
+ "esri/tasks/query",
+ "esri/tasks/QueryTask",
+ "esri/Color",
+ "esri/toolbars/edit",
+ "esri/graphic",
+ "esri/geometry/Point",
+ "esri/geometry/Polyline",
+ "esri/geometry/Polygon",
+ "esri/geometry/Extent",
+ "esri/tasks/FeatureSet",
+ "esri/renderers/HeatmapRenderer",
+ "esri/symbols/SimpleLineSymbol",
+ "esri/symbols/SimpleFillSymbol",
+ "esri/symbols/PictureMarkerSymbol",
+ "esri/symbols/SimpleMarkerSymbol",
+ "esri/SpatialReference",
+ "esri/tasks/GeometryService",
+ "esri/tasks/ProjectParameters",
+ "esri/layers/GraphicsLayer",
+ "esri/layers/LabelLayer",
+ "esri/symbols/TextSymbol",
+ "esri/renderers/SimpleRenderer",
+ "esri/renderers/ClassBreaksRenderer",
+ "esri/tasks/Geoprocessor",
+ "esri/tasks/DataFile",
+ "esri/geometry/webMercatorUtils",
+ "esri/symbols/Font",
+ "esri/geometry/ScreenPoint",
+ "esri/layers/ImageParameters",
+ "esri/geometry/geometryEngine",
+ "esri/dijit/PopupTemplate",
+ "widgets/clientManagement/FlareClusterLayer_v3",
+ "dojo/domReady!"
+], function (
+ dojo,
+ declare,
+ lang,
+ BaseWidget,
+ template,
+ AppEvent,
+ ConfigData,
+ config,
+ dom,
+ domConstruct,
+ domAttr,
+ domStyle,
+ on,
+ ArcGISDynamicMapServiceLayer,
+ ArcGISTiledMapServiceLayer,
+ FeatureLayer,
+ TabControl,
+ SymbolStyler,
+ basic,
+ arrayUtils,
+ InfoTemplate,
+ Query,
+ QueryTask,
+ Color,
+ Edit,
+ Graphic,
+ Point,
+ Polyline,
+ Polygon,
+ Extent,
+ FeatureSet,
+ HeatmapRenderer,
+ SimpleLineSymbol,
+ SimpleFillSymbol,
+ PictureMarkerSymbol,
+ SimpleMarkerSymbol,
+ SpatialReference,
+ GeometryService,
+ ProjectParameters,
+ GraphicsLayer,
+ LabelLayer,
+ TextSymbol,
+ SimpleRenderer,
+ ClassBreaksRenderer,
+ Geoprocessor,
+ DataFile,
+ webMercatorUtils,
+ Font,
+ ScreenPoint,
+ ImageParameters,
+ geometryEngine,
+ PopupTemplate,
+ FlareClusterLayer
+) {
+ var Widget = declare([BaseWidget], {
+ widgetName: "AlertSecurity",
+ label: "分发处置",
+ templateString: template,
+ _map: null,
+ objThis: null,
+ _siteLayer: new GraphicsLayer(),
+ layuiLayer: null,
+ layuiLadate: null,
+ tabIndex: 0,
+
+ // 保留添加实体图层的变量
+ addEntitys: null,
+ entitysData: [],
+
+
+
+
+
+
+
+ // 巡逻区域或者巡逻路线的描述
+ routeOrRegionDescribe: null,
+
+ // 用来记录巡逻区域或者巡逻路线的下标的
+ patrolIndex: 0,
+
+ // 拖拽
+ isDown: false,
+ x: 0,
+ y: 0,
+ offset: null,
+ moveThis: null,
+ // 电子围栏需要新增的Id
+ newElectronicFenceId: null,
+
+ // 新增路线时,派发人员,人员名称,以及人员id
+ peopleRealName: null,
+ pepleRealId: null,
+ constructor: function (options, srcRefNode) {
+ this._map = options.map;
+ objThis = this;
+
+ this.addEntitys = new GraphicsLayer({
+ id: 'addEntitys'
+ });
+
+ // 添加点面线的图层
+ this.addPolygonEntitys = new GraphicsLayer({
+ id: 'addPolygonEntitys'
+ });
+ // 添加所有图层的地方
+ this.entityPolygonAll = new GraphicsLayer({
+ id: 'entityPolygonAll'
+ });
+
+
+ this._map.addLayer(this.addEntitys);
+
+
+ this._map.addLayer(this.addPolygonEntitys);
+ this._map.addLayer(this.entityPolygonAll);
+
+ },
+
+ startup: function () {
+
+ objThis._map.addLayer(objThis._siteLayer);
+ var that = this;
+
+ var openid = that.getQueryStringByKey('id');
+
+
+ $.ajax({
+ url: "http://web.byisf.com/api/blade-jfpts/jingdan/jingdan/detail?id=" + openid,
+ type: 'get',
+ dataType: 'JSON',
+ success: function (data) {
+ that.addPoint(that.addEntitys, data.data.jd, data.data.wd)
+ }
+ })
+
+ },
+
+ getQueryStringByKey: function (key) {
+ return (document.location.search.match(new RegExp("(?:^\\?|&)" + key + "=(.*?)(?=&|$)")) || ['', null])[1];
+ },
+
+ open: function () {
+ var that = this;
+
+ },
+ close: function () {
+
+ },
+ // 获取当前时间,以及昨天现在的时间
+ getTime: function getTime() {
+ var timestamp = Date.parse(new Date());
+
+ // 当前时间
+ var currentTime = new Date(timestamp);
+ // 年
+ var currentY = currentTime.getFullYear();
+ // 月
+ var currentM = currentTime.getMonth() + 1 < 10 ? '0' + (currentTime.getMonth() + 1) : currentTime.getMonth() + 1;
+ // 日
+ var currentD = currentTime.getDate() < 10 ? '0' + currentTime.getDate() : currentTime.getDate();
+ // 时
+ var currentH = currentTime.getHours() < 10 ? '0' + currentTime.getHours() : currentTime.getHours();
+ // 分
+ var currentDd = currentTime.getMinutes() < 10 ? '0' + currentTime.getMinutes() : currentTime.getMinutes();
+ // 明天
+ var tomorrowTime = new Date(timestamp - 60 * 60 * 24 * 1000);
+ // 年
+ var tomorrowY = tomorrowTime.getFullYear();
+ // 月
+ var tomorrowM = tomorrowTime.getMonth() + 1 < 10 ? '0' + (tomorrowTime.getMonth() + 1) : tomorrowTime.getMonth() + 1;
+ // 日
+ var tomorrowD = tomorrowTime.getDate() < 10 ? '0' + tomorrowTime.getDate() : tomorrowTime.getDate();
+ // 时
+ var tomorrowH = tomorrowTime.getHours() < 10 ? '0' + tomorrowTime.getHours() : tomorrowTime.getHours();
+ // 分
+ var tomorrowDd = tomorrowTime.getMinutes() < 10 ? '0' + tomorrowTime.getMinutes() : tomorrowTime.getMinutes();
+ return {
+ current: currentY + '-' + currentM + '-' + currentD + ' ' + currentH + ':' + currentDd,
+ tomorrow: tomorrowY + '-' + tomorrowM + '-' + tomorrowD + ' ' + tomorrowH + ':' + tomorrowDd,
+ month: currentM + currentD
+ };
+ },
+
+ // 创建实体图层
+ createEntitys: function (entitys, entityContent, name, item, lgtd, lttd, outlineColors) {
+
+ var symbol = new esri.symbol.PictureMarkerSymbol(outlineColors, 26, 26);
+ symbol.name = name;
+ var pt = new Point(lgtd, lttd, new esri.SpatialReference({
+ wkid: 4326
+ }));
+ pt.entityData = item;
+ var graphic = new esri.Graphic(pt, symbol);
+ entitys.add(graphic);
+
+
+ entityContent.push(item);
+ },
+
+ addPoint: function (entitys, lgtd, lttd) {
+ var symbol = new esri.symbol.PictureMarkerSymbol('./images/jingbaored.png', 20, 20);
+ var pt = new Point(lgtd, lttd, new SpatialReference({
+ wkid: 4326
+ }));
+ var graphic = new esri.Graphic(pt, symbol);
+ entitys.add(graphic);
+ }
+ });
+ return Widget;
+});
diff --git a/public/map/widgets/alertSecurity/config.js b/public/map/widgets/alertSecurity/config.js
new file mode 100644
index 0000000..2b48f25
--- /dev/null
+++ b/public/map/widgets/alertSecurity/config.js
@@ -0,0 +1,13 @@
+/*
+ * @Description:
+ * @Version: 1.0
+ * @Author: yangsx
+ * @Date: 2019-12-09 19:01:40
+ * @LastEditors: yangsx
+ * @LastEditTime: 2019-12-14 10:00:41
+ */
+define([], function() {
+ var config = {};
+
+ return config;
+});
diff --git a/public/map/widgets/alertSecurity/template.html b/public/map/widgets/alertSecurity/template.html
new file mode 100644
index 0000000..281c686
--- /dev/null
+++ b/public/map/widgets/alertSecurity/template.html
@@ -0,0 +1 @@
+<div></div>
\ No newline at end of file
diff --git a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js b/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js
index 0ddc52d..b1fd5c3 100644
--- a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js
+++ b/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment.js
@@ -663,13 +663,13 @@
dom.children('.select-list').children('ul').append($("<li areaid='all'>全部</li>"));
var that = this;
$.ajax({
- url: 'https://web.byisf.com/api/blade-jfpts/district/district/selectd',
+ url: 'http://web.byisf.com/api/blade-system/region/select?code=3601',
type: 'GET',
dataType: 'JSON',
success: function (data) {
var res = data.data;
for (var i = 0; i < res.length; i++) {
- dom.children('.select-list').children('ul').append($("<li areaid=" + res[i].addvcds + ">" + res[i].addvnm + "</li>"));
+ dom.children('.select-list').children('ul').append($("<li areaid=" + res[i].code + ">" + res[i].name + "</li>"));
}
}
})
@@ -686,14 +686,14 @@
dom.empty();
var that = this;
$.ajax({
- url: 'https://web.byisf.com/api/blade-jfpts/jingdan/jingdan/selectList',
+ url: 'http://web.byisf.com/api/blade-jfpts/jingdan/jingdan/selectList',
type: 'POST',
dataType: 'JSON',
data: {
beginTime: beginTime,
endTime: endTime,
waringType: waringType,
- addvcd: addvcd,
+ district: addvcd,
type: ''
},
success: function (data) {
@@ -741,7 +741,7 @@
dom.children('.select-list').children('ul').empty();
dom.children('.select-list').children('ul').append($("<li ownerid='all'>全部</li>"));
$.ajax({
- url: 'https://web.byisf.com/api/blade-jfpts/lx/lx/seleclx',
+ url: 'http://web.byisf.com/api/blade-jfpts/lx/lx/seleclx',
type: 'GET',
dataType: 'JSON',
success: function (data) {
@@ -757,7 +757,7 @@
dom.children('.select-list').children('ul').empty();
dom.children('.select-list').children('ul').append($("<li>全部</li>"));
$.ajax({
- url: 'https://web.byisf.com/api/blade-jfpts/dj/dj/selectName?tnumbers=' + tnumbers,
+ url: 'http://web.byisf.com/api/blade-jfpts/dj/dj/selectName?tnumbers=' + tnumbers,
type: 'GET',
dataType: 'JSON',
success: function (data) {
@@ -773,7 +773,7 @@
dom.empty();
var that = this;
$.ajax({
- url: 'https://web.byisf.com/api/blade-jfpts/suser/suser/selectList?type=' + type + '&dj=' + dj,
+ url: 'http://web.byisf.com/api/blade-jfpts/suser/suser/selectList?type=' + type + '&dj=' + dj,
type: 'GET',
dataType: 'JSON',
success: function (data) {
@@ -809,7 +809,7 @@
dom.empty();
var that = this;
$.ajax({
- url: 'https://web.byisf.com/api/blade-jfpts/equipment/equipment/selectList?deviceType=' + deviceType,
+ url: 'http://web.byisf.com/api/blade-jfpts/equipment/equipment/selectList?deviceType=' + deviceType,
type: 'GET',
dataType: 'JSON',
success: function (data) {
diff --git a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.js b/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.js
index 05f5554..ab78ab9 100644
--- a/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.js
+++ b/public/map/widgets/analysisAndJudgment/AnalysisAndJudgment1.js
@@ -670,7 +670,7 @@
dom.empty();
var that = this;
$.ajax({
- url: 'https://web.byisf.com/api/blade-jfpts/jingdan/jingdan/selectList',
+ url: 'http://web.byisf.com/api/blade-jfpts/jingdan/jingdan/selectList',
type: 'POST',
dataType: 'JSON',
data: {
@@ -721,7 +721,7 @@
dom.empty();
var that = this;
$.ajax({
- url: 'https://web.byisf.com/api/blade-jfpts/suser/suser/selectList?type=' + type + '&dj=' + dj,
+ url: 'http://web.byisf.com/api/blade-jfpts/suser/suser/selectList?type=' + type + '&dj=' + dj,
type: 'GET',
dataType: 'JSON',
success: function (data) {
@@ -755,7 +755,7 @@
dom.empty();
var that = this;
$.ajax({
- url: 'https://web.byisf.com/api/blade-jfpts/equipment/equipment/selectList?deviceType=' + deviceType,
+ url: 'http://web.byisf.com/api/blade-jfpts/equipment/equipment/selectList?deviceType=' + deviceType,
type: 'GET',
dataType: 'JSON',
success: function (data) {
diff --git a/public/map/widgets/analysisAndJudgment/template.html b/public/map/widgets/analysisAndJudgment/template.html
index a7d722d..0f1176e 100644
--- a/public/map/widgets/analysisAndJudgment/template.html
+++ b/public/map/widgets/analysisAndJudgment/template.html
@@ -21,9 +21,14 @@
<div class='select-list'>
<ul>
<li>全部</li>
- <li>治安警情</li>
- <li>刑事警情</li>
+ <li>医疗求助</li>
<li>火警</li>
+ <li>紧急求救</li>
+ <li>盗警</li>
+ <li>普通报警</li>
+ <li>交通</li>
+ <li>中心调度</li>
+ <li>电话报警</li>
</ul>
</div>
</li>
diff --git a/src/styles/common.scss b/src/styles/common.scss
index 4507ae7..5a20b5f 100644
--- a/src/styles/common.scss
+++ b/src/styles/common.scss
@@ -18,6 +18,8 @@
@import './media.scss';
//通用配置
@import './normalize.scss';
+//警情处置样式修改
+@import './distribution.scss';
a{
text-decoration: none;
diff --git a/src/styles/distribution.scss b/src/styles/distribution.scss
new file mode 100644
index 0000000..7838f44
--- /dev/null
+++ b/src/styles/distribution.scss
@@ -0,0 +1,8 @@
+.distribution-form-label.el-form-item--mini .el-form-item__label,
+.distribution-form-label.el-form-item--mini .el-form-item__content {
+ line-height: 50px !important;
+}
+
+.distribution-form-save .el-form-item__content {
+ margin: 0 !important;
+}
\ No newline at end of file
diff --git a/src/views/distribution/index.vue b/src/views/distribution/index.vue
index 33fc7d8..7f6282f 100644
--- a/src/views/distribution/index.vue
+++ b/src/views/distribution/index.vue
@@ -1,147 +1,211 @@
<template>
- <el-form
- :model="form"
- label-position="right"
- size="mini"
- label-width="100px"
- style="background: #fff; margin-left: 10px;padding-top: 40px !important; margin-right: 10px; height: calc(100% - 40px); width: calc(100% - 20px)"
- >
- <el-row>
- <el-col span="12"
- ><el-form-item label="报警人姓名">
- <el-input
- disabled="true"
- v-model="form.galarmPeople"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- <el-col span="12"
- ><el-form-item label="联系方式">
- <el-input
- disabled="true"
- v-model="form.phoneNumber"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-row>
- <el-col span="12"
- ><el-form-item label="事发地址">
- <el-input
- disabled="true"
- v-model="form.place"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- <el-col span="12"
- ><el-form-item label="行政区">
- <el-input
- disabled="true"
- v-model="form.addvnm"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-row>
- <el-col span="12"
- ><el-form-item label="报警时间">
- <el-input
- disabled="true"
- v-model="form.galarmTime"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- <el-col span="12"
- ><el-form-item label="报警内容">
- <el-input
- disabled="true"
- v-model="form.content"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-row>
- <el-col span="12"
- ><el-form-item label="警情级别">
- <el-input
- disabled="true"
- v-model="form.level"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- <el-col span="12"
- ><el-form-item label="警情类别">
- <el-input
- disabled="true"
- v-model="form.waringType"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-row>
- <el-col span="12"
- ><el-form-item label="处理方式">
- <el-radio-group
- @change="processChange"
- v-model="processmode"
- :disabled="this.form.type == 0 ? false : true"
- >
- <el-radio label="派发保安"></el-radio>
- <el-radio label="提示业主"></el-radio>
- </el-radio-group> </el-form-item
- ></el-col>
- <el-col span="12"
- ><el-form-item label="处理人">
- <el-select
- v-model="form.handName"
- @change="selectChange"
- placeholder="请选择处理人"
- :disabled="
- this.form.type == 0 ? this.form.handletype == 1 ? true : false : false
- "
- >
- <el-option
- v-for="item in selectOptions"
- :key="item.value"
- :label="item.label"
- :value="item.snumber"
- >
- </el-option>
- </el-select> </el-form-item
- ></el-col>
- </el-row>
- <el-row>
- <el-col span="12"
- ><el-form-item label="是否上报110">
- <el-input
- disabled="true"
- v-model="form.alarmPeople"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- <el-col span="12"
- ><el-form-item label="设备编号">
- <el-input
- disabled="true"
- v-model="form.deviceNumber"
- autocomplete="off"
- ></el-input> </el-form-item
- ></el-col>
- </el-row>
- <el-form-item style="text-align: center; margin: 0" class="dispose">
- <el-button
- :style="
- this.form.type == 0
- ? 'background:#66b1ff; border-color:#66b1ff'
- : 'background:#cfcfcf; border-color:#cfcfcf'
+ <el-row>
+ <el-col :span="12">
+ <el-form
+ :model="form"
+ label-position="right"
+ size="mini"
+ label-width="100px"
+ style="
+ background: #fff;
+ margin-left: 10px;
+ margin-right: 10px;
+ height: calc(100% - 40px);
+ width: calc(100% - 20px);
"
- type="primary"
- @click="onSubmit"
>
- 保 存
- </el-button>
- </el-form-item>
- </el-form>
+ <el-row>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="报警人姓名">
+ <el-input
+ disabled="true"
+ v-model="form.galarmPeople"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="联系方式">
+ <el-input
+ disabled="true"
+ v-model="form.phoneNumber"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="事发地址">
+ <el-input
+ disabled="true"
+ v-model="form.place"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="要求处置时间">
+ <el-input
+ disabled="true"
+ v-model="form.czTime"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="报警时间">
+ <el-input
+ disabled="true"
+ v-model="form.galarmTime"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="报警内容">
+ <el-input
+ disabled="true"
+ v-model="form.content"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="警情级别">
+ <el-input
+ disabled="true"
+ v-model="form.level"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="警情类别">
+ <el-input
+ disabled="true"
+ v-model="form.waringType"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="处理方式">
+ <el-radio-group
+ @change="processChange"
+ v-model="processmode"
+ :disabled="this.form.type == 0 ? false : true"
+ >
+ <el-radio
+ class="distribution-form-label"
+ label="派发保安"
+ ></el-radio>
+ <el-radio
+ class="distribution-form-label"
+ label="提示业主"
+ ></el-radio>
+ </el-radio-group> </el-form-item
+ ></el-col>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="处理人">
+ <el-select
+ v-model="form.handName"
+ @change="selectChange"
+ placeholder="请选择处理人"
+ :disabled="
+ this.form.type == 0
+ ? this.form.handletype == 1
+ ? true
+ : false
+ : true
+ "
+ >
+ <el-option
+ v-for="item in selectOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.snumber"
+ >
+ </el-option>
+ </el-select> </el-form-item
+ ></el-col>
+ </el-row>
+ <el-row>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="是否上报110">
+ <el-input
+ disabled="true"
+ v-model="form.alarmPeople"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="设备编号">
+ <el-input
+ disabled="true"
+ v-model="form.deviceNumber"
+ autocomplete="off"
+ ></el-input> </el-form-item
+ ></el-col>
+ </el-row>
+
+ <el-row>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="省份">
+ <el-input
+ disabled="true"
+ v-model="form.$province"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="地市">
+ <el-input
+ disabled="true"
+ v-model="form.$city"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col span="12"
+ ><el-form-item class="distribution-form-label" label="行政区">
+ <el-input
+ disabled="true"
+ v-model="form.$district"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-form-item
+ class="distribution-form-save"
+ style="text-align: center; margin: 0"
+ >
+ <el-button
+ :style="
+ this.form.type == 0
+ ? 'background:#66b1ff; border-color:#66b1ff'
+ : 'background:#cfcfcf; border-color:#cfcfcf'
+ "
+ type="primary"
+ @click="onSubmit"
+ >
+ 保 存
+ </el-button>
+ </el-form-item>
+ </el-form></el-col
+ >
+ <el-col :span="12">
+ <iframe
+ id="DistributionMapDiv"
+ ref="DistributionMapDiv"
+ :src="baseUrl"
+ frameborder="0"
+ width="100%"
+ height="100%"
+ ></iframe>
+ </el-col>
+ </el-row>
</template>
<script>
@@ -151,18 +215,48 @@
return {
selectOptions: [],
form: {},
- processmode: "提示业主"
+ baseUrl: "",
+ processmode: "提示业主",
+ ref: this.$refs,
};
},
created() {
this.form = this.$route.query;
this.form.handletype = 1;
+
+ console.log(this.form);
if (this.form.type == 0) {
this.form.handleP = "";
this.form.handName = "";
}
this.getSelectOptions();
+
+ this.baseUrl = `/map/index.html?openid=AlertSecurity&id=${this.form.id}&jd=${this.form.jd}&wd=${this.form.wd}}`;
+
+ var arr = [];
+ var flag = false;
+
+ this.$store.state.tags.tagList.forEach((item) => {
+ if (item.label != "警情分发处置") {
+ arr.push(item);
+ } else if (item.label == "警情分发处置" && flag == false) {
+ arr.push(item);
+ flag = true;
+ }
+ });
+
+ this.$store.state.tags.tagList = arr;
},
+
+ mounted() {
+ this.$refs.DistributionMapDiv.onload = () => {
+ window.frames[0].init("AlertSecurity", {
+ x: this.form.jd,
+ y: this.form.wd,
+ });
+ };
+ },
+
methods: {
onSubmit() {
if (this.form.type == 1 || this.form.type == 2) return;
@@ -175,9 +269,9 @@
}
var newAxios = axios.create({
- baseURL: "https://web.byisf.com",
+ baseURL: "http://web.byisf.com",
withCredentials: false,
- headers: {}
+ headers: {},
});
newAxios
@@ -190,14 +284,14 @@
handleP: this.form.handleP,
handName: this.form.handName,
handletype: this.form.handletype,
- type: "1"
- }
+ type: "1",
+ },
}
)
- .then(res => {
+ .then((res) => {
if (res.data.msg == "修改成功") {
var arr = [];
- this.$store.state.tags.tagList.forEach(item => {
+ this.$store.state.tags.tagList.forEach((item) => {
if (item.value != this.$store.state.tags.tag.value) {
arr.push(item);
}
@@ -210,9 +304,9 @@
getSelectOptions() {
var newAxios = axios.create({
- baseURL: "https://web.byisf.com",
+ baseURL: "http://web.byisf.com",
withCredentials: false,
- headers: {}
+ headers: {},
});
newAxios
@@ -224,19 +318,19 @@
this.form.wd +
")"
)
- .then(res => {
- res.data.data.forEach(item => {
+ .then((res) => {
+ res.data.data.forEach((item) => {
this.selectOptions.push({
value: item.sname,
label: item.sname,
- snumber: item.snumber
+ snumber: item.snumber,
});
});
});
},
selectChange(value) {
- this.selectOptions.forEach(item => {
+ this.selectOptions.forEach((item) => {
if (item.snumber == value) {
this.form.handName = item.value;
this.form.handleP = value;
@@ -245,38 +339,31 @@
},
processChange(value) {
- debugger
value == "提示业主"
? (this.form.handletype = 1)
: (this.form.handletype = 0);
- }
- }
+ },
+ },
};
</script>
<style scoped>
.el-form .el-row {
- padding: 0 40px !important;
+ padding: 0 20px !important;
}
.el-form .el-col {
- padding: 0 40px !important;
+ padding: 0 20px !important;
}
.el-form .el-col,
.el-form .el-col .el-form-item__label,
.el-form .el-col .el-form-item__content {
height: 50px !important;
- line-height: 50px !important;
- /* margin: 0 !important; */
+
+ margin: 0 !important;
}
.el-form .el-col .el-form-item {
height: 100% !important;
-
- margin: 0 !important;
+ line-height: 1.2 !important;
}
-
-.dispose .el-form-item__content {
- margin: 0 !important;
-}
-
</style>
--
Gitblit v1.9.3