This commit is contained in:
lyc 2024-11-20 15:25:25 +08:00
commit 0ccdbfe37a
8 changed files with 212 additions and 15 deletions

View File

@ -3,6 +3,7 @@ import path from 'path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import vue from '@vitejs/plugin-vue'
import WindiCSS from "vite-plugin-windicss"
import vitePpt from './src/renderer/src/plugins/vite-ppt'
/*import electron from 'vite-plugin-electron'
plugins: [electron({
main: {
@ -55,7 +56,7 @@ export default defineConfig({
}
},
},
plugins: [vue(), WindiCSS()],
plugins: [vue(), WindiCSS(),vitePpt()],
assetsInclude:('**/*.woff', '**/*.woff2', '**/*.ttf'),
css: {
preprocessorOptions: {

View File

@ -0,0 +1,20 @@
/**
* @file vitePpt.js
* ppt-list 样式配置
*/
export default function vitePpt () {
return {
name: 'vite-ppt',
enforce: 'pre',
transform(code, id) {
if (id.endsWith('.scss')) {
// 使用 @use 代替 @import
code = code.replace(/@import\s+["']([^"']+)["'];/g, (match, importPath) => {
return `@use "${importPath}" as *;`
})
}
return code
}
}
}

View File

@ -132,7 +132,13 @@ const dynamicRoutes = [
path: 'newClassTaskAssign',
component: () => import('@/views/classTask/newClassTaskAssign/index.vue'),
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',

View File

@ -16,7 +16,7 @@
<!-- <i v-if="!isCollapse" class="iconfont icon-xiangzuo" style="color: blue;"></i> -->
<span>作业设计</span>
<!-- <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 v-else class="unit-top-left">
<i class="iconfont icon-xiangzuo cursor-pointer" style="color: blue;" @click="goBack">返回上页</i>

View File

@ -39,6 +39,9 @@
<el-col :span="5">
<el-button @click="handleQueryParamFromEntpCourseWork(1)"><el-icon><Search /></el-icon> </el-button>
</el-col>
<el-col :span="5">
<el-button type="primary" @click="goToQuestUpload()">添加习题</el-button>
</el-col>
</el-row>
<!-- 习题表格 -->
<div class="page-table" >
@ -92,6 +95,7 @@
</template>
<script setup>
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { listEntpcoursework } from '@/api/education/entpCourseWork'
import { listEvaluationclue } from '@/api/classTask'
@ -105,6 +109,7 @@ import { sessionStore } from '@/utils/store'
import {throttle,debounce } from '@/utils/comm'
import useUserStore from '@/store/modules/user'
const router = useRouter()
// emit
const emit = defineEmits(['addQuiz'])
const { proxy } = getCurrentInstance()
@ -190,6 +195,10 @@ onMounted(() => {
debounceQueryData(); //
})
const goToQuestUpload = () => {
router.push({ path: '/questionUpload', query: { courseObj: JSON.stringify(props.bookobj) } });
}
const initPageParams = () => {
//
workResource.entpCourseWorkList = [];

View File

@ -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>

View File

@ -7,7 +7,10 @@
<div class="item-text">
<div class="title-header">
<div class="item-title" :title="item.title">{{ item.title }}</div>
<div style="display: flex;justify-content: space-between;align-items: center;width:100%">
<CustomButton :item="{ type: item.type, text: item.text, plain: true }" />
<el-text size="small" type="info">{{ item.time }}</el-text>
</div>
</div>
<div class="item-description" :title="item.description">{{ item.description }}</div>
</div>
@ -25,16 +28,16 @@
const emits = defineEmits(['checked']);
const items = ref([
{ id:1,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:2,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'primary',text:'课堂练习' },
{ id:3,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:4,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'danger',text:'常规作业' },
{ id:5,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:6,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
{ id:1,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
{ id:2,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'primary',text:'课堂练习',time:'123' },
{ id:3,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
{ id:4,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'danger',text:'常规作业',time:'123' },
{ id:5,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
{ id:6,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
]);
// checkboxid
@ -125,6 +128,7 @@ onMounted(() => {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column;
}
.item-title {

View File

@ -8,12 +8,14 @@
<el-button type="success" @click="openPPTist">打开PPTist</el-button>
<!-- <el-button type="info" @click="onchange('/model/examination')">考试分析</el-button> -->
</div>
<ChooseTextbook @change-book="getData" @node-click="getData" />
</div>
</template>
<script setup>
import { useRouter } from 'vue-router'
import { createWindow } from '@/utils/tool' //
import ChooseTextbook from '@/components/choose-textbook/index.vue'
const router = useRouter()