提交 7f186850 authored 作者: matian's avatar matian

chore:新增大作业模块,修改课程章节展开问题

上级 b532f1cf
......@@ -158,7 +158,7 @@ export const menus: IMenuItem[] = [
tag: 'v1-backend-cover-list',
icon: Picture,
name: ' 投诉建议管理',
path: '/system/question'
path: '/system/suggestion'
}
]
},
......@@ -179,6 +179,12 @@ export const menus: IMenuItem[] = [
name: '批改试卷',
path: '/teach/exam'
},
{
tag: 'v1-backend-lecturer-list',
icon: EditPen,
name: '批改大作业',
path: '/teach/homework'
},
{
tag: 'v1-backend-lecturer-list',
icon: DataAnalysis,
......
......@@ -93,6 +93,7 @@ const handleAddSection = (node: any) => {
chapterID.value = node.key
isShowSectionDialog.value = true
isEdit.value = false
defaultExpandedKeys.value = [node.key]
}
//编辑章节
const handleEdit = (node: any) => {
......@@ -124,6 +125,8 @@ const handleAddDialog = (node: any, item: any) => {
chapterID.value = node.key
chapterName.value = node.label
btnInfo.value = item
defaultExpandedKeys.value = [node.key]
if (item.resource_type === '6') {
isShowLiveDialog.value = true
} else if (
......
import httpRequest from '@/utils/axios'
// 获取视频列表
export function getVideoList(params?: { type?: string; page?: number; ['per-page']?: number }) {
return httpRequest.get('/api/resource/backend/video/index', { params })
}
// 获取字典列表
export function getDictionaryList(params?: {
name?: string
key?: string
status?: string
created_time_start?: string
created_time_end?: string
page?: number
['per-page']?: number
}) {
return httpRequest.get('/api/resource/v1/backend/data-dictionary/list', { params })
}
// 新增字典
export function createDictionary(data: {
name: string
key: string
status?: string
remark?: string
can_edit?: string
}) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/create', data)
}
// 更新字典
export function updateDictionary(data: {
id: string
name: string
key: string
status?: string
remark?: string
can_edit?: string
}) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/update', data)
}
// 删除字典
export function delDictionary(data: { id: string }) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/delete', data)
}
// 获取字典的值的列表
export function getDictionaryItemList(params?: { data_dictionary_id: string; page?: number; page_size?: number }) {
return httpRequest.get('/api/resource/v1/backend/data-dictionary/value-list', { params })
}
// 新增字典的值
export function createDictionaryItem(data: {
data_dictionary_id: string
label: string
value: string
sort: string
remark: string
can_edit: string
status: string
}) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/value-create', data)
}
// 更新字典的值
export function updateDictionaryItem(data: {
id: any
data_dictionary_id: string
label: string
value: string
sort: string
remark: string
can_edit: string
status: string
}) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/value-update', data)
}
// 删除字典的值
export function delDictionaryItem(data: { id: string }) {
return httpRequest.post('/api/resource/v1/backend/data-dictionary/value-delete', data)
}
import httpRequest from '@/utils/axios'
// 获取视频列表
export function getSuggestionList(params?: {
sso_id?: string
created_time_start?: string
created_time_end?: string
page?: string
['per-page']?: string
}) {
return httpRequest.get('/api/resource/v1/backend/suggestion/list', { params })
}
// 用户检索
export function getUserList(params?: { q: string }) {
return httpRequest.get('/api/resource/v1/backend/suggestion/search-user', { params })
}
// 投诉建议详情
export function getSuggestionDetail(params?: { id: string }) {
return httpRequest.get('/api/resource/v1/backend/suggestion/view', { params })
}
// 回复投诉建议
export function replySuggestion(data: { id: string; reply: string }) {
return httpRequest.post('/api/resource/v1/backend/suggestion/update', data)
}
import type { RouteRecordRaw } from 'vue-router'
import AppLayout from '@/components/layout/Index.vue'
export const routes: Array<RouteRecordRaw> = [
{
path: '/system/suggestion',
component: AppLayout,
children: [{ path: '', component: () => import('./views/List.vue') }]
}
]
<script setup lang="ts">
import DealDialog from '../components/DealDialog.vue'
import { getSuggestionList, getUserList } from '../api'
const appList = ref()
const isShowDialog = ref(false)
const userList: any = ref([])
// 状态
//表单每行数据
const listOptions = $computed(() => {
return {
remote: {
// httpRequest: getDictionaryList,
httpRequest: getSuggestionList,
params: {
status: '',
type: '',
sso_id: [],
created_time_start: '',
created_time_end: ''
},
beforeRequest(params: any) {
console.log(params)
if (params.sso_id.length) {
params.sso_id = params.sso_id[0].id
return params
}
}
},
filters: [
{ type: 'input', prop: 'name', label: '字典名称:', placeholder: '请输入字典名称' },
{ type: 'input', prop: 'key', label: '字典类型:', placeholder: '请输入字典类型' }
{ type: 'input', prop: 'sso_id_name', slots: 'user_name' },
{
type: 'input',
label: '投诉时间:',
slots: 'created_time_start',
prop: 'created_time_start'
},
{ slots: 'created_time_end', prop: 'created_time_end' }
],
columns: [
{ label: '序号', type: 'index', align: 'center' },
{ label: '问题描述', prop: 'name', align: 'center' },
{ label: '投诉人', prop: 'complaint_name', align: 'center' },
{ label: '问题描述', prop: 'title', align: 'center' },
{ label: '投诉人', prop: 'sso_id_name', align: 'center' },
{
label: '投诉时间',
prop: 'complaint_time',
prop: 'created_time',
align: 'center'
},
{ label: '处理人', prop: 'deal_operator', align: 'center' },
{ label: '处理时间', prop: 'deal_time', align: 'center' },
{ label: '处理状态', prop: 'status', align: 'center' },
{ label: '处理人', prop: 'operator_name', align: 'center' },
{ label: '处理时间', prop: 'updated_time', align: 'center' },
{ label: '处理状态', prop: 'status_name', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 300 }
],
data: [{ name: 111 }]
]
}
})
const handleDeal = () => {
isShowDialog.value = true
}
// 用户检索
const handleGetUserList = (query: string) => {
if (!query) return
getUserList({ q: query }).then((res: any) => {
userList.value = res.data
})
}
</script>
<template>
<AppCard title="投诉建议管理">
<AppList v-bind="listOptions" ref="appList" border stripe>
<template v-slot:user_name="{ params }">
用户姓名:
<el-select
v-model="params.sso_id"
multiple
filterable
remote
value-key="id"
:reserve-keyword="false"
:remote-method="handleGetUserList"
>
<el-option v-for="item in userList" :key="item.id" :label="item.username" :value="item" />
</el-select>
</template>
<template v-slot:created_time_start="{ params }">
<el-date-picker v-model="params.created_time_start" type="date" placeholder="开始时间"> </el-date-picker>
<p class="separator">&nbsp;&nbsp;&nbsp;&nbsp;-</p>
</template>
<template v-slot:created_time_end="{ params }">
<el-date-picker v-model="params.created_time_end" type="date" placeholder="结束时间"> </el-date-picker>
</template>
<template #table-operate>
<el-space>
<el-link type="primary" plain @click="handleDeal">查看</el-link>
......
import httpRequest from '@/utils/axios'
// 获取学生列表
export function getProList(params?: { type?: string; page?: number; page_size?: number }) {
return httpRequest.get('/api/psp/backend/video/index', { params })
}
<script lang="ts" setup>
import type { FormInstance } from 'element-plus'
const emit = defineEmits<Emits>()
const ruleFormRef = ref<FormInstance>()
// 封面类型
// 封面状态
const form = reactive({
desc: '',
detail: '',
answer: ''
})
defineProps({
isShowCheckDialog: {
type: Boolean,
required: true
}
})
interface Emits {
(e: 'update:isShowCheckDialog', isShowCheckDialog: boolean): void
}
// 取消
const handleCancel = () => {
emit('update:isShowCheckDialog', false)
}
// 确定
const handleConfirm = () => {
emit('update:isShowCheckDialog', false)
}
</script>
<template>
<el-dialog :model-value="isShowCheckDialog" draggable :before-close="handleCancel" width="50%" title="批改大作业">
<el-form :model="form" ref="ruleFormRef" label-width="100px">
<el-row>
<el-col :span="10"> <el-form-item label="课程名称:" prop="type"> 投诉建议人:lisi </el-form-item></el-col>
</el-row>
<el-row>
<el-col :span="10"> <el-form-item label="学生姓名:" prop="type"> 投诉建议人:lisi </el-form-item></el-col>
<el-col :span="10"> <el-form-item label="学号:" prop="type"> 提交时间:2022-07-19 </el-form-item></el-col>
</el-row>
<el-form-item label="得分:" prop="desc">
<el-input v-model="form.desc" autosize type="textarea" placeholder="Please input" disabled />
</el-form-item>
<el-divider border-style="desdashedc" />
<el-form-item label="大作业标题:" prop="desc">
<el-input v-model="form.desc" autosize type="textarea" placeholder="Please input" disabled />
</el-form-item>
<el-form-item label="大作业正文:" prop="detail">
<el-input v-model="form.detail" autosize type="textarea" placeholder="Please input" disabled />
</el-form-item>
<el-form-item label="相关附件:" prop="type">
<a href="1">11</a>
</el-form-item>
</el-form>
<template #footer>
<span>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
</span>
</template>
</el-dialog>
</template>
......@@ -3,7 +3,7 @@ import AppLayout from '@/components/layout/Index.vue'
export const routes: Array<RouteRecordRaw> = [
{
path: '/system/question',
path: '/teach/homework',
component: AppLayout,
children: [{ path: '', component: () => import('./views/List.vue') }]
}
......
<script setup lang="ts">
// import { getProList } from '../api'
// import { useMapStore } from '@/stores/map'
// const store = useMapStore()
import CheckHomework from '../components/CheckHomework.vue'
const appList = ref()
const isShowCheckDialog = ref(false)
const listOptions = $computed(() => {
return {
// remote: { httpRequest: getProList, params: { name: '' } },
filters: [
{ type: 'select', prop: 'course', label: '所属课程:', placeholder: '所属课程' },
{ type: 'input', prop: 'paper_name', label: '大作业名称:', placeholder: '大作业名称' }
],
columns: [
{ label: '序号', type: 'index', align: 'center' },
{ label: '所属课程', prop: 'course', align: 'center' },
{ label: '学生姓名', prop: 'name', align: 'center' },
{ label: '学号', prop: 'sno_number', align: 'center' },
{ label: '提交时间', prop: 'created_time', align: 'center' },
{ label: '批改人', prop: 'operator_name', align: 'center' },
{ label: '批改时间', prop: 'update_time', align: 'center' },
{ label: '得分', prop: 'score', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' }
],
data: [
{
name: 111,
exam_id: '6952903190949920768',
student_id: '6953256575158976512'
}
]
}
})
const handleCheckPaper = (row: any) => {
console.log(row)
isShowCheckDialog.value = true
console.log(isShowCheckDialog.value)
}
</script>
<template>
<AppCard title="批改试卷">
<AppList v-bind="listOptions" ref="appList" border stripe>
<template #table-operate="{ row }">
<el-space>
<el-link type="primary" plain @click="handleCheckPaper(row)">批改</el-link>
</el-space>
</template>
</AppList>
</AppCard>
<CheckHomework v-if="isShowCheckDialog === true" v-model:isShowCheckDialog="isShowCheckDialog" />
</template>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论