提交 8161046c authored 作者: matian's avatar matian

修改授权莫默认值为长期有效

上级 3f70756f
...@@ -4,6 +4,7 @@ import { useProjectList } from '@/composables/useGetProjectList' ...@@ -4,6 +4,7 @@ import { useProjectList } from '@/composables/useGetProjectList'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
// 筛选部门 // 筛选部门
let departmentList: any = useProjectList('', '79806610719731712').departmentList let departmentList: any = useProjectList('', '79806610719731712').departmentList
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const props = defineProps(['data']) const props = defineProps(['data'])
...@@ -164,7 +165,7 @@ const changeDepartment = () => { ...@@ -164,7 +165,7 @@ const changeDepartment = () => {
departmentList.value.map((i: any) => { departmentList.value.map((i: any) => {
const find = authorizeCheck.value.find((item: any) => item === i.id) const find = authorizeCheck.value.find((item: any) => item === i.id)
if (!find) { if (!find) {
i.auth_type = '' i.auth_type = '1'
i.auth_semester_id = '' i.auth_semester_id = ''
i.auth_start_time = '' i.auth_start_time = ''
i.auth_end_time = '' i.auth_end_time = ''
...@@ -187,6 +188,7 @@ watch( ...@@ -187,6 +188,7 @@ watch(
value => { value => {
if (value === true) { if (value === true) {
departmentList.value.map((i: any) => { departmentList.value.map((i: any) => {
i.auth_type = '1'
props.data.auth_departments.map((item: any) => { props.data.auth_departments.map((item: any) => {
if (item.organ_id === i.id) { if (item.organ_id === i.id) {
i.auth_type = item.auth_type i.auth_type = item.auth_type
...@@ -209,7 +211,6 @@ watch( ...@@ -209,7 +211,6 @@ watch(
<router-link :to="`/course/update-course?id=${route.query.id}`"> <router-link :to="`/course/update-course?id=${route.query.id}`">
<div class="btn-item">编辑课程信息</div> <div class="btn-item">编辑课程信息</div>
</router-link> </router-link>
<div v-if="props.data.auth_authorized" class="btn-item" @click="dialogVisibleAuthorize = true">授权</div> <div v-if="props.data.auth_authorized" class="btn-item" @click="dialogVisibleAuthorize = true">授权</div>
<div v-if="props.data.auth_copy" class="btn-item" @click="copyCourse">复制</div> <div v-if="props.data.auth_copy" class="btn-item" @click="copyCourse">复制</div>
<div v-if="props.data.auth_department" class="btn-item" @click="handleDepartment"> <div v-if="props.data.auth_department" class="btn-item" @click="handleDepartment">
......
...@@ -48,6 +48,14 @@ const replyList = ref([ ...@@ -48,6 +48,14 @@ const replyList = ref([
reply_teacher: 'lisi', reply_teacher: 'lisi',
reply_time: '2021-12-21 23:12:03', reply_time: '2021-12-21 23:12:03',
reply_con: 'jrfhjshfdjdksfhjkshf' reply_con: 'jrfhjshfdjdksfhjkshf'
},
{
question_tit: '第三章学习问题',
question_desc: '2ddddxxxxxx',
question_time: '2021-12-21 23:12:03',
reply_teacher: 'lisi',
reply_time: '2021-12-21 23:12:03',
reply_con: ''
} }
]) ])
</script> </script>
...@@ -62,65 +70,69 @@ const replyList = ref([ ...@@ -62,65 +70,69 @@ const replyList = ref([
<el-descriptions-item label="所属专业:">555</el-descriptions-item> <el-descriptions-item label="所属专业:">555</el-descriptions-item>
<el-descriptions-item label="问题类型:">666</el-descriptions-item> <el-descriptions-item label="问题类型:">666</el-descriptions-item>
</el-descriptions> </el-descriptions>
<div class="main_content" v-for="(item, index) in replyList" :key="index"> <div style="min-height: 30vh; max-height: 60vh; overflow: auto">
<el-divider /> <div class="main_content" v-for="(item, index) in replyList" :key="index">
<el-divider />
<div class="content_list"> <div class="content_list">
<div class="list_left"> <div class="list_left">
<div class="left_type"></div> <div class="left_type1 left_type"></div>
</div>
<div class="list_right">
<div class="right_top">
<div class="tit">问题标题: {{ item.question_tit }}</div>
<div class="time">提问时间:{{ item.question_desc }}</div>
</div> </div>
<div class="right_center"> <div class="list_right">
<div class="tit">问题描述: {{ item.question_desc }}</div> <div class="right_top">
</div> <div class="tit">问题标题: {{ item.question_tit }}</div>
<div class="right_bottom"> <div class="time">提问时间:{{ item.question_desc }}</div>
<div class="tit"> </div>
相关附件: <div class="right_center">
<div v-for="(it, index) in item.question_fileList" :key="index"> <div class="tit">问题描述: {{ item.question_desc }}</div>
{{ it.name }} <a :href="it.url" style="color: #aa1941">查看</a> </div>
<div class="right_bottom">
<div class="tit">
相关附件:
<div v-for="(it, index) in item.question_fileList" :key="index">
{{ it.name }} <a :href="it.url" style="color: #aa1941">查看</a>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> <div class="content_list">
<div class="content_list"> <div class="list_left">
<div class="list_left"> <div class="left_type2 left_type"></div>
<div class="left_type"></div>
</div>
<div class="list_right">
<div class="right_top">
<div class="tit">回答教师:{{ item.reply_teacher }}</div>
<div class="time">回答时间:{{ item.reply_time }}</div>
</div> </div>
<div class="right_center"> <div class="list_right">
<div class="tit">回答内容: {{ item.reply_con }}</div> <div class="right_top">
<div class="tit">回答教师:{{ item.reply_teacher }}</div>
<div class="time" v-if="item.reply_con !== ''">回答时间:{{ item.reply_time }}</div>
</div>
<div class="right_center">
<div class="tit" v-if="item.reply_con !== ''">回答内容: {{ item.reply_con }}</div>
<div v-else>
<el-input></el-input>
<el-upload
ref="uploadRef"
class="upload-demo"
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
:auto-upload="false"
style="margin-top: 10px"
>
<template #trigger>
<el-button type="primary">添加附件</el-button>
</template>
</el-upload>
<el-button type="primary" class="btn_reply">提交回复</el-button>
</div>
</div>
</div> </div>
<!-- <el-input></el-input>
<el-upload
ref="uploadRef"
class="upload-demo"
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
:auto-upload="false"
style="margin-top: 10px"
>
<template #trigger>
<el-button type="primary">select file</el-button>
</template>
</el-upload> -->
</div> </div>
</div> </div>
</div> </div>
<!-- <el-button type="primary" style="display: flex; justify-content: center">提交回复</el-button> -->
</el-dialog> </el-dialog>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.main_content { .main_content {
width: 90%; width: 90%;
.content_list { .content_list {
width: 100%; width: 100%;
display: flex; display: flex;
...@@ -132,12 +144,17 @@ const replyList = ref([ ...@@ -132,12 +144,17 @@ const replyList = ref([
.left_type { .left_type {
width: 50px; width: 50px;
height: 50px; height: 50px;
background: rgb(0, 255, 255);
text-align: center; text-align: center;
line-height: 50px; line-height: 50px;
border-radius: 50%; border-radius: 50%;
box-sizing: border-box; box-sizing: border-box;
} }
.left_type1 {
background: rgb(90, 156, 232);
}
.left_type2 {
background: rgb(54, 241, 7);
}
} }
.list_right { .list_right {
width: 90%; width: 90%;
...@@ -145,6 +162,13 @@ const replyList = ref([ ...@@ -145,6 +162,13 @@ const replyList = ref([
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.right_center {
display: flex;
flex-direction: column;
.btn_reply {
align-self: center;
}
}
} }
} }
} }
......
...@@ -22,12 +22,12 @@ const listOptions = $computed(() => { ...@@ -22,12 +22,12 @@ const listOptions = $computed(() => {
{ label: '是否回复', prop: 'reply_status', align: 'center' }, { label: '是否回复', prop: 'reply_status', align: 'center' },
{ label: '更新时间', prop: 'updated_time', align: 'center' }, { label: '更新时间', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
],
data: [
{
name: '111'
}
] ]
// data: [
// {
// name: '111'
// }
// ]
} }
}) })
const handleReply = () => { const handleReply = () => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论