diff --git a/api/system/user.js b/api/system/user.js index 632cfd4..7ecc418 100644 --- a/api/system/user.js +++ b/api/system/user.js @@ -8,12 +8,23 @@ export function updateUserPwd(oldPassword, newPassword) { newPassword } return request({ - url: '/system/user/profile/updatePwd', + url: '/system/user/resetPwd', method: 'put', params: data }) } +//重置密码 +export function userResetPwd(data) { + return request({ + url: "/system/user/resetPwd", + method: "post", + data:data + }) +} + + + // 查询用户个人信息 export function getUserProfile() { return request({ @@ -49,3 +60,47 @@ export function allListUser (query) { }) } +// 查询用户列表 +export function getUserList(data) { + return request({ + url: '/system/user/app/getUserList', + method: 'get', + data:data + }) +} + + +// 查询用户详细 +export function getUser (userId) { + return request({ + url: '/system/user/' + userId, + method: 'get' + }) +} + +// 新增用户 +export function addUser (data) { + return request({ + url: '/system/user', + method: 'post', + data: data + }) +} + +// 修改用户 +export function updateUser (data) { + return request({ + url: '/system/user', + method: 'put', + data: data + }) +} + +// 删除用户 +export function delUser (userId) { + return request({ + url: '/system/user/' + userId, + method: 'delete' + }) +} + diff --git a/pages.json b/pages.json index 4f8d53f..a6bd726 100644 --- a/pages.json +++ b/pages.json @@ -38,7 +38,41 @@ "navigationBarTitleText": "地块详情", "enablePullDownRefresh": false } + },{ + "path": "pages/work/user/index", + "style": { + "navigationBarTitleText": "用户管理", + "enablePullDownRefresh": false, + "app-plus": { + "titleNView": { + "buttons": [{ + "text": "\ue67b", + "color": "#333", + "fontSrc": "/static/font/uniicons.ttf", + "fontSize": "24px" + }] + } + } + } + }, { + "path": "pages/work/user/create-user", + "style": { + "navigationBarTitleText": "新增用户", + "enablePullDownRefresh": false + } }, { + "path": "pages/work/user/ground", + "style": { + "navigationBarTitleText": "用户地块", + "enablePullDownRefresh": false + } + },, { + "path": "pages/work/user/device", + "style": { + "navigationBarTitleText": "设备权限", + "enablePullDownRefresh": false + } + },{ "path": "pages/index", "style": { "navigationBarTitleText": "田间", diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 7625281..777848c 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -46,7 +46,7 @@ 地块管理 - + 用户管理 @@ -160,7 +160,11 @@ url: '/pages/work/land/index' }); } - + function handleToUser(){ + uni.navigateTo({ + url: '/pages/work/user/index' + }); + } function handleToEditInfo() { uni.navigateTo({ url: '/pages/mine/info/edit' diff --git a/pages/mine/pwd/index.vue b/pages/mine/pwd/index.vue index d0a10c5..e1b810c 100644 --- a/pages/mine/pwd/index.vue +++ b/pages/mine/pwd/index.vue @@ -1,91 +1,96 @@ + .pwd-retrieve-container { + padding-top: 36rpx; + padding: 15px; + } + \ No newline at end of file diff --git a/pages/work/land/create-new.vue b/pages/work/land/create-new.vue index 2f66561..2a4aeb1 100644 --- a/pages/work/land/create-new.vue +++ b/pages/work/land/create-new.vue @@ -180,7 +180,6 @@ //获取数据字典 this.getDictList("custom_soil_type"); this.getDictList("custom_water_source_type"); - if (data) { if (data.companyObj) { let companyAllObj = JSON.parse(decodeURIComponent(data.companyObj)); diff --git a/pages/work/land/index.vue b/pages/work/land/index.vue index a10ddd8..bc116f3 100644 --- a/pages/work/land/index.vue +++ b/pages/work/land/index.vue @@ -8,7 +8,7 @@ @clear="onSearchValue(null)" shape="square"> - @@ -69,16 +69,11 @@ export default { data() { return { - list: [], windowHeight: null, + defaultCheckedKeys:"", paging: null, form: null, - value: null, - formData: { - selectedArr: [], - }, treeList: [], - showModel: true, query: { companyId: null, landName: null @@ -121,6 +116,12 @@ .dispatch("companyTreeSelect", null) .then(res => { this.treeList = res.data; + if(this.treeList && this.treeList.length){ + let companyList= this.treeList[0].children.filter(x=>x.id!=100); + if(companyList && companyList.length){ + this.defaultCheckedKeys = companyList[0].id+""; + } + } }) .catch(error => { plugin.modal.msgError(error) @@ -134,6 +135,9 @@ plugin.modal.msgError("抱歉暂无权限") return } + if(!this.query.companyId){ + return; + } plugin.modal.loading("获取地块列表...") if (this.query.landName == null || this.query.landName == "") { delete this.query["landName"] diff --git a/static/images/mine/userAvatar.png b/static/images/mine/userAvatar.png new file mode 100644 index 0000000..07214de Binary files /dev/null and b/static/images/mine/userAvatar.png differ diff --git a/static/images/work/user/camera_holder.png b/static/images/work/user/camera_holder.png new file mode 100644 index 0000000..d53a043 Binary files /dev/null and b/static/images/work/user/camera_holder.png differ diff --git a/static/images/work/user/editpassword.png b/static/images/work/user/editpassword.png new file mode 100644 index 0000000..34f60e3 Binary files /dev/null and b/static/images/work/user/editpassword.png differ diff --git a/static/images/work/user/list-size-icon.png b/static/images/work/user/list-size-icon.png new file mode 100644 index 0000000..607ea63 Binary files /dev/null and b/static/images/work/user/list-size-icon.png differ diff --git a/static/images/work/user/user-index-del-icon.png b/static/images/work/user/user-index-del-icon.png new file mode 100644 index 0000000..6a85bbc Binary files /dev/null and b/static/images/work/user/user-index-del-icon.png differ diff --git a/static/images/work/user/user-index-edit-icon.png b/static/images/work/user/user-index-edit-icon.png new file mode 100644 index 0000000..028c45f Binary files /dev/null and b/static/images/work/user/user-index-edit-icon.png differ diff --git a/static/images/work/user/user-index-phone-icon.png b/static/images/work/user/user-index-phone-icon.png new file mode 100644 index 0000000..777bf1a Binary files /dev/null and b/static/images/work/user/user-index-phone-icon.png differ diff --git a/store/index.js b/store/index.js index 7636438..b23b8a9 100644 --- a/store/index.js +++ b/store/index.js @@ -1,7 +1,9 @@ import user from '@/store/modules/user' import land from '@/store/modules/system/land' +import sysUser from '@/store/modules/system/user' import dict from '@/store/modules/system/dict' import company from '@/store/modules/system/company' +import role from '@/store/modules/system/role' import getters from './getters' import { createStore @@ -10,8 +12,10 @@ const store = createStore({ modules: { user, land, + sysUser, dict, - company + company, + role }, getters });