|
@@ -41,7 +41,7 @@
|
|
|
<template v-for="typeItm in scoredQuestionType" :key="typeItm.value">
|
|
<template v-for="typeItm in scoredQuestionType" :key="typeItm.value">
|
|
|
<el-button class="button_refresh"
|
|
<el-button class="button_refresh"
|
|
|
@click="CheckedQuestionType(typeItm.value)">
|
|
@click="CheckedQuestionType(typeItm.value)">
|
|
|
- <component :is="typeItm.icon" ></component>
|
|
|
|
|
|
|
+ <component :is="typeItm.icon" class="img_icon" ></component>
|
|
|
{{ typeItm.label }}
|
|
{{ typeItm.label }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -49,7 +49,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <!-- 中间面板:编辑区域 -->
|
|
|
|
|
|
|
+ <!-- 中间面板:预览/操作区域 -->
|
|
|
<div class="center_panel">
|
|
<div class="center_panel">
|
|
|
<div class="page_item questionnaire_base">
|
|
<div class="page_item questionnaire_base">
|
|
|
<QuestionnaireBaseForm
|
|
<QuestionnaireBaseForm
|
|
@@ -89,7 +89,9 @@
|
|
|
<!-- 题目添加区域 -->
|
|
<!-- 题目添加区域 -->
|
|
|
<div class=" add_question_area">
|
|
<div class=" add_question_area">
|
|
|
<div v-if="!selectedQuestionType" class="add_question">
|
|
<div v-if="!selectedQuestionType" class="add_question">
|
|
|
- <div class="add_action">+ 点击左侧添加题型</div>
|
|
|
|
|
|
|
+ <div class="add_action">
|
|
|
|
|
+ <AddIcon :style="{'--icon-color':'#CCCCCC'}"></AddIcon>
|
|
|
|
|
+ 点击左侧添加题型</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else class="question_itm_edit">
|
|
<div v-else class="question_itm_edit">
|
|
|
<QuestionConfig
|
|
<QuestionConfig
|
|
@@ -159,7 +161,7 @@ import { useHandleMoveUpAndDown } from '@/baseComponents/useHandleMoveUpAndDown'
|
|
|
|
|
|
|
|
import QuestionTypeShow from '@/components/QuestionTypeShow.vue';
|
|
import QuestionTypeShow from '@/components/QuestionTypeShow.vue';
|
|
|
import moveUpDownIcon from '@/assets/icon/move_up_down.png'
|
|
import moveUpDownIcon from '@/assets/icon/move_up_down.png'
|
|
|
-
|
|
|
|
|
|
|
+import AddIcon from '@/assets/icon/AddIcon.vue'
|
|
|
|
|
|
|
|
import {addQuestionnaireApi,editQuestionnaireApi, getQuestionnaireDetailApi} from '@/api/surveyManagement'
|
|
import {addQuestionnaireApi,editQuestionnaireApi, getQuestionnaireDetailApi} from '@/api/surveyManagement'
|
|
|
|
|
|
|
@@ -181,11 +183,11 @@ interface QuestionItm {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
interface QuestionnaireInfo {
|
|
interface QuestionnaireInfo {
|
|
|
- assessmentTitle:String,
|
|
|
|
|
- assessmentIllustrate:String,
|
|
|
|
|
- createdAt?:String,
|
|
|
|
|
- teacherName?:String,
|
|
|
|
|
- useStatus?:String | Number,
|
|
|
|
|
|
|
+ assessmentTitle:String, //问卷标题
|
|
|
|
|
+ assessmentIllustrate:String, //问卷说明
|
|
|
|
|
+ createdAt?:String, //创建时间
|
|
|
|
|
+ teacherName?:String, //创建人
|
|
|
|
|
+ useStatus?:String | Number, //使用状态
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -404,6 +406,17 @@ const SaveQuestionnaire = async ()=>{
|
|
|
await formRef.validate(async(valid) => {
|
|
await formRef.validate(async(valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
if(addedQuestionList.value.length > 0){
|
|
if(addedQuestionList.value.length > 0){
|
|
|
|
|
+ // 限40字
|
|
|
|
|
+ if(questionnaireInfo.value?.assessmentTitle?.length > 40){
|
|
|
|
|
+ ElMessage.warning('问卷标题不得超过40字')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ // 限100字
|
|
|
|
|
+ if(questionnaireInfo.value?.assessmentIllustrate?.length > 100){
|
|
|
|
|
+ ElMessage.warning('问卷说明不得超过100字')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
let questionData = addedQuestionList.value.map((item,index)=>{
|
|
let questionData = addedQuestionList.value.map((item,index)=>{
|
|
|
return {
|
|
return {
|
|
|
...item,
|
|
...item,
|
|
@@ -577,7 +590,7 @@ onMounted(async ()=>{
|
|
|
if(route.query.id){
|
|
if(route.query.id){
|
|
|
await GetQuestionnaireDetail()
|
|
await GetQuestionnaireDetail()
|
|
|
}else{
|
|
}else{
|
|
|
- // 创建问卷 状态
|
|
|
|
|
|
|
+ // 创建问卷 状态 —— 不执行操作
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -735,9 +748,12 @@ onMounted(async ()=>{
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
height: 240px;
|
|
height: 240px;
|
|
|
.add_action {
|
|
.add_action {
|
|
|
- color: #c0c4cc;
|
|
|
|
|
|
|
+ color: #cccccc;
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap:4px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.question_itm_edit {
|
|
.question_itm_edit {
|