新增习题:待完善
This commit is contained in:
parent
e322103089
commit
f8d0e846cd
|
@ -135,7 +135,13 @@ const dynamicRoutes = [
|
||||||
path: 'newClassTaskAssign',
|
path: 'newClassTaskAssign',
|
||||||
component: () => import('@/views/classTask/newClassTaskAssign/index.vue'),
|
component: () => import('@/views/classTask/newClassTaskAssign/index.vue'),
|
||||||
name: 'newClassTaskAssign',
|
name: 'newClassTaskAssign',
|
||||||
meta: { title: '新作业设计', showBread: true }
|
meta: { title: '新作业管理', showBread: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'questionUpload',
|
||||||
|
component: () => import('@/views/classTask/newClassTaskAssign/questionUpload/index.vue'),
|
||||||
|
name: 'questionUpload',
|
||||||
|
meta: { title: '新作业管理', showBread: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'classTask',
|
path: 'classTask',
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<!-- <i v-if="!isCollapse" class="iconfont icon-xiangzuo" style="color: blue;"></i> -->
|
<!-- <i v-if="!isCollapse" class="iconfont icon-xiangzuo" style="color: blue;"></i> -->
|
||||||
<span>作业设计</span>
|
<span>作业设计</span>
|
||||||
<!-- <i v-if="isCollapse" class="iconfont icon-xiangyou" style="color: blue;"></i> -->
|
<!-- <i v-if="isCollapse" class="iconfont icon-xiangyou" style="color: blue;"></i> -->
|
||||||
<!-- <el-button type="primary" @click="goToNewClassTaskAssign">新版作业管理</el-button> -->
|
<el-button type="primary" @click="goToNewClassTaskAssign">新版作业管理</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="unit-top-left">
|
<div v-else class="unit-top-left">
|
||||||
<i class="iconfont icon-xiangzuo cursor-pointer" style="color: blue;" @click="goBack">返回上页</i>
|
<i class="iconfont icon-xiangzuo cursor-pointer" style="color: blue;" @click="goBack">返回上页</i>
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-button @click="handleQueryParamFromEntpCourseWork(1)"><el-icon><Search /></el-icon> 查找</el-button>
|
<el-button @click="handleQueryParamFromEntpCourseWork(1)"><el-icon><Search /></el-icon> 查找</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<el-button type="primary" @click="goToQuestUpload()">添加习题</el-button>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 习题表格 -->
|
<!-- 习题表格 -->
|
||||||
<div class="page-table" >
|
<div class="page-table" >
|
||||||
|
@ -92,6 +95,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
|
||||||
import { listEntpcoursework } from '@/api/education/entpCourseWork'
|
import { listEntpcoursework } from '@/api/education/entpCourseWork'
|
||||||
import { listEvaluationclue } from '@/api/classTask'
|
import { listEvaluationclue } from '@/api/classTask'
|
||||||
|
@ -105,6 +109,7 @@ import { sessionStore } from '@/utils/store'
|
||||||
import {throttle,debounce } from '@/utils/comm'
|
import {throttle,debounce } from '@/utils/comm'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
// 定义要发送的emit事件
|
// 定义要发送的emit事件
|
||||||
const emit = defineEmits(['addQuiz'])
|
const emit = defineEmits(['addQuiz'])
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
@ -190,6 +195,10 @@ onMounted(() => {
|
||||||
debounceQueryData(); // 查询习题列表
|
debounceQueryData(); // 查询习题列表
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const goToQuestUpload = () => {
|
||||||
|
router.push({ path: '/questionUpload', query: { courseObj: JSON.stringify(props.bookobj) } });
|
||||||
|
}
|
||||||
|
|
||||||
const initPageParams = () => {
|
const initPageParams = () => {
|
||||||
// 初始化作业习题列表
|
// 初始化作业习题列表
|
||||||
workResource.entpCourseWorkList = [];
|
workResource.entpCourseWorkList = [];
|
||||||
|
|
|
@ -0,0 +1,155 @@
|
||||||
|
<template>
|
||||||
|
<div class="pagqe-quiz-upload">
|
||||||
|
<div class="page-left">
|
||||||
|
<el-tabs v-model="activeAptTab" style="height: 100%;">
|
||||||
|
<el-tab-pane label="人工录入" name="人工录入" class="prepare-center-zglr">
|
||||||
|
<div>
|
||||||
|
<vue-cropper
|
||||||
|
class="import-manual-cropper"
|
||||||
|
ref="cropper"
|
||||||
|
:img="cropOption.img"
|
||||||
|
:outputSize="cropOption.outputSize"
|
||||||
|
:outputType="cropOption.outputType"
|
||||||
|
:info="cropOption.info"
|
||||||
|
:canScale="cropOption.canScale"
|
||||||
|
:autoCrop="cropOption.autoCrop"
|
||||||
|
:autoCropWidth="cropOption.autoCropWidth"
|
||||||
|
:autoCropHeight="cropOption.autoCropHeight"
|
||||||
|
:fixedNumber="cropOption.fixedNumber"
|
||||||
|
:fixedBox="cropOption.fixedBox"
|
||||||
|
:fixed="cropOption.fixed"
|
||||||
|
:canMove="cropOption.canMove"
|
||||||
|
:canMoveBox="cropOption.canMoveBox"
|
||||||
|
:original="cropOption.original"
|
||||||
|
:centerBox="cropOption.centerBox"
|
||||||
|
:infoTrue="cropOption.infoTrue"
|
||||||
|
:maxImgSize="cropOption.maxImgSize"
|
||||||
|
:full="cropOption.full"
|
||||||
|
:enlarge="cropOption.enlarge"
|
||||||
|
:mode="cropOption.mode"
|
||||||
|
>
|
||||||
|
</vue-cropper>
|
||||||
|
<div class="import-manual-crop-menu">
|
||||||
|
<el-upload
|
||||||
|
action=""
|
||||||
|
:auto-upload="false"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-change="handleImportImg"
|
||||||
|
>
|
||||||
|
<el-button type="primary" size="small" class="manual-crop-menu-browse">本地浏览</el-button>
|
||||||
|
</el-upload>
|
||||||
|
<el-button type="primary" size="small" class="manual-crop-menu-browse" @click="getClipboardImg">获取剪贴板图片</el-button>
|
||||||
|
<el-button type="primary" size="small" class="manual-crop-menu-whole" @click="identifyOverallImg">整题识别</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page-right">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
|
import { processList } from '@/hooks/useProcessList'
|
||||||
|
import { editListItem } from '@/hooks/useClassTask'
|
||||||
|
|
||||||
|
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
|
import { sessionStore } from '@/utils/store'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
import useUserStore from '@/store/modules/user'
|
||||||
|
const userStore = useUserStore().user
|
||||||
|
const route = useRoute();
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
const props = defineProps({
|
||||||
|
})
|
||||||
|
|
||||||
|
const propsQueryCourseObj = route.query.courseObj;//作业布置的内容对象
|
||||||
|
const courseObj = reactive({
|
||||||
|
// 课程相关参数: 教材id,单元id,章节id,课程名称
|
||||||
|
textbookId: '',
|
||||||
|
levelFirstId: '',
|
||||||
|
levelSecondId: '',
|
||||||
|
coursetitle:'',
|
||||||
|
node: null, // 选择的课程节点
|
||||||
|
//
|
||||||
|
})
|
||||||
|
const activeAptTab = ref("自主搜题");
|
||||||
|
const taskList = ref([]); // 作业列表
|
||||||
|
const tasklist_loading = ref(false); // 加载中
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
console.log('propsQueryCourseObj', JSON.parse(propsQueryCourseObj));
|
||||||
|
if(propsQueryCourseObj&&JSON.parse(propsQueryCourseObj)){
|
||||||
|
courseObj.textbookId = JSON.parse(propsQueryCourseObj).bookObj // 版本
|
||||||
|
courseObj.levelFirstId = JSON.parse(propsQueryCourseObj).levelFirstId // 单元
|
||||||
|
courseObj.levelSecondId = JSON.parse(propsQueryCourseObj).levelSecondId // 章节
|
||||||
|
courseObj.coursetitle = JSON.parse(propsQueryCourseObj).coursetitle // (单元/章节) 名称
|
||||||
|
courseObj.node = JSON.parse(propsQueryCourseObj).node; // 保存当前节点
|
||||||
|
}
|
||||||
|
initHomeWork();
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 entpcourseid 获取作业列表
|
||||||
|
*/
|
||||||
|
const initHomeWork = async()=> {
|
||||||
|
tasklist_loading.value = true;
|
||||||
|
// const { res, chapterId } = await useGetHomework(courseObj.node);
|
||||||
|
const { res, chapterId } = await useGetHomework(sessionStore.get('subject.curNode'));
|
||||||
|
console.log('entpcourseid', chapterId);
|
||||||
|
console.log('res', res);
|
||||||
|
// entpcourseid.value = chapterId;
|
||||||
|
taskList.value = res;
|
||||||
|
tasklist_loading.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.pagqe-quiz-upload {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
|
||||||
|
.page-left {
|
||||||
|
min-width: 500px;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 5px;
|
||||||
|
margin: 0 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: white;
|
||||||
|
:deep(.el-tabs__nav) {
|
||||||
|
.el-tabs__item{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.prepare-center-zglr{
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.page-right {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
Loading…
Reference in New Issue