|
|
@ -293,22 +293,24 @@ |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<!-- <el-tab-pane label="项目类别权限"> |
|
|
|
|
|
<div style="overflow-y: scroll;height:350px;"> |
|
|
|
|
|
|
|
|
<el-tab-pane label="项目类别权限"> |
|
|
|
|
|
<div style="overflow-y: scroll; height: 350px"> |
|
|
<el-tree |
|
|
<el-tree |
|
|
:props="{ |
|
|
:props="{ |
|
|
label: 'displayName', |
|
|
label: 'displayName', |
|
|
children: 'treeChildren', |
|
|
children: 'treeChildren', |
|
|
}" |
|
|
}" |
|
|
:default-checked-keys="department" |
|
|
|
|
|
|
|
|
:default-checked-keys="haveitemtype" |
|
|
:default-expand-all="true" |
|
|
:default-expand-all="true" |
|
|
show-checkbox |
|
|
show-checkbox |
|
|
:data="setupdepartments" |
|
|
|
|
|
|
|
|
:data="itemtype" |
|
|
node-key="id" |
|
|
node-key="id" |
|
|
@check="iscrentddepartment" |
|
|
|
|
|
ref="department" size="small" /> |
|
|
|
|
|
|
|
|
@check="iscrentditemtype" |
|
|
|
|
|
ref="haveitemtype" |
|
|
|
|
|
size="small" |
|
|
|
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</el-tab-pane> --> |
|
|
|
|
|
|
|
|
</el-tab-pane> |
|
|
</el-tabs> |
|
|
</el-tabs> |
|
|
<!-- //新增 --> |
|
|
<!-- //新增 --> |
|
|
<el-form |
|
|
<el-form |
|
|
@ -384,7 +386,7 @@ |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<!-- 角色111 --> |
|
|
<!-- 角色111 --> |
|
|
<el-tab-pane label="角色"> |
|
|
<el-tab-pane label="角色"> |
|
|
<el-checkbox-group v-model="roleNames"> |
|
|
|
|
|
|
|
|
<el-checkbox-group v-model="form.roleNames"> |
|
|
<el-checkbox |
|
|
<el-checkbox |
|
|
v-model="item.id" |
|
|
v-model="item.id" |
|
|
:label="item.name" |
|
|
:label="item.name" |
|
|
@ -397,13 +399,18 @@ |
|
|
<!-- 组织11 --> |
|
|
<!-- 组织11 --> |
|
|
<el-tab-pane label="所属科室"> |
|
|
<el-tab-pane label="所属科室"> |
|
|
<el-cascader |
|
|
<el-cascader |
|
|
|
|
|
v-model="orgId" |
|
|
:options="organizationalstructure" |
|
|
:options="organizationalstructure" |
|
|
:show-all-levels="false" |
|
|
:show-all-levels="false" |
|
|
|
|
|
ref="example" |
|
|
|
|
|
popper-class="example" |
|
|
|
|
|
@change="cascaderchang" |
|
|
:props="{ |
|
|
:props="{ |
|
|
label: 'displayName', |
|
|
label: 'displayName', |
|
|
children: 'treeChildren', |
|
|
children: 'treeChildren', |
|
|
checkStrictly: true, |
|
|
checkStrictly: true, |
|
|
value: 'id', |
|
|
value: 'id', |
|
|
|
|
|
expandTrigger: 'hover', |
|
|
}" |
|
|
}" |
|
|
size="small" |
|
|
size="small" |
|
|
></el-cascader> |
|
|
></el-cascader> |
|
|
@ -426,11 +433,24 @@ |
|
|
:data="newdepartment" |
|
|
:data="newdepartment" |
|
|
show-checkbox |
|
|
show-checkbox |
|
|
:default-expand-all="true" |
|
|
:default-expand-all="true" |
|
|
@check="ischesc" |
|
|
|
|
|
|
|
|
@check="iscrentddepartments" |
|
|
node-key="id" |
|
|
node-key="id" |
|
|
ref="tree" |
|
|
ref="tree" |
|
|
:default-expanded-keys="nodekes" |
|
|
|
|
|
:default-checked-keys="[5]" |
|
|
|
|
|
|
|
|
:props="{ label: 'displayName', children: 'treeChildren' }" |
|
|
|
|
|
size="small" |
|
|
|
|
|
> |
|
|
|
|
|
</el-tree> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
<el-tab-pane label="项目类别权限"> |
|
|
|
|
|
<div style="overflow-y: scroll; height: 350px"> |
|
|
|
|
|
<el-tree |
|
|
|
|
|
:data="newitemtype" |
|
|
|
|
|
show-checkbox |
|
|
|
|
|
:default-expand-all="true" |
|
|
|
|
|
@check="iscrentditemtypes" |
|
|
|
|
|
node-key="id" |
|
|
|
|
|
ref="newitemtype" |
|
|
:props="{ label: 'displayName', children: 'treeChildren' }" |
|
|
:props="{ label: 'displayName', children: 'treeChildren' }" |
|
|
size="small" |
|
|
size="small" |
|
|
> |
|
|
> |
|
|
@ -767,6 +787,9 @@ export default { |
|
|
passwordid: "", |
|
|
passwordid: "", |
|
|
newdepartment: [], //新增科室 |
|
|
newdepartment: [], //新增科室 |
|
|
curRow: {}, |
|
|
curRow: {}, |
|
|
|
|
|
itemtype: [], |
|
|
|
|
|
haveitemtype: [], |
|
|
|
|
|
newitemtype: [], |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -786,6 +809,7 @@ export default { |
|
|
this.roleNames = this.$options.data().roleNames; |
|
|
this.roleNames = this.$options.data().roleNames; |
|
|
this.department = this.$options.data().department; |
|
|
this.department = this.$options.data().department; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
|
|
|
this.haveitemtype = this.$options.data().haveitemtype; |
|
|
}, |
|
|
}, |
|
|
cascaderchang(v) { |
|
|
cascaderchang(v) { |
|
|
if (v.length > 1) { |
|
|
if (v.length > 1) { |
|
|
@ -821,6 +845,15 @@ export default { |
|
|
iscrentddepartment() { |
|
|
iscrentddepartment() { |
|
|
this.department = this.$refs.department.getCheckedKeys(true); |
|
|
this.department = this.$refs.department.getCheckedKeys(true); |
|
|
}, |
|
|
}, |
|
|
|
|
|
iscrentddepartments() { |
|
|
|
|
|
this.department = this.$refs.tree.getCheckedKeys(true); |
|
|
|
|
|
}, |
|
|
|
|
|
iscrentditemtype() { |
|
|
|
|
|
this.haveitemtype = this.$refs.haveitemtype.getCheckedKeys(true); |
|
|
|
|
|
}, |
|
|
|
|
|
iscrentditemtypes() { |
|
|
|
|
|
this.haveitemtype = this.$refs.newitemtype.getCheckedKeys(true); |
|
|
|
|
|
}, |
|
|
//修改密码确定按钮 |
|
|
//修改密码确定按钮 |
|
|
Changepassword() { |
|
|
Changepassword() { |
|
|
if (this.newPassWord == "") { |
|
|
if (this.newPassWord == "") { |
|
|
@ -1036,6 +1069,11 @@ export default { |
|
|
tcdate(this.organizationalstructure); |
|
|
tcdate(this.organizationalstructure); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
getapi("/api/app/item-type/by-code-all").then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.newitemtype = [...res.data]; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
//确定添加或修改 |
|
|
//确定添加或修改 |
|
|
addlsit() { |
|
|
addlsit() { |
|
|
@ -1054,13 +1092,31 @@ export default { |
|
|
usesurnamerName: this.form.usesurnamerName, |
|
|
usesurnamerName: this.form.usesurnamerName, |
|
|
phoneNumber: this.form.phoneNumber, |
|
|
phoneNumber: this.form.phoneNumber, |
|
|
password: this.form.password, |
|
|
password: this.form.password, |
|
|
roleNames: this.roleNames, |
|
|
|
|
|
|
|
|
roleNames: this.form.roleNames, |
|
|
isActive: this.form.isActive, |
|
|
isActive: this.form.isActive, |
|
|
}; |
|
|
}; |
|
|
if (this.roleNames.length == 0) { |
|
|
|
|
|
|
|
|
if (this.form.roleNames.length == 0) { |
|
|
this.$message.warning("请选择角色"); |
|
|
this.$message.warning("请选择角色"); |
|
|
|
|
|
} else if (this.orgId == "" || this.orgId == null) { |
|
|
|
|
|
this.$message.warning("请选择科室"); |
|
|
} else { |
|
|
} else { |
|
|
newlists(obj).then((res) => { |
|
|
newlists(obj).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.form = res.data; |
|
|
|
|
|
postapi( |
|
|
|
|
|
`/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`, |
|
|
|
|
|
this.department |
|
|
|
|
|
).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
postapi( |
|
|
|
|
|
"/api/app/organization-units/user-organization-unit", |
|
|
|
|
|
{ userId: this.form.id, orgId: this.orgId } |
|
|
|
|
|
).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
postapi( |
|
|
|
|
|
`/api/app/UserItemType/CreateMany?UserId=${this.form.id}`, |
|
|
|
|
|
this.haveitemtype |
|
|
|
|
|
).then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
this.dialogVisible = false; |
|
|
this.dialogVisible = false; |
|
|
this.$message.success("新增成功"); |
|
|
this.$message.success("新增成功"); |
|
|
@ -1069,11 +1125,18 @@ export default { |
|
|
this.department = this.$options.data().department; |
|
|
this.department = this.$options.data().department; |
|
|
this.curRow = this.$options.data().curRow; |
|
|
this.curRow = this.$options.data().curRow; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
|
|
|
this.haveitemtype =this.$options.data().haveitemtype; |
|
|
this.$refs["tableData"].setCurrentRow(""); |
|
|
this.$refs["tableData"].setCurrentRow(""); |
|
|
this.btnQuery(); |
|
|
this.btnQuery(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} else if (this.title == 2) { |
|
|
} else if (this.title == 2) { |
|
|
// this.roleNames=arrs |
|
|
// this.roleNames=arrs |
|
|
let obj = { |
|
|
let obj = { |
|
|
@ -1099,13 +1162,24 @@ export default { |
|
|
let msg = ""; |
|
|
let msg = ""; |
|
|
|
|
|
|
|
|
//更新用户与所属角色 |
|
|
//更新用户与所属角色 |
|
|
postapi(`/api/identity/users/update?id=${this.form.id}`, obj) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
|
|
|
postapi(`/api/identity/users/update?id=${this.form.id}`, obj).then( |
|
|
|
|
|
(res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
//更新科室权限 |
|
|
//更新科室权限 |
|
|
postapi(`/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`,this.department).then((res)=>{ |
|
|
|
|
|
|
|
|
postapi( |
|
|
|
|
|
`/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`, |
|
|
|
|
|
this.department |
|
|
|
|
|
).then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
postapi("/api/app/organization-units/user-organization-unit",{ userId: this.form.id, orgId: this.orgId }).then((res)=>{ |
|
|
|
|
|
|
|
|
postapi( |
|
|
|
|
|
"/api/app/organization-units/user-organization-unit", |
|
|
|
|
|
{ userId: this.form.id, orgId: this.orgId } |
|
|
|
|
|
).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
postapi( |
|
|
|
|
|
`/api/app/UserItemType/CreateMany?UserId=${this.form.id}`, |
|
|
|
|
|
this.haveitemtype |
|
|
|
|
|
).then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
this.dialogVisible = false; |
|
|
this.dialogVisible = false; |
|
|
this.form = this.$options.data().form; |
|
|
this.form = this.$options.data().form; |
|
|
@ -1113,15 +1187,19 @@ export default { |
|
|
this.department = this.$options.data().department; |
|
|
this.department = this.$options.data().department; |
|
|
this.curRow = this.$options.data().curRow; |
|
|
this.curRow = this.$options.data().curRow; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
this.orgId = this.$options.data().orgId; |
|
|
|
|
|
this.haveitemtype =this.$options.data().haveitemtype; |
|
|
this.$refs["tableData"].setCurrentRow(""); |
|
|
this.$refs["tableData"].setCurrentRow(""); |
|
|
this.$message.success("操作成功!"); |
|
|
this.$message.success("操作成功!"); |
|
|
this.btnQuery(); |
|
|
this.btnQuery(); |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@ -1216,7 +1294,6 @@ export default { |
|
|
// default-checked-keys |
|
|
// default-checked-keys |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
this.department = res.data; |
|
|
this.department = res.data; |
|
|
console.log(this.department); |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -1247,16 +1324,18 @@ export default { |
|
|
// }); |
|
|
// }); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
// console.log(row); |
|
|
|
|
|
// usersinits(row.id).then((res) => { |
|
|
|
|
|
// this.orgId = res.data[res.data.length - 1].displayName; |
|
|
|
|
|
// this.orgIds = res.data[0].displayName; |
|
|
|
|
|
// let list = res.data; |
|
|
|
|
|
// this.defaultKeys = list.map((item) => { |
|
|
|
|
|
// return item.id; |
|
|
|
|
|
// }); |
|
|
|
|
|
// console.log("defaultKeys", this.defaultKeys); |
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
getapi("/api/app/item-type/by-code-all").then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.itemtype = [...res.data]; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
postapi( |
|
|
|
|
|
`/api/app/UserItemType/GetUserItemType?UserId=${this.curRow.id}` |
|
|
|
|
|
).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.haveitemtype = [...res.data]; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//分页 |
|
|
//分页 |
|
|
|