修改机构

This commit is contained in:
闫晓茹 2024-04-23 11:04:24 +08:00
parent 33f993120f
commit 7e3213a55d
3 changed files with 41 additions and 39 deletions

View File

@ -68,6 +68,14 @@ export function updateUser(data) {
data: data
})
}
export function editAgency(data) {
return request({
url: '/system/user/editAgency',
method: 'post',
data: data
})
}
export function editDepartment(data) {
return request({
url: '/system/user/editDepartment',

View File

@ -109,8 +109,8 @@
<el-descriptions-item label="上级机构">
{{ agencyList.parentAgencyName }}
</el-descriptions-item>
<el-descriptions-item label="节点类型"
>{{ agencyList.nodeType == "HEALTH_COMYISION" ? "卫健委" : "" }}
<el-descriptions-item label="节点类型">
<!-- {{ agencyList.nodeType == "HEALTH_COMYISION" ? "卫健委" : "" }}
{{
agencyList.nodeType == "MEDICAL_INSURANCE_BUREAU" ? "医保局" : ""
}}
@ -121,7 +121,7 @@
{{ agencyList.nodeType == "WARD" ? "病区" : "" }}
{{ agencyList.nodeType == "DEPARIMENT" ? "科室" : "" }}
{{ agencyList.nodeType == "PHARNAGY" ? "药店" : "" }}
{{ agencyList.nodeType == "PHARNAGY" ? "药店" : "" }} -->
{{ agencyList.nodeType == "CANPUS" ? "院区" : "" }}
{{
agencyList.nodeType == "HOSPITAL" ? "医院" : ""
@ -391,9 +391,7 @@
style="width: 205px"
v-model="form.parentId"
:show-all-levels="false"
:placeholder="
form.parentAgencyName ? form.parentAgencyName : ''
"
:placeholder="form.parentAgencyName ? form.parentAgencyName : ''"
clearable
ref="cascader"
:key="isResouceShow"
@ -407,9 +405,7 @@
@change="changeagencyCategoryId($event)"
style="width: 205px"
:placeholder="
form.agencyCategoryName
? form.agencyCategoryName
: ''
form.agencyCategoryName ? form.agencyCategoryName : ''
"
v-model="form.agencyCategoryId"
:show-all-levels="false"
@ -476,7 +472,6 @@
</el-form-item>
<el-form-item label="机构联系电话" prop="agencyPhone">
<el-input
onkeyup="value=value.replace(/[^\-?\d.]/g,'')"
maxlength="11"
v-model="form.agencyPhone"
@ -767,10 +762,9 @@ export default {
this.infolist();
},
methods: {
//
info() {
var dictType = "node_type";
var dictType = "agency_node_type";
getAgencytype(dictType).then((res) => {
this.nodeTypeoptions = res.data;
});
@ -1134,32 +1128,33 @@ export default {
/** 提交按钮 */
submitForm() {
// if (this.form.provinceCode && !this.form.communityCode) {
// this.$message("");
// }
if (this.form.areaCode && !this.form.streetName) {
this.$message.error("行政区划请至少选择到街道");
} else {
console.log(this.form);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateAgency(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
++this.isResouceShow;
this.gettreelist();
});
} else {
addAgency(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
++this.isResouceShow;
this.gettreelist();
});
}
}
});
}
// if(this.form.cityName){
// this.form.areaCode=this.form.cityName
// }
console.log(this.form);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateAgency(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
++this.isResouceShow;
this.gettreelist();
});
} else {
addAgency(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
++this.isResouceShow;
this.gettreelist();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
@ -1189,7 +1184,7 @@ export default {
};
</script>
<style lang="scss" scoped>
::v-deep .el-cascader .el-input__inner::placeholder{
::v-deep .el-cascader .el-input__inner::placeholder {
color: #686a6d !important;
}
::v-deep.el-button--text {
@ -1212,12 +1207,10 @@ export default {
overflow: scroll;
}
.el-cascader .el-input input::-webkit-input-placeholder {
color: #686a6d;
}
.custom-tree-node {
// flex: 1;
// display: flex;

View File

@ -863,6 +863,7 @@ import {
addUser,
updateUser,
editDepartment,
editAgency,
resetUserPwd,
selectUserAgency,
changeUserStatus,
@ -1172,7 +1173,7 @@ export default {
//
leftcontent() {
console.log(this.formlists, "4578");
updateUser(this.formlists).then((response) => {
editAgency(this.formlists).then((response) => {
if (response.code == 200) {
console.log(response.code);
this.info();