Commit 54d766dc authored by 王's avatar

同步最新数据”

parent 51942411
<template> <template>
<div class="user"> <div class="user" v-loading="loading">
<el-form ref="searchFrom" :model="searchFrom" label-width="80px"> <el-form ref="searchFrom" :model="searchFrom" label-width="80px">
<el-row> <el-row>
<el-col :span="4"> <el-col :span="4">
...@@ -24,7 +24,10 @@ ...@@ -24,7 +24,10 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item> <el-form-item>
<el-button type="primary" plain @click="getUser">搜索</el-button> <div class="flexRow">
<el-button type="primary" plain @click="getUser">搜索</el-button>
<el-button type="success" plain @click="syncUser">同步最新数据</el-button>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -71,7 +74,7 @@ ...@@ -71,7 +74,7 @@
</template> </template>
<script> <script>
import {getUserListApi} from "../../service/api"; import {getUserListApi,getSyncUserApi} from "../../service/api";
import page from '../framework/page' import page from '../framework/page'
import detailDialog from './detail' import detailDialog from './detail'
import teacherDialog from './dialog' import teacherDialog from './dialog'
...@@ -100,7 +103,8 @@ ...@@ -100,7 +103,8 @@
dialogDetailObj: { dialogDetailObj: {
show: false, show: false,
id: '' id: ''
} },
loading: false
} }
}, },
components:{ components:{
...@@ -162,6 +166,14 @@ ...@@ -162,6 +166,14 @@
}, },
goToDetail(id){ goToDetail(id){
this.$router.push('/userDetail/'+ id); this.$router.push('/userDetail/'+ id);
},
syncUser(){
this.loading = true
getSyncUserApi().then(()=>{
this.loading = false
}).catch(()=>{
this.loading = false
})
} }
} }
} }
...@@ -182,6 +194,12 @@ ...@@ -182,6 +194,12 @@
text-align: center; text-align: center;
} }
} }
.flexRow {
display: flex;
flex-flow: row;
justify-content: flex-start;
align-items: center;
}
</style> </style>
<style> <style>
......
...@@ -625,3 +625,8 @@ const getWechatStatisticListUrl = '/api/admin/wechat/statistics'; ...@@ -625,3 +625,8 @@ const getWechatStatisticListUrl = '/api/admin/wechat/statistics';
export const getWechatStatisticListApi = function (json) { export const getWechatStatisticListApi = function (json) {
return Vue.prototype.$fetch(getWechatStatisticListUrl,json) return Vue.prototype.$fetch(getWechatStatisticListUrl,json)
}; };
// 同步用户手机号
const getSyncUserUrl = '/api/admin/student/mobile';
export const getSyncUserApi = function (json) {
return Vue.prototype.$fetch(getSyncUserUrl,json)
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment