From eed39ea913dddfe6572f37de8c7de3f1523b6816 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 20 Jul 2021 09:36:04 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_regulatory

---
 src/views/management/register.vue | 1525 ++++++++++++++++++++++++++++++---------------------------
 1 files changed, 803 insertions(+), 722 deletions(-)

diff --git a/src/views/management/register.vue b/src/views/management/register.vue
index 463113e..1a23a55 100644
--- a/src/views/management/register.vue
+++ b/src/views/management/register.vue
@@ -6,39 +6,43 @@
  * menu-name 保安员注册查询
  */
 <template>
-    <el-row>
-        <el-col :span="5">
-            <div class="box">
-                <el-scrollbar>
-                    <basic-container>
-                        <avue-tree :option="treeOption"
-                                   :data="treeData"
-                                   @node-click="nodeClick" />
-                    </basic-container>
-                </el-scrollbar>
-            </div>
-        </el-col>
-        <el-col :span="19">
-            <basic-container>
-                <avue-crud :option="option"
-                           :search.sync="search"
-                           :table-loading="loading"
-                           :data="data"
-                           ref="crud"
-                           v-model="form"
-                           :permission="permissionList"
-                           @row-save="rowSave"
-                           :before-open="beforeOpen"
-                           :page.sync="page"
-                           @search-change="searchChange"
-                           @search-reset="searchReset"
-                           @selection-change="selectionChange"
-                           @current-change="currentChange"
-                           @size-change="sizeChange"
-                           @refresh-change="refreshChange"
-                           @row-click="handleRowClick"
-                           @on-load="onLoad">
-                    <!-- <template slot-scope="{row}"
+  <el-row>
+    <el-col :span="5">
+      <div class="box">
+        <el-scrollbar>
+          <basic-container>
+            <avue-tree
+              :option="treeOption"
+              :data="treeData"
+              @node-click="nodeClick"
+            />
+          </basic-container>
+        </el-scrollbar>
+      </div>
+    </el-col>
+    <el-col :span="19">
+      <basic-container>
+        <avue-crud
+          :option="option"
+          :search.sync="search"
+          :table-loading="loading"
+          :data="data"
+          ref="crud"
+          v-model="form"
+          :permission="permissionList"
+          @row-save="rowSave"
+          :before-open="beforeOpen"
+          :page.sync="page"
+          @search-change="searchChange"
+          @search-reset="searchReset"
+          @selection-change="selectionChange"
+          @current-change="currentChange"
+          @size-change="sizeChange"
+          @refresh-change="refreshChange"
+          @row-click="handleRowClick"
+          @on-load="onLoad"
+        >
+          <!-- <template slot-scope="{row}"
                               slot="tenantName">
                         <el-tag>{{row.tenantName}}</el-tag>
                     </template>
@@ -54,723 +58,800 @@
                               slot="userTypeName">
                         <el-tag>{{row.userTypeName}}</el-tag>
                     </template> -->
-                    <template slot-scope="{type,size,row}"
-                              slot="menu">
-                        <el-button icon="icon-zhengjian"
-                                   :size="size"
-                                   :type="type"
-                                   class="zhengJian-icon"
-                                   @click.stop="handleCredentials(row)">证件吊销</el-button>
-                    </template>
-                </avue-crud>
-                <el-dialog title="用户数据导入"
-                           append-to-body
-                           :visible.sync="excelBox"
-                           width="555px">
-                    <avue-form :option="excelOption"
-                               v-model="excelForm"
-                               :upload-after="uploadAfter">
-                        <template slot="excelTemplate">
-                            <el-button type="primary"
-                                       @click="handleTemplate">
-                                点击下载<i class="el-icon-download el-icon--right"></i>
-                            </el-button>
-                        </template>
-                    </avue-form>
-                </el-dialog>
-
-            </basic-container>
-        </el-col>
-    </el-row>
+          <template slot-scope="{ type, size, row }" slot="menu">
+            <el-button
+              :size="size"
+              :type="type"
+              class="zhengJian-icon"
+              @click.stop="handleViewCredentials(row)"
+              >查看证件</el-button
+            >
+            <el-button
+              icon="icon-zhengjian"
+              :size="size"
+              :type="type"
+              class="zhengJian-icon"
+              @click.stop="handleCredentials(row)"
+              >证件吊销</el-button
+            >
+          </template>
+        </avue-crud>
+        <el-dialog
+          title="用户数据导入"
+          append-to-body
+          :visible.sync="excelBox"
+          width="555px"
+        >
+          <avue-form
+            :option="excelOption"
+            v-model="excelForm"
+            :upload-after="uploadAfter"
+          >
+            <template slot="excelTemplate">
+              <el-button type="primary" @click="handleTemplate">
+                点击下载<i class="el-icon-download el-icon--right"></i>
+              </el-button>
+            </template>
+          </avue-form>
+        </el-dialog>
+      </basic-container>
+    </el-col>
+  </el-row>
 </template>
 
 <script>
-import {
-    getList,
-    getUser,
-    add,
-    updateHold,
-} from "@/api/management/user";
-import { getDeptTree, getDeptLazyTree } from "@/api/system/dept";
+import { getUser, add, updateHold } from "@/api/management/user";
+import { getListSecurity } from "@/api/system/user";
+import { getDeptLazyTree } from "@/api/Jurs/jurs";
+// import { getDeptTree, getDeptLazyTree } from "@/api/system/dept";
+import { getDeptTree } from "@/api/system/dept";
 import { getRoleTree } from "@/api/system/role";
 import { getPostList } from "@/api/system/post";
 import { mapGetters } from "vuex";
-import website from '@/config/website';
-import { getToken } from '@/util/auth';
+import website from "@/config/website";
+import { getToken } from "@/util/auth";
 
 export default {
-    data () {
-        const validatePass = (rule, value, callback) => {
-            if (value === '') {
-                callback(new Error('请输入密码'));
-            } else {
-                callback();
-            }
-        };
-        const validatePass2 = (rule, value, callback) => {
-            if (value === '') {
-                callback(new Error('请再次输入密码'));
-            } else if (value !== this.form.password) {
-                callback(new Error('两次输入密码不一致!'));
-            } else {
-                callback();
-            }
-        };
-        return {
-            form: {},
-            search: {},
-            excelBox: false,
-            initFlag: true,
-            selectionList: [],
-            query: {},
-            loading: true,
-            page: {
-                pageSize: 10,
-                currentPage: 1,
-                total: 0
-            },
+  data() {
+    const validatePass = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("请输入密码"));
+      } else {
+        callback();
+      }
+    };
+    const validatePass2 = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("请再次输入密码"));
+      } else if (value !== this.form.password) {
+        callback(new Error("两次输入密码不一致!"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      form: {},
+      search: {},
+      excelBox: false,
+      initFlag: true,
+      selectionList: [],
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+      },
 
-            init: {
-                roleTree: [],
-                deptTree: [],
-            },
+      init: {
+        roleTree: [],
+        deptTree: [],
+      },
 
-            treeDeptId: '',
-            treeData: [],
-            treeOption: {
-                nodeKey: 'id',
-                lazy: true,
-                treeLoad: function (node, resolve) {
-                    const parentId = (node.level === 0) ? 0 : node.data.id;
-                    getDeptLazyTree(parentId).then(res => {
-                        resolve(res.data.data.map(item => {
-                            return {
-                                ...item,
-                                leaf: !item.hasChildren
-                            }
-                        }))
-                    });
-                },
-                addBtn: false,
-                menu: false,
-                size: 'small',
+      treeDeptId: "",
+      jurisdiction: "",
+      treeData: [],
+      treeOption: {
+        nodeKey: "id",
+        defaultExpandAll: true,
+        lazy: true,
+        treeLoad: function (node, resolve) {
+          const parentId = node.level === 0 ? 0 : node.data.id;
+          getDeptLazyTree(parentId).then((res) => {
+            resolve(
+              res.data.data.map((item) => {
+                return {
+                  ...item,
+                  leaf: !item.hasChildren,
+                };
+              })
+            );
+          });
+        },
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          labelText: "标题",
+          label: "title",
+          value: "value",
+          children: "children",
+        },
+      },
+      option: {
+        // 操作栏多余按钮去除
+        delBtn: false,
+        editBtn: false,
+        addBtn: false,
+        selection: false,
+        align: "center",
+        height: "auto",
+        calcHeight: 80,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 4,
+        index: true,
+        viewBtn: false,
+        //dialogType: 'drawer',
+        dialogClickModal: false,
+        // 操作栏宽度
+        menuWidth: 175,
+        column: [
+          {
+            label: "保安姓名",
+            prop: "realName",
+            search: true,
+            searchSpan: 5,
+            display: false,
+            width: 78,
+          },
+          {
+            label: "性别",
+            prop: "sex",
+            type: "select",
+            search: true,
+            searchSpan: 4,
+            searchLabelWidth: 50,
+            dicData: [
+              {
+                label: "女",
+                value: 2,
+              },
+              {
+                label: "男",
+                value: 1,
+              },
+            ],
+            slot: true,
+            display: false,
+            width: 48,
+          },
+          {
+            label: "保安公司",
+            prop: "deptName",
+            slot: true,
+            display: false,
+          },
+          {
+            label: "保安证编号",
+            prop: "securitynumber",
+            display: false,
+          },
+          {
+            label: "身份证号",
+            prop: "cardid",
+            slot: true,
+            display: false,
+            width: 138,
+          },
+          {
+            label: "联系方式",
+            prop: "phone",
+            slot: true,
+            display: false,
+            width: 92,
+          },
+          {
+            label: "联系地址",
+            prop: "address",
+            slot: true,
+            display: false,
+          },
+          {
+            label: "入职时间",
+            prop: "rtime",
+            slot: true,
+            display: false,
+            width: 82,
+          },
+          {
+            label: "所属角色",
+            prop: "roleName",
+            slot: true,
+            display: false,
+            width: 78,
+          },
+
+          {
+            label: "所属辖区",
+            prop: "jurisdiction",
+            // multiple: true,
+            type: "tree",
+            dicUrl: "/api/jurisdiction/lazy-tree?parentId=0",
+            props: {
+              label: "title",
+              value: "id",
+            },
+            checkStrictly: true,
+            slot: true,
+            rules: [
+              {
+                required: true,
+                message: "请选择所属辖区",
+                trigger: "click",
+              },
+            ],
+          },
+          {
+            label: "是否在职",
+            prop: "status",
+            type: "select",
+            search: true,
+            searchSpan: 4,
+            dicData: [
+              {
+                label: "否",
+                value: 0,
+              },
+              {
+                label: "是",
+                value: 1,
+              },
+            ],
+            slot: true,
+            display: false,
+            width: 78,
+          },
+          {
+            label: "是否持证",
+            prop: "hold",
+            type: "select",
+            search: true,
+            searchSpan: 4,
+            dicData: [
+              {
+                label: "是",
+                value: "0",
+              },
+              {
+                label: "否",
+                value: "1",
+              },
+              {
+                label: "已吊销",
+                value: "2",
+              },
+            ],
+            slot: true,
+            display: false,
+            width: 78,
+          },
+        ],
+        group: [
+          {
+            label: "基础信息",
+            prop: "baseInfo",
+            icon: "el-icon-user-solid",
+            column: [
+              {
+                label: "所属机构",
+                prop: "tenantId",
+                type: "tree",
+                dicUrl: "/api/blade-system/tenant/select",
                 props: {
-                    labelText: '标题',
-                    label: 'title',
-                    value: 'value',
-                    children: 'children'
-                }
-            },
-            option: {
-                // 操作栏多余按钮去除
-                delBtn: false,
-                editBtn: false,
-                addBtn: false,
-                selection: false,
-
-                align: 'center',
-                height: 'auto',
-                calcHeight: 80,
-                tip: false,
-                searchShow: true,
-                searchMenuSpan: 4,
-                index: true,
-                viewBtn: false,
-                //dialogType: 'drawer',
-                dialogClickModal: false,
-                // 操作栏宽度
-                menuWidth: 156,
-
-                column: [
-                    {
-                        label: "保安姓名",
-                        prop: "realName",
-                        search: true,
-                        searchSpan: 5,
-                        display: false,
-                        width: 78
-                    },
-                    {
-                        label: "性别",
-                        prop: "sex",
-                        type: "select",
-                        search: true,
-                        searchSpan: 4,
-                        searchLabelWidth: 50,
-                        dicData: [{
-                            label: '女',
-                            value: 2
-                        }, {
-                            label: '男',
-                            value: 1,
-                        }],
-                        slot: true,
-                        display: false,
-                        width: 48
-                    },
-                    {
-                        label: "身份证号",
-                        prop: "cardid",
-                        slot: true,
-                        display: false,
-                        width: 138
-                    },
-                    {
-                        label: "联系方式",
-                        prop: "phone",
-                        slot: true,
-                        display: false,
-                        width: 92
-                    },
-                    {
-                        label: "联系地址",
-                        prop: "address",
-                        slot: true,
-                        display: false
-                    },
-                    {
-                        label: "入职时间",
-                        prop: "rtime",
-                        slot: true,
-                        display: false,
-                        width: 82
-                    },
-                    {
-                        label: "所属角色",
-                        prop: "roleName",
-                        slot: true,
-                        display: false,
-                        width: 78
-                    },
-                    {
-                        label: "所属公司",
-                        prop: "deptName",
-                        slot: true,
-                        display: false
-                    },
-                    {
-                        label: "所属辖区",
-                        prop: "deptName",
-                        slot: true,
-                        display: false
-                    },
-                    {
-                        label: "是否在职",
-                        prop: "status",
-                        type: "select",
-                        search: true,
-                        searchSpan: 4,
-                        dicData: [{
-                            label: '否',
-                            value: 0
-                        }, {
-                            label: '是',
-                            value: 1,
-                        }],
-                        slot: true,
-                        display: false,
-                        width: 78
-                    },
-                    {
-                        label: "是否持证",
-                        prop: "hold",
-                        type: "select",
-                        search: true,
-                        searchSpan: 4,
-                        dicData: [{
-                            label: '是',
-                            value: '0'
-                        }, {
-                            label: '否',
-                            value: '1',
-                        }, {
-                            label: '已吊销',
-                            value: '2',
-                        }],
-                        slot: true,
-                        display: false,
-                        width: 78
-                    },
+                  label: "tenantName",
+                  value: "tenantId",
+                },
+                hide: !website.tenantMode,
+                addDisplay: website.tenantMode,
+                editDisplay: website.tenantMode,
+                viewDisplay: website.tenantMode,
+                rules: [
+                  {
+                    required: true,
+                    message: "请输入所属机构",
+                    trigger: "click",
+                  },
                 ],
-                group: [
-                    {
-                        label: '基础信息',
-                        prop: 'baseInfo',
-                        icon: 'el-icon-user-solid',
-                        column: [
-                            {
-                                label: "所属机构",
-                                prop: "tenantId",
-                                type: "tree",
-                                dicUrl: "/api/blade-system/tenant/select",
-                                props: {
-                                    label: "tenantName",
-                                    value: "tenantId"
-                                },
-                                hide: !website.tenantMode,
-                                addDisplay: website.tenantMode,
-                                editDisplay: website.tenantMode,
-                                viewDisplay: website.tenantMode,
-                                rules: [{
-                                    required: true,
-                                    message: "请输入所属机构",
-                                    trigger: "click"
-                                }],
-                                span: 24,
-                            },
-                            {
-                                label: "登录账号",
-                                prop: "account",
-                                rules: [{
-                                    required: true,
-                                    message: "请输入登录账号",
-                                    trigger: "blur"
-                                }],
-                            },
-                            {
-                                label: "用户平台",
-                                type: "select",
-                                dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
-                                props: {
-                                    label: "dictValue",
-                                    value: "dictKey"
-                                },
-                                dataType: "number",
-                                slot: true,
-                                prop: "userType",
-                                rules: [{
-                                    required: true,
-                                    message: "请选择用户平台",
-                                    trigger: "blur"
-                                }]
-                            },
-                            {
-                                label: '密码',
-                                prop: 'password',
-                                hide: true,
-                                editDisplay: false,
-                                viewDisplay: false,
-                                rules: [{ required: true, validator: validatePass, trigger: 'blur' }]
-                            },
-                            {
-                                label: '确认密码',
-                                prop: 'password2',
-                                hide: true,
-                                editDisplay: false,
-                                viewDisplay: false,
-                                rules: [{ required: true, validator: validatePass2, trigger: 'blur' }]
-                            },
-                        ]
-                    },
-                    {
-                        label: '详细信息',
-                        prop: 'detailInfo',
-                        icon: 'el-icon-s-order',
-                        column: [
-                            {
-                                label: "用户昵称",
-                                prop: "name",
-                                hide: true,
-                                rules: [{
-                                    required: true,
-                                    message: "请输入用户昵称",
-                                    trigger: "blur"
-                                }]
-                            },
-                            {
-                                label: "用户姓名",
-                                prop: "realName",
-                                rules: [{
-                                    required: true,
-                                    message: "请输入用户姓名",
-                                    trigger: "blur"
-                                }, {
-                                    min: 2,
-                                    max: 5,
-                                    message: '姓名长度在2到5个字符'
-                                }]
-                            },
-                            {
-                                label: "手机号码",
-                                prop: "phone",
-                                overHidden: true
-                            },
-                            {
-                                label: "电子邮箱",
-                                prop: "email",
-                                hide: true,
-                                overHidden: true
-                            },
-                            {
-                                label: "用户性别",
-                                prop: "sex",
-                                type: "select",
-                                dicData: [
-                                    {
-                                        label: "男",
-                                        value: 1
-                                    },
-                                    {
-                                        label: "女",
-                                        value: 2
-                                    },
-                                    {
-                                        label: "未知",
-                                        value: 3
-                                    }
-                                ],
-                                hide: true
-                            },
-                            {
-                                label: "用户生日",
-                                type: "date",
-                                prop: "birthday",
-                                format: "yyyy-MM-dd hh:mm:ss",
-                                valueFormat: "yyyy-MM-dd hh:mm:ss",
-                                hide: true
-                            },
-                            {
-                                label: "账号状态",
-                                prop: "statusName",
-                                hide: true,
-                                display: false
-                            }
-                        ]
-                    },
-                    {
-                        label: '职责信息',
-                        prop: 'dutyInfo',
-                        icon: 'el-icon-s-custom',
-                        column: [
-                            {
-                                label: "用户编号",
-                                prop: "code",
-                            },
-                            {
-                                label: "所属角色",
-                                prop: "roleId",
-                                multiple: true,
-                                type: "tree",
-                                dicData: [],
-                                props: {
-                                    label: "title"
-                                },
-                                checkStrictly: true,
-                                slot: true,
-                                rules: [{
-                                    required: true,
-                                    message: "请选择所属角色",
-                                    trigger: "click"
-                                }]
-                            },
-                            {
-                                label: "所属单位",
-                                prop: "deptId",
-                                type: "tree",
-                                multiple: true,
-                                dicData: [],
-                                props: {
-                                    label: "title"
-                                },
-                                checkStrictly: true,
-                                slot: true,
-                                rules: [{
-                                    required: true,
-                                    message: "请选择所属部门",
-                                    trigger: "click"
-                                }]
-                            },
-                            {
-                                label: "所属岗位",
-                                prop: "postId",
-                                type: "tree",
-                                multiple: true,
-                                dicData: [],
-                                props: {
-                                    label: "postName",
-                                    value: "id"
-                                },
-                                rules: [{
-                                    required: true,
-                                    message: "请选择所属岗位",
-                                    trigger: "click"
-                                }],
-                            },
-                        ]
-                    },
-                ]
+                span: 24,
+              },
+              {
+                label: "登录账号",
+                prop: "account",
+                rules: [
+                  {
+                    required: true,
+                    message: "请输入登录账号",
+                    trigger: "blur",
+                  },
+                ],
+              },
+              {
+                label: "用户平台",
+                type: "select",
+                dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
+                props: {
+                  label: "dictValue",
+                  value: "dictKey",
+                },
+                dataType: "number",
+                slot: true,
+                prop: "userType",
+                rules: [
+                  {
+                    required: true,
+                    message: "请选择用户平台",
+                    trigger: "blur",
+                  },
+                ],
+              },
+              {
+                label: "密码",
+                prop: "password",
+                hide: true,
+                editDisplay: false,
+                viewDisplay: false,
+                rules: [
+                  { required: true, validator: validatePass, trigger: "blur" },
+                ],
+              },
+              {
+                label: "确认密码",
+                prop: "password2",
+                hide: true,
+                editDisplay: false,
+                viewDisplay: false,
+                rules: [
+                  { required: true, validator: validatePass2, trigger: "blur" },
+                ],
+              },
+            ],
+          },
+          {
+            label: "详细信息",
+            prop: "detailInfo",
+            icon: "el-icon-s-order",
+            column: [
+              {
+                label: "用户昵称",
+                prop: "name",
+                hide: true,
+                rules: [
+                  {
+                    required: true,
+                    message: "请输入用户昵称",
+                    trigger: "blur",
+                  },
+                ],
+              },
+              {
+                label: "用户姓名",
+                prop: "realName",
+                rules: [
+                  {
+                    required: true,
+                    message: "请输入用户姓名",
+                    trigger: "blur",
+                  },
+                  {
+                    min: 2,
+                    max: 5,
+                    message: "姓名长度在2到5个字符",
+                  },
+                ],
+              },
+              {
+                label: "手机号码",
+                prop: "phone",
+                overHidden: true,
+              },
+              {
+                label: "电子邮箱",
+                prop: "email",
+                hide: true,
+                overHidden: true,
+              },
+              {
+                label: "用户性别",
+                prop: "sex",
+                type: "select",
+                dicData: [
+                  {
+                    label: "男",
+                    value: 1,
+                  },
+                  {
+                    label: "女",
+                    value: 2,
+                  },
+                  {
+                    label: "未知",
+                    value: 3,
+                  },
+                ],
+                hide: true,
+              },
+              {
+                label: "用户生日",
+                type: "date",
+                prop: "birthday",
+                format: "yyyy-MM-dd hh:mm:ss",
+                valueFormat: "yyyy-MM-dd hh:mm:ss",
+                hide: true,
+              },
+              {
+                label: "账号状态",
+                prop: "statusName",
+                hide: true,
+                display: false,
+              },
+            ],
+          },
+          {
+            label: "职责信息",
+            prop: "dutyInfo",
+            icon: "el-icon-s-custom",
+            column: [
+              {
+                label: "用户编号",
+                prop: "code",
+              },
+              {
+                label: "所属角色",
+                prop: "roleId",
+                multiple: true,
+                type: "tree",
+                dicData: [],
+                props: {
+                  label: "title",
+                },
+                checkStrictly: true,
+                slot: true,
+                rules: [
+                  {
+                    required: true,
+                    message: "请选择所属角色",
+                    trigger: "click",
+                  },
+                ],
+              },
+              {
+                label: "所属单位",
+                prop: "deptId",
+                type: "tree",
+                multiple: true,
+                dicData: [],
+                props: {
+                  label: "title",
+                },
+                checkStrictly: true,
+                slot: true,
+                rules: [
+                  {
+                    required: true,
+                    message: "请选择所属部门",
+                    trigger: "click",
+                  },
+                ],
+              },
+              {
+                label: "所属岗位",
+                prop: "postId",
+                type: "tree",
+                multiple: true,
+                dicData: [],
+                props: {
+                  label: "postName",
+                  value: "id",
+                },
+                rules: [
+                  {
+                    required: true,
+                    message: "请选择所属岗位",
+                    trigger: "click",
+                  },
+                ],
+              },
+            ],
+          },
+        ],
+      },
+      data: [],
+      platformQuery: {},
+      platformSelectionList: [],
+
+      excelForm: {},
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "模板上传",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "模板上传中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data",
             },
-            data: [],
-            platformQuery: {},
-            platformSelectionList: [],
-
-            excelForm: {},
-            excelOption: {
-                submitBtn: false,
-                emptyBtn: false,
-                column: [
-                    {
-                        label: '模板上传',
-                        prop: 'excelFile',
-                        type: 'upload',
-                        drag: true,
-                        loadText: '模板上传中,请稍等',
-                        span: 24,
-                        propsHttp: {
-                            res: 'data'
-                        },
-                        tip: '请上传 .xls,.xlsx 标准格式文件',
-                        action: "/api/blade-user/import-user"
-                    },
-                    {
-                        label: "数据覆盖",
-                        prop: "isCovered",
-                        type: "switch",
-                        align: "center",
-                        width: 80,
-                        dicData: [
-                            {
-                                label: "否",
-                                value: 0
-                            },
-                            {
-                                label: "是",
-                                value: 1
-                            }
-                        ],
-                        value: 0,
-                        slot: true,
-                        rules: [
-                            {
-                                required: true,
-                                message: "请选择是否覆盖",
-                                trigger: "blur"
-                            }
-                        ]
-                    },
-                    {
-                        label: '模板下载',
-                        prop: 'excelTemplate',
-                        formslot: true,
-                        span: 24,
-                    }
-                ]
-            }
-        };
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-user/import-user",
+          },
+          {
+            label: "数据覆盖",
+            prop: "isCovered",
+            type: "switch",
+            align: "center",
+            width: 80,
+            dicData: [
+              {
+                label: "否",
+                value: 0,
+              },
+              {
+                label: "是",
+                value: 1,
+              },
+            ],
+            value: 0,
+            slot: true,
+            rules: [
+              {
+                required: true,
+                message: "请选择是否覆盖",
+                trigger: "blur",
+              },
+            ],
+          },
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24,
+          },
+        ],
+      },
+    };
+  },
+  watch: {
+    "form.tenantId"() {
+      if (this.form.tenantId !== "" && this.initFlag) {
+        this.initData(this.form.tenantId);
+      }
     },
-    watch: {
-        'form.tenantId' () {
-            if (this.form.tenantId !== '' && this.initFlag) {
-                this.initData(this.form.tenantId);
-            }
-        },
-        'excelForm.isCovered' () {
-            if (this.excelForm.isCovered !== '') {
-                const column = this.findObject(this.excelOption.column, "excelFile");
-                column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
-            }
-        }
+    "excelForm.isCovered"() {
+      if (this.excelForm.isCovered !== "") {
+        const column = this.findObject(this.excelOption.column, "excelFile");
+        column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
+      }
     },
-    computed: {
-        ...mapGetters(["permission"]),
-        permissionList () {
-            return {
-                addBtn: this.vaildData(this.permission.user_add, false),
-                viewBtn: this.vaildData(this.permission.user_view, false),
-                delBtn: this.vaildData(this.permission.user_delete, false),
-                editBtn: this.vaildData(this.permission.user_edit, false)
-            };
-        },
-
-        ids () {
-            let ids = [];
-            this.selectionList.forEach(ele => {
-                ids.push(ele.id);
-            });
-            return ids.join(",");
-        },
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.user_add, false),
+        viewBtn: this.vaildData(this.permission.user_view, false),
+        delBtn: this.vaildData(this.permission.user_delete, false),
+        editBtn: this.vaildData(this.permission.user_edit, false),
+      };
     },
-    mounted () {
-        // 非租户模式默认加载管理组数据
-        if (!website.tenantMode) {
-            this.initData(website.tenantId);
-        }
+
+    ids() {
+      let ids = [];
+      this.selectionList.forEach((ele) => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
     },
-    methods: {
-        nodeClick (data) {
-            this.treeDeptId = data.id;
-            this.page.currentPage = 1;
-            this.onLoad(this.page);
-        },
-        initData (tenantId) {
-            getRoleTree(tenantId).then(res => {
-                const column = this.findObject(this.option.group, "roleId");
-                column.dicData = res.data.data;
-            });
-            getDeptTree(tenantId).then(res => {
-                const column = this.findObject(this.option.group, "deptId");
-                column.dicData = res.data.data;
-            });
-            getPostList(tenantId).then(res => {
-                const column = this.findObject(this.option.group, "postId");
-                column.dicData = res.data.data;
-            });
-        },
-
-        rowSave (row, done, loading) {
-            row.deptId = row.deptId.join(",");
-            row.roleId = row.roleId.join(",");
-            row.postId = row.postId.join(",");
-            add(row).then(() => {
-                this.initFlag = false;
-                this.onLoad(this.page);
-                this.$message({
-                    type: "success",
-                    message: "操作成功!"
-                });
-                done();
-            }, error => {
-                window.console.log(error);
-                loading();
-            });
-        },
-        searchReset () {
-            this.query = {};
-            this.treeDeptId = '';
-            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();
-        },
-        uploadAfter (res, done, loading, column) {
-            window.console.log(column);
-            this.excelBox = false;
-            this.refreshChange();
-            done();
-        },
-
-        handleTemplate () {
-            window.open(`/api/blade-user/export-template?${this.website.tokenHeader}=${getToken()}`);
-        },
-        beforeOpen (done, type) {
-            if (["edit", "view"].includes(type)) {
-                getUser(this.form.id).then(res => {
-                    this.form = res.data.data;
-                    if (this.form.hasOwnProperty("deptId")) {
-                        this.form.deptId = this.form.deptId.split(",");
-                    }
-                    if (this.form.hasOwnProperty("roleId")) {
-                        this.form.roleId = this.form.roleId.split(",");
-                    }
-                    if (this.form.hasOwnProperty("postId")) {
-                        this.form.postId = this.form.postId.split(",");
-                    }
-                });
-            }
-            this.initFlag = true;
-            done();
-        },
-        currentChange (currentPage) {
-            this.page.currentPage = currentPage;
-        },
-        sizeChange (pageSize) {
-            this.page.pageSize = pageSize;
-        },
-        refreshChange () {
-            this.onLoad(this.page, this.query);
-        },
-        onLoad (page, params = {}) {
-            this.loading = true;
-            getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
-                const data = res.data.data;
-                this.page.total = data.total;
-                this.data = data.records;
-                this.loading = false;
-                this.selectionClear();
-            });
-        },
-
-
-
-        platformSelectionClear () {
-            this.platformSelectionList = [];
-            this.$refs.platformCrud.toggleSelection();
-        },
-
-        // 行单击
-        handleRowClick (row) {
-            // delete (row["name"]);
-            var obj = row
-            obj["name"] = "保安详细资料"
-            this.$router.push({
-                path: `/management/index`,
-                query: obj,
-            });
-
-        },
-        // 证件吊销事件
-        handleCredentials (row) {
-
-            if (row.hold == 1) {
-                this.$message({
-                  type: 'info',
-                    message: '证件未拥有!'
-                });
-            } else if (row.hold == 2) {
-                this.$message({
-                   type: 'info',
-                    message: '证件已吊销!'
-                });
-            } else {
-
-                this.$confirm('此操作将吊销该人员的证件, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-
-                    updateHold(2, row.cardid).then(res => {
-                        console.log(res)
-                        this.$message({
-                            type: 'success',
-                            message: '删除成功!'
-                        });
-                    })
-
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-
-            }
-
-        }
+  },
+  mounted() {
+    // 非租户模式默认加载管理组数据
+    if (!website.tenantMode) {
+      this.initData(website.tenantId);
     }
+  },
+  methods: {
+    nodeClick(data) {
+      //   this.treeDeptId = data.id;
+      this.jurisdiction = data.id;
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
+    initData(tenantId) {
+      getRoleTree(tenantId).then((res) => {
+        const column = this.findObject(this.option.group, "roleId");
+        column.dicData = res.data.data;
+      });
+      getDeptTree(tenantId).then((res) => {
+        const column = this.findObject(this.option.group, "deptId");
+        column.dicData = res.data.data;
+      });
+      getPostList(tenantId).then((res) => {
+        const column = this.findObject(this.option.group, "postId");
+        column.dicData = res.data.data;
+      });
+    },
+
+    rowSave(row, done, loading) {
+      row.deptId = row.deptId.join(",");
+      row.roleId = row.roleId.join(",");
+      row.postId = row.postId.join(",");
+      add(row).then(
+        () => {
+          this.initFlag = false;
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+          done();
+        },
+        (error) => {
+          window.console.log(error);
+          loading();
+        }
+      );
+    },
+    searchReset() {
+      this.query = {};
+      this.treeDeptId = "";
+      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();
+    },
+    uploadAfter(res, done, loading, column) {
+      window.console.log(column);
+      this.excelBox = false;
+      this.refreshChange();
+      done();
+    },
+
+    handleTemplate() {
+      window.open(
+        `/api/blade-user/export-template?${
+          this.website.tokenHeader
+        }=${getToken()}`
+      );
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getUser(this.form.id).then((res) => {
+          this.form = res.data.data;
+          if (this.form.hasOwnProperty("deptId")) {
+            this.form.deptId = this.form.deptId.split(",");
+          }
+          if (this.form.hasOwnProperty("roleId")) {
+            this.form.roleId = this.form.roleId.split(",");
+          }
+          if (this.form.hasOwnProperty("postId")) {
+            this.form.postId = this.form.postId.split(",");
+          }
+        });
+      }
+      this.initFlag = true;
+      done();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      params["jurisdiction"] = this.jurisdiction;
+      getListSecurity(
+        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;
+        this.loading = false;
+        this.selectionClear();
+      });
+    },
+
+    platformSelectionClear() {
+      this.platformSelectionList = [];
+      this.$refs.platformCrud.toggleSelection();
+    },
+
+    // 行单击
+    handleRowClick(row) {
+      // delete (row["name"]);
+      var obj = row;
+      obj["name"] = "保安详细资料";
+      this.$router.push({
+        path: `/management/index`,
+        query: obj,
+      });
+    },
+    //证件查看
+    handleViewCredentials(row) {
+      var obj = row;
+      obj["name"] = "保安证件信息";
+      this.$router.push({
+        path: `/management/idinformation`,
+        query: obj,
+      });
+    },
+    // 证件吊销事件
+    handleCredentials(row) {
+      if (row.hold == 1) {
+        this.$message({
+          type: "info",
+          message: "证件未拥有!",
+        });
+      } else if (row.hold == 2) {
+        this.$message({
+          type: "info",
+          message: "证件已吊销!",
+        });
+      } else {
+        this.$confirm("此操作将吊销该人员的证件, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            updateHold(2, row.cardid).then((res) => {
+              console.log(res);
+              this.$message({
+                type: "success",
+                message: "删除成功!",
+              });
+            });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "已取消删除",
+            });
+          });
+      }
+    },
+  },
 };
 </script>
 
 <style lang='scss' scoped>
 .box {
-    height: 800px;
+  height: 800px;
 }
 
 .el-scrollbar {
-    height: 100%;
+  height: 100%;
 }
 
 .box .el-scrollbar__wrap {
-    overflow: scroll;
+  overflow: scroll;
 }
 </style>

--
Gitblit v1.9.3