Compare commits

...

5 Commits

Author SHA1 Message Date
zouyf 95c93f19ee Merge pull request 'zouyf_dev' (#58) from zouyf_dev into main
Reviewed-on: #58
2024-11-22 09:54:36 +08:00
“zouyf” dcd1a3bb05 1 2024-11-22 09:54:05 +08:00
“zouyf” 5ac33bd1ca 1 2024-11-22 09:53:15 +08:00
“zouyf” bd50a7cdf0 Merge branch 'main' into zouyf_dev 2024-11-22 09:42:15 +08:00
“zouyf” 94e609164a 替换菁优网填空标识 2024-11-22 09:41:58 +08:00
2 changed files with 12 additions and 8 deletions

View File

@ -120,7 +120,7 @@ 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'
import { delEntpcoursework } from "@/api/education/entpCourseWork"; import { delEntpcoursework, updateEntpcoursework } from "@/api/education/entpCourseWork";
import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue' import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue'
import QuesItem from "@/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue"; import QuesItem from "@/views/classTask/newClassTaskAssign/questionUpload/quesItem/index.vue";
@ -284,7 +284,7 @@ const t = function(name, time) {
edustage: userStore.edustage, // this.userStore.edustage, edustage: userStore.edustage, // this.userStore.edustage,
edusubject: userStore.edusubject, // this.userStore.edusubject, edusubject: userStore.edusubject, // this.userStore.edusubject,
evalid: props.bookobj.levelSecondId, // this.activeParams.lession.id, evalid: props.bookobj.levelSecondId, // this.activeParams.lession.id,
status: "1",
orderby: 'concat(worktype,timestamp) DESC', orderby: 'concat(worktype,timestamp) DESC',
} }
@ -424,7 +424,8 @@ const onSubmitExamSingleCallback=(callback) =>{
/** 删除题目按钮操作 */ /** 删除题目按钮操作 */
const handleDelete = async(item, index) => { const handleDelete = async(item, index) => {
await useHandleData(delEntpcoursework, item.id, `确认删除编号为【${index+1}】的题目?` ); //await useHandleData(delEntpcoursework, item.id, `${index+1}` );
await useHandleData(updateEntpcoursework, {id:item.id, status:'0'}, `确认删除编号为【${index+1}】的题目?` );
debounceQueryData(); debounceQueryData();
} }

View File

@ -145,8 +145,7 @@
</el-form-item> </el-form-item>
<el-form-item :prop="checkAnswer"> <el-form-item :prop="checkAnswer">
<el-checkbox-group v-model="questForm.checkAnswer" style="display:flex; width: 100%"> <el-checkbox-group v-model="questForm.checkAnswer" style="display:flex; width: 100%">
<el-button @click="addItem" type="primary" style="margin-left: auto;" <el-button @click="addItem" type="primary" style="margin-left: auto;">+</el-button>
:disabled="questForm.list.length>=7">+</el-button>
<el-button :disabled="questForm.list.length==1" @click="deleteItem(item,index)" type="primary" <el-button :disabled="questForm.list.length==1" @click="deleteItem(item,index)" type="primary"
style="margin-left: 10px;">-</el-button> style="margin-left: 10px;">-</el-button>
</el-checkbox-group> </el-checkbox-group>
@ -491,7 +490,7 @@ const questForm = reactive({
method: '', method: '',
submitIndex: 0, // ([]0, []) submitIndex: 0, // ([]0, [])
submitType: 0, // submitType: 0, //
status: 1, // status: '1', //
list:[ list:[
{ {
text:"" text:""
@ -952,6 +951,7 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
workAnswerArr.forEach(it => selList.push(it)); workAnswerArr.forEach(it => selList.push(it));
} }
else if( item.worktype == '填空题' || item.worktype == '判断题'){ else if( item.worktype == '填空题' || item.worktype == '判断题'){
item.title = item.title.replace(/<!--BA--><div class="quizPutTag" contenteditable="true">(?:&nbsp;)?<\/div><!--EA-->/g, '_____');
// //
workAnswerArr.forEach((it,id)=>{ workAnswerArr.forEach((it,id)=>{
const s = { const s = {
@ -1000,6 +1000,7 @@ const updateForm= async(item, submitIndex=0, submitType=1) =>{
const pointArr = item.evalnodeid.split(','); const pointArr = item.evalnodeid.split(',');
if (curKnowledgePointList.value.length > 0 && pointArr.length > 0) { if (curKnowledgePointList.value.length > 0 && pointArr.length > 0) {
pointArr.forEach(element => { pointArr.forEach(element => {
element = element.trim();
let point = []; let point = [];
if (getCurKnowledgePointToForm(point, element, curKnowledgePointList.value)) { if (getCurKnowledgePointToForm(point, element, curKnowledgePointList.value)) {
point = point.reverse(); point = point.reverse();
@ -1337,8 +1338,10 @@ const submitForm=(formName) =>{
const workType = questForm.worktype.replace('(主观题)', ''); const workType = questForm.worktype.replace('(主观题)', '');
// ()(title_like) // ()(title_like)
const title = questForm.title.replace(/'/g, "\\'"); const title = questForm.title
console.log(questForm,'???????????????????????') .replace(/'/g, "\\'")
.replace(/_{3,}/g, "<!--BA--><div class=\"quizPutTag\" contenteditable=\"true\"></div><!--EA-->");
console.log(questForm,'???????????????????????');
let param = { let param = {
id: questForm.id, // id id: questForm.id, // id
thirdid: 0, // id SID thirdid: 0, // id SID