Compare commits
10 Commits
1a0a2f9a67
...
0ccdbfe37a
Author | SHA1 | Date |
---|---|---|
lyc | 0ccdbfe37a | |
yangws | 5a09a7fecb | |
小杨 | 639c07bccd | |
小杨 | 1f6427ff21 | |
zhengdegang | d2c54e83c5 | |
zdg | 13f4aa25b8 | |
小杨 | 232c5690bf | |
白了个白 | bff83162d3 | |
白了个白 | d357a15f12 | |
白了个白 | f8d0e846cd |
|
@ -3,6 +3,7 @@ import path from 'path'
|
||||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import WindiCSS from "vite-plugin-windicss"
|
import WindiCSS from "vite-plugin-windicss"
|
||||||
|
import vitePpt from './src/renderer/src/plugins/vite-ppt'
|
||||||
/*import electron from 'vite-plugin-electron'
|
/*import electron from 'vite-plugin-electron'
|
||||||
plugins: [electron({
|
plugins: [electron({
|
||||||
main: {
|
main: {
|
||||||
|
@ -55,7 +56,7 @@ export default defineConfig({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [vue(), WindiCSS()],
|
plugins: [vue(), WindiCSS(),vitePpt()],
|
||||||
assetsInclude:('**/*.woff', '**/*.woff2', '**/*.ttf'),
|
assetsInclude:('**/*.woff', '**/*.woff2', '**/*.ttf'),
|
||||||
css: {
|
css: {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -132,7 +132,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>
|
|
@ -7,7 +7,10 @@
|
||||||
<div class="item-text">
|
<div class="item-text">
|
||||||
<div class="title-header">
|
<div class="title-header">
|
||||||
<div class="item-title" :title="item.title">{{ item.title }}</div>
|
<div class="item-title" :title="item.title">{{ item.title }}</div>
|
||||||
<CustomButton :item="{ type: item.type, text: item.text, plain: true }" />
|
<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>
|
||||||
<div class="item-description" :title="item.description">{{ item.description }}</div>
|
<div class="item-description" :title="item.description">{{ item.description }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,16 +28,16 @@
|
||||||
const emits = defineEmits(['checked']);
|
const emits = defineEmits(['checked']);
|
||||||
|
|
||||||
const items = ref([
|
const items = ref([
|
||||||
{ id:1,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:'课堂练习' },
|
{ id:2,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'primary',text:'课堂练习',time:'123' },
|
||||||
{ id:3,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
{ id:3,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
|
||||||
{ id:4,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'danger',text:'常规作业' },
|
{ id:4,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'danger',text:'常规作业',time:'123' },
|
||||||
{ id:5,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
{ id:5,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
|
||||||
{ id:6,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
{ id:6,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
|
||||||
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
|
||||||
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
|
||||||
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
|
||||||
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练' },
|
{ id:7,title: '沁园春-长沙 习题训练作业', description: '沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业沁园春-长沙 习题训练作业',checked:false,type:'default',text:'习题训练',time:'123' },
|
||||||
|
|
||||||
]);
|
]);
|
||||||
// 获取选中的checkbox的id
|
// 获取选中的checkbox的id
|
||||||
|
@ -125,6 +128,7 @@ onMounted(() => {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-title {
|
.item-title {
|
||||||
|
|
|
@ -8,12 +8,14 @@
|
||||||
<el-button type="success" @click="openPPTist">打开PPTist</el-button>
|
<el-button type="success" @click="openPPTist">打开PPTist</el-button>
|
||||||
<!-- <el-button type="info" @click="onchange('/model/examination')">考试分析</el-button> -->
|
<!-- <el-button type="info" @click="onchange('/model/examination')">考试分析</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<ChooseTextbook @change-book="getData" @node-click="getData" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { createWindow } from '@/utils/tool' // 相关工具
|
import { createWindow } from '@/utils/tool' // 相关工具
|
||||||
|
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue