| | |
| | | <el-button class="but_style" icon="el-icon-upload2" size="small">{{ button_name }}</el-button> |
| | | </el-upload> |
| | | 请点击 |
| | | <el-button type="text" icon="el-icon-download" @click="clickDown(code)">下载数据模版</el-button> |
| | | <el-button type="text" style="font-size: 14px;cursor: pointer" icon="el-icon-download" @click="clickDown(code)">下载数据模版</el-button> |
| | | , 并按照模版编辑导入数据 |
| | | </div> |
| | | <p v-if="div1">{{ file_name }}</p> |
| | |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import all from '@/api/all' |
| | | |
| | | import { DownLoadExcel, ExcelModelCheck } from '@/api/Excel' |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | } |
| | | }, |
| | | ExcelImportSubmit(data) { |
| | | all.ExcelImportSubmit(data).then((res) => { |
| | | if (res.statusCode === '200') { |
| | | this.div3 = true |
| | | this.num += 2 |
| | | this.button_text = '完成' |
| | | this.disState = false |
| | | } else { |
| | | this.num += 1 |
| | | this.div3_sb = true |
| | | this.disState = true |
| | | this.error_message = res.message |
| | | } |
| | | }) |
| | | // all.ExcelImportSubmit(data).then((res) => { |
| | | // if (res.statusCode === '200') { |
| | | // this.div3 = true |
| | | // this.num += 2 |
| | | // this.button_text = '完成' |
| | | // this.disState = false |
| | | // } else { |
| | | // this.num += 1 |
| | | // this.div3_sb = true |
| | | // this.disState = true |
| | | // this.error_message = res.message |
| | | // } |
| | | // }) |
| | | }, |
| | | ExcelCheckData(data) { |
| | | all.ExcelCheckData(data).then((res) => { |
| | | this.div2_state = res.StuCode |
| | | setTimeout(() => { |
| | | this.cg4 = true |
| | | }, 2000) |
| | | this.error_list = res.list |
| | | this.total_num = res.Count |
| | | if (res.StuCode === '200') { |
| | | this.disState = false |
| | | } |
| | | // all.ExcelCheckData(data).then((res) => { |
| | | // this.div2_state = res.StuCode |
| | | // setTimeout(() => { |
| | | // this.cg4 = true |
| | | // }, 2000) |
| | | // this.error_list = res.list |
| | | // this.total_num = res.Count |
| | | // if (res.StuCode === '200') { |
| | | // this.disState = false |
| | | // } |
| | | // }) |
| | | ExcelModelCheck(data).then(res => { |
| | | |
| | | }) |
| | | }, |
| | | beforeUpload(file) { |
| | |
| | | const data = { |
| | | FileCode: code |
| | | } |
| | | all.DownLoadExcel(data).then((res) => { |
| | | // all.DownLoadExcel(data).then((res) => { |
| | | // window.location.href = res |
| | | // }) |
| | | DownLoadExcel(data).then(res => { |
| | | window.location.href = res |
| | | }) |
| | | } |