diff --git a/src/pages/user/Index.vue b/src/pages/user/Index.vue
index c445127..dd8e382 100644
--- a/src/pages/user/Index.vue
+++ b/src/pages/user/Index.vue
@@ -3,23 +3,23 @@
-
-
-
+
+
+
-
-
+
+
-
-
+
+
@@ -27,13 +27,11 @@
-
-
-
+
-
+
查询
@@ -42,15 +40,15 @@
-
+
-

+
-
-
昵称:{{ scope.row.nickname }}
-
OpenId:{{ scope.row.open_id }}
+
+
昵称:{{ scope.row.nickname }}
+
OpenId:{{ scope.row.open_id }}
@@ -68,16 +66,21 @@
-
-
- {{scope.row.is_first_to_tibet | firstToTibet}}
+
+ {{scope.row.drink | formatYesNo}}
+
+
+ {{scope.row.is_first_to_tibet | formatYesNo}}
+
+
+ {{scope.row.medical_history | formatMedical}}
-
@@ -94,13 +97,14 @@
height: 176,
weight: 106,
address: '北京',
- smoke: '北京',
- drink: '北京',
+ smoke: '不抽烟',
+ drink: '是',
is_first_to_tibet: 1,
medical_history: 1,
medical_history_data: '反流性食道炎、、结肠炎',
}
import cities from '../../utils/distpicker';
+ import {userSearch} from './../../service/api';
export default {
name: "Index",
@@ -109,17 +113,24 @@
provinces: cities,
cities: [],
searchModel: {
- first_to_tibet: '',
- province: '',
- city: ''
+ is_first: '-1',
+ province: '-1',
+ city: '-1',
+ gender: '-1',
+ page: 1,
+ pageSize: 20,
+ name: ''
},
- userList: Array(5).fill(userObj),
- currentPage: 1,
+ userList: [],
totalCount: 401
}
},
filters: {
- firstToTibet(v) {
+ formatMedical(v) {
+ if (!!v && Array.isArray(v)) return v.join('、');
+ return '无';
+ },
+ formatYesNo(v) {
return v == 1 ? "是" : "否";
},
formatGender(v) {
@@ -132,6 +143,9 @@
return v + 'kg';
}
},
+ mounted() {
+ this.onSearch();
+ },
methods: {
handleProvinceChange(provinceId) {
for (var i = 0; i < cities.length; i++) {
@@ -141,8 +155,10 @@
}
}
},
- onSearch() {
-
+ async onSearch() {
+ let data = await userSearch(this.searchModel);
+ this.userList = data.list;
+ this.totalCount = data.totalCount;
},
handleSizeChange() {
@@ -178,13 +194,27 @@
border-radius: 50%;
}
.info {
- float: left;
vertical-align: middle;
padding-left: 10px;
+ position: relative;
+ height: 80px;
+ padding-top: 10px;
+ margin-left: 80px;
p {
height: 30px;
line-height: 30px;
}
+ .open-id {
+ position: absolute;
+ top: 40px;
+ left: 10px;
+ overflow: hidden;
+ }
+ }
+ &:hover {
+ .open-id {
+ overflow: visible;
+ }
}
}
\ No newline at end of file
diff --git a/src/service/api.js b/src/service/api.js
index 9255e46..38e2c28 100644
--- a/src/service/api.js
+++ b/src/service/api.js
@@ -17,6 +17,9 @@ export async function adminLogin(params = {}) {
export async function evaluationSearch(params = {}) {
return get(`/admin/searchEvaluation?${stringify(params)}`);
}
+export async function userSearch(params = {}) {
+ return get(`/admin/searchUser?${stringify(params)}`);
+}
export async function queryNews(params = {}) {
return get(`/news/index?${stringify(params)}`);