| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="addVisibelReport">添加</el-button> |
| | | <el-button type="primary" @click="exportExcel">导出</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-upload name="multipartFile" class="upload-demo" action="/api/cause/reporterUpload" |
| | |
| | | }, |
| | | methods: |
| | | { |
| | | expExcel(){ |
| | | |
| | | }, |
| | | addAduitAnJian(){ |
| | | let date=(new Date()).valueOf();//获取时间戳 |
| | | let txt = '1234567890';//生成的随机机器码 |
| | |
| | | //案件人员 |
| | | //导出文件 |
| | | exportExcel() { |
| | | this.$http.post('/api/report/exportReporter?id=' + this.exportReportId, {}, { responseType: 'blob' }) |
| | | this.$http.post('/api//cause/exp?causeId=' + this.exportReportId, {}, { responseType: 'blob' }) |
| | | .then(res => { |
| | | const fileName = decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1]) |
| | | const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) |
| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="addPublicityVisibel = true">添加</el-button> |
| | | <el-button type="primary" @click="exportList">导出</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | }, |
| | | methods: |
| | | { |
| | | exportList(){ |
| | | this.$http({ |
| | | url:'/api/user/exp', |
| | | responseType: 'blob', |
| | | method: 'post', |
| | | }).then(res=>{ |
| | | console.log(res) |
| | | this.$message.success('操作成功'); |
| | | let time = new Date() |
| | | let deathdate =time.toLocaleDateString() |
| | | const blob = new Blob([res.data], { |
| | | type: "application/vnd.ms-excel;charset=utf-8", |
| | | }); |
| | | if (window.navigator.msSaveBlob) { |
| | | window.navigator.msSaveBlob(blob, deathdate + ".xlsx"); |
| | | } else { |
| | | const url = window.URL.createObjectURL(blob); |
| | | const link = document.createElement("a"); |
| | | link.style.display = "none"; |
| | | link.href = url; |
| | | link.download = deathdate + ".xlsx"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | } |
| | | }) |
| | | }, |
| | | handleToManager(data) { |
| | | toManager(data.id).then(res => { |
| | | this.$message({ |