|
@@ -23,7 +23,7 @@
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
<div class="info_tip">
|
|
<div class="info_tip">
|
|
|
- <span class="process_tip">总进度:{{ (teacherList.filter(item=>item.status == 'done')?.length / teacherList.length) * 100 }}%</span>
|
|
|
|
|
|
|
+ <span class="process_tip">总进度:{{ questionnaireProgress }}</span>
|
|
|
<span class="time_tip">
|
|
<span class="time_tip">
|
|
|
<img :src="redTimeIcon" alt="">
|
|
<img :src="redTimeIcon" alt="">
|
|
|
剩余时间:{{ deadlineCountDown?.day + '天' + deadlineCountDown?.hours + '时' + deadlineCountDown?.minutes + '分' }}</span>
|
|
剩余时间:{{ deadlineCountDown?.day + '天' + deadlineCountDown?.hours + '时' + deadlineCountDown?.minutes + '分' }}</span>
|
|
@@ -46,16 +46,16 @@
|
|
|
<ul class="teacher_list">
|
|
<ul class="teacher_list">
|
|
|
<li v-for="(teacher,index) in teacherList" :key="teacher.id"
|
|
<li v-for="(teacher,index) in teacherList" :key="teacher.id"
|
|
|
:class="['teacher_card',{active:currentActiveTeacherIndex === index},
|
|
:class="['teacher_card',{active:currentActiveTeacherIndex === index},
|
|
|
- {disabled:IsSubjectQuestionnaireUnFinish(teacher.status)}]"
|
|
|
|
|
- @click="IsSubjectQuestionnaireUnFinish(teacher.status) ? '' : HandleSubjectTeacherChange(index,teacher)">
|
|
|
|
|
- <div class="teacher_tag" :style="{backgroundColor:subjectToColor(teacher.subject)?.color}">
|
|
|
|
|
- {{ teacher.subject }}
|
|
|
|
|
|
|
+ {disabled:IsSubjectQuestionnaireUnFinish(teacher.evaluationStatus)}]"
|
|
|
|
|
+ @click="IsSubjectQuestionnaireUnFinish(teacher.evaluationStatus) ? '' : HandleSubjectTeacherChange(index,teacher)">
|
|
|
|
|
+ <div class="teacher_tag" :style="{backgroundColor:subjectToColor(teacher.evaluationSubjectName)?.color}">
|
|
|
|
|
+ {{ teacher.evaluationSubjectName }}
|
|
|
</div>
|
|
</div>
|
|
|
<div class="info_text">
|
|
<div class="info_text">
|
|
|
- <div class="teacher_name">{{ teacher.name }}</div>
|
|
|
|
|
|
|
+ <div class="teacher_name">{{ teacher.teacherName }}</div>
|
|
|
<div class="status"
|
|
<div class="status"
|
|
|
- :style="{color:fillOutStatusToColor(teacher.status)?.color}"
|
|
|
|
|
- >{{ fillOutStatusToColor(teacher.status)?.label }}</div>
|
|
|
|
|
|
|
+ :style="{color:fillOutStatusToColor(teacher.evaluationStatus)?.color}"
|
|
|
|
|
+ >{{ fillOutStatusToColor(teacher.evaluationStatus)?.label }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</li>
|
|
</li>
|
|
|
</ul>
|
|
</ul>
|
|
@@ -168,7 +168,9 @@
|
|
|
disabled:defaultQuestionnaireMode=='split' && IsSplitQuestionnaireUnFinish(question.status)}]">
|
|
disabled:defaultQuestionnaireMode=='split' && IsSplitQuestionnaireUnFinish(question.status)}]">
|
|
|
{{ index + 1 }}.{{ question.questionTitleName }}
|
|
{{ index + 1 }}.{{ question.questionTitleName }}
|
|
|
</span>
|
|
</span>
|
|
|
- <img v-if="defaultQuestionnaireMode=='split' && IsSplitQuestionnaireFinish(question.status)" :src="finishIcon" alt="">
|
|
|
|
|
|
|
+ <!-- <img v-if="defaultQuestionnaireMode=='split' && IsSplitQuestionnaireFinish(question.status)" :src="finishIcon" alt=""> -->
|
|
|
|
|
+ <img v-if="IsSplitQuestionnaireFinish(question.studentAnswerStatus)" :src="finishIcon" alt="">
|
|
|
|
|
+ <!-- question.studentAnswerStatus 学生答题是否完成 0 否 1 是-->
|
|
|
</li>
|
|
</li>
|
|
|
</ul>
|
|
</ul>
|
|
|
</div>
|
|
</div>
|
|
@@ -191,17 +193,30 @@ import StarRationQuestionBatchFill from '@/components/starRationQuestionBatchFil
|
|
|
import QuestionAndAnswerBatchFill from '@/components/questionAndAnswerBatchFill/QuestionAndAnswerBatchFill.vue';
|
|
import QuestionAndAnswerBatchFill from '@/components/questionAndAnswerBatchFill/QuestionAndAnswerBatchFill.vue';
|
|
|
import BatchSelectQuestionBatchFill from '@/components/batchSelectQuestionBatchFill/BatchSelectQuestionBatchFill.vue';
|
|
import BatchSelectQuestionBatchFill from '@/components/batchSelectQuestionBatchFill/BatchSelectQuestionBatchFill.vue';
|
|
|
|
|
|
|
|
-
|
|
|
|
|
import { subjectToColor,fillOutStatusToColor,
|
|
import { subjectToColor,fillOutStatusToColor,
|
|
|
IsSubjectQuestionnaireUnFinish,IsSplitQuestionnaireFinish,IsSplitQuestionnaireUnFinish
|
|
IsSubjectQuestionnaireUnFinish,IsSplitQuestionnaireFinish,IsSplitQuestionnaireUnFinish
|
|
|
} from '@/components/commonDictConvert';
|
|
} from '@/components/commonDictConvert';
|
|
|
|
|
+import { useTimeCountDown } from '@/utils/dateTransform';
|
|
|
|
|
|
|
|
|
|
|
|
|
-import { useTimeCountDown } from '@/utils/dateTransform';
|
|
|
|
|
|
|
+import { getEvaluationQuestionDataApi } from '@/api/questionnaireCommit'
|
|
|
|
|
|
|
|
import redTimeIcon from '@/assets/icon/red_time_icon.svg'
|
|
import redTimeIcon from '@/assets/icon/red_time_icon.svg'
|
|
|
import finishIcon from '@/assets/studentQuestionnaire/select_icon.png'
|
|
import finishIcon from '@/assets/studentQuestionnaire/select_icon.png'
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+interface TeacherItm {
|
|
|
|
|
+ id: string|number
|
|
|
|
|
+ evaluationClassName: string //班级
|
|
|
|
|
+ evaluationStatus: number //评价状态 0-待评价 1-进行中 2-已评价
|
|
|
|
|
+ subjectType: number // 科目类型 0-班主任 1 科目(单科)
|
|
|
|
|
+ teacherName: string //教师名称
|
|
|
|
|
+ evaluationSubjectName:string //科目名称
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
|
|
@@ -217,7 +232,7 @@ const {
|
|
|
* 1. 左侧教师相关变量
|
|
* 1. 左侧教师相关变量
|
|
|
*/
|
|
*/
|
|
|
// 待评价教师列表
|
|
// 待评价教师列表
|
|
|
-const teacherList = ref([])
|
|
|
|
|
|
|
+const teacherList = ref<TeacherItm[]>([])
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -228,7 +243,15 @@ const teacherList = ref([])
|
|
|
const isCurrentQuestionnaireTaskFinish = ref(false) //true false
|
|
const isCurrentQuestionnaireTaskFinish = ref(false) //true false
|
|
|
|
|
|
|
|
// 问卷填写截止时间
|
|
// 问卷填写截止时间
|
|
|
-const deadlineTime = ref('2026-07-28 12:30:00')
|
|
|
|
|
|
|
+// const deadlineTime = ref('2026-07-28 12:30:00')
|
|
|
|
|
+const deadlineTime = computed(()=>{
|
|
|
|
|
+ return questionaireMsg.value.deadlineTime
|
|
|
|
|
+})
|
|
|
|
|
+// 每个问卷的进度
|
|
|
|
|
+const questionnaireProgress= computed(()=>{
|
|
|
|
|
+ return questionaireMsg.value.progress
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 模拟所有教师的问卷数据(目前只有两个)
|
|
// 模拟所有教师的问卷数据(目前只有两个)
|
|
|
const mockTeacherQuestionnaireData = ref([
|
|
const mockTeacherQuestionnaireData = ref([
|
|
@@ -597,7 +620,7 @@ const mockTeacherQuestionnaireData = ref([
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
// 模拟问卷响应数据
|
|
// 模拟问卷响应数据
|
|
|
-const mockResData = computed(()=>mockTeacherQuestionnaireData.value[currentActiveTeacherIndex.value % 2])
|
|
|
|
|
|
|
+const mockResData = computed(()=>mockTeacherQuestionnaireData.value[currentActiveTeacherIndex.value])
|
|
|
|
|
|
|
|
// 最终渲染的整体问卷数据
|
|
// 最终渲染的整体问卷数据
|
|
|
const questionaireMsg = computed(()=>{
|
|
const questionaireMsg = computed(()=>{
|
|
@@ -606,8 +629,7 @@ const questionaireMsg = computed(()=>{
|
|
|
return{
|
|
return{
|
|
|
content: opt.answerName,
|
|
content: opt.answerName,
|
|
|
score: opt.answerScore,
|
|
score: opt.answerScore,
|
|
|
- // id: opt.questionId
|
|
|
|
|
- id: opt.id
|
|
|
|
|
|
|
+ id: opt.answerId
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
let extraConfig = []
|
|
let extraConfig = []
|
|
@@ -619,18 +641,19 @@ const questionaireMsg = computed(()=>{
|
|
|
}
|
|
}
|
|
|
return {
|
|
return {
|
|
|
...item,
|
|
...item,
|
|
|
- // id:item.assessmentId,
|
|
|
|
|
- id:item.id,
|
|
|
|
|
|
|
+ id:item.questionId,
|
|
|
extraConfig, // 是否必答 required, 是否横排 isHorizontal
|
|
extraConfig, // 是否必答 required, 是否横排 isHorizontal
|
|
|
options,
|
|
options,
|
|
|
answer:undefined
|
|
answer:undefined
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
return{
|
|
return{
|
|
|
- assessmentTitle:mockResData.value.assessmentTitle, //问卷标题
|
|
|
|
|
|
|
+ assessmentTitle:mockResData.value.assessmentName, //问卷标题
|
|
|
assessmentIllustrate:mockResData.value.assessmentIllustrate, //问卷简介
|
|
assessmentIllustrate:mockResData.value.assessmentIllustrate, //问卷简介
|
|
|
// 问卷试题列表
|
|
// 问卷试题列表
|
|
|
- questionData:addedQuestionList
|
|
|
|
|
|
|
+ questionData:addedQuestionList,
|
|
|
|
|
+ progress:mockResData.value.progress,
|
|
|
|
|
+ deadlineTime:mockResData.value.endDateTime,
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -738,11 +761,19 @@ const HandleTimeDeadline = ()=>{
|
|
|
StartCounDown(deadlineTime.value,1000)
|
|
StartCounDown(deadlineTime.value,1000)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-onMounted(()=>{
|
|
|
|
|
- // 从父级获取 待评价教师的模拟数据列表
|
|
|
|
|
|
|
+onMounted( async ()=>{
|
|
|
|
|
+ // 从父级获取 待评价教师的数据列表
|
|
|
let localTeacherList = sessionStorage.getItem('teacherList')
|
|
let localTeacherList = sessionStorage.getItem('teacherList')
|
|
|
if(localTeacherList){
|
|
if(localTeacherList){
|
|
|
teacherList.value = JSON.parse(localTeacherList || '[]')
|
|
teacherList.value = JSON.parse(localTeacherList || '[]')
|
|
|
|
|
+ let teacherIds = teacherList.value.map(item=>{
|
|
|
|
|
+ return item.id
|
|
|
|
|
+ })
|
|
|
|
|
+ let res = await getEvaluationQuestionDataApi(teacherIds)
|
|
|
|
|
+ if(res?.code == 200){
|
|
|
|
|
+ mockTeacherQuestionnaireData.value = res?.data
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
HandleTimeDeadline()
|
|
HandleTimeDeadline()
|
|
|
})
|
|
})
|