mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-09 02:46:48 +08:00
评估回退
This commit is contained in:
@@ -46,7 +46,7 @@
|
|||||||
<div class="question" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
|
<div class="question" :style="{ 'margin-top': index === 0 ? '57px' : '41px' }">
|
||||||
<div class="text">{{ value.assessmentScTitle }}</div>
|
<div class="text">{{ value.assessmentScTitle }}</div>
|
||||||
<div class="answer">
|
<div class="answer">
|
||||||
<div class="answerL" @click="updataName(value.id,index)">{{names[value.id]? names[value.id] : '完全没用'}}</div>
|
<div class="answerL">完全没用</div>
|
||||||
<div class="answerC">
|
<div class="answerC">
|
||||||
<div class="answerCitem"
|
<div class="answerCitem"
|
||||||
v-for="(item, key) in orderArr(value.assessmentMinScore,value.assessmentMaxScore)"
|
v-for="(item, key) in orderArr(value.assessmentMinScore,value.assessmentMaxScore)"
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<div>{{ item + 1 }}</div>
|
<div>{{ item + 1 }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="answerR" @click="updataNameEnd(value.id,index)">{{names['end'+ value.id]? names['end'+ value.id] : '非常有帮助/启发'}}</div>
|
<div class="answerR">非常有帮助/启发</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -239,7 +239,7 @@ import checkbox from "@/assets/image/checkbox.png";
|
|||||||
import checkbox2 from "@/assets/image/checkbox2.png";
|
import checkbox2 from "@/assets/image/checkbox2.png";
|
||||||
import {useRoute, useRouter} from "vue-router/dist/vue-router";
|
import {useRoute, useRouter} from "vue-router/dist/vue-router";
|
||||||
import {request, usePage, useRequest} from "@/api/request";
|
import {request, usePage, useRequest} from "@/api/request";
|
||||||
import {ASSESSMENT_QUERY, ASSESSMENT_SUBMIT,EDIT_ASSESSMENT_SCORE} from "@/api/api";
|
import {ASSESSMENT_QUERY, ASSESSMENT_SUBMIT} from "@/api/api";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {ref, watch,onMounted,nextTick } from "vue";
|
import {ref, watch,onMounted,nextTick } from "vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
@@ -299,7 +299,6 @@ function orderArr(a, b) {
|
|||||||
return arrs;
|
return arrs;
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log(data.value,'aaaa')
|
|
||||||
if(isSubmitTrue==true){
|
if(isSubmitTrue==true){
|
||||||
open();
|
open();
|
||||||
return
|
return
|
||||||
@@ -319,85 +318,8 @@ const centerDialogVisible = ref(false);
|
|||||||
const open = () => {
|
const open = () => {
|
||||||
centerDialogVisible.value = true;
|
centerDialogVisible.value = true;
|
||||||
};
|
};
|
||||||
const bg_name = ref(false)
|
|
||||||
const nameInput = ref('')
|
|
||||||
const names = ref([])
|
|
||||||
const editingIndex = ref(null);
|
|
||||||
const editingIndexEnd = ref(null);
|
|
||||||
const statusId = ref(null)
|
|
||||||
const indexId = ref(null)
|
|
||||||
const updataName = (id,index) => {
|
|
||||||
nameInput.value = names.value[id] || '完全没用';
|
|
||||||
editingIndex.value = id;
|
|
||||||
statusId.value = id
|
|
||||||
indexId.value = index
|
|
||||||
bg_name.value = true;
|
|
||||||
}
|
|
||||||
const updataNameEnd = (id,index) => {
|
|
||||||
nameInput.value = names.value['end'+id] || '非常有帮助/启发';
|
|
||||||
editingIndexEnd.value = 'end' + id;
|
|
||||||
statusId.value = id
|
|
||||||
indexId.value = index
|
|
||||||
bg_name.value = true;
|
|
||||||
}
|
|
||||||
const inputElement = ref()
|
|
||||||
const focusInput = () => {
|
|
||||||
inputElement.value.focus()
|
|
||||||
}
|
|
||||||
const onDialogOpen = async () => {
|
|
||||||
await nextTick();
|
|
||||||
focusInput();
|
|
||||||
};
|
|
||||||
const of_name = () => {
|
|
||||||
bg_name.value = false;
|
|
||||||
}
|
|
||||||
const updataList = ref([])
|
|
||||||
const nameUpdata = () => {
|
|
||||||
if(!nameInput.value){
|
|
||||||
ElMessage.error('请输入内容');
|
|
||||||
return
|
|
||||||
}
|
|
||||||
bg_name.value = false;
|
|
||||||
//开始名称
|
|
||||||
if (editingIndex.value !== null) {
|
|
||||||
names.value[editingIndex.value] = nameInput.value;
|
|
||||||
const foundItem = updataList.value.find(item => item.assessmentId === statusId.value);
|
|
||||||
if (foundItem) {
|
|
||||||
foundItem.minimumEvaluation = names.value[editingIndex.value];
|
|
||||||
} else {
|
|
||||||
updataList.value.push({
|
|
||||||
minimumEvaluation: names.value[editingIndex.value],
|
|
||||||
highestEvaluation:'非常有帮助/启发' ,
|
|
||||||
assessmentId: statusId.value,
|
|
||||||
orderNumber: indexId.value
|
|
||||||
});
|
|
||||||
}
|
|
||||||
editingIndex.value = null
|
|
||||||
}
|
|
||||||
//结束名称
|
|
||||||
if (editingIndexEnd.value !== null) {
|
|
||||||
names.value[editingIndexEnd.value] = nameInput.value;
|
|
||||||
const foundItem = updataList.value.find(item => item.assessmentId === statusId.value);
|
|
||||||
if (foundItem) {
|
|
||||||
foundItem.highestEvaluation = names.value[editingIndexEnd.value];
|
|
||||||
} else {
|
|
||||||
updataList.value.push({
|
|
||||||
minimumEvaluation: '完全没用',
|
|
||||||
highestEvaluation: names.value[editingIndexEnd.value],
|
|
||||||
assessmentId: statusId.value,
|
|
||||||
orderNumber: indexId.value
|
|
||||||
});
|
|
||||||
}
|
|
||||||
editingIndexEnd.value = null
|
|
||||||
}
|
|
||||||
console.log(updataList.value,'aa')
|
|
||||||
}
|
|
||||||
const isEmptyValue = ref(false);
|
const isEmptyValue = ref(false);
|
||||||
function emptyValuePromp() {
|
function emptyValuePromp() {
|
||||||
// request(EDIT_ASSESSMENT_SCORE, {assessmentQuestionDtoList:updataList.value}).tnen((res)=>{
|
|
||||||
// console.log(res,'res')
|
|
||||||
// return
|
|
||||||
// })
|
|
||||||
if (data.value.isSubmit) {
|
if (data.value.isSubmit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,10 @@ export default defineConfig(({ command, mode }) =>
|
|||||||
'/vote': {
|
'/vote': {
|
||||||
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
},'stu/project/redirectDetail':{
|
||||||
|
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
||||||
|
changeOrigin: true,
|
||||||
|
|
||||||
},
|
},
|
||||||
'/admin': {
|
'/admin': {
|
||||||
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
|
||||||
|
|||||||
Reference in New Issue
Block a user