Compare commits

..

2 Commits

  1. 100
      ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
  2. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
  3. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysUserService.java
  4. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java

@ -59,38 +59,39 @@
:label-col="labelCol" :label-col="labelCol"
:wrapper-col="wrapperCol" :wrapper-col="wrapperCol"
> >
<a-form-model-item label="性别" prop="region"> <a-form-model-item label="性别" prop="sex">
<a-select v-model="form.region" placeholder="请选择性别"> <!-- <a-select v-model="form.sex" placeholder="请选择性别" >
<a-select-option value="shanghai"> <a-select-option value="2">
女士 女士
</a-select-option> </a-select-option>
<a-select-option value="beijing"> <a-select-option value="1">
先生 先生
</a-select-option> </a-select-option>
</a-select> </a-select>-->
<j-dict-select-tag type="list" v-model="form.sex" dictCode="sex" placeholder="请选择性别" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="姓名" prop="desc"> <a-form-model-item label="姓名" prop="realname">
<a-input placeholder="请输入姓名" v-model="form.desc" /> <a-input placeholder="请输入姓名" v-model="form.realname" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="地区" prop="desc"> <!-- <a-form-model-item label="地区" prop="desc">
<a-input placeholder="请选择地区" v-model="form.desc" /> <a-input placeholder="请选择地区" v-model="form.desc" />
</a-form-model-item> </a-form-model-item>-->
<a-form-model-item label="电话" prop="desc"> <a-form-model-item label="电话" prop="phone">
<a-input placeholder="请输入电话" v-model="form.desc" /> <a-input placeholder="请输入电话" v-model="form.phone" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="出生日期" required prop="date1"> <a-form-model-item label="出生日期" required prop="birthday">
<a-date-picker <a-date-picker
v-model="form.date1" v-model="form.birthday"
show-time show-time
type="date" type="date"
placeholder="请选择出生日期" placeholder="请选择出生日期"
style="width: 100%;" style="width: 100%;"
/> />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="电子邮箱" prop="desc"> <a-form-model-item label="电子邮箱" prop="email">
<a-input placeholder="请输入电子邮箱" v-model="form.desc" /> <a-input placeholder="请输入电子邮箱" v-model="form.email" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="1" prop="type"> <a-form-model-item label="1" prop="type">
<a-checkbox value="1" name="type"> <a-checkbox value="1" name="type">
@ -102,10 +103,10 @@
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<div class="d-flex btnDiv"> <div class="d-flex btnDiv">
<div type="primary" style="width: 100%;margin-bottom: 10px" class="dialogButton primary f_12">修改信息</div> <div type="primary" style="width: 100%;margin-bottom: 10px" class="dialogButton primary f_12" @click="handuser()">修改信息</div>
</div> </div>
<a @click="show" class="xgmm"> 更改密码?</a> <a @click="handleChangePassword(form.username)" class="xgmm"> 更改密码?</a>
<a-modal v-model="visible1" title="更改密码" @ok="handleOk" @cancel="handleCancel"> <!-- <a-modal v-model="visible1" title="更改密码" @ok="handleOk" @cancel="handleCancel">
<a-form-model <a-form-model
ref="ruleForm1" ref="ruleForm1"
:model="form1" :model="form1"
@ -118,7 +119,7 @@
<a-input placeholder="请输入新密码" v-model="form.desc" /> <a-input placeholder="请输入新密码" v-model="form.desc" />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</a-modal> </a-modal>-->
</div> </div>
</div> </div>
<div class="orderList" > <div class="orderList" >
@ -155,8 +156,10 @@
</div> </div>
</div> </div>
</div> </div>
<password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
<Footer></Footer> <Footer></Footer>
</div> </div>
</template> </template>
<script> <script>
import Header from "../components/Header/HeaderView"; import Header from "../components/Header/HeaderView";
@ -164,9 +167,10 @@
import {mapGetters} from 'vuex' import {mapGetters} from 'vuex'
import { getFileAccessHttpUrl} from "@/api/manage" import { getFileAccessHttpUrl} from "@/api/manage"
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import PasswordModal from '../../system/modules/PasswordModal'
export default { export default {
name: "gerenzhongxin", name: "gerenzhongxin",
components: { Header,Footer }, components: { Header,Footer,PasswordModal },
data() {0 data() {0
return { return {
model:{ model:{
@ -226,20 +230,25 @@
url: { url: {
list: "/starehouse/starehouse/list", list: "/starehouse/starehouse/list",
getusername: "/sys/user/getusername", getusername: "/sys/user/getusername",
findgoods: "/sys/user/findgoods" findgoods: "/sys/user/findgoods",
getneeduser: "/getuserpersion/getneeduser",
updateneeduser: "/getuserpersion/updateneeduser",
}, },
labelCol: { span: 3 }, labelCol: { span: 3 },
wrapperCol: { span: 21 }, wrapperCol: { span: 21 },
other: '', other: '',
form: { /*form: {
name: '', realname: '',
region: undefined, sex: '',
date1: undefined, birthday: '',
delivery: false, email: '',
phone: '',
type: [], type: [],
resource: '', resource: '',
desc: '', desc: '',
},*/
form: {
}, },
form1: { form1: {
name: '', name: '',
@ -251,24 +260,24 @@
desc: '', desc: '',
}, },
rules: { rules: {
name: [ /*name: [
{ required: true, message: 'Please input Activity name', trigger: 'blur' }, { required: true, message: 'Please input Activity name', trigger: 'blur' },
{ min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'blur' }, { min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'blur' },
], ],
region: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }], region: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
date1: [{ required: true, message: 'Please pick a date', trigger: 'change' }], date1: [{ required: true, message: 'Please pick a date', trigger: 'change' }],*/
type: [ type: [
{ {
type: 'array', type: 'array',
required: true, required: true,
message: 'Please select at least one activity type', message: '请选择',
trigger: 'change', trigger: 'change',
}, },
], ],
resource: [ /*resource: [
{ required: true, message: 'Please select activity resource', trigger: 'change' }, { required: true, message: 'Please select activity resource', trigger: 'change' },
], ],
desc: [{ required: true, message: 'Please input activity form', trigger: 'blur' }], desc: [{ required: true, message: 'Please input activity form', trigger: 'blur' }],*/
}, },
visible1: false, visible1: false,
@ -278,6 +287,7 @@
created() { created() {
this.getusername(); this.getusername();
this.getallgoods(); this.getallgoods();
this.getneeduser();
}, },
mounted() { mounted() {
@ -287,11 +297,14 @@
} }
}, },
methods: { methods: {
passwordModalOk() {
//TODO datasource
},
handleCancel(e) { handleCancel(e) {
this.visible1 = false; this.visible1 = false;
}, },
show() { handleChangePassword(username) {
this.visible1 = true; this.$refs.passwordmodal.show(username);
}, },
handleOk(e) { handleOk(e) {
console.log(e); console.log(e);
@ -323,12 +336,31 @@
getAction(this.url.getusername).then((res) => { getAction(this.url.getusername).then((res) => {
if(res.success) { if(res.success) {
this.model.username1 = res.result; this.model.username1 = res.result;
console.log(res.message)
this.visible = true; this.visible = true;
} else { } else {
} }
}); });
}, },
getneeduser(){
getAction(this.url.getneeduser).then((res) => {
if(res.success) {
this.form = res.result;
this.visible = true;
} else {
}
});
},
handuser(){
getAction(this.url.updateneeduser,{form: JSON.stringify(this.form)}).then((res) => {
if(res.success) {
console.log("-----------------------")
this.loadData(1);
} else {
}
});
},
...mapGetters(["nickname", "avatar", "userInfo", "addRouters", "username", "permissionList"]), ...mapGetters(["nickname", "avatar", "userInfo", "addRouters", "username", "permissionList"]),
// //
getAvatar(){ getAvatar(){

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.orderbymakeclothplan.pojo.ZyOrder; import org.jeecg.modules.orderbymakeclothplan.pojo.ZyOrder;
import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -173,4 +174,8 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
//根据id获取用户 //根据id获取用户
@Select("select * from sys_user where id=#{needid}") @Select("select * from sys_user where id=#{needid}")
SysUser getneeduser(String needid); SysUser getneeduser(String needid);
//个人中心我的账户修改个人信息
@Update("UPDATE sys_user SET realname = #{realname},sex=#{sex},birthday=#{birthday},phone=#{phone},email=#{email} WHERE id = #{id} ")
void updateneed(String id, String sex, String birthday, String realname, String phone, String email);
} }

@ -269,4 +269,7 @@ public interface ISysUserService extends IService<SysUser> {
SysUser getuser(); SysUser getuser();
SysUser getneeduser(String id);
void updateneed(String id, String sex, String birthday, String realname, String phone, String email);
} }

@ -578,4 +578,14 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
return sysUser; return sysUser;
} }
@Override
public SysUser getneeduser(String id) {
return userMapper.getneeduser(id);
}
@Override
public void updateneed(String id, String sex, String birthday, String realname, String phone, String email) {
userMapper.updateneed(id,sex,birthday,realname,phone,email);
}
} }

Loading…
Cancel
Save