src/views/commandQuery/taskDistribution.vue
@@ -1,13 +1,15 @@
/*
 * @Author: Morpheus
 * @Date: 2021-07-07 17:30:05
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-11-25 14:54:40
 * menu-name 监管信息
 */
/* * @Author: Morpheus * @Date: 2021-07-07 17:30:05 * @Last Modified by:
Morpheus * @Last Modified time: 2021-11-25 14:54:40 * menu-name 监管信息 */
<template>
    <basic-container>
        <avue-crud :option="option"
  <basic-container
    :class="[
      $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '',
    ]"
  >
    <avue-crud
      class="tablesss"
      :option="option"
                   :table-loading="loading"
                   :data="data"
                   :page.sync="page"
@@ -23,48 +25,55 @@
                   @current-change="currentChange"
                   @size-change="sizeChange"
                   @refresh-change="refreshChange"
                   @on-load="onLoad">
            <template slot-scope="{ type, size, row }"
                      slot="menu">
                <el-button icon="el-icon-location-outline"
      @on-load="onLoad"
    >
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-location-outline"
                           :size="size"
                           :type="type"
                           @click.stop="seeLocation(row)">位置查看</el-button>
                <el-button icon="el-icon-place"
          @click.stop="seeLocation(row)"
          >位置查看</el-button
        >
        <el-button
          icon="el-icon-place"
                           :size="size"
                           :type="type"
                           @click.stop="seeTrack(row)">轨迹查看
          @click.stop="seeTrack(row)"
          >轨迹查看
                </el-button>
            </template>
        </avue-crud>
        <el-dialog class="see-location"
    <el-dialog
      class="see-location"
                   title="位置查看"
                   :visible.sync="seeLocationFlag"
                   :modal-append-to-body="false"
                   width="width">
      width="width"
    >
            <Map v-if="seeLocationFlag" ref="locationForm" />
        </el-dialog>
        <el-dialog class="see-track"
    <el-dialog
      class="see-track"
                   title="轨迹查看"
                   :visible.sync="seeTrackFlag"
                   :modal-append-to-body="false"
                   width="width">
      width="width"
    >
            <div class="search">
                选择时间:<el-date-picker v-model="trackTime"
        选择时间:<el-date-picker
          v-model="trackTime"
                                type="datetimerange"
                                range-separator="至"
                                start-placeholder="开始日期"
                                size="mini"
                                :editable="false"
                                end-placeholder="结束日期">
          end-placeholder="结束日期"
        >
                </el-date-picker>
                <el-button type="text"
                           @click="lookTrack">
                    查看轨迹
                </el-button>
        <el-button type="text" @click="lookTrack"> 查看轨迹 </el-button>
            </div>
            <Map v-if="seeTrackFlag" ref="tarckForm" />
@@ -84,7 +93,12 @@
// import { datasing } from "./dataqualificationExamination";
// import { getList } from "@/api/qualificationExamination/qualificationExamination";
import { getLisperetaskDistribution } from "@/api/commandQuery/commandQuery";
import { getDirectiveLiveLocationVoList, getDirectiveLocusInfoList, getNewPeople, getNewTark } from "@/api/map/people";
import {
  getDirectiveLiveLocationVoList,
  getDirectiveLocusInfoList,
  getNewPeople,
  getNewTark,
} from "@/api/map/people";
import peoplePng from "@/assets/img/people.png";
@@ -102,6 +116,7 @@
                pageSize: 10,
                currentPage: 1,
                total: 0,
        ...this.$store.state.control.changePageSize,
            },
            selectionList: [],
@@ -125,6 +140,7 @@
                index: true,
                viewBtn: true,
                dialogClickModal: false,
        ...this.$store.state.control.clearOtherBut,
                column: [
                    //   {
@@ -163,6 +179,7 @@
                        search: true,
                        searchLabelWidth: 90,
                        searchSpan: 4,
            width: 100,
                        //     hide: true,
                        //     editDisplay: false,
                        //     addDisplay: false
@@ -226,6 +243,9 @@
            });
            return ids.join(",");
        },
  },
  mounted() {
    this.$store.commit("setWindowSizeHeightAdd");
    },
    methods: {
        rowSave (row, done, loading) {
@@ -325,8 +345,9 @@
                this.data = data.records;
                // for (var k in this.data) {
                //   this.data[k]["url"] = "https://avuejs.com/images/logo-bg.jpg";
        this.$store.commit("setWindowSizeHeightAdd");
                // }
                console.log(this.data, "getLisperetaskDistribution");
        // console.log(this.data, "getLisperetaskDistribution");
                this.loading = false;
                // this.selectionClear();
            });
@@ -377,16 +398,17 @@
        },
        seeLocation (row) {
      this.seeLocationFlag = true;
            this.seeLocationFlag = true
            getDirectiveLiveLocationVoList({ type: 1, userIds: row.receiveDirectiveIds }).then((result) => {
                getNewPeople().then(res => {
      getDirectiveLiveLocationVoList({
        type: 1,
        userIds: row.receiveDirectiveIds,
      }).then((result) => {
        getNewPeople().then((res) => {
                    if (JSON.stringify(res.data) != "{}") {
                        var arr = res.data.sort(function (a, b) {
                            return a['date'] < b['date'] ? 1 : -1
                        })
              return a["date"] < b["date"] ? 1 : -1;
            });
                        this.$refs.locationForm.addEntitys(
                            {
@@ -400,7 +422,7 @@
                            "peopleAddlayer"
                        );
                    }
                })
        });
                // var res = result.data.data;
                // if (JSON.stringify(res) != "[]") {
@@ -423,9 +445,9 @@
        seeTrack (row) {
            this.trackTime = [];
            this.rowData = '';
      this.rowData = "";
            this.rowData = row;
            this.seeTrackFlag = true
      this.seeTrackFlag = true;
        },
        lookTrack () {
@@ -470,10 +492,8 @@
                startTime: start,
                endTime: end,
            }).then((res) => {
                getNewTark().then(res => {
        getNewTark().then((res) => {
                    if (JSON.stringify(res.data.track) != "{}") {
                        if (res.data.track.length > 1) {
                            let arr = [];
@@ -483,10 +503,8 @@
                            this.$refs.tarckForm.addLines(arr);
                        }
                    }
                })
        });
                // var result = res.data.data;
                // if (JSON.stringify(res) != "[]") {
@@ -513,5 +531,4 @@
};
</script>
<style>
</style>
<style></style>