|
@@ -48,12 +48,18 @@
|
|
<el-dialog width="1100px" title="设置" :visible.sync="setVisible" :before-close="close">
|
|
<el-dialog width="1100px" title="设置" :visible.sync="setVisible" :before-close="close">
|
|
<Project-Field :reportId="reportId"></Project-Field>
|
|
<Project-Field :reportId="reportId"></Project-Field>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <el-dialog width="1000px" title="选择模板" :visible.sync="reportTemplate" :before-close="close1">
|
|
|
|
- <Report-Template :reportType="reportType" @getReportTemplateId="getReportTemplateId"></Report-Template>
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
|
|
+ <el-dialog width="1000px" title="选择模板" :visible.sync="reportTemplate" :before-close="close1" >
|
|
|
|
+ <div v-loading="loadingTemplate"
|
|
|
|
+ element-loading-text="报告导出中"
|
|
|
|
+ element-loading-spinner="el-icon-loading"
|
|
|
|
+ >
|
|
|
|
+ <Report-Template :reportType="reportType" @getReportTemplateId="getReportTemplateId"></Report-Template>
|
|
|
|
+ <div slot="footer" class="dialog-footer" style="display: flex;justify-content: flex-end;">
|
|
<el-button @click="close1">取 消</el-button>
|
|
<el-button @click="close1">取 消</el-button>
|
|
<el-button type="primary" @click="submitExport" :loading="btnLoading">确 定</el-button>
|
|
<el-button type="primary" @click="submitExport" :loading="btnLoading">确 定</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
<project-file-drawer ref="projectFileDrawer" />
|
|
<project-file-drawer ref="projectFileDrawer" />
|
|
@@ -95,6 +101,7 @@ export default {
|
|
total: 0,
|
|
total: 0,
|
|
loading: false,
|
|
loading: false,
|
|
showDialog: false,
|
|
showDialog: false,
|
|
|
|
+ loadingTemplate: false,
|
|
reportId: "",
|
|
reportId: "",
|
|
reportType:'',
|
|
reportType:'',
|
|
reportTemplateId:''
|
|
reportTemplateId:''
|
|
@@ -131,21 +138,29 @@ export default {
|
|
this.reportTemplate = false
|
|
this.reportTemplate = false
|
|
},
|
|
},
|
|
submitExport(){
|
|
submitExport(){
|
|
- if(this.reportTemplateId){
|
|
|
|
|
|
+ if (this.reportTemplateId) {
|
|
|
|
+ this.loadingTemplate=true
|
|
var a = {
|
|
var a = {
|
|
- reportId : this.reportId,
|
|
|
|
- templeId :this.reportTemplateId
|
|
|
|
- }
|
|
|
|
- this.$api.exportReport(a).then(response=>{
|
|
|
|
- if(response.code == 200){
|
|
|
|
- this.$message.success('导出成功')
|
|
|
|
- downLoad2(response.data)
|
|
|
|
- this.reportType = ''
|
|
|
|
- this.reportTemplateId = ''
|
|
|
|
- this.reportTemplate = false
|
|
|
|
- console.log(response.data)
|
|
|
|
|
|
+ reportId : this.reportId,
|
|
|
|
+ templeId :this.reportTemplateId
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ this.$api.exportReport(a).then(response => {
|
|
|
|
+ if (response.code == 200) {
|
|
|
|
+ this.$message.success('导出成功')
|
|
|
|
+ downLoad2(response.data)
|
|
|
|
+ this.reportType = ''
|
|
|
|
+ this.reportTemplateId = ''
|
|
|
|
+ this.reportTemplate = false
|
|
|
|
+ this.loadingTemplate=false
|
|
|
|
+ console.log(response.data)
|
|
|
|
+ } else{
|
|
|
|
+ this.$message.success('导出失败,请重试')
|
|
|
|
+ this.loadingTemplate=false
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.$message.success('导出失败,请重试')
|
|
|
|
+ this.loadingTemplate=false
|
|
|
|
+ })
|
|
}else{
|
|
}else{
|
|
this.$alert('请选择报告模板', '提示', {
|
|
this.$alert('请选择报告模板', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|