From 161d705a809405eece944b574fcddf92edce7b7d Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 15 Mar 2021 17:12:22 +0800
Subject: [PATCH] 处警队伍列表修改为user表数据展示

---
 src/views/security/security.vue |  140 +++++++++++++++++++++-------------------------
 1 files changed, 63 insertions(+), 77 deletions(-)

diff --git a/src/views/security/security.vue b/src/views/security/security.vue
index e292a64..17e28c7 100644
--- a/src/views/security/security.vue
+++ b/src/views/security/security.vue
@@ -1,30 +1,12 @@
 <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>
 
@@ -36,36 +18,29 @@
       </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() {
@@ -81,7 +56,7 @@
         },
         selectionList: [],
         option: {
-          height:'auto',
+          height: 'auto',
           calcHeight: 30,
           tip: false,
           searchShow: true,
@@ -91,10 +66,18 @@
           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,
@@ -103,8 +86,8 @@
               }]
             },
             {
-              label: "人员名称",
-              prop: "sname",
+              label: "人员姓名",
+              prop: "realName",
               search: true,
               rules: [{
                 required: true,
@@ -116,25 +99,15 @@
               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: "联系电话",
@@ -146,24 +119,33 @@
               }]
             },
             {
-              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: []
@@ -232,12 +214,16 @@
           });
       },
       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
+            });
           };
         })
       },
@@ -288,10 +274,10 @@
         this.selectionList = [];
         this.$refs.crud.toggleSelection();
       },
-      currentChange(currentPage){
+      currentChange(currentPage) {
         this.page.currentPage = currentPage;
       },
-      sizeChange(pageSize){
+      sizeChange(pageSize) {
         this.page.pageSize = pageSize;
       },
       refreshChange() {

--
Gitblit v1.9.3