| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @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"> |
| | | <avue-crud :option="option" :table-loading="loading" :data="data" :page="page" :permission="permissionList" |
| | | :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @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="menuLeft"> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.security_delete" |
| | | @click="handleDelete">删 除 |
| | | <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.security_delete" @click="handleDelete">删 |
| | | 除 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | </template> |
| | | |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | icon="el-icon-location-outline" |
| | | :size="size" |
| | | :type="type" |
| | | @click.stop="handleMap(row)" |
| | | >定位 |
| | | <el-button icon="el-icon-location-outline" :size="size" :type="type" @click.stop="handleMap(row)">编辑电子围栏 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | <el-drawer |
| | | title="电子地图" |
| | | append-to-body="true" |
| | | :visible.sync="showMap" |
| | | > |
| | | <iframe |
| | | id="mapDiv" |
| | | ref="mapDiv" |
| | | src="/map/index.html?openid=APoliceTeam&ISinit=1" |
| | | frameborder="0" |
| | | width="100%" |
| | | height="100%" |
| | | ></iframe> |
| | | <el-drawer title="电子地图" append-to-body="true" :visible.sync="showMap"> |
| | | <iframe id="mapDiv" ref="mapDiv" src="/map/index.html?openid=scurityMap&ISinit=1" frameborder="0" width="100%" |
| | | height="100%"></iframe> |
| | | </el-drawer> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList, getDetail, add, update, remove} from "@/api/security/security"; |
| | | import {mapGetters} from "vuex"; |
| | | import { |
| | | getList, |
| | | getDetail, |
| | | add, |
| | | update, |
| | | remove |
| | | } from "@/api/security/security"; |
| | | import { |
| | | mapGetters |
| | | } from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | | height:'auto', |
| | | height: 'auto', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | column: [{ |
| | | label: "账号", |
| | | prop: "account", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入账号", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "人员编号", |
| | | prop: "snumber", |
| | | prop: "code", |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | label: "人员名称", |
| | | prop: "sname", |
| | | label: "人员姓名", |
| | | prop: "realName", |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | |
| | | label: "性别", |
| | | prop: "sex", |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "男", |
| | | value: "0" |
| | | }, |
| | | dicData: [{ |
| | | label: "男", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: "1" |
| | | value: 2 |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "年龄", |
| | | prop: "age", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入年龄", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | |
| | | }] |
| | | }, |
| | | { |
| | | label: "家庭住址", |
| | | prop: "address", |
| | | label: "邮箱", |
| | | prop: "email", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入家庭住址", |
| | | message: "请输入邮箱", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "录用时间", |
| | | prop: "stime", |
| | | display: false, |
| | | label: "生日", |
| | | prop: "birthday", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入录用时间", |
| | | message: "请选择", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | display: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择创建时间", |
| | | trigger: "blur" |
| | | }] |
| | | } |
| | | ] |
| | | }, |
| | | data: [] |
| | |
| | | }); |
| | | }, |
| | | handleMap(row) { |
| | | debugger |
| | | this.showMap = true; |
| | | console.log("row.id="+row.id); |
| | | console.log("row.wd="+row.wd); |
| | | this.$nextTick(() => { |
| | | this.$refs.mapDiv.onload = () => { |
| | | window.frames[0].init(null,{x: row.jd, y: row.wd}); |
| | | |
| | | window.frames[0].init("SecurityMap", { |
| | | x: row.jd, |
| | | y: row.wd, |
| | | code:row.code |
| | | }); |
| | | }; |
| | | }) |
| | | }, |
| | |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage){ |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize){ |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |