| | |
| | | :permission="permissionList" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdates" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | |
| | | import { |
| | | getDirectiveLiveLocationVoList, |
| | | getDirectiveLocusInfoList, |
| | | getNewPeople, |
| | | getNewTark, |
| | | } from "@/api/map/people"; |
| | | |
| | | import peoplePng from "@/assets/img/people.png"; |
| | |
| | | search: true, |
| | | searchLabelWidth: 90, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | // hide: true, |
| | | // editDisplay: false, |
| | | // addDisplay: false |
| | |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | adddata(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdates(row, index, done, loading) { |
| | | // console.log(42342); |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | // beforeOpen(done, type) { |
| | | // if (["edit", "view"].includes(type)) { |
| | | // getDetail(this.form.id).then((res) => { |
| | |
| | | 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"); |
| | | // } |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | // console.log(this.data, "getLisperetaskDistribution"); |
| | | this.loading = false; |
| | | // this.selectionClear(); |
| | |
| | | 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; |
| | | }); |
| | | |
| | | var res = result.data.data; |
| | | if (JSON.stringify(res) != "[]") { |
| | | res.forEach((data) => { |
| | | this.$refs.locationForm.addEntitys( |
| | | { |
| | | LGTD: arr[0].gis_jd, |
| | | LTTD: arr[0].gis_wd, |
| | | LGTD: data.longitude, |
| | | LTTD: data.latitude, |
| | | name: "人员位置", |
| | | }, |
| | | peoplePng, |
| | |
| | | "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" |
| | | // ); |
| | | // }) |
| | | // } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | |
| | | startTime: start, |
| | | endTime: end, |
| | | }).then((res) => { |
| | | getNewTark().then((res) => { |
| | | if (JSON.stringify(res.data.track) != "{}") { |
| | | if (res.data.track.length > 1) { |
| | | var result = res.data.data; |
| | | if (JSON.stringify(res) != "[]") { |
| | | result.forEach((item) => { |
| | | if (item.length > 1) { |
| | | let arr = []; |
| | | |
| | | res.data.track.forEach((item) => { |
| | | arr.push([Number(item.gis_jd), Number(item.gis_wd)]); |
| | | item.forEach((data) => { |
| | | arr.push([Number(data.longitude), Number(data.latitude)]); |
| | | }); |
| | | |
| | | this.$refs.tarckForm.addLines(arr); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | // var result = res.data.data; |
| | | // if (JSON.stringify(res) != "[]") { |
| | | // result.forEach((item) => { |
| | | // if (item.length > 1) { |
| | | // let arr = []; |
| | | |
| | | // item.forEach((data) => { |
| | | // arr.push([Number(data.longitude), Number(data.latitude)]); |
| | | // }); |
| | | |
| | | // this.$refs.tarckForm.addLines(arr); |
| | | // } |
| | | // }) |
| | | // } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |