| | |
| | | /* |
| | | * @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" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :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" |
| | | @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" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="seeLocation(row)">位置查看</el-button> |
| | | <el-button icon="el-icon-place" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="seeTrack(row)">轨迹查看 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <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" |
| | | :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" |
| | | @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" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="seeLocation(row)" |
| | | >位置查看</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-place" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="seeTrack(row)" |
| | | >轨迹查看 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-dialog class="see-location" |
| | | title="位置查看" |
| | | :visible.sync="seeLocationFlag" |
| | | :modal-append-to-body="false" |
| | | width="width"> |
| | | <Map v-if="seeLocationFlag" ref="locationForm" /> |
| | | </el-dialog> |
| | | <el-dialog |
| | | class="see-location" |
| | | title="位置查看" |
| | | :visible.sync="seeLocationFlag" |
| | | :modal-append-to-body="false" |
| | | width="width" |
| | | > |
| | | <Map v-if="seeLocationFlag" ref="locationForm" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog class="see-track" |
| | | title="轨迹查看" |
| | | :visible.sync="seeTrackFlag" |
| | | :modal-append-to-body="false" |
| | | width="width"> |
| | | <el-dialog |
| | | class="see-track" |
| | | title="轨迹查看" |
| | | :visible.sync="seeTrackFlag" |
| | | :modal-append-to-body="false" |
| | | width="width" |
| | | > |
| | | <div class="search"> |
| | | 选择时间:<el-date-picker |
| | | v-model="trackTime" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | size="mini" |
| | | :editable="false" |
| | | end-placeholder="结束日期" |
| | | > |
| | | </el-date-picker> |
| | | <el-button type="text" @click="lookTrack"> 查看轨迹 </el-button> |
| | | </div> |
| | | |
| | | <div class="search"> |
| | | 选择时间:<el-date-picker v-model="trackTime" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | size="mini" |
| | | :editable="false" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | <el-button type="text" |
| | | @click="lookTrack"> |
| | | 查看轨迹 |
| | | </el-button> |
| | | </div> |
| | | |
| | | <Map v-if="seeTrackFlag" ref="tarckForm" /> |
| | | </el-dialog> |
| | | </basic-container> |
| | | <Map v-if="seeTrackFlag" ref="tarckForm" /> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | // 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"; |
| | | |
| | | export default { |
| | | data () { |
| | | return { |
| | | seeLocationFlag: false, |
| | | seeTrackFlag: false, |
| | | trackTime: [], |
| | | rowData: null, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | data() { |
| | | return { |
| | | seeLocationFlag: false, |
| | | seeTrackFlag: false, |
| | | trackTime: [], |
| | | rowData: null, |
| | | form: {}, |
| | | query: {}, |
| | | loading: true, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | }, |
| | | |
| | | selectionList: [], |
| | | selectionList: [], |
| | | |
| | | option: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | selection: true, |
| | | menu: true, |
| | | option: { |
| | | // 操作栏多余按钮去除 |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | selection: true, |
| | | menu: true, |
| | | |
| | | searchShowBtn: false, |
| | | searchShowBtn: false, |
| | | |
| | | align: "center", |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | index: true, |
| | | viewBtn: true, |
| | | dialogClickModal: false, |
| | | align: "center", |
| | | height: "auto", |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | index: true, |
| | | viewBtn: true, |
| | | dialogClickModal: false, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | |
| | | column: [ |
| | | // { |
| | | // label: "类型", |
| | | // prop: "type", |
| | | // overHidden: true, |
| | | // }, |
| | | // { |
| | | // label: "deptId", |
| | | // prop: "deptId", |
| | | // overHidden: true, |
| | | // // labelWidth: 120, |
| | | // // searchLabelWidth: 120, |
| | | // searchSpan: 4, |
| | | // dicUrl: |
| | | // "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | // props: { |
| | | // label: "title", |
| | | // value: "id", |
| | | // }, |
| | | // // hide: true, |
| | | // search: true, |
| | | // // overHidden: true, |
| | | // type: "select", |
| | | // // rules: [ |
| | | // // { |
| | | // // required: true, |
| | | // // message: "请输入保安公司", |
| | | // // trigger: "blur", |
| | | // // }, |
| | | // // ], |
| | | // }, |
| | | { |
| | | label: "发送指令人", |
| | | prop: "sendName", |
| | | search: true, |
| | | searchLabelWidth: 90, |
| | | searchSpan: 4, |
| | | // hide: true, |
| | | // editDisplay: false, |
| | | // addDisplay: false |
| | | }, |
| | | column: [ |
| | | // { |
| | | // label: "类型", |
| | | // prop: "type", |
| | | // overHidden: true, |
| | | // }, |
| | | // { |
| | | // label: "deptId", |
| | | // prop: "deptId", |
| | | // overHidden: true, |
| | | // // labelWidth: 120, |
| | | // // searchLabelWidth: 120, |
| | | // searchSpan: 4, |
| | | // dicUrl: |
| | | // "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | // props: { |
| | | // label: "title", |
| | | // value: "id", |
| | | // }, |
| | | // // hide: true, |
| | | // search: true, |
| | | // // overHidden: true, |
| | | // type: "select", |
| | | // // rules: [ |
| | | // // { |
| | | // // required: true, |
| | | // // message: "请输入保安公司", |
| | | // // trigger: "blur", |
| | | // // }, |
| | | // // ], |
| | | // }, |
| | | { |
| | | label: "发送指令人", |
| | | prop: "sendName", |
| | | search: true, |
| | | searchLabelWidth: 90, |
| | | searchSpan: 4, |
| | | width: 100, |
| | | // hide: true, |
| | | // editDisplay: false, |
| | | // addDisplay: false |
| | | }, |
| | | |
| | | { |
| | | label: "接收指令人", |
| | | prop: "receiveName", |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | searchLabelWidth: 90, |
| | | }, |
| | | { |
| | | label: "发送指令时间", |
| | | prop: "sendTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | }, |
| | | { |
| | | label: "指令内容", |
| | | prop: "content", |
| | | search: true, |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | label: "图片", |
| | | prop: "url", |
| | | dataType: "string", |
| | | type: "img", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "接收指令人", |
| | | prop: "receiveName", |
| | | // search: true, |
| | | // searchSpan: 4, |
| | | searchLabelWidth: 90, |
| | | }, |
| | | { |
| | | label: "发送指令时间", |
| | | prop: "sendTime", |
| | | type: "date", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | }, |
| | | { |
| | | label: "指令内容", |
| | | prop: "content", |
| | | search: true, |
| | | searchSpan: 4, |
| | | }, |
| | | { |
| | | label: "图片", |
| | | prop: "url", |
| | | dataType: "string", |
| | | type: "img", |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | data: [ |
| | | // { |
| | | // deptid: "江西众泰保安公司", |
| | | // punishtype: 2, |
| | | // punishreason: "非法施工", |
| | | // punishresult: "没收全部非法所得财产,并罚款3W元", |
| | | // punishtime: "2021-01-01", |
| | | // punisnum: 110110110120, |
| | | // }, |
| | | ], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList () { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.post_add, false), |
| | | viewBtn: this.vaildData(this.permission.post_view, false), |
| | | delBtn: this.vaildData(this.permission.post_delete, false), |
| | | editBtn: this.vaildData(this.permission.post_edit, false), |
| | | }; |
| | | }, |
| | | ids () { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | 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.form = res.data.data; |
| | | // }); |
| | | // } |
| | | // done(); |
| | | data: [ |
| | | // { |
| | | // deptid: "江西众泰保安公司", |
| | | // punishtype: 2, |
| | | // punishreason: "非法施工", |
| | | // punishresult: "没收全部非法所得财产,并罚款3W元", |
| | | // punishtime: "2021-01-01", |
| | | // punisnum: 110110110120, |
| | | // }, |
| | | searchReset () { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange (params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange (list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear () { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange (currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange (pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange () { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | // this.loading = false; |
| | | this.loading = true; |
| | | getLisperetaskDistribution( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | // for (var k in this.data) { |
| | | // this.data[k]["url"] = "https://avuejs.com/images/logo-bg.jpg"; |
| | | // } |
| | | console.log(this.data, "getLisperetaskDistribution"); |
| | | this.loading = false; |
| | | // this.selectionClear(); |
| | | }); |
| | | }, |
| | | // onLoad(page, params = {}) { |
| | | // // this.loading = false; |
| | | // this.loading = true; |
| | | // // getListJSON().then((res) => { |
| | | // // axios |
| | | // // .get( |
| | | // // "../../api/qualificationExamination/signQualificationExamination.json" |
| | | // // ) |
| | | // // .then((res) => { |
| | | // // page.currentPage, |
| | | // // page.pageSize, |
| | | // // Object.assign(params, this.query) |
| | | // if (datasing) { |
| | | // var res = datasing; |
| | | // console.log(res, "signQualificationExamination"); |
| | | // const data = res.data; |
| | | // // this.page.total = data.total; |
| | | // var d = data.records; |
| | | // for (var k in d) { |
| | | // d[k].examination_mx = "正常"; |
| | | // d[k].examination_type = "正常"; |
| | | // d[k]["carid"] = "370111198807051124"; |
| | | // d[k]["certificate"] = "拥有"; |
| | | // d[k]["reviewTime"] = "2021-02-21"; |
| | | // d[k]["results"] = "通过"; |
| | | // d[k]["onjob"] = "是"; |
| | | // } |
| | | // this.data = d; |
| | | // this.loading = false; |
| | | // } |
| | | // // this.selectionClear(); |
| | | // // }); |
| | | // }, |
| | | |
| | | // 行单击 |
| | | handleRowClick (row) { |
| | | // delete (row["name"]); |
| | | var obj = row; |
| | | obj["name"] = "保安公司详细资料"; |
| | | this.$router.push({ |
| | | path: `/securityCompany/index`, |
| | | query: obj, |
| | | }); |
| | | }, |
| | | |
| | | seeLocation (row) { |
| | | |
| | | this.seeLocationFlag = true |
| | | |
| | | 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 |
| | | }) |
| | | |
| | | this.$refs.locationForm.addEntitys( |
| | | { |
| | | LGTD: arr[0].gis_jd, |
| | | LTTD: arr[0].gis_wd, |
| | | name: "人员位置", |
| | | }, |
| | | peoplePng, |
| | | 0.5, |
| | | "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" |
| | | // ); |
| | | // }) |
| | | // } |
| | | }); |
| | | }, |
| | | |
| | | seeTrack (row) { |
| | | this.trackTime = []; |
| | | this.rowData = ''; |
| | | this.rowData = row; |
| | | this.seeTrackFlag = true |
| | | }, |
| | | |
| | | lookTrack () { |
| | | if (this.trackTime.length == 0) { |
| | | this.$message({ message: "请选择开始时间", duration: 2000 }); |
| | | return; |
| | | } |
| | | const startTime = new Date(this.trackTime[0]); |
| | | const start = |
| | | startTime.getFullYear() + |
| | | "-" + |
| | | this.disposeTime(startTime.getMonth() + 1) + |
| | | "-" + |
| | | this.disposeTime(startTime.getDate()) + |
| | | " " + |
| | | this.disposeTime(startTime.getHours()) + |
| | | ":" + |
| | | this.disposeTime(startTime.getMinutes()) + |
| | | ":" + |
| | | this.disposeTime(startTime.getSeconds()); |
| | | if (this.trackTime.length == 1) { |
| | | this.$message({ message: "请选择结束时间", duration: 2000 }); |
| | | return; |
| | | } |
| | | const endTime = new Date(this.trackTime[1]); |
| | | const end = |
| | | endTime.getFullYear() + |
| | | "-" + |
| | | this.disposeTime(endTime.getMonth() + 1) + |
| | | "-" + |
| | | this.disposeTime(endTime.getDate()) + |
| | | " " + |
| | | this.disposeTime(endTime.getHours()) + |
| | | ":" + |
| | | this.disposeTime(endTime.getMinutes()) + |
| | | ":" + |
| | | this.disposeTime(endTime.getSeconds()); |
| | | |
| | | getDirectiveLocusInfoList({ |
| | | userIds: this.rowData.receiveDirectiveIds, |
| | | type: 1, |
| | | startTime: start, |
| | | endTime: end, |
| | | }).then((res) => { |
| | | getNewTark().then(res => { |
| | | |
| | | if (JSON.stringify(res.data.track) != "{}") { |
| | | |
| | | if (res.data.track.length > 1) { |
| | | let arr = []; |
| | | |
| | | res.data.track.forEach((item) => { |
| | | arr.push([Number(item.gis_jd), Number(item.gis_wd)]); |
| | | }); |
| | | |
| | | 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); |
| | | // } |
| | | // }) |
| | | // } |
| | | }); |
| | | }, |
| | | |
| | | // 处理时间补零操作 |
| | | disposeTime (s) { |
| | | return s < 10 ? "0" + s : s; |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.post_add, false), |
| | | viewBtn: this.vaildData(this.permission.post_view, false), |
| | | delBtn: this.vaildData(this.permission.post_delete, false), |
| | | editBtn: this.vaildData(this.permission.post_edit, false), |
| | | }; |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | 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.form = res.data.data; |
| | | // }); |
| | | // } |
| | | // done(); |
| | | // }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | // this.loading = false; |
| | | this.loading = true; |
| | | getLisperetaskDistribution( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | 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"); |
| | | this.loading = false; |
| | | // this.selectionClear(); |
| | | }); |
| | | }, |
| | | // onLoad(page, params = {}) { |
| | | // // this.loading = false; |
| | | // this.loading = true; |
| | | // // getListJSON().then((res) => { |
| | | // // axios |
| | | // // .get( |
| | | // // "../../api/qualificationExamination/signQualificationExamination.json" |
| | | // // ) |
| | | // // .then((res) => { |
| | | // // page.currentPage, |
| | | // // page.pageSize, |
| | | // // Object.assign(params, this.query) |
| | | // if (datasing) { |
| | | // var res = datasing; |
| | | // console.log(res, "signQualificationExamination"); |
| | | // const data = res.data; |
| | | // // this.page.total = data.total; |
| | | // var d = data.records; |
| | | // for (var k in d) { |
| | | // d[k].examination_mx = "正常"; |
| | | // d[k].examination_type = "正常"; |
| | | // d[k]["carid"] = "370111198807051124"; |
| | | // d[k]["certificate"] = "拥有"; |
| | | // d[k]["reviewTime"] = "2021-02-21"; |
| | | // d[k]["results"] = "通过"; |
| | | // d[k]["onjob"] = "是"; |
| | | // } |
| | | // this.data = d; |
| | | // this.loading = false; |
| | | // } |
| | | // // this.selectionClear(); |
| | | // // }); |
| | | // }, |
| | | |
| | | // 行单击 |
| | | handleRowClick(row) { |
| | | // delete (row["name"]); |
| | | var obj = row; |
| | | obj["name"] = "保安公司详细资料"; |
| | | this.$router.push({ |
| | | path: `/securityCompany/index`, |
| | | query: obj, |
| | | }); |
| | | }, |
| | | |
| | | seeLocation(row) { |
| | | this.seeLocationFlag = true; |
| | | |
| | | 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; |
| | | }); |
| | | |
| | | this.$refs.locationForm.addEntitys( |
| | | { |
| | | LGTD: arr[0].gis_jd, |
| | | LTTD: arr[0].gis_wd, |
| | | name: "人员位置", |
| | | }, |
| | | peoplePng, |
| | | 0.5, |
| | | "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" |
| | | // ); |
| | | // }) |
| | | // } |
| | | }); |
| | | }, |
| | | |
| | | seeTrack(row) { |
| | | this.trackTime = []; |
| | | this.rowData = ""; |
| | | this.rowData = row; |
| | | this.seeTrackFlag = true; |
| | | }, |
| | | |
| | | lookTrack() { |
| | | if (this.trackTime.length == 0) { |
| | | this.$message({ message: "请选择开始时间", duration: 2000 }); |
| | | return; |
| | | } |
| | | const startTime = new Date(this.trackTime[0]); |
| | | const start = |
| | | startTime.getFullYear() + |
| | | "-" + |
| | | this.disposeTime(startTime.getMonth() + 1) + |
| | | "-" + |
| | | this.disposeTime(startTime.getDate()) + |
| | | " " + |
| | | this.disposeTime(startTime.getHours()) + |
| | | ":" + |
| | | this.disposeTime(startTime.getMinutes()) + |
| | | ":" + |
| | | this.disposeTime(startTime.getSeconds()); |
| | | if (this.trackTime.length == 1) { |
| | | this.$message({ message: "请选择结束时间", duration: 2000 }); |
| | | return; |
| | | } |
| | | const endTime = new Date(this.trackTime[1]); |
| | | const end = |
| | | endTime.getFullYear() + |
| | | "-" + |
| | | this.disposeTime(endTime.getMonth() + 1) + |
| | | "-" + |
| | | this.disposeTime(endTime.getDate()) + |
| | | " " + |
| | | this.disposeTime(endTime.getHours()) + |
| | | ":" + |
| | | this.disposeTime(endTime.getMinutes()) + |
| | | ":" + |
| | | this.disposeTime(endTime.getSeconds()); |
| | | |
| | | getDirectiveLocusInfoList({ |
| | | userIds: this.rowData.receiveDirectiveIds, |
| | | type: 1, |
| | | startTime: start, |
| | | endTime: end, |
| | | }).then((res) => { |
| | | getNewTark().then((res) => { |
| | | if (JSON.stringify(res.data.track) != "{}") { |
| | | if (res.data.track.length > 1) { |
| | | let arr = []; |
| | | |
| | | res.data.track.forEach((item) => { |
| | | arr.push([Number(item.gis_jd), Number(item.gis_wd)]); |
| | | }); |
| | | |
| | | 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); |
| | | // } |
| | | // }) |
| | | // } |
| | | }); |
| | | }, |
| | | |
| | | // 处理时间补零操作 |
| | | disposeTime(s) { |
| | | return s < 10 ? "0" + s : s; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style></style> |