Browse Source

标签使用记录导出

master
x_ying 3 years ago
parent
commit
e3bf6f492d
  1. 26
      src/views/storeManage/tagManage/tagLog/index.vue

26
src/views/storeManage/tagManage/tagLog/index.vue

@ -1,7 +1,8 @@
<template>
<div>
<div class="head-container">
<crudOperation />
<!-- <crudOperation /> -->
<el-button v-permission="permission.download" :loading="crud.downloadLoading" size="mini" icon="el-icon-download" @click="handleExport">导出</el-button>
<el-select v-model="bindingType" class="filter-item" style="width: 130px; height: 30px;margin:0 25px 0 10px" @change="crud.toQuery">
<el-option v-for="item in bindingTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
@ -43,14 +44,18 @@
</template>
<script>
import crudOperation from '@crud/CRUD.operation'
// import crudOperation from '@crud/CRUD.operation'
import CRUD, { presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
// import { doExport } from '@/api/storeManage/tagManage/bindTagList'
import { exportFile } from '@/utils/index'
// import qs from 'qs'
import { mapGetters } from 'vuex'
export default {
name: 'TagLog',
components: { crudOperation, pagination, rrOperation },
components: { pagination, rrOperation },
mixins: [presenter()],
cruds() {
return CRUD({
@ -68,6 +73,9 @@ export default {
},
data() {
return {
permission: {
download: ['admin', 'tagLog:download']
},
bindingType: '0',
bindingTypeOptions: [
{ value: '0', label: '全部' },
@ -96,7 +104,19 @@ export default {
tableData: []
}
},
computed: {
...mapGetters([
'baseApi'
])
},
methods: {
handleExport() {
this.crud.downloadLoading = true
exportFile(this.baseApi + '/api/tag/exportTagLogList')
// exportFile('http://192.168.99.84:7070/api/tag/exportTagLogList')
console.log(this.baseApi)
this.crud.downloadLoading = false
},
//
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.tid = this.params.tid

Loading…
Cancel
Save