|
|
|
@ -11,6 +11,14 @@ |
|
|
|
<FormItem class="margin-bottom-0"> |
|
|
|
<Button type="primary" @click="search">{{ $t('find_button') }}/{{ $t('refresh_button') }}</Button> |
|
|
|
</FormItem> |
|
|
|
<FormItem class="margin-bottom-0"> |
|
|
|
<Upload :action="action" :on-success="handlesucces" :headers="headers" :show-upload-list="false"> |
|
|
|
<Button type="primary">导入</Button> |
|
|
|
</Upload> |
|
|
|
</FormItem> |
|
|
|
<FormItem class="margin-bottom-0"> |
|
|
|
<Button type="primary" @click="Import_Template">下载导入模板</Button> |
|
|
|
</FormItem> |
|
|
|
</Form> |
|
|
|
</Card> |
|
|
|
</Col> |
|
|
|
@ -48,12 +56,17 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getList } from '@/api/wechat' |
|
|
|
import Vue from 'vue' |
|
|
|
// |
|
|
|
export default { |
|
|
|
name: 'wechat_user_list', |
|
|
|
data () { |
|
|
|
return { |
|
|
|
appGroup: [], |
|
|
|
action: Vue.prototype.$config.baseUrl.dev + '/admin/WechatUser/importUser', |
|
|
|
headers: { |
|
|
|
token: sessionStorage.getItem('Swadmin_ApiAuth') |
|
|
|
}, |
|
|
|
columnsList: [{ |
|
|
|
title: '序号', |
|
|
|
type: 'index', |
|
|
|
@ -226,6 +239,7 @@ export default { |
|
|
|
// keywords: vm.searchConf.keywords, |
|
|
|
// status: vm.searchConf.status |
|
|
|
}).then(response => { |
|
|
|
// console.log('11111') |
|
|
|
vm.tableData = response.data.data.list |
|
|
|
vm.tableShow.listCount = response.data.data.count |
|
|
|
vm.listLoading = false |
|
|
|
@ -238,6 +252,19 @@ export default { |
|
|
|
this.modalSetting.loading = false |
|
|
|
this.modalSetting.index = 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
handlesucces (response, file, fileList) { |
|
|
|
if (response.code === 1) { |
|
|
|
this.getList() |
|
|
|
this.$Message.success(response.msg) |
|
|
|
} else { |
|
|
|
this.$Message.warning(response.msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
Import_Template () { |
|
|
|
// console.log(Vue.prototype.$config.baseUrl.dev) |
|
|
|
let url = Vue.prototype.$config.baseUrl.dev + 'admin/WechatUser/exportTemplate' |
|
|
|
window.open(url) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|