图片添加

This commit is contained in:
jsy_zjg 2024-11-22 17:29:55 +08:00
parent cba68e8cf8
commit 54557d1a27
14 changed files with 197 additions and 92 deletions

View File

@ -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'
})
}

View File

@ -38,6 +38,40 @@
"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": {

View File

@ -46,7 +46,7 @@
<view>地块管理</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="list-cell list-cell-arrow" v-show="setAuthorizationt('Account')" @click="handleToUser">
<view class="menu-item-box">
<view class="iconfont icon-yonghu menu-icon"></view>
<view>用户管理</view>
@ -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'

View File

@ -1,23 +1,25 @@
<template>
<view class="pwd-retrieve-container">
<uni-forms ref="form" :value="user" labelWidth="80px">
<uni-forms-item name="oldPassword" label="旧密码">
<!-- <uni-forms-item name="oldPassword" label="旧密码">
<uni-easyinput type="password" v-model="user.oldPassword" placeholder="请输入旧密码" />
</uni-forms-item>
</uni-forms-item> -->
<uni-forms-item name="newPassword" label="新密码">
<uni-easyinput type="password" v-model="user.newPassword" placeholder="请输入新密码" />
</uni-forms-item>
<uni-forms-item name="confirmPassword" label="确认密码">
<!-- <uni-forms-item name="confirmPassword" label="确认密码">
<uni-easyinput type="password" v-model="user.confirmPassword" placeholder="请确认新密码" />
</uni-forms-item>
</uni-forms-item> -->
<button type="primary" @click="submit">提交</button>
</uni-forms>
</view>
</template>
<script>
import { updateUserPwd } from "@/api/system/user"
import {
userResetPwd
} from "@/api/system/user"
import store from '@/store'
export default {
data() {
return {
@ -27,12 +29,12 @@
confirmPassword: undefined
},
rules: {
oldPassword: {
rules: [{
required: true,
errorMessage: '旧密码不能为空'
}]
},
// oldPassword: {
// rules: [{
// required: true,
// errorMessage: ''
// }]
// },
newPassword: {
rules: [{
required: true,
@ -45,16 +47,16 @@
}
]
},
confirmPassword: {
rules: [{
required: true,
errorMessage: '确认密码不能为空'
}, {
validateFunction: (rule, value, data) => data.newPassword === value,
errorMessage: '两次输入的密码不一致'
}
]
}
// confirmPassword: {
// rules: [{
// required: true,
// errorMessage: ''
// }, {
// validateFunction: (rule, value, data) => data.newPassword === value,
// errorMessage: ''
// }
// ]
// }
}
}
},
@ -64,7 +66,10 @@
methods: {
submit() {
this.$refs.form.validate().then(res => {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
let user = {};
user.userId = store.state.user.user.userId;
user.password = this.user.newPassword;
userResetPwd(user).then(response => {
uni.showToast({
title: '修改成功',
mask: false,

View File

@ -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));

View File

@ -8,7 +8,7 @@
@clear="onSearchValue(null)" shape="square"></u-search>
<uni-forms ref="form" :model="form" labelWidth="0px" style="margin-top: 5px;">
<uni-forms-item label="" name="">
<cxk-dropdown-tree :dataOptions="treeList" labelField="label" valueField="id"
<cxk-dropdown-tree :dataOptions="treeList" labelField="label" valueField="id" :defaultCheckedKeys="defaultCheckedKeys"
@change="handleTreeChange"></cxk-dropdown-tree>
</uni-forms-item>
</uni-forms>
@ -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"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -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
});