提交 2f783113 authored 作者: matian's avatar matian

updates

上级 9ae70d4f
...@@ -271,7 +271,6 @@ const handleNodeCollapse = () => { ...@@ -271,7 +271,6 @@ const handleNodeCollapse = () => {
} }
// 设置开放规则 // 设置开放规则
const handleOpenRules = (node: any, data: any) => { const handleOpenRules = (node: any, data: any) => {
console.log(node, '000000000000')
if (node.level === 1) { if (node.level === 1) {
chapterName.value = node.label chapterName.value = node.label
sectionName.value = '无' sectionName.value = '无'
......
...@@ -13,6 +13,14 @@ const emit = defineEmits<{ ...@@ -13,6 +13,14 @@ const emit = defineEmits<{
// 详情id // 详情id
const id = route.query.id as string const id = route.query.id as string
// 数据回显
watch(
() => props.data,
value => {
authorizeCheck.value = value.auth_departments.reduce((a: any, b: any) => a.push(b.department_id) && a, [])
}
)
// 设置部门共享 // 设置部门共享
const handleDepartment = () => { const handleDepartment = () => {
ElMessageBox.confirm( ElMessageBox.confirm(
...@@ -151,27 +159,6 @@ const courseAuthorizeConfirm = () => { ...@@ -151,27 +159,6 @@ const courseAuthorizeConfirm = () => {
} }
}) })
} }
// 数据回显
watch(
() => props.data,
value => {
authorizeCheck.value = value.auth_departments.reduce((a: any, b: any) => a.push(b.department_id) && a, [])
departmentList.value.map((i: any) => {
value.auth_departments.map((item: any) => {
if (item.organ_id === i.id) {
i.auth_type = item.auth_type
if (item.auth_semester_id === '0') {
i.auth_semester_id = ''
} else {
i.auth_semester_id = item.auth_semester_id
}
i.auth_start_time = item.auth_start_time
i.auth_end_time = item.auth_start_time
}
})
})
}
)
const changeDepartment = () => { const changeDepartment = () => {
departmentList.value.map((i: any) => { departmentList.value.map((i: any) => {
...@@ -195,6 +182,27 @@ const copyCourse = () => { ...@@ -195,6 +182,27 @@ const copyCourse = () => {
} }
}) })
} }
watch(
() => dialogVisibleAuthorize.value,
value => {
if (value === true) {
departmentList.value.map((i: any) => {
props.data.auth_departments.map((item: any) => {
if (item.organ_id === i.id) {
i.auth_type = item.auth_type
if (item.auth_semester_id === '0') {
i.auth_semester_id = ''
} else {
i.auth_semester_id = item.auth_semester_id
}
i.auth_start_time = item.auth_start_time
i.auth_end_time = item.auth_start_time
}
})
})
}
}
)
</script> </script>
<template> <template>
<div class="tool-btn-box" v-if="route.query.id" style="margin-bottom: 20px"> <div class="tool-btn-box" v-if="route.query.id" style="margin-bottom: 20px">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论