Administrator
2021-09-10 ae425fbcb4a275e0a4185ee799e8e1e6acd61678
src/views/commandQuery/taskDistribution.vue
@@ -84,7 +84,7 @@
// import { datasing } from "./dataqualificationExamination";
// import { getList } from "@/api/qualificationExamination/qualificationExamination";
import { getLisperetaskDistribution } from "@/api/commandQuery/commandQuery";
import { getPosition, getTrack } from "@/api/map/people";
import { getDirectiveLiveLocationVoList, getDirectiveLocusInfoList } from "@/api/map/people";
import peoplePng from "@/assets/img/people.png";
export default {
@@ -377,20 +377,23 @@
            this.seeLocationFlag = true
            getPosition({ type: 1, workerId: row.receiveDirectiveIds }).then((result) => {
            getDirectiveLiveLocationVoList({ type: 1, userIds: row.receiveDirectiveIds }).then((result) => {
                var res = result.data.data;
                if (JSON.stringify(res) != "{}") {
                    this.$refs.locationForm.addEntitys(
                        {
                            LGTD: res.longitude,
                            LTTD: res.latitude,
                            name: "人员位置",
                        },
                        peoplePng,
                        0.5,
                        "peoplelayer",
                        "peopleAddlayer"
                    );
                if (JSON.stringify(res) != "[]") {
                    res.forEach((data)=>{
                        this.$refs.locationForm.addEntitys(
                            {
                                LGTD: data.longitude,
                                LTTD: data.latitude,
                                name: "人员位置",
                            },
                            peoplePng,
                            0.5,
                            "peoplelayer",
                            "peopleAddlayer"
                        );
                    })
                }
            });
        },
@@ -438,21 +441,25 @@
                ":" +
                this.disposeTime(endTime.getSeconds());
            getTrack({
                workerId: this.rowData.receiveDirectiveIds,
            getDirectiveLocusInfoList({
                userIds: this.rowData.receiveDirectiveIds,
                type: 1,
                startTime: start,
                endTime: end,
            }).then((res) => {
                var result = res.data.data;
                if (result.length > 1) {
                    let arr = [];
                if (JSON.stringify(res) != "[]") {
                    result.forEach((item) => {
                        arr.push([Number(item.longitude), Number(item.latitude)]);
                    });
                        if (item.length > 1) {
                            let arr = [];
                    this.$refs.tarckForm.addLines(arr);
                            item.forEach((data) => {
                                arr.push([Number(data.longitude), Number(data.latitude)]);
                            });
                            this.$refs.tarckForm.addLines(arr);
                        }
                    })
                }
            });
        },