update code
parent
1756bc5aa6
commit
e087575672
|
@ -39,9 +39,9 @@ spring:
|
|||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://cd-cynosdbmysql-grp-9rqrhxsm.sql.tencentcdb.com:27981/yanzhu_project?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://62.234.3.186:3306/yanzhu_project?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: Sxyanzhu@cf
|
||||
password: Sxyanzhu@cf123
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
@ -233,7 +233,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|||
dept.setLevel(2);
|
||||
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
|
||||
int id=deptMapper.insertDept(dept);
|
||||
String[] subDepts="成本部,行政部,工程部".split(",");
|
||||
String[] subDepts="物设部,工程部,商务部,财务部,安质部,领导班子".split(",");
|
||||
for(String it:subDepts){
|
||||
SysDept dpt=new SysDept();
|
||||
dpt.setParentId(dept.getDeptId());
|
||||
|
@ -263,7 +263,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|||
dept.setLevel(300);
|
||||
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
|
||||
int id=deptMapper.insertDept(dept);
|
||||
String[] subDepts="科技部,采购部,商务部,工程部,财务部".split(",");
|
||||
String[] subDepts="物设部,工程部,领导班子".split(",");
|
||||
for(String it:subDepts){
|
||||
SysDept dpt=new SysDept();
|
||||
dpt.setParentId(dept.getDeptId());
|
||||
|
|
|
@ -425,12 +425,17 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
List<SysUserRole> list = new ArrayList<SysUserRole>(roleIds.length);
|
||||
for (Long roleId : roleIds)
|
||||
{
|
||||
if(roleId==null){
|
||||
continue;
|
||||
}
|
||||
SysUserRole ur = new SysUserRole();
|
||||
ur.setUserId(userId);
|
||||
ur.setRoleId(roleId);
|
||||
list.add(ur);
|
||||
}
|
||||
userRoleMapper.batchUserRole(list);
|
||||
if(list.size()>0){
|
||||
userRoleMapper.batchUserRole(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2018-2023 yanZhu.vip All Rights Reserved.</span>
|
||||
<span>Copyright © 2023-2024 yanZhu.vip All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-register-footer">
|
||||
<span>Copyright © 2018-2023 yanZhu.vip All Rights Reserved.</span>
|
||||
<span>Copyright © 2023-2024 yanZhu.vip All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="归属部门" prop="deptId">
|
||||
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" @select="doInputDept"/>
|
||||
<treeselect ref="treeSel"v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" @select="doInputDept"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -158,7 +158,7 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="角色">
|
||||
<el-form-item label="角色" prop="roleId">
|
||||
<el-select v-model="form.roleId" placeholder="请选择角色">
|
||||
<el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId"
|
||||
:disabled="item.status == 1"></el-option>
|
||||
|
@ -331,7 +331,8 @@ export default {
|
|||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
created() {
|
||||
window.x99=this
|
||||
this.getList();
|
||||
this.getDeptTree();
|
||||
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||
|
@ -473,10 +474,10 @@ export default {
|
|||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const userId = row.userId || this.ids;
|
||||
getUser(userId).then(response => {
|
||||
getUser(userId).then(response => {
|
||||
this.form = response.data;
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
|
@ -486,6 +487,18 @@ export default {
|
|||
this.open = true;
|
||||
this.title = "修改用户";
|
||||
this.form.password = "";
|
||||
setTimeout(()=>{
|
||||
let node=this.$refs.treeSel.getNode(this.form.deptId);
|
||||
this.$refs.treeSel.select(node);
|
||||
this.doInputDept(node.raw);
|
||||
const func=p=>{
|
||||
p.isExpanded=true;
|
||||
if(p.parentNode){
|
||||
func(p.parentNode);
|
||||
}
|
||||
};
|
||||
func(node);
|
||||
},400);
|
||||
});
|
||||
},
|
||||
/** 重置密码按钮操作 */
|
||||
|
|
Loading…
Reference in New Issue