From 79d9fc857559982b00b68b2d709807bdc4cd286f Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 11 Apr 2022 10:58:17 +0800
Subject: [PATCH] minio 地址修改

---
 src/views/securityUnit/index.vue |   79 ++++++++++++++++++++++++++++++++++++---
 1 files changed, 73 insertions(+), 6 deletions(-)

diff --git a/src/views/securityUnit/index.vue b/src/views/securityUnit/index.vue
index 5526813..c6823e1 100644
--- a/src/views/securityUnit/index.vue
+++ b/src/views/securityUnit/index.vue
@@ -23,7 +23,7 @@
             :type="type"
             @click="handleUploadPage(row)"
             icon="el-icon-circle-check"
-            >单位装备清单附件上传
+            >附件上传
           </el-button>
         </template>
         <template slot="menuLeft">
@@ -35,8 +35,6 @@
             @click.stop="rowSave"
             >新增</el-button
           >
-        </template>
-        <template slot="menuLeft">
           <el-button
             type="danger"
             size="small"
@@ -44,6 +42,14 @@
             icon="el-icon-delete"
             @click="handleDelete"
             >删 除
+          </el-button>
+          <el-button
+            type="success"
+            size="small"
+            plain
+            icon="el-icon-upload2"
+            @click="handleImport1"
+            >批量导入
           </el-button>
         </template>
       </avue-crud>
@@ -100,8 +106,26 @@
         </div>
       </div>
     </div>
+    <el-dialog
+      title="保安单位导入"
+      append-to-body
+      :visible.sync="excelBox1"
+      width="555px"
+    >
+      <avue-form
+        :option="excelOption1"
+        v-model="excelForm1"
+        :upload-after="uploadAfter1"
+      >
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="handleTemplate1">
+            点击下载<i class="el-icon-download el-icon--right"></i>
+          </el-button>
+        </template>
+      </avue-form>
+    </el-dialog>
   </basic-container>
-</template> 
+</template>
 
 <script>
 import { column, column0, column1, column2 } from "./data";
@@ -120,12 +144,41 @@
     var w = 160,
       s = 12;
     return {
+      excelBox1: false,
+      excelForm1: {},
+      excelOption1: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "文件上传",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "文件上传中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data",
+            },
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/information/import-informaton",
+          },
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24,
+          },
+        ],
+      },
+
       loading: true, //保安单位基本信息
       selectionList: [],
       page: {
         pageSize: 10,
         currentPage: 1,
         total: 0,
+        ...this.$store.state.control.changePageSize,
       },
 
       treeData: [],
@@ -231,10 +284,11 @@
         searchSize: "mini",
         searchMenuSpan: 6,
         height: 583,
-        menuWidth: 290,
+        menuWidth: 220,
         align: "center",
         selection: true,
         column: column,
+        ...this.$store.state.control.clearOtherBut,
       },
     };
   },
@@ -266,6 +320,19 @@
     },
   },
   methods: {
+    handleImport1() {
+      this.excelBox1 = true;
+    },
+    uploadAfter1(res, done, loading, column) {
+      window.console.log(column);
+      this.excelBox1 = false;
+      // this.refreshChange();
+      done();
+    },
+    handleTemplate1() {
+      window.open(`/api/examSubjectChoices/export-template`);
+    },
+
     // handleChangeTABS(column) {
     //   this.typeTABS = column;
     //   // this.$message.success(JSON.stringify(column));
@@ -644,4 +711,4 @@
 .el-collapse {
   border-top: 1px solid transparent !important;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3