Browse Source

修改

master
liaoxinyu 4 months ago
parent
commit
f39990d018
  1. 27
      src/view/customer/wxulist.vue

27
src/view/customer/wxulist.vue

@ -11,6 +11,14 @@
<FormItem class="margin-bottom-0"> <FormItem class="margin-bottom-0">
<Button type="primary" @click="search">{{ $t('find_button') }}/{{ $t('refresh_button') }}</Button> <Button type="primary" @click="search">{{ $t('find_button') }}/{{ $t('refresh_button') }}</Button>
</FormItem> </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> </Form>
</Card> </Card>
</Col> </Col>
@ -48,12 +56,17 @@
<script> <script>
import { getList } from '@/api/wechat' import { getList } from '@/api/wechat'
import Vue from 'vue'
// //
export default { export default {
name: 'wechat_user_list', name: 'wechat_user_list',
data () { data () {
return { return {
appGroup: [], appGroup: [],
action: Vue.prototype.$config.baseUrl.dev + '/admin/WechatUser/importUser',
headers: {
token: sessionStorage.getItem('Swadmin_ApiAuth')
},
columnsList: [{ columnsList: [{
title: '序号', title: '序号',
type: 'index', type: 'index',
@ -226,6 +239,7 @@ export default {
// keywords: vm.searchConf.keywords, // keywords: vm.searchConf.keywords,
// status: vm.searchConf.status // status: vm.searchConf.status
}).then(response => { }).then(response => {
// console.log('11111')
vm.tableData = response.data.data.list vm.tableData = response.data.data.list
vm.tableShow.listCount = response.data.data.count vm.tableShow.listCount = response.data.data.count
vm.listLoading = false vm.listLoading = false
@ -238,6 +252,19 @@ export default {
this.modalSetting.loading = false this.modalSetting.loading = false
this.modalSetting.index = 0 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)
} }
} }
} }

Loading…
Cancel
Save