From c224e85141eca6ff5dd6733d0c2839cce319c8be Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 02 Dec 2021 17:14:28 +0800
Subject: [PATCH] +

---
 src/views/commandQuery/taskDistribution.vue |   73 ++++++++++++++++++++++++++++++------
 1 files changed, 60 insertions(+), 13 deletions(-)

diff --git a/src/views/commandQuery/taskDistribution.vue b/src/views/commandQuery/taskDistribution.vue
index 2737550..330bee0 100644
--- a/src/views/commandQuery/taskDistribution.vue
+++ b/src/views/commandQuery/taskDistribution.vue
@@ -2,7 +2,7 @@
  * @Author: Morpheus
  * @Date: 2021-07-07 17:30:05
  * @Last Modified by: Morpheus
- * @Last Modified time: 2021-08-12 21:00:27
+ * @Last Modified time: 2021-11-25 15:47:19
  * menu-name 监管信息
  */
 <template>
@@ -43,7 +43,8 @@
                    :visible.sync="seeLocationFlag"
                    :modal-append-to-body="false"
                    width="width">
-            <Map ref="locationForm" />
+            <Map v-if="seeLocationFlag"
+                 ref="locationForm" />
         </el-dialog>
 
         <el-dialog class="see-track"
@@ -67,7 +68,8 @@
                 </el-button>
             </div>
 
-            <Map ref="tarckForm" />
+            <Map v-if="seeTrackFlag"
+                 ref="tarckForm" />
         </el-dialog>
     </basic-container>
 </template>
@@ -84,7 +86,8 @@
 // import { datasing } from "./dataqualificationExamination";
 // import { getList } from "@/api/qualificationExamination/qualificationExamination";
 import { getLisperetaskDistribution } from "@/api/commandQuery/commandQuery";
-import { getDirectiveLiveLocationVoList, getDirectiveLocusInfoList } from "@/api/map/people";
+import { getDirectiveLiveLocationVoList, getDirectiveLocusInfoList, getNewPeople } from "@/api/map/people";
+
 import peoplePng from "@/assets/img/people.png";
 
 export default {
@@ -166,7 +169,26 @@
                         //     editDisplay: false,
                         //     addDisplay: false
                     },
-
+                    {
+                        label: "指令时间",
+                        prop: "releaseTimeRange",
+                        type: "datetime",
+                        format: "yyyy-MM-dd hh:mm:ss",
+                        valueFormat: "yyyy-MM-dd hh:mm:ss",
+                        searchRange: true,
+                        hide: true,
+                        addDisplay: false,
+                        editDisplay: false,
+                        viewDisplay: false,
+                        search: true,
+                        rules: [
+                            {
+                                required: true,
+                                message: "请输入指令时间",
+                                trigger: "blur",
+                            },
+                        ],
+                    },
                     {
                         label: "接收指令人",
                         prop: "receiveName",
@@ -314,6 +336,11 @@
         onLoad (page, params = {}) {
             // this.loading = false;
             this.loading = true;
+            if (this.query.releaseTimeRange) {
+                this.query["startTime"] = this.query.releaseTimeRange[0];
+                this.query["endTime"] = this.query.releaseTimeRange[1];
+                delete this.query.releaseTimeRange;
+            }
             getLisperetaskDistribution(
                 page.currentPage,
                 page.pageSize,
@@ -380,13 +407,17 @@
             this.seeLocationFlag = true
 
             getDirectiveLiveLocationVoList({ type: 1, userIds: row.receiveDirectiveIds }).then((result) => {
-                var res = result.data.data;
-                if (JSON.stringify(res) != "[]") {
-                    res.forEach((data)=>{
+                getNewPeople().then(res => {
+
+                    if (JSON.stringify(res.data) != "{}") {
+                        var arr = res.data.sort(function (a, b) {
+                            return a['date'] < b['date'] ? 1 : -1
+                        })
+
                         this.$refs.locationForm.addEntitys(
                             {
-                                LGTD: data.longitude,
-                                LTTD: data.latitude,
+                                LGTD: arr[0].gis_jd,
+                                LTTD: arr[0].gis_wd,
                                 name: "人员位置",
                             },
                             peoplePng,
@@ -394,9 +425,25 @@
                             "peoplelayer",
                             "peopleAddlayer"
                         );
-                    })
-                    
-                }
+                    }
+                })
+
+                // var res = result.data.data;
+                // if (JSON.stringify(res) != "[]") {
+                //     res.forEach((data)=>{
+                //         this.$refs.locationForm.addEntitys(
+                //             {
+                //                 LGTD: data.longitude,
+                //                 LTTD: data.latitude,
+                //                 name: "人员位置",
+                //             },
+                //             peoplePng,
+                //             0.5,
+                //             "peoplelayer",
+                //             "peopleAddlayer"
+                //         );
+                //     })
+                // }
             });
         },
 

--
Gitblit v1.9.3