From 8334817de9a6f75ceb580d831ec594b88fbcce9d Mon Sep 17 00:00:00 2001 From: zhangsir Date: Fri, 29 Mar 2024 14:48:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E4=BC=B0=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/survey/SurveyDetail.vue | 84 ++----------------------------- vite.config.js | 4 ++ 2 files changed, 7 insertions(+), 81 deletions(-) diff --git a/src/views/survey/SurveyDetail.vue b/src/views/survey/SurveyDetail.vue index 459bbd7..a008a46 100644 --- a/src/views/survey/SurveyDetail.vue +++ b/src/views/survey/SurveyDetail.vue @@ -46,7 +46,7 @@
{{ value.assessmentScTitle }}
-
{{names[value.id]? names[value.id] : '完全没用'}}
+
完全没用
{{ item + 1 }}
-
{{names['end'+ value.id]? names['end'+ value.id] : '非常有帮助/启发'}}
+
非常有帮助/启发
@@ -239,7 +239,7 @@ import checkbox from "@/assets/image/checkbox.png"; import checkbox2 from "@/assets/image/checkbox2.png"; import {useRoute, useRouter} from "vue-router/dist/vue-router"; 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 {ref, watch,onMounted,nextTick } from "vue"; import dayjs from "dayjs"; @@ -299,7 +299,6 @@ function orderArr(a, b) { return arrs; } onMounted(() => { -console.log(data.value,'aaaa') if(isSubmitTrue==true){ open(); return @@ -319,85 +318,8 @@ const centerDialogVisible = ref(false); const open = () => { 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); function emptyValuePromp() { - // request(EDIT_ASSESSMENT_SCORE, {assessmentQuestionDtoList:updataList.value}).tnen((res)=>{ - // console.log(res,'res') - // return - // }) if (data.value.isSubmit) { return; } diff --git a/vite.config.js b/vite.config.js index 8fb8c06..22d158f 100644 --- a/vite.config.js +++ b/vite.config.js @@ -76,6 +76,10 @@ export default defineConfig(({ command, mode }) => '/vote': { target: loadEnv(mode, process.cwd()).VITE_PROXY_URL, changeOrigin: true, + },'stu/project/redirectDetail':{ + target: loadEnv(mode, process.cwd()).VITE_PROXY_URL, + changeOrigin: true, + }, '/admin': { target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,