|
@@ -48,7 +48,7 @@
|
|
<a-button @click="changDate('day', -7)">近七天</a-button>
|
|
<a-button @click="changDate('day', -7)">近七天</a-button>
|
|
<a-button @click="changDate('month', -1)">近一个月</a-button>
|
|
<a-button @click="changDate('month', -1)">近一个月</a-button>
|
|
<a-button @click="changDate('month', -3)">近三个月</a-button>
|
|
<a-button @click="changDate('month', -3)">近三个月</a-button>
|
|
- <a-button>导出数据</a-button>
|
|
|
|
|
|
+ <a-button @click="exportData">导出数据</a-button>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -73,6 +73,8 @@ import SdUserPicker from '@/common/components/sd-user-picker.vue'
|
|
import { getUserInfo } from '@/common/store-mixin'
|
|
import { getUserInfo } from '@/common/store-mixin'
|
|
import axios from '@/common/services/axios-instance'
|
|
import axios from '@/common/services/axios-instance'
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
|
|
+import download from '@/common/services/download'
|
|
|
|
+import { Modal } from 'ant-design-vue'
|
|
export default {
|
|
export default {
|
|
name: 'XmOperatorLogList',
|
|
name: 'XmOperatorLogList',
|
|
metaInfo: {
|
|
metaInfo: {
|
|
@@ -106,6 +108,30 @@ export default {
|
|
this.initAuditUnit()
|
|
this.initAuditUnit()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ exportData() {
|
|
|
|
+ const param = {}
|
|
|
|
+ this.changeParam(param)
|
|
|
|
+ console.log(param)
|
|
|
|
+ axios({
|
|
|
|
+ url: 'api/xcoa-mobile/v1/operation-log/export-list',
|
|
|
|
+ data: param,
|
|
|
|
+ method: 'post',
|
|
|
|
+ responseType: 'blob',
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.status === 200) {
|
|
|
|
+ console.log(res)
|
|
|
|
+ const url = URL.createObjectURL(res.data)
|
|
|
|
+ const filename = '模块操作日志.xlsx'
|
|
|
|
+ download(url, decodeURI(filename))
|
|
|
|
+ } else {
|
|
|
|
+ Modal.warning({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '导出报错,请联系管理员!',
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
changeParam(param) {
|
|
changeParam(param) {
|
|
console.log(param)
|
|
console.log(param)
|
|
param.startDateRange = this.startDate
|
|
param.startDateRange = this.startDate
|