From f5d88e4f31bec1d77721c0795afde3f3a571e9aa Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 11 Aug 2021 15:55:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
---
src/views/securityUnitChild/index.vue | 246 +++++++++++++++++++++++++++++++++++++++----------
1 files changed, 195 insertions(+), 51 deletions(-)
diff --git a/src/views/securityUnitChild/index.vue b/src/views/securityUnitChild/index.vue
index accac2a..3a6ff7c 100644
--- a/src/views/securityUnitChild/index.vue
+++ b/src/views/securityUnitChild/index.vue
@@ -29,67 +29,127 @@
</template>
</avue-crud>-->
<!-- 表单组件 -->
- <avue-form ref="form" v-model="obj0" :option="option0">
- <!-- <template slot-scope="scope" slot="menuForm">
+ <basic-container>
+ <avue-form ref="form" v-model="obj0" :option="option0">
+ <!-- <template slot-scope="scope" slot="menuForm">
<el-button @click="tip">自定义按钮</el-button>
</template> -->
- </avue-form>
+ </avue-form>
+ </basic-container>
</span>
<span v-else-if="typeTABS.prop === 'tab2'">
<!-- <span v-if="typeTABS.prop === 'tab2'"> -->
- <avue-crud
- :option="option1"
- :data="data1"
- :page.sync="page1"
- ref="crudrec1"
- :table-loading="loading1"
- @row-save="rowSave1"
- @search-change="searchChange1"
- @search-reset="searchReset1"
- @row-update="rowUpdate1"
- @row-del="rowDel1"
- @selection-change="selectionChange1"
- @refresh-change="refreshChange1"
- >
- <template slot="menuLeft">
- <el-button
- type="danger"
- size="small"
- plain
- icon="el-icon-delete"
- @click="handleDelete1"
- >删 除
- </el-button>
- </template>
- </avue-crud>
+ <basic-container>
+ <avue-crud
+ :option="option1"
+ :data="data1"
+ :page.sync="page1"
+ ref="crudrec1"
+ :table-loading="loading1"
+ @row-save="rowSave1"
+ @search-change="searchChange1"
+ @search-reset="searchReset1"
+ @row-update="rowUpdate1"
+ @row-del="rowDel1"
+ @selection-change="selectionChange1"
+ @refresh-change="refreshChange1"
+ >
+ <template slot="menuLeft">
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport"
+ >批量导入
+ </el-button>
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete1"
+ >删 除
+ </el-button>
+ </template>
+ </avue-crud>
+ </basic-container>
</span>
<span v-else-if="typeTABS.prop === 'tab3'">
- <avue-crud
- :option="option2"
- :data="data2"
- :page.sync="page2"
- ref="crudrec2"
- :table-loading="loading2"
- @row-save="rowSave2"
- @search-change="searchChange2"
- @search-reset="searchReset2"
- @row-update="rowUpdate2"
- @row-del="rowDel2"
- @selection-change="selectionChange2"
- @refresh-change="refreshChange2"
+ <basic-container>
+ <avue-crud
+ :option="option2"
+ :data="data2"
+ :page.sync="page2"
+ ref="crudrec2"
+ :table-loading="loading2"
+ @row-save="rowSave2"
+ @search-change="searchChange2"
+ @search-reset="searchReset2"
+ @row-update="rowUpdate2"
+ @row-del="rowDel2"
+ @selection-change="selectionChange2"
+ @refresh-change="refreshChange2"
+ >
+ <template slot="menuLeft">
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport1"
+ >批量导入
+ </el-button>
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete2"
+ >删 除
+ </el-button>
+ </template>
+ </avue-crud>
+ </basic-container>
+ </span>
+
+ <el-dialog
+ title="出资人导入"
+ append-to-body
+ :visible.sync="excelBox"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption"
+ v-model="excelForm"
+ :upload-after="uploadAfter"
>
- <template slot="menuLeft">
- <el-button
- type="danger"
- size="small"
- plain
- icon="el-icon-delete"
- @click="handleDelete2"
- >删 除
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
</el-button>
</template>
- </avue-crud>
- </span>
+ </avue-form>
+ </el-dialog>
+
+ <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>
</div>
</template>
@@ -137,6 +197,62 @@
],
};
return {
+ excelBox: false, //出资人
+ 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/car/import-examSubject",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+
+ 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/examSubjectChoices/import-examSubject",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+
typeTABS: {}, //标签页
optionTABS: {
column: [
@@ -262,6 +378,34 @@
},
},
methods: {
+ handleImport() {
+ //出资人
+ this.excelBox = true;
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox = false;
+ this.refreshChange();
+ done();
+ },
+ handleTemplate() {
+ window.open(`/api/car/export-template`);
+ },
+
+ 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));
--
Gitblit v1.9.3