Commit 9841e58e authored by renjintao's avatar renjintao

user indexindex

parent e574be65
...@@ -424,7 +424,7 @@ export default { ...@@ -424,7 +424,7 @@ export default {
}, },
], ],
selectRow: {}, //删除时选中的行数据 selectRow: {}, //删除时选中的行数据
//导入导出时使用 //导入导出时使用start
searchs: { searchs: {
pageIndex: 1, pageIndex: 1,
pageSize: 1000, pageSize: 1000,
...@@ -560,6 +560,7 @@ export default { ...@@ -560,6 +560,7 @@ export default {
}, },
], ],
departArr: [], //部门list departArr: [], //部门list
//导入导出时使用end
}; };
}, },
created() { created() {
...@@ -868,6 +869,7 @@ export default { ...@@ -868,6 +869,7 @@ export default {
}); });
}, },
//导入excel //导入excel
//打开弹出层
import2Excel() { import2Excel() {
this.modalImport = true; this.modalImport = true;
this.excelData = []; this.excelData = [];
...@@ -876,6 +878,7 @@ export default { ...@@ -876,6 +878,7 @@ export default {
this.departArr = r.result.items; this.departArr = r.result.items;
}); });
}, },
//导入excel文件
async beforeUpload(file) { async beforeUpload(file) {
this.excelData = []; this.excelData = [];
const workbook = await this.$u.readXLSX(file); const workbook = await this.$u.readXLSX(file);
...@@ -946,8 +949,8 @@ export default { ...@@ -946,8 +949,8 @@ export default {
//console.log(workbook); //console.log(workbook);
return false; return false;
}, },
//确定批量导入
importOk() { importOk() {
//确定批量导入
let tempData = this.$u.clone(this.excelData); let tempData = this.$u.clone(this.excelData);
let tempList = []; let tempList = [];
tempData.forEach((ele) => { tempData.forEach((ele) => {
...@@ -981,6 +984,7 @@ export default { ...@@ -981,6 +984,7 @@ export default {
} }
}); });
}, },
//取消导入excel
cancelExcel() { cancelExcel() {
this.modalImport = false; this.modalImport = false;
this.excelData = []; this.excelData = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment