Commit c772a0cb by 朱哲铨

Merge remote-tracking branch 'remotes/origin/dev'

parents 7847f9d8 7ca96b84
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
<el-form-item> <el-form-item>
<el-button type="danger" @click="deleteSection()">删除</el-button> <el-button type="danger" @click="deleteSection()">删除</el-button>
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom: 0px">
<el-button type="primary" @click="importExcel">导入</el-button>
</el-form-item>
</el-form> </el-form>
<div class="table_wrap"> <div class="table_wrap">
<my-table <my-table
...@@ -368,6 +371,22 @@ export default { ...@@ -368,6 +371,22 @@ export default {
}, },
methods: { methods: {
importExcel() {
const input = document.createElement('input')
input.style.display = 'none'
input.type = 'file'
input.click()
input.onchange = async () => {
const form = new FormData()
form.append('importExcel', input.files.length > 0 ? input.files[0] : [])
const res = await axios.post('baseProperty/importBaseProperty', form)
console.log(res)
if (res.code === 200) {
this.$message.success('导入成功')
this.getList()
}
}
},
async changeDisableStatus(v, item) { async changeDisableStatus(v, item) {
try { try {
await this.$confirm( await this.$confirm(
......
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