Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into yws_dev
This commit is contained in:
commit
08f0b63741
|
@ -8,7 +8,7 @@
|
|||
http-equiv="Content-Security-Policy"
|
||||
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:"
|
||||
/> -->
|
||||
<meta http-equiv="Content-Security-Policy" content="connect-src *; default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *;img-src * 'self' data: blob:" />
|
||||
<meta http-equiv="Content-Security-Policy" content="connect-src *; default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src * blob:;img-src * 'self' data: blob:" />
|
||||
|
||||
</head>
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 新增图片存eos
|
||||
export function saveUploadFile(data) {
|
||||
return request({
|
||||
url: '/education/uploadfile/saveUploadFile',
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增批量图片存eos
|
||||
export function saveUploadFiles(data) {
|
||||
return request({
|
||||
url: '/education/uploadfile/saveUploadFiles',
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改basecomment
|
||||
export function updateUploadFile(data) {
|
||||
return request({
|
||||
url: '/education/uploadfile',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除basecomment
|
||||
export function delUploadFile(id) {
|
||||
return request({
|
||||
url: '/education/uploadfile/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
|
@ -46,7 +46,8 @@ import "tinymce/plugins/anchor"; //锚点
|
|||
|
||||
import { ref, reactive, defineProps, defineEmits, nextTick, onMounted, computed, watch } from 'vue'
|
||||
import { getStaticUrl } from '@/utils/tool'
|
||||
//import { listUploadfile, getUploadFile, delUploadFile, addUploadFile, saveUploadFile } from "@/api/comm/uploadfile";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import { saveUploadFile } from "@/api/file/img";
|
||||
|
||||
const emits = defineEmits(["update:modelValue", "setHtml"]);
|
||||
//这里我选择将数据定义在props里面,方便在不同的页面也可以配置出不同的编辑器,当然也可以直接在组件中直接定义
|
||||
|
@ -107,6 +108,8 @@ const props = defineProps({
|
|||
default: () => ({ userId: 0, fileAlias: '单题上传' }),
|
||||
},
|
||||
});
|
||||
|
||||
const userStore = useUserStore().user;
|
||||
|
||||
const pasteImgName = ref('');
|
||||
const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传的图片服务器地址
|
||||
|
@ -212,29 +215,31 @@ const init = reactive({
|
|||
|
||||
// 插入/编辑图片(普通) - 因此处上传可传图片和文件故仅参考, 实际以[images_upload_handler]这个为准
|
||||
file_picker_callback: function(callback, value, meta) {
|
||||
return;
|
||||
|
||||
//文件分类
|
||||
let filetype='.pdf, .txt, .zip, .rar, .7z, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .mp3, .mp4';
|
||||
let upURL = '/common/upload';
|
||||
//为不同插件指定文件类型及后端地址
|
||||
switch(meta.filetype){
|
||||
case 'image':
|
||||
filetype='.jpg, .jpeg, .png, .gif';
|
||||
//upURL='upimg.php';
|
||||
break;
|
||||
case 'media':
|
||||
filetype='.mp3, .mp4';
|
||||
//upURL='upfile.php';
|
||||
break;
|
||||
case 'file':
|
||||
default:
|
||||
}
|
||||
// let filetype='.pdf, .txt, .zip, .rar, .7z, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .mp3, .mp4';
|
||||
// let upURL = '/common/upload';
|
||||
// //为不同插件指定文件类型及后端地址
|
||||
// switch(meta.filetype){
|
||||
// case 'image':
|
||||
// filetype='.jpg, .jpeg, .png, .gif';
|
||||
// //upURL='upimg.php';
|
||||
// break;
|
||||
// case 'media':
|
||||
// filetype='.mp3, .mp4';
|
||||
// //upURL='upfile.php';
|
||||
// break;
|
||||
// case 'file':
|
||||
// default:
|
||||
// }
|
||||
|
||||
// 模拟出一个input用于添加本地文件
|
||||
let input = document.createElement('input');
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('accept', filetype);
|
||||
// // 模拟出一个input用于添加本地文件
|
||||
// let input = document.createElement('input');
|
||||
// input.setAttribute('type', 'file');
|
||||
// input.setAttribute('accept', filetype);
|
||||
|
||||
// 暂时屏蔽
|
||||
// // 暂时屏蔽
|
||||
// input.onchange = function() {
|
||||
// const file = this.files[0];
|
||||
// const formData = new FormData();
|
||||
|
@ -250,7 +255,7 @@ const init = reactive({
|
|||
// });
|
||||
// };
|
||||
|
||||
input.click();
|
||||
// input.click();
|
||||
},
|
||||
|
||||
// 插入/编辑图片(上传)
|
||||
|
@ -278,22 +283,25 @@ const init = reactive({
|
|||
formData.append("entpcourseid", 0);
|
||||
formData.append("filetype", "image");
|
||||
formData.append("suffix", "image");
|
||||
formData.append("status", '0');
|
||||
if(props.upFileParams?.hasOwnProperty('deptId')){
|
||||
formData.append("entpid", props.upFileParams.deptId);
|
||||
formData.append("status", '1');
|
||||
if(userStore.deptId && userStore.deptId != null){
|
||||
formData.append("entpid", userStore.deptId);
|
||||
}
|
||||
if(props.upFileParams?.hasOwnProperty('userId')){
|
||||
formData.append("userid", props.upFileParams.userId);
|
||||
if(userStore.userId && userStore.userId != null){
|
||||
formData.append("userid", userStore.userId);
|
||||
}
|
||||
if(props.upFileParams?.hasOwnProperty('edudegree')){
|
||||
let edudegree = props.upFileParams.edudegree.toString();
|
||||
if(userStore.edudegree && userStore.edudegree != null){
|
||||
let edudegree = userStore.edudegree.toString();
|
||||
if(edudegree != '' && edudegree.indexOf('年级') == -1){
|
||||
edudegree += '年级';
|
||||
}
|
||||
formData.append("edudegree", edudegree);
|
||||
}
|
||||
if(props.upFileParams?.hasOwnProperty('edusubject')){
|
||||
formData.append("edusubject", props.upFileParams.edusubject);
|
||||
if(userStore.edusubject && userStore.edusubject != null){
|
||||
formData.append("edusubject", userStore.edusubject);
|
||||
}
|
||||
if(userStore.edustage && userStore.edustage != null){
|
||||
formData.append("edustage", userStore.edustage);
|
||||
}
|
||||
if(props.upFileParams?.hasOwnProperty('lessionId')){
|
||||
formData.append("evalid", props.upFileParams.lessionId);
|
||||
|
@ -301,19 +309,22 @@ const init = reactive({
|
|||
if(props.upFileParams?.hasOwnProperty('fileAlias')){
|
||||
formData.append("filegroup", props.upFileParams.fileAlias);
|
||||
}
|
||||
|
||||
|
||||
loading.value = true;
|
||||
console.log('formData->', formData);
|
||||
|
||||
// 暂时屏蔽
|
||||
// saveUploadFile(formData)
|
||||
// .then((res) => {
|
||||
// loading.value = false;
|
||||
// return resolve(res.fileurl);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// loading.value = false;
|
||||
// return reject('err:' + err);
|
||||
// });
|
||||
saveUploadFile(formData)
|
||||
.then((res) => {
|
||||
console.log('res->', res);
|
||||
loading.value = false;
|
||||
return resolve(res.fileurl);
|
||||
})
|
||||
.catch((err) => {
|
||||
loading.value = false;
|
||||
return reject('err:' + err);
|
||||
});
|
||||
}
|
||||
),
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="whiteboart-container">
|
||||
<div class="whiteboart-container" :style="{ height: height + 'px' }">
|
||||
<div class="canvasBox" ref="box"></div>
|
||||
|
||||
<div class="footerLeft" @click.stop
|
||||
|
@ -15,7 +15,7 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
<div class="blockBox">
|
||||
<el-button @click="currentType = 'selection'"><el-image src="/src/assets/icons/pngjpg/mouse-pointer.png"
|
||||
<el-button @click="currentType = 'selection'"><el-image src="/src/assets/images/mouse-pointer.png"
|
||||
style="width: 14px; height: 14px; color: silver" /></el-button>
|
||||
</div>
|
||||
<template v-if="type == 'design'">
|
||||
|
@ -53,7 +53,8 @@
|
|||
</el-radio-group>
|
||||
</template>
|
||||
<div class="blockBox">
|
||||
<el-button @click="currentType = 'selection'" style="color:#848282" :icon="Camera" disabled></el-button>
|
||||
<!-- <el-button @click="currentType = 'selection'" style="color:#848282" :icon="Camera" disabled></el-button> -->
|
||||
<el-button @click="handleToolTypeChange('image')">图片</el-button>
|
||||
</div>
|
||||
<div class="blockBox" v-if="!readonly">
|
||||
<el-dropdown @command="handleToolTypeChange" placement="top">
|
||||
|
@ -71,7 +72,7 @@
|
|||
<template v-if="type != 'design'">
|
||||
<el-dropdown-item command="freedraw">画笔</el-dropdown-item>
|
||||
<el-dropdown-item command="text">文字</el-dropdown-item>
|
||||
<el-dropdown-item command="image">图片</el-dropdown-item>
|
||||
<!-- <el-dropdown-item command="image">图片</el-dropdown-item> -->
|
||||
</template>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
|
@ -122,7 +123,7 @@
|
|||
<!-- 边框样式 -->
|
||||
<div class="blockBox">
|
||||
<el-dropdown @command="updateStyle('lineDash', $event)" placement="top">
|
||||
<el-button><el-image src="/src/assets/icons/pngjpg/borderstyle.png"
|
||||
<el-button><el-image src="/src/assets/images/borderstyle.png"
|
||||
style="width: 14px; height: 14px"></el-image></el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
|
@ -134,8 +135,7 @@
|
|||
</el-dropdown>
|
||||
</div>
|
||||
<!--透明度-->
|
||||
<div class="blockBox" style="width: 120px"
|
||||
v-if="type == 'design' ? true : ['image'].includes(activeElement?.type) || hasSelectedElements">
|
||||
<div class="blockBox" style="width: 120px">
|
||||
<el-tooltip effect="light" content="透明度" placement="top">
|
||||
<el-input-number v-model="globalAlpha" :min="0" :max="1" :step="0.1"
|
||||
@change="updateStyle('globalAlpha', $event)"></el-input-number>
|
||||
|
@ -145,7 +145,7 @@
|
|||
<!-- 边框粗细 -->
|
||||
<div class="blockBox">
|
||||
<el-dropdown @command="updateStyle('lineWidth', $event)" placement="top">
|
||||
<el-button><el-image src="/src/assets/icons/pngjpg/borderwidth.png"
|
||||
<el-button><el-image src="/src/assets/images/borderwidth.png"
|
||||
style="width: 14px; height: 14px"></el-image></el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
|
@ -309,11 +309,11 @@ const props = defineProps({
|
|||
default: true
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
type: [Number,String],
|
||||
default: 700,
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
type: [Number,String],
|
||||
default: 1000,
|
||||
},
|
||||
data: {
|
||||
|
@ -685,6 +685,20 @@ const getCanvasBase64 = async () =>{
|
|||
return base64
|
||||
}
|
||||
|
||||
const getCanvasBlob = async () =>{
|
||||
return await app.exportImage({
|
||||
type: 'image/jpeg',
|
||||
renderBg: exportRenderBackground.value,
|
||||
paddingX: exportImagePaddingX.value,
|
||||
paddingY: exportImagePaddingY.value,
|
||||
onlySelected: exportOnlySelected.value,
|
||||
useBlob: true,
|
||||
backgroundColor: '#ffffff'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
watch(() => props.data, (newVal) => {
|
||||
if (newVal) {
|
||||
setCanvasData(newVal)
|
||||
|
@ -773,7 +787,8 @@ defineExpose({
|
|||
showFit,
|
||||
getCanvasJson,
|
||||
getCanvasBase64,
|
||||
setCanvasData
|
||||
setCanvasData,
|
||||
getCanvasBlob
|
||||
})
|
||||
</script>
|
||||
|
||||
|
@ -895,7 +910,7 @@ ol {
|
|||
font-size: 14px;
|
||||
color: #000;
|
||||
|
||||
:deep(.jsontree_tree) {
|
||||
/deep/ .jsontree_tree {
|
||||
font-family: 'Trebuchet MS', Arial, sans-serif !important;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
<el-button type="primary" @click="handleNewAllClass" :icon="Plus">设计新作业</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-resource">
|
||||
<div class="page-resource">
|
||||
<div class="page-left">
|
||||
<el-table
|
||||
ref="taskTable"
|
||||
v-loading="loading"
|
||||
v-loading="tasklist_loading"
|
||||
:data="taskList"
|
||||
:tree-props="{checkStrictly: true}"
|
||||
row-key="id"
|
||||
|
@ -48,11 +48,11 @@
|
|||
</el-table>
|
||||
</div>
|
||||
|
||||
<div v-if="currentRow.id == 0" style="width: 100%; height: 100%;">
|
||||
<div v-if="currentRow.id == 0" style="width: 100%; height: 100%;">
|
||||
<!-- 默认的习题类型卡片 -->
|
||||
<Right @itemClick="handleItemClick" />
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="(currentRow.worktype == '习题训练' || classWorkForm.worktype == '习题训练') && currentRow.id>0" class="page-center">
|
||||
<el-tabs v-model="activeAptTab" style="height: 100%;">
|
||||
<el-tab-pane label="自主搜题" name="自主搜题" class="prepare-center-zzst">
|
||||
|
@ -69,7 +69,7 @@
|
|||
<div v-if="(currentRow.worktype == '课堂展示' || classWorkForm.worktype == '课堂展示') && currentRow.id>0" class="page-center">
|
||||
<div v-loading="boardLoading" class="board-wrap" style="height: 100%; flex: 1; overflow: hidden;">
|
||||
<!-- <whiteboard v-if="isShowBoard" ref="boardref" :height="mainHeight - 150" :isShowSave="false" :data="whiteboardObj"/> -->
|
||||
<whiteboard ref="boardref" height=" 100%" :isShowSave="false" :data="classWorkForm.whiteboardObj"/>
|
||||
<whiteboard ref="boardref" height="100%" width="100%" :isShowSave="false" :data="classWorkForm.whiteboardObj"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="(currentRow.worktype == '常规作业' || classWorkForm.worktype == '常规作业')&& currentRow.id>0" class="page-center">
|
||||
|
@ -77,20 +77,20 @@
|
|||
<FileUpload v-model="classWorkForm.fileHomeworkList" :fileSize="800" :fileType="['mp3','mp4','doc','docx','xlsx','xls','pdf','ppt','pptx','jpg','jpeg','gif','png','txt']"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="currentRow.id>0 " class="page-right">
|
||||
<div class="prepare-top" >
|
||||
<el-button v-if="currentRow.id != 1 " type="success" @click="openSet(currentRow,'item')">推 送</el-button>
|
||||
<el-button type="primary" @click="handleClassWorkSave">保 存</el-button>
|
||||
</div>
|
||||
<div class="prepare-con" >
|
||||
<el-form
|
||||
ref="classWorkFormRef"
|
||||
:model="classWorkForm"
|
||||
label-width="90"
|
||||
<el-form
|
||||
ref="classWorkFormRef"
|
||||
:model="classWorkForm"
|
||||
label-width="90"
|
||||
style=" height: 100%; overflow: hidden;display: flex;flex-direction: column;"
|
||||
>
|
||||
<div >
|
||||
<div >
|
||||
<el-form-item label="作业名称">
|
||||
<el-input v-model="classWorkForm.uniquekey" type="text" placeholder="请输入作业名称"/>
|
||||
</el-form-item>
|
||||
|
@ -100,8 +100,8 @@
|
|||
<el-input v-if="classWorkForm.worktype == '课堂展示'" v-model="classWorkForm.question" type="textarea" placeholder="请输入作业说明" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div v-if="classWorkForm.worktype == '习题训练'" class="pageRight-list">
|
||||
|
||||
<div v-if="classWorkForm.worktype == '习题训练'" class="pageRight-list">
|
||||
<div :style="{height: '100%', 'overflow': 'auto', 'border':'1px dotted blue','border-radius':'5px', 'background-color': '#f7f7f7'}">
|
||||
<template v-for="(item,index) in classWorkForm.quizlist" :key="item.id">
|
||||
<div style="margin: 5px; background-color: white">
|
||||
|
@ -144,6 +144,10 @@ import whiteboard from '@/components/whiteboard/whiteboard.vue'
|
|||
import FileUpload from "@/components/FileUpload/index.vue";
|
||||
import Right from './Right/index.vue'
|
||||
|
||||
import {
|
||||
Delete
|
||||
} from '@element-plus/icons-vue'
|
||||
|
||||
import SetHomework from '@/components/set-homework/index.vue'
|
||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||
import { sessionStore } from '@/utils/store'
|
||||
|
@ -229,7 +233,7 @@ const selectable=(row, index)=>{
|
|||
* 获取 entpcourseid 获取作业列表
|
||||
*/
|
||||
const initHomeWork = async()=> {
|
||||
tasklist_loading.value = true;
|
||||
tasklist_loading.value = true;
|
||||
// const { res, chapterId } = await useGetHomework(courseObj.node);
|
||||
const { res, chapterId } = await useGetHomework(sessionStore.get('subject.curNode'));
|
||||
console.log('entpcourseid', chapterId);
|
||||
|
@ -241,7 +245,7 @@ const initHomeWork = async()=> {
|
|||
|
||||
const handleNewAllClass = () => {
|
||||
taskTable.value.setCurrentRow({});// 清除表格选中项背景色
|
||||
currentRow.value = {id:0}; // 作业设计
|
||||
currentRow.value = {id:0}; // 作业设计
|
||||
//--------
|
||||
classWorkForm.id = 0;
|
||||
classWorkForm.uniquekey = ""; // 作业唯一标识 作业名称
|
||||
|
@ -268,7 +272,7 @@ const handleDelete =() => {
|
|||
return delClasswork(ids.join(','));
|
||||
}).then(() => {
|
||||
taskTable.value.setCurrentRow({});// 清除表格选中项背景色
|
||||
currentRow.value = {id:0}; // 作业设计
|
||||
currentRow.value = {id:0}; // 作业设计
|
||||
taskList.value = [];
|
||||
// initHomeWork();
|
||||
setTimeout(() => {
|
||||
|
@ -359,17 +363,17 @@ let propsformobj = reactive({
|
|||
* 选中的布置作业行
|
||||
*/
|
||||
const handleCurrentChange = (val) => {
|
||||
|
||||
|
||||
console.log(val,'???????????')
|
||||
if(val && val.id >0 ) {
|
||||
currentRow.value = val;
|
||||
classWorkForm.worktype = val.worktype; //作业类型
|
||||
editListItem(val, courseObj).then((obj) => {
|
||||
if(obj){
|
||||
propsformobj = obj;
|
||||
// 新赋值的作业内容
|
||||
classWorkForm.id = obj.id;
|
||||
classWorkForm.uniquekey = cloneDeep(obj.uniquekey); // 作业唯一标识 作业名称
|
||||
classWorkForm.worktype = cloneDeep(obj.worktype); //作业类型
|
||||
classWorkForm.title = cloneDeep(obj.title); // 作业说明
|
||||
classWorkForm.quizlist = cloneDeep(obj.quizlist); // 作业习题列表内容
|
||||
classWorkForm.chooseWorkLists = cloneDeep(obj.chooseWorkLists); // 作业框架梳理list
|
||||
|
@ -383,7 +387,7 @@ const handleCurrentChange = (val) => {
|
|||
|
||||
/**
|
||||
* 添加作业
|
||||
* @param entpcourseworkid
|
||||
* @param entpcourseworkid
|
||||
*/
|
||||
const handleClassWorkQuizAdd = (entpcourseworkid) => {
|
||||
var exist = false;
|
||||
|
@ -687,7 +691,7 @@ const editWork = async (cform) =>{
|
|||
// // 返回上一页
|
||||
// router.back()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//----
|
||||
|
||||
|
@ -748,11 +752,11 @@ const editWork = async (cform) =>{
|
|||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.page-center{
|
||||
flex: 1;
|
||||
// width: 100%;
|
||||
//min-width: calc(100% - 675px);
|
||||
height: 100%;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
|
@ -764,8 +768,8 @@ const editWork = async (cform) =>{
|
|||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
.prepare-center-xbtk{
|
||||
height: 100%;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="page">
|
||||
<div class="page-myquest">
|
||||
<!-- 习题筛选1 -->
|
||||
<el-row style="width: 100%; height: 50px;">
|
||||
<el-col :span="7">
|
||||
|
@ -72,7 +72,9 @@
|
|||
<template #default="scope">
|
||||
<div>
|
||||
<el-button type="primary" @click="handleClassWorkQuizAdd('entpcourseworklist', scope.row.id)">添加</el-button>
|
||||
<div style="padding: 5px;"></div>
|
||||
<div style="padding: 2px;"></div>
|
||||
<el-button type="warning" @click="handleImportSingleDlg(scope.row)">纠错</el-button>
|
||||
<div style="padding: 2px;"></div>
|
||||
<el-button type="danger" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -91,9 +93,28 @@
|
|||
</div>
|
||||
<!-- 试题详细信息 -->
|
||||
<examDetailsDrawer ref="examDetailsDrawerRef"></examDetailsDrawer>
|
||||
<!-- 单题上传的对话框/ 纠错对话框 close-on-click-modal|close-on-press-escape 避免误点dialog区域外,导致白填入大量题目内容
|
||||
style="width: 70%; height: 80%; overflow: hidden"-->
|
||||
<el-dialog
|
||||
v-model="dlgImportSingle.open"
|
||||
class="my-custom-dialog"
|
||||
:title="dlgImportSingle.title"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
>
|
||||
<QuesItem
|
||||
ref="refquesItem"
|
||||
:bookobj="props.bookobj"
|
||||
@submit-exam-single-callback="onSubmitExamSingleCallback"
|
||||
@cancel-exam-single-callback="onCancelExamSingleCallback"
|
||||
>
|
||||
</QuesItem>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
|
||||
|
@ -102,6 +123,7 @@ import { listEvaluationclue } from '@/api/classTask'
|
|||
import { delEntpcoursework } from "@/api/education/entpCourseWork";
|
||||
|
||||
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
|
||||
import QuesItem from "@/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
import { processList } from '@/hooks/useProcessList'
|
||||
|
||||
|
@ -190,6 +212,11 @@ const workResource = reactive({
|
|||
entpCourseWorkTotal: 0, // 习题总数
|
||||
}); // 作业资源
|
||||
|
||||
const dlgImportSingle = reactive({
|
||||
title: '单题上传',
|
||||
open: false,
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
debounceQueryData(); // 查询习题列表
|
||||
})
|
||||
|
@ -356,6 +383,44 @@ const getPaginationList = ( page, limit ) => {
|
|||
handleQueryFromEntpCourseWork(0);
|
||||
}
|
||||
|
||||
/** 单题上传弹出框----纠错修改框 */
|
||||
const handleImportSingleDlg=(item, index) => {
|
||||
dlgImportSingle.open = true;
|
||||
// 获取单元科目数据
|
||||
// this.handleImportSingle();
|
||||
//console.log("单题上传")
|
||||
if (item == '{}') {
|
||||
// 新增
|
||||
//重置表单
|
||||
proxy.$nextTick(() => {
|
||||
proxy.$refs.refquesItem.resetForm();
|
||||
})
|
||||
dlgImportSingle.title = "单题上传";
|
||||
} else {
|
||||
//赋值表单
|
||||
proxy.$nextTick(() => {
|
||||
item.status = '1';
|
||||
proxy.$refs.refquesItem.updateForm(item, index, 1);
|
||||
})
|
||||
dlgImportSingle.title = "纠错上传";
|
||||
}
|
||||
}
|
||||
// 取消
|
||||
const onCancelExamSingleCallback=()=>{
|
||||
// 关闭弹窗
|
||||
dlgImportSingle.open = false;
|
||||
};
|
||||
/** 单题上传/纠错 完成后的回调 */
|
||||
const onSubmitExamSingleCallback=(callback) =>{
|
||||
if (callback.submitType !== 1) {
|
||||
console.log('999-999');
|
||||
return;
|
||||
}
|
||||
// 刷新列表
|
||||
debounceQueryData();
|
||||
// 关闭弹窗
|
||||
dlgImportSingle.open = false;
|
||||
};
|
||||
|
||||
/** 删除题目按钮操作 */
|
||||
const handleDelete = async(item, index) => {
|
||||
|
@ -412,8 +477,19 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
|
|||
})
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.my-custom-dialog{
|
||||
width: 60% !important;
|
||||
height: 77vh !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
.my-custom-dialog .el-dialog__body {
|
||||
height: 90% !important;
|
||||
overflow: auto !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
.page {
|
||||
.page-myquest {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -422,7 +498,28 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
|
|||
width: 100%;
|
||||
height: calc(100% - 100px);
|
||||
}
|
||||
|
||||
// :deep(.el-dialog .question-dialog){
|
||||
// height: 80vh !important;
|
||||
// width: 80% !important;
|
||||
// overflow: hidden !important;
|
||||
|
||||
// }
|
||||
// .el-dialog .question-dialog{
|
||||
// height: 80vh !important;
|
||||
// width: 80% !important;
|
||||
// overflow: hidden !important;
|
||||
|
||||
|
||||
// }
|
||||
}
|
||||
// .question-dialog{
|
||||
// width: 80% !important;
|
||||
|
||||
// }
|
||||
// :deep(.el-dialog) {
|
||||
// width: 80% !important;
|
||||
// }
|
||||
|
||||
</style>
|
||||
<style src="@/assets/styles/JYStyle.css"></style>
|
|
@ -67,18 +67,13 @@
|
|||
<div class="questForm-item-cover">
|
||||
<el-form-item :label="questForm.worktype == '复合题' ? '背景材料' : questForm.worktype == '主观题' ? '背景资料' : '题目'" prop="title">
|
||||
<Tinymce v-model="questForm.title" :upFileParams="{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div class="item-cropper-btn">
|
||||
<!-- <el-button v-show="isCropper" circle icon="Search" @click="cropperFormItem('title')"></el-button> -->
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('title')">识别</el-button>
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('title')"><el-icon><Search /></el-icon></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -88,10 +83,6 @@
|
|||
<el-form-item :label=Options(1,index) :prop="`list.${index}.text`"
|
||||
:rules="{required: true, message: '选项不能为空', trigger: 'blur'}">
|
||||
<Tinymce v-model="item.text" :minHeight="150" :upFileParams="{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}" />
|
||||
|
@ -107,8 +98,7 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div class="item-cropper-btn">
|
||||
<!-- <el-button v-show="isCropper" circle icon="Search" @click="cropperFormItem('workdesc')"></el-button> -->
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('workdesc')">识别</el-button>
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('workdesc')"><el-icon><Search /></el-icon></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -124,10 +114,6 @@
|
|||
v-model="item.text"
|
||||
:minHeight="150"
|
||||
:upFileParams = "{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}" />
|
||||
|
@ -143,8 +129,7 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div class="item-cropper-btn">
|
||||
<!-- <el-button v-show="isCropper" circle icon="Search" @click="cropperFormItem('workdesc')"></el-button> -->
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('workdesc')">识别</el-button>
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('workdesc')"><el-icon><Search /></el-icon></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -154,10 +139,6 @@
|
|||
<el-form-item :label=Options(3,index) :prop="`list.${index}.text`"
|
||||
:rules="{required: true, message: '填空选项不能为空', trigger: 'blur'}">
|
||||
<Tinymce v-model="item.text" :minHeight="150" :upFileParams="{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}" />
|
||||
|
@ -172,8 +153,7 @@
|
|||
</el-form-item>
|
||||
</div>
|
||||
<div class="item-cropper-btn">
|
||||
<!-- <el-button v-show="isCropper" circle icon="Search" @click="cropperFormItem('workdesc')"></el-button> -->
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('workdesc')">识别</el-button>
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('workdesc')"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -200,17 +180,12 @@
|
|||
<div v-if="questForm.worktype.indexOf('主观题') != -1" class="questForm-item-cover">
|
||||
<el-form-item label="答案">
|
||||
<Tinymce v-model="questForm.workanswer" :upFileParams="{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}" />
|
||||
</el-form-item>
|
||||
<div class="item-cropper-btn">
|
||||
<!-- <el-button v-show="isCropper" circle icon="Search" @click="cropperFormItem('workanswer')"></el-button> -->
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('workanswer')">识别</el-button>
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('workanswer')"><el-icon><Search /></el-icon></el-button>
|
||||
</div>
|
||||
|
||||
<!-- subjList -->
|
||||
|
@ -287,10 +262,6 @@
|
|||
<el-form-item :label="`${item.type}目${index+1}.`" :prop="`mulList.params.${index}.title`" :rules="{
|
||||
required: true, message: '题目不能为空', trigger: 'blur'}" :key='index'>
|
||||
<Tinymce v-model="item.title" :minHeight="150" :upFileParams="{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}"
|
||||
|
@ -302,10 +273,6 @@
|
|||
<el-form-item :label=Options(1,indexOp) :prop="`mulList.params.${index}.options.${indexOp}.text`"
|
||||
:rules="{ required: true, message: '单题不能为空', trigger: 'blur' }" :key='indexOp'>
|
||||
<Tinymce v-model="itemOp.text" :minHeight="150" :upFileParams="{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}"
|
||||
|
@ -326,10 +293,6 @@
|
|||
<el-form-item :label=Options(3,indexOp) :prop="`mulList.params.${index}.options.${indexOp}.text`"
|
||||
:rules="{required: true, message: '填空选项不能为空', trigger: 'blur'}">
|
||||
<Tinymce v-model="itemOp.text" :minHeight="150" :upFileParams="{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}"
|
||||
|
@ -350,10 +313,6 @@
|
|||
<el-form-item :label=Options(1,indexOp) :prop="`mulList.params.${index}.options.${indexOp}.text`"
|
||||
:rules="{required: true, message: '多选不能为空', trigger: 'blur'}">
|
||||
<Tinymce v-model="itemOp.text" :minHeight="150" :upFileParams="{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}"
|
||||
|
@ -384,10 +343,6 @@
|
|||
<div v-if="item.type == '主观题'">
|
||||
<el-form-item :label=Options(6,indexOp) :prop="`mulList.params.${index}.options.${indexOp}.text`">
|
||||
<Tinymce v-model="itemOp.text" :upFileParams="{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}" />
|
||||
|
@ -403,17 +358,12 @@
|
|||
<Tinymce
|
||||
v-model="questForm.method"
|
||||
:upFileParams = "{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}" />
|
||||
</el-form-item>
|
||||
<div class="item-cropper-btn">
|
||||
<!-- <el-button v-show="isCropper" circle icon="Search" @click="cropperFormItem('method')"></el-button> -->
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('method')">识别</el-button>
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('method')"><el-icon><Search /></el-icon></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -422,17 +372,12 @@
|
|||
<el-form-item label="答案解答" prop="analyse">
|
||||
<Tinymce v-model="questForm.analyse"
|
||||
:upFileParams = "{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}" />
|
||||
</el-form-item>
|
||||
<div class="item-cropper-btn">
|
||||
<!-- <el-button v-show="isCropper" circle icon="Search" @click="cropperFormItem('analyse')"></el-button> -->
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('analyse')">识别</el-button>
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('analyse')"><el-icon><Search /></el-icon></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -441,17 +386,12 @@
|
|||
<el-form-item label="答案点评" prop="discuss">
|
||||
<Tinymce v-model="questForm.discuss"
|
||||
:upFileParams = "{
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
}" />
|
||||
</el-form-item>
|
||||
<div class="item-cropper-btn">
|
||||
<!-- <el-button v-show="isCropper" circle icon="Search" @click="cropperFormItem('discuss')"></el-button> -->
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('discuss')">识别</el-button>
|
||||
<el-button v-show="isCropper" circle @click="cropperFormItem('discuss')"><el-icon><Search /></el-icon></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -465,6 +405,7 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { ElMessage, ElNotification } from 'element-plus'
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||
|
||||
import { getBindlist } from '@/api/education/knowledgePoint'
|
||||
|
@ -658,10 +599,6 @@ const loading = ref(false);
|
|||
onMounted(() => {
|
||||
lessionid.value = props.bookobj.levelSecondId? props.bookobj.levelSecondId : props.bookobj.levelFirstId; // 获取课程id
|
||||
upFileParams.value = {
|
||||
deptId: userStore.deptId,
|
||||
userId: userStore.userId,
|
||||
edudegree: userStore.edudegree,
|
||||
edusubject: userStore.edusubject,
|
||||
lessionId: lessionid,
|
||||
fileAlias: '单题上传',
|
||||
};
|
||||
|
@ -1733,6 +1670,7 @@ watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => {
|
|||
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
||||
defineExpose({
|
||||
updateForm,
|
||||
resetForm,
|
||||
cropperFormItemCallBack,
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<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-row>
|
||||
<!-- 习题表格 -->
|
||||
|
@ -102,6 +102,8 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Search } from '@element-plus/icons-vue'
|
||||
|
||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||
|
||||
import {listEntpcoursework, listEntpcourseworkNew, getEntpcoursework} from '@/api/education/entpCourseWork'
|
||||
|
|
|
@ -2,7 +2,13 @@
|
|||
<div>
|
||||
<div class="form-item-cover">
|
||||
<el-form-item label="答案点评" prop="discuss">
|
||||
<tinymce v-model="discuss"/>
|
||||
<tinymce
|
||||
v-model="discuss"
|
||||
:upFileParams="{
|
||||
lessionId: 123456,
|
||||
fileAlias: '单题上传',
|
||||
}"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue