|
@@ -360,6 +360,7 @@
|
|
end-placeholder="结束日期"
|
|
end-placeholder="结束日期"
|
|
size="small"
|
|
size="small"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
+ :default-time="['00:00:00','23:59:59']"
|
|
:picker-options="pickerOptions"
|
|
:picker-options="pickerOptions"
|
|
@change="changDate"
|
|
@change="changDate"
|
|
/>
|
|
/>
|
|
@@ -430,6 +431,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
|
+ <el-button type="primary" size="mini" class="download" @click="download">导出</el-button>
|
|
<div align="right">
|
|
<div align="right">
|
|
<el-pagination
|
|
<el-pagination
|
|
:current-page="currentPage4"
|
|
:current-page="currentPage4"
|
|
@@ -470,6 +472,8 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import axios from 'axios'
|
|
|
|
+import { mockUrl } from '@/apiConfig/api'
|
|
import BugDetails from './details/index'
|
|
import BugDetails from './details/index'
|
|
import createdBug from '@/views/projectManage/bugList/file/createdBug'
|
|
import createdBug from '@/views/projectManage/bugList/file/createdBug'
|
|
import {
|
|
import {
|
|
@@ -594,6 +598,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ if (this.$route.query.startDate && this.$route.query.endDate) {
|
|
|
|
+ this.stratAndEnd = [this.$route.query.startDate, this.$route.query.endDate]
|
|
|
|
+ }
|
|
if (this.type === 'page') {
|
|
if (this.type === 'page') {
|
|
this.getBugList()
|
|
this.getBugList()
|
|
} else {
|
|
} else {
|
|
@@ -601,9 +608,6 @@ export default {
|
|
}
|
|
}
|
|
this.bugListSelect()
|
|
this.bugListSelect()
|
|
this.$store.state.data.status = true
|
|
this.$store.state.data.status = true
|
|
- if (this.$route.query.startDate && this.$route.query.endDate) {
|
|
|
|
- this.stratAndEnd = [this.$route.query.startDate, this.$route.query.endDate]
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
destroyed() {
|
|
destroyed() {
|
|
this.$store.state.data.status = false
|
|
this.$store.state.data.status = false
|
|
@@ -825,6 +829,20 @@ export default {
|
|
}))
|
|
}))
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
+ },
|
|
|
|
+ async download() { // 下载导出Excel
|
|
|
|
+ const res = await axios({
|
|
|
|
+ method: 'post',
|
|
|
|
+ url: mockUrl + '/bug/downLoad', // 请求地址
|
|
|
|
+ data: this.indexPage, // 参数
|
|
|
|
+ responseType: 'blob' // 表明返回服务器返回的数据类型
|
|
|
|
+ })
|
|
|
|
+ const aLink = document.createElement('a')
|
|
|
|
+ const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
|
|
|
|
+ aLink.href = URL.createObjectURL(blob)
|
|
|
|
+ aLink.download = '导出信息.xlsx'
|
|
|
|
+ aLink.style.display = 'none'
|
|
|
|
+ aLink.click()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|