@@ -105,6 +105,8 @@ public class UserInfoServiceImpl implements UserInfoService {
try {
if (StringUtils.isNotEmpty(record.getPassword())) {
record.setPassword(MD5Util.getMD5(record.getPassword()));
+ }else{
+ record.setPassword(MD5Util.getMD5("123456"));
}
int updates = userInfoMapper.insertSelective(record);
@@ -120,7 +120,7 @@
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="150">
<template slot-scope="scope">
- <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+ <el-button @click="editRow(scope.row)" v-if="userInfo.roleId!='10'&&userInfo.roleId!='7'" type="primary" size="mini" plain>编辑</el-button>
<el-button @click="houseImages(scope.row)" type="primary" size="mini" plain>图片</el-button>
</template>
@@ -369,7 +369,7 @@ export default {
},
computed: {
- ...mapState(['tableHeight']),
+ ...mapState(['tableHeight','userInfo']),
selection() {
return this.$refs.table.selection.map(i => i.id);
@@ -119,7 +119,10 @@ export default {
roles: [
{ id: '5', name: '管理员' },
- { id: '7', name: '用户' }
+ { id: '7', name: '用户' },
+ { id: '8', name: '总经理' },
+ { id: '9', name: '片区经理' },
+ { id: '10', name: '业务员' },
],
departs: [],
@@ -7,6 +7,12 @@
</el-option>
<el-option label="用户" value="7">
+ <el-option label="总经理" value="8">
+ </el-option>
+ <el-option label="片区经理" value="9">
+ <el-option label="业务员" value="10">
</el-select>
<el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
</el-button>