|
@@ -22,23 +22,6 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="part-box-action">
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- icon="el-icon-download"
|
|
|
- v-if="checkPrivilege('button', 'Import')"
|
|
|
- ><a :href="downloadUrl" :download="dfilename">模板下载</a></el-button
|
|
|
- >
|
|
|
- <upload-button
|
|
|
- v-if="checkPrivilege('button', 'Import')"
|
|
|
- btn-icon="el-icon-circle-plus-outline"
|
|
|
- btn-content="批量导入"
|
|
|
- btn-type="success"
|
|
|
- :upload-url="uploadUrl"
|
|
|
- :format="['xls', 'xlsx']"
|
|
|
- @upload-error="uplaodError"
|
|
|
- @upload-success="uploadSuccess"
|
|
|
- >
|
|
|
- </upload-button>
|
|
|
<el-button
|
|
|
v-if="checkPrivilege('button', 'add')"
|
|
|
type="primary"
|
|
@@ -107,11 +90,10 @@
|
|
|
<script>
|
|
|
import { clazzListQuery, deleteClazz } from "../api";
|
|
|
import ModifyClazz from "../components/ModifyClazz";
|
|
|
-import UploadButton from "../../../components/UploadButton";
|
|
|
|
|
|
export default {
|
|
|
name: "clazz-manage",
|
|
|
- components: { ModifyClazz, UploadButton },
|
|
|
+ components: { ModifyClazz },
|
|
|
data() {
|
|
|
return {
|
|
|
filter: {
|
|
@@ -121,11 +103,7 @@ export default {
|
|
|
size: this.GLOBAL.pageSize,
|
|
|
total: 0,
|
|
|
dataList: [],
|
|
|
- curRow: {},
|
|
|
- // import
|
|
|
- uploadUrl: "/api/admin/basic/clazz/data_import",
|
|
|
- downloadUrl: "/temps/classTemplate.xlsx",
|
|
|
- dfilename: "班级导入模板.xlsx"
|
|
|
+ curRow: {}
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -166,14 +144,6 @@ export default {
|
|
|
this.deletePageLastItem();
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
- },
|
|
|
- // import
|
|
|
- uplaodError(errorData) {
|
|
|
- this.$notify.error({ title: "错误提示", message: errorData.message });
|
|
|
- },
|
|
|
- uploadSuccess() {
|
|
|
- this.$message.success("文件上传成功,后台正在导入!");
|
|
|
- this.getList();
|
|
|
}
|
|
|
}
|
|
|
};
|