|
|
|
@ -98,6 +98,18 @@
|
|
|
|
<el-switch v-model="departmentInfo.appointment_enabled" active-text="是" inactive-text="否"
|
|
|
|
<el-switch v-model="departmentInfo.appointment_enabled" active-text="是" inactive-text="否"
|
|
|
|
:active-value="1" :inactive-value="0" />
|
|
|
|
:active-value="1" :inactive-value="0" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-divider content-position="left">工作台属性</el-divider>
|
|
|
|
|
|
|
|
<el-form-item label="是否工作台科室:">
|
|
|
|
|
|
|
|
<el-switch v-model="departmentInfo.is_workbench" active-text="是" inactive-text="否"
|
|
|
|
|
|
|
|
:active-value="1" :inactive-value="0" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="关联科室:" v-if="departmentInfo.is_workbench == 1">
|
|
|
|
|
|
|
|
<el-select v-model="selectedLinkedDepts" multiple filterable collapse-tags
|
|
|
|
|
|
|
|
placeholder="请选择关联科室" style="width: 100%;">
|
|
|
|
|
|
|
|
<el-option v-for="item in topScheduleDepts" :key="item.id"
|
|
|
|
|
|
|
|
:label="item.department_name" :value="item.id" />
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<template #footer>
|
|
|
|
<template #footer>
|
|
|
|
<span class="dialog-footer">
|
|
|
|
<span class="dialog-footer">
|
|
|
|
@ -168,7 +180,8 @@
|
|
|
|
getGroupList,
|
|
|
|
getGroupList,
|
|
|
|
GetDepartmentChildren,
|
|
|
|
GetDepartmentChildren,
|
|
|
|
GetLeafDepartmentList,
|
|
|
|
GetLeafDepartmentList,
|
|
|
|
SaveDepartmentChildren
|
|
|
|
SaveDepartmentChildren,
|
|
|
|
|
|
|
|
GetHasScheduleTopDepartments
|
|
|
|
} from '@/api/api.js'
|
|
|
|
} from '@/api/api.js'
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
|
import DepartmentResourcesSave from '@/components/Yewu/DepartmentResourcesSave.vue'
|
|
|
|
import DepartmentResourcesSave from '@/components/Yewu/DepartmentResourcesSave.vue'
|
|
|
|
@ -184,6 +197,8 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
let loading = ref(false);
|
|
|
|
let loading = ref(false);
|
|
|
|
|
|
|
|
let selectedLinkedDepts = ref([])
|
|
|
|
|
|
|
|
let topScheduleDepts = ref([])
|
|
|
|
let searchInfo = ref({
|
|
|
|
let searchInfo = ref({
|
|
|
|
status: null,
|
|
|
|
status: null,
|
|
|
|
name: '',
|
|
|
|
name: '',
|
|
|
|
@ -228,7 +243,9 @@
|
|
|
|
department_status: null,
|
|
|
|
department_status: null,
|
|
|
|
appointment_enabled: 0,
|
|
|
|
appointment_enabled: 0,
|
|
|
|
auto_gen_days: 15,
|
|
|
|
auto_gen_days: 15,
|
|
|
|
pid: 0
|
|
|
|
pid: 0,
|
|
|
|
|
|
|
|
is_workbench: 0,
|
|
|
|
|
|
|
|
linked_departments: '[]'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const Edit = (row) => {
|
|
|
|
const Edit = (row) => {
|
|
|
|
dialogVisible.value = true
|
|
|
|
dialogVisible.value = true
|
|
|
|
@ -239,10 +256,19 @@
|
|
|
|
department_status: row.department_status,
|
|
|
|
department_status: row.department_status,
|
|
|
|
appointment_enabled: row.appointment_enabled ?? 0,
|
|
|
|
appointment_enabled: row.appointment_enabled ?? 0,
|
|
|
|
auto_gen_days: row.auto_gen_days ?? 15,
|
|
|
|
auto_gen_days: row.auto_gen_days ?? 15,
|
|
|
|
pid: row.pid ?? 0
|
|
|
|
pid: row.pid ?? 0,
|
|
|
|
|
|
|
|
is_workbench: row.is_workbench ?? 0,
|
|
|
|
|
|
|
|
linked_departments: row.linked_departments ?? '[]'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
selectedLinkedDepts.value = JSON.parse(row.linked_departments || '[]').map(Number)
|
|
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
|
|
selectedLinkedDepts.value = []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
loadTopScheduleDepts()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const Save = () => {
|
|
|
|
const Save = () => {
|
|
|
|
|
|
|
|
departmentInfo.value.linked_departments = JSON.stringify(selectedLinkedDepts.value.map(String))
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
SaveDepartment({
|
|
|
|
SaveDepartment({
|
|
|
|
info: departmentInfo.value,
|
|
|
|
info: departmentInfo.value,
|
|
|
|
@ -266,8 +292,12 @@
|
|
|
|
department_status: 1,
|
|
|
|
department_status: 1,
|
|
|
|
appointment_enabled: 0,
|
|
|
|
appointment_enabled: 0,
|
|
|
|
auto_gen_days: 15,
|
|
|
|
auto_gen_days: 15,
|
|
|
|
pid: 0
|
|
|
|
pid: 0,
|
|
|
|
|
|
|
|
is_workbench: 0,
|
|
|
|
|
|
|
|
linked_departments: '[]'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
selectedLinkedDepts.value = []
|
|
|
|
|
|
|
|
loadTopScheduleDepts()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//添加账号
|
|
|
|
//添加账号
|
|
|
|
let addUserdialogVisible =ref(false);
|
|
|
|
let addUserdialogVisible =ref(false);
|
|
|
|
@ -412,6 +442,16 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const loadTopScheduleDepts = () => {
|
|
|
|
|
|
|
|
GetHasScheduleTopDepartments({
|
|
|
|
|
|
|
|
department_id: departmentInfo.value.id
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
topScheduleDepts.value = res.data.list
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
getGroup()
|
|
|
|
getGroup()
|
|
|
|
GetList()
|
|
|
|
GetList()
|
|
|
|
|