正在显示
1 个修改的文件
包含
25 行增加
和
8 行删除
@@ -31,9 +31,9 @@ | @@ -31,9 +31,9 @@ | ||
31 | <!-- 显示区域 --> | 31 | <!-- 显示区域 --> |
32 | <el-row :gutter="24" style="margin-top: 30px"> | 32 | <el-row :gutter="24" style="margin-top: 30px"> |
33 | <el-col :span="11" style="margin-top: 10px"> | 33 | <el-col :span="11" style="margin-top: 10px"> |
34 | - <el-progress :text-inside="true" :stroke-width="15" :percentage="proportion" | ||
35 | - :color="customColors" | ||
36 | - style="width: 455px"></el-progress> | 34 | +<!-- <el-progress :text-inside="true" :stroke-width="15" :percentage="proportion"--> |
35 | +<!-- :color="customColors"--> | ||
36 | +<!-- style="width: 455px"></el-progress>--> | ||
37 | <el-input v-model="message" type="textarea" | 37 | <el-input v-model="message" type="textarea" |
38 | :autosize="{ minRows: 6, maxRows: 10}" | 38 | :autosize="{ minRows: 6, maxRows: 10}" |
39 | style="width: 455px;height: 400px" | 39 | style="width: 455px;height: 400px" |
@@ -69,7 +69,10 @@ | @@ -69,7 +69,10 @@ | ||
69 | resultStatus: '0', | 69 | resultStatus: '0', |
70 | message: '', | 70 | message: '', |
71 | 71 | ||
72 | - proportion: 0, | 72 | + |
73 | + /** | ||
74 | + * 返回结果 | ||
75 | + */ | ||
73 | socketResponse: { | 76 | socketResponse: { |
74 | socketMessage: '', | 77 | socketMessage: '', |
75 | socketStatus: '', | 78 | socketStatus: '', |
@@ -90,6 +93,15 @@ | @@ -90,6 +93,15 @@ | ||
90 | /* 列表加载 */ | 93 | /* 列表加载 */ |
91 | listLoading: false, | 94 | listLoading: false, |
92 | downloadLoading: false, | 95 | downloadLoading: false, |
96 | + | ||
97 | + /** | ||
98 | + * 百分比例 | ||
99 | + */ | ||
100 | + proportion: 0, | ||
101 | + | ||
102 | + /** | ||
103 | + * 百分比例,颜色 | ||
104 | + */ | ||
93 | customColors: [ | 105 | customColors: [ |
94 | {color: '#6f7ad3', percentage: 20}, | 106 | {color: '#6f7ad3', percentage: 20}, |
95 | {color: '#f56c6c', percentage: 40}, | 107 | {color: '#f56c6c', percentage: 40}, |
@@ -121,9 +133,11 @@ | @@ -121,9 +133,11 @@ | ||
121 | */ | 133 | */ |
122 | downLoadExcel() { | 134 | downLoadExcel() { |
123 | downExcel().then((response) => { | 135 | downExcel().then((response) => { |
136 | + this.downloadLoading = true; | ||
124 | let res = response.data; | 137 | let res = response.data; |
125 | if (res.code !== '200') { | 138 | if (res.code !== '200') { |
126 | return this.$message.error('下载失败'); | 139 | return this.$message.error('下载失败'); |
140 | + this.downloadLoading = false; | ||
127 | } | 141 | } |
128 | // console.log(res.msg) | 142 | // console.log(res.msg) |
129 | //获取地址 | 143 | //获取地址 |
@@ -132,7 +146,9 @@ | @@ -132,7 +146,9 @@ | ||
132 | console.log(this.url) | 146 | console.log(this.url) |
133 | // console.log(this.ipAddress) | 147 | // console.log(this.ipAddress) |
134 | this.down(); | 148 | this.down(); |
149 | + this.downloadLoading = false; | ||
135 | }).catch(error => { | 150 | }).catch(error => { |
151 | + this.downloadLoading = false; | ||
136 | console.log(error.toString()) | 152 | console.log(error.toString()) |
137 | this.$message.error(error.toString()); | 153 | this.$message.error(error.toString()); |
138 | }); | 154 | }); |
@@ -140,12 +156,13 @@ | @@ -140,12 +156,13 @@ | ||
140 | }, | 156 | }, |
141 | down() { | 157 | down() { |
142 | // 创建a标签 | 158 | // 创建a标签 |
143 | - const link = document.createElement('a') | 159 | + const link = document.createElement('a'); |
144 | // download属性 | 160 | // download属性 |
145 | - link.setAttribute('download', 'excel.xls') | 161 | + link.setAttribute('download', 'excel.xls'); |
146 | // href链接 | 162 | // href链接 |
147 | - link.setAttribute('href', this.url) | ||
148 | - document.body.appendChild(link) | 163 | + link.setAttribute('href', this.url); |
164 | + | ||
165 | + document.body.appendChild(link); | ||
149 | // 自执行点击事件 | 166 | // 自执行点击事件 |
150 | link.click() | 167 | link.click() |
151 | }, | 168 | }, |
-
请 注册 或 登录 后发表评论