From 8e68b3cefdf22c2eb37e02e2bafa06013bab5053 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Fri, 03 Sep 2021 17:56:39 +0800
Subject: [PATCH] 注册

---
 src/views/securityGuard/securityGuard.vue |   61 ++++++++++++++++++++++++++++--
 1 files changed, 56 insertions(+), 5 deletions(-)

diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index ff04663..0a53084 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -49,6 +49,15 @@
               >批量导入
             </el-button>
             <el-button
+              type="success"
+              size="small"
+              plain
+              icon="el-icon-upload2"
+              v-if="permission.securityGuard_import"
+              @click="handleImport2"
+              >个人照片批量上传
+            </el-button>
+            <el-button
               type="danger"
               style="display: none"
               size="small"
@@ -144,7 +153,7 @@
               class="rowClickSelf"
               title="点击查看所属公司情况"
               @click="rowClickSelf(row.deptId)"
-              >{{ row.$deptId }}</el-tag
+              >{{ row.deptName }}</el-tag
             >
           </template>
           <template slot-scope="{ row }" slot="tenantName">
@@ -250,6 +259,19 @@
             </template>
           </avue-form>
         </el-dialog>
+        <el-dialog
+          title="个人照片批量上传"
+          append-to-body
+          :visible.sync="excelBox2"
+          width="555px"
+        >
+          <avue-form
+            :option="excelOption2"
+            v-model="excelForm2"
+            :upload-after="uploadAfter2"
+          >
+          </avue-form>
+        </el-dialog>
       </basic-container>
     </el-col>
   </el-row>
@@ -300,6 +322,7 @@
     return {
       securityid: "",
       excelBox1: false,
+      excelBox2: false,
       isSecurity: true,
       excelForm1: {},
       excelOption1: {
@@ -325,6 +348,26 @@
             formslot: true,
             span: 24,
           },
+        ],
+      },
+      excelForm2: {},
+      excelOption2: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "文件上传",
+            prop: "file",
+            type: "upload",
+            drag: true,
+            loadText: "文件上传中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data",
+            },
+            tip: "请上传 zip 压缩文件",
+            action: "/api/blade-resource/oss/endpoint/put-file-zip",
+          }
         ],
       },
 
@@ -518,7 +561,7 @@
                 tip: "只能上传jpg/png个人头像,且不超过500kb",
                 span: 12,
                 row: true,
-                prop: "myPicture",
+                prop: "avatar",
               },
               {
                 label: "是否持证",
@@ -617,7 +660,7 @@
                 prop: "jurisdiction",
                 // multiple: true,
                 type: "tree",
-                dicUrl: "/api/jurisdiction/lazy-tree?parentId=0",
+                dicUrl: "/api/jurisdiction/lazy-tree",
                 props: {
                   label: "title",
                   value: "id",
@@ -866,6 +909,15 @@
     },
     handleTemplate1() {
       window.open(`/api/blade-user/export-template-security`);
+    },
+    handleImport2() {
+      this.excelBox2 = true;
+    },
+    uploadAfter2(res, done, loading, column) {
+      window.console.log(column);
+      this.excelBox2 = false;
+      // this.refreshChange();
+      done();
     },
 
     //行点击事件
@@ -1193,8 +1245,7 @@
           var roleAlias = res.data.data.roleAlias;
           if (
             roleAlias == "保安公司管理员" ||
-            roleAlias == "保安" ||
-            roleAlias == "未持证保安"
+            roleAlias == "保安"
           ) {
             //去除保安公司查询
             const column = that.findObject(that.option.column, "deptId");

--
Gitblit v1.9.3