shuishen
2021-09-13 b8dfc98b089e47fdb3e269941bbd2de3f7fb7de1
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"
@@ -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",
          }
        ],
      },
@@ -861,12 +904,21 @@
    uploadAfter1(res, done, loading, column) {
      window.console.log(column);
      this.excelBox1 = false;
      // this.refreshChange();
      this.refreshChange();
      done();
    },
    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();
    },
    //行点击事件
    rowClick(row) {