mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 03:16:47 +08:00
feat:合并
This commit is contained in:
@@ -30,8 +30,8 @@ export const TASK_VOTE_LIST = '/queryVoteSubmitDetailListByTaskId'
|
||||
export const STU_OFFCOURSE_DETAIL = '/stu/offcourse/detail'
|
||||
export const WORK_QUERYWORKDETAILBYID = '/work/queryWorkDetailById'
|
||||
export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId'
|
||||
export const EXAMINATION_QUERYEXAMINATIONDETAILBYID = '/examination/queryExaminationDetailById'
|
||||
export const DISCUSS_COLLECTION = '/discussSubmit/clickDiscussCollectionCountOr post'
|
||||
export const EXAMINATION_QUERY = examinationId => `/examination/queryExaminationDetailById?examinationId=${examinationId} post`
|
||||
|
||||
export const DISCUSS_LIKE = '/discussSubmit/clickDiscussLikeCountOr post'
|
||||
export const DISCUSS_LIST = '/discussSubmit/list'
|
||||
export const DISCUSS_DETAIL = '/discussSubmit/detail'
|
||||
@@ -44,3 +44,6 @@ export const VOTE_DETAIL2 = voteId => `/vote/queryVoteAndVoteStemDetailByVoteId?
|
||||
export const COMMENT_ADD = '/comment post'
|
||||
export const COMMENT_PRAISE = '/comment/praise post'
|
||||
export const COMMENT_COLLECTION = '/comment/collection post'
|
||||
|
||||
export const ASSESSMENT_QUERY = assessmentId => `/assessment/queryAssessmentDetailById?assessmentId=${assessmentId} post`
|
||||
export const ASSESSMENT_SUBMIT = '/assessmentSubmit/submitAssessmentDetail'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="surveydetail">
|
||||
<!-- 面包屑导航 -->
|
||||
<div
|
||||
style="display: flex; align-items: center; justify-content: space-between"
|
||||
style="display: flex; align-items: center; justify-content: space-between"
|
||||
>
|
||||
<div class="crumb">
|
||||
<div>混合制项目</div>
|
||||
@@ -14,16 +14,16 @@
|
||||
<div class="prevnext">
|
||||
<div class="prev">
|
||||
<img
|
||||
style="width: 23px; height: 23px"
|
||||
src="../../assets/image/prev.png"
|
||||
style="width: 23px; height: 23px"
|
||||
src="../../assets/image/prev.png"
|
||||
/>
|
||||
<div style="margin-left: 7px">上一个</div>
|
||||
</div>
|
||||
<div class="prev" style="margin-left: 31px">
|
||||
<div style="margin-right: 7px">下一个</div>
|
||||
<img
|
||||
style="width: 23px; height: 23px"
|
||||
src="../../assets/image/next.png"
|
||||
style="width: 23px; height: 23px"
|
||||
src="../../assets/image/next.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,20 +37,20 @@
|
||||
<!-- 中间盒子 -->
|
||||
<div class="centercontent">
|
||||
<div class="righttitle">
|
||||
<img width="20px" height="20px" src="../../assets/image/yuan.png" />
|
||||
<img width="20px" height="20px" src="../../assets/image/yuan.png"/>
|
||||
|
||||
<div class="text">考试测试</div>
|
||||
<div class="text">{{ data.examinationName }}</div>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<!-- 考试测试的盒子 -->
|
||||
<div class="test clearfix">
|
||||
<div class="detail">
|
||||
<span style="margin-right: 43px">考试时间:30分钟</span>
|
||||
<span>及格线:60</span>
|
||||
<span style="margin-right: 43px">考试时间:{{ data.examinationDuration }}分钟</span>
|
||||
<span>及格线:{{data.passLine || 60}}</span>
|
||||
</div>
|
||||
<div class="testtime clearfix">
|
||||
<div class="timedetail">
|
||||
考试时间:2022-7-20 00:00 至 2022-8-29 23:59:59
|
||||
考试时间:{{ data.examinationStartTime }} 至 {{ data.examinationEndTime }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,7 +60,7 @@
|
||||
<button class="starttest" style="cursor: pointer">开始考试</button>
|
||||
<!-- 开始考试按钮 -->
|
||||
<div class="righttitleE">
|
||||
<img width="20px" height="20px" src="../../assets/image/yuan.png" />
|
||||
<img width="20px" height="20px" src="../../assets/image/yuan.png"/>
|
||||
|
||||
<div class="text">历史纪录</div>
|
||||
<div class="box"></div>
|
||||
@@ -88,8 +88,8 @@
|
||||
</div>
|
||||
<div class="fenge"></div>
|
||||
<div
|
||||
class="historytitle2 clearfix tongyi"
|
||||
style="border-radius: 0px 0px 8px 8px"
|
||||
class="historytitle2 clearfix tongyi"
|
||||
style="border-radius: 0px 0px 8px 8px"
|
||||
>
|
||||
<div class="content1">2022-7-14 00:00</div>
|
||||
<div class="content2">10分</div>
|
||||
@@ -101,13 +101,19 @@
|
||||
</div>
|
||||
<!-- 详细内容 -->
|
||||
</div>
|
||||
<!-- todo #考试接口 暂时没有-->
|
||||
<!-- todo #考试接口 暂时没有-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ExamPage",
|
||||
};
|
||||
<script setup>
|
||||
|
||||
import {useRoute} from "vue-router/dist/vue-router";
|
||||
import {usePage, useRequest} from "@/api/request";
|
||||
import {COMMENT_LIST, DISCUSS_DETAIL, EXAMINATION_QUERY} from "@/api/api";
|
||||
|
||||
const {query: {id, discussSubmitId}} = useRoute()
|
||||
|
||||
const {data} = useRequest(EXAMINATION_QUERY(159), {})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -118,18 +124,21 @@ export default {
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.prevnext {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
|
||||
.prev {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
@@ -138,6 +147,7 @@ export default {
|
||||
margin-top: 17px;
|
||||
margin-left: -11px;
|
||||
}
|
||||
|
||||
.bascinfo {
|
||||
min-height: 800px;
|
||||
width: 100%;
|
||||
@@ -147,24 +157,29 @@ export default {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.centercontent {
|
||||
position: relative;
|
||||
|
||||
.righttitle {
|
||||
display: flex;
|
||||
padding-top: 30px;
|
||||
position: relative;
|
||||
|
||||
.text {
|
||||
margin-left: 8px;
|
||||
font-size: 16px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 75px;
|
||||
height: 10px;
|
||||
@@ -174,6 +189,7 @@ export default {
|
||||
top: 44px;
|
||||
}
|
||||
}
|
||||
|
||||
.test {
|
||||
margin-top: 16px;
|
||||
margin-bottom: 26px;
|
||||
@@ -181,6 +197,7 @@ export default {
|
||||
height: 158px;
|
||||
background: #f2f5f7;
|
||||
border-radius: 8px;
|
||||
|
||||
.detail {
|
||||
margin-top: 29px;
|
||||
margin-left: 44px;
|
||||
@@ -189,6 +206,7 @@ export default {
|
||||
font-weight: 500;
|
||||
color: #56a3f9;
|
||||
}
|
||||
|
||||
.testtime {
|
||||
margin-top: 20px;
|
||||
margin-left: 10px;
|
||||
@@ -196,6 +214,7 @@ export default {
|
||||
height: 81px;
|
||||
background: #ffffff;
|
||||
border-radius: 0px 8px 0px 8px;
|
||||
|
||||
.timedetail {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
@@ -205,6 +224,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.starttest {
|
||||
position: absolute;
|
||||
width: 146px;
|
||||
@@ -219,17 +239,20 @@ export default {
|
||||
left: calc(50% - 73px);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.righttitleE {
|
||||
display: flex;
|
||||
margin-top: 110px;
|
||||
// padding-top: 30px;
|
||||
position: relative;
|
||||
|
||||
.text {
|
||||
margin-left: 8px;
|
||||
font-size: 16px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 75px;
|
||||
height: 10px;
|
||||
@@ -239,6 +262,7 @@ export default {
|
||||
top: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.history {
|
||||
position: relative;
|
||||
margin-top: 32px;
|
||||
@@ -246,38 +270,46 @@ export default {
|
||||
height: 200px;
|
||||
border: 1px solid #d7e5fd;
|
||||
border-radius: 8px;
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.fenge {
|
||||
width: 841px;
|
||||
border-top: 1px solid #d7e5fd;
|
||||
}
|
||||
|
||||
.tongyi {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.content1 {
|
||||
margin-top: 14px;
|
||||
margin-left: 77px;
|
||||
}
|
||||
|
||||
.content2 {
|
||||
position: absolute;
|
||||
margin-top: 14px;
|
||||
left: 328px;
|
||||
}
|
||||
|
||||
.content3 {
|
||||
position: absolute;
|
||||
margin-top: 14px;
|
||||
left: 512px;
|
||||
}
|
||||
|
||||
.content4 {
|
||||
position: absolute;
|
||||
margin-top: 14px;
|
||||
left: 700px;
|
||||
}
|
||||
|
||||
.contentbtn {
|
||||
position: absolute;
|
||||
margin-top: 14px;
|
||||
@@ -291,6 +323,7 @@ export default {
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.historycontent {
|
||||
width: 59px;
|
||||
height: 14px;
|
||||
@@ -300,12 +333,14 @@ export default {
|
||||
color: #333330;
|
||||
line-height: 38px;
|
||||
}
|
||||
|
||||
.historytitle {
|
||||
width: 842px;
|
||||
height: 50px;
|
||||
background: #f2f5f7;
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
}
|
||||
|
||||
.historytitle2 {
|
||||
width: 842px;
|
||||
height: 48px;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="surveydetail">
|
||||
<!-- 面包屑导航 -->
|
||||
<div
|
||||
style="display: flex; align-items: center; justify-content: space-between"
|
||||
style="display: flex; align-items: center; justify-content: space-between"
|
||||
>
|
||||
<div class="crumb">
|
||||
<div>混合制项目</div>
|
||||
@@ -14,16 +14,16 @@
|
||||
<div class="prevnext">
|
||||
<div class="prev">
|
||||
<img
|
||||
style="width: 23px; height: 23px"
|
||||
src="../../assets/image/prev.png"
|
||||
style="width: 23px; height: 23px"
|
||||
src="../../assets/image/prev.png"
|
||||
/>
|
||||
<div style="margin-left: 7px">上一个</div>
|
||||
</div>
|
||||
<div class="prev" style="margin-left: 31px">
|
||||
<div style="margin-right: 7px">下一个</div>
|
||||
<img
|
||||
style="width: 23px; height: 23px"
|
||||
src="../../assets/image/next.png"
|
||||
style="width: 23px; height: 23px"
|
||||
src="../../assets/image/next.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,20 +36,20 @@
|
||||
<div class="bascinfo">
|
||||
<div>
|
||||
<div
|
||||
class="question"
|
||||
v-for="(value, index) in question"
|
||||
:key="index"
|
||||
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
|
||||
class="question"
|
||||
v-for="(value, index) in data.scoringQuestionVoList"
|
||||
:key="index"
|
||||
:style="{ 'margin-top': index === 0 ? '57px' : '41px' }"
|
||||
>
|
||||
<div class="text">{{ value.text }}</div>
|
||||
<div class="text">{{ value.assessmentScTitle }}</div>
|
||||
<div class="answer">
|
||||
<div class="answerL">完全没用</div>
|
||||
<div class="answerC">
|
||||
<div
|
||||
class="answerCitem"
|
||||
v-for="(item, key) in select"
|
||||
:key="key"
|
||||
:style="{
|
||||
class="answerCitem"
|
||||
v-for="(item, key) in Array.from({length:value.assessmentMaxScore},(k,i)=>i)"
|
||||
:key="key"
|
||||
:style="{
|
||||
'margin-left': key === 0 ? '15px' : '10px',
|
||||
background:
|
||||
value.selectAnswer === item
|
||||
@@ -60,141 +60,84 @@
|
||||
? '#fff'
|
||||
: 'rgba(86, 163, 249, 1)',
|
||||
}"
|
||||
@click="score(value, item)"
|
||||
@click="()=>{value.selectAnswer=item}"
|
||||
>
|
||||
<div>{{ item }}</div>
|
||||
<div>{{ item + 1 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="answerR">非常有帮助/启发</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="question" style="margin-top: 41px">
|
||||
<div class="text">4.类似相应的课程,您认为适合哪些人观看?</div>
|
||||
<div class="question" style="margin-top: 41px" v-for="(item,i) in data.singleStemVoList" :key="i">
|
||||
<div class="text">{{ item.singleStemName }}</div>
|
||||
<div
|
||||
v-for="(value, index) in viewpeople"
|
||||
:key="index"
|
||||
style="display: flex; align-items: center"
|
||||
:style="{ 'margin-top': index === 0 ? '29px' : '22px' }"
|
||||
@click="selectPeople(value)"
|
||||
v-for="(value, index) in item.assessmentSingleChoiceVoList"
|
||||
:key="index"
|
||||
style="display: flex; align-items: center"
|
||||
:style="{ 'margin-top': index === 0 ? '29px' : '22px' ,cursor:'pointer'}"
|
||||
@click="()=>{
|
||||
item.assessmentSingleChoiceVoList.forEach(e=>{e.select = false});
|
||||
value.select=true;
|
||||
}"
|
||||
>
|
||||
<img
|
||||
style="width: 19px; height: 18px; cursor: pointer"
|
||||
:src="
|
||||
value.select
|
||||
? checkbox
|
||||
: checkbox2
|
||||
"
|
||||
/>
|
||||
<div class="people">{{ value.text }}</div>
|
||||
<img style="width: 19px; height: 18px; cursor: pointer" :src=" value.select? checkbox: checkbox2"/>
|
||||
<div class="people">{{ value.singleOptionName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="question" style="margin-top: 41px">
|
||||
<div class="text">5.您的其他意见</div>
|
||||
|
||||
<div class="question" style="margin-top: 41px" v-for="(item,i) in data.multipleStemVoList" :key="i">
|
||||
<div class="text">{{ item.multipleStemName }}</div>
|
||||
<div
|
||||
v-for="(value, index) in item.multipleChoiceVoList"
|
||||
:key="index"
|
||||
style="display: flex; align-items: center"
|
||||
:style="{ 'margin-top': index === 0 ? '29px' : '22px' ,cursor:'pointer'}"
|
||||
@click="()=>value.select=!value.select"
|
||||
>
|
||||
<img style="width: 19px; height: 18px; cursor: pointer" :src="value.select? checkbox: checkbox2"/>
|
||||
<div class="people">{{ value.multipleOptionName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="question" style="margin-top: 41px" v-for="(item,i) in data.essayQuestionVoList">
|
||||
<div class="text">{{ item.assessmentQaTitle }}</div>
|
||||
<div style="width: 713px; margin-top: 31px; position: relative">
|
||||
<el-input
|
||||
v-model="textarea1"
|
||||
:autosize="{ minRows: 5, maxRows: 5 }"
|
||||
resize="none"
|
||||
maxlength="200"
|
||||
type="textarea"
|
||||
@input="textareaInput"
|
||||
v-model="item.content"
|
||||
:autosize="{ minRows: 5, maxRows: 5 }"
|
||||
resize="none"
|
||||
maxlength="200"
|
||||
type="textarea"
|
||||
/>
|
||||
<div class="words">{{ textarealength }}/200</div>
|
||||
<div class="words">{{ item.content?.length || 0 }}/200</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: center">
|
||||
<div class="submit">提交</div>
|
||||
<div class="submit" @click="submit">提交</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 基本信息 -->
|
||||
<!-- todo 测评页面 没有接口-->
|
||||
<!-- todo 测评页面 没有接口-->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
<script setup>
|
||||
import checkbox from '@/assets/image/checkbox.png'
|
||||
import checkbox2 from '@/assets/image/checkbox2.png'
|
||||
export default {
|
||||
name: "SurveyDetail",
|
||||
setup() {
|
||||
const state = reactive({
|
||||
question: [
|
||||
{
|
||||
id: 1,
|
||||
text: "1.您觉得课程对您是否有用?",
|
||||
selectAnswer: 0,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
text: "2.您是否会推荐课程给其他同事?",
|
||||
selectAnswer: 0,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: "3.后续该讲师有其他课程是否会参与?",
|
||||
selectAnswer: 0,
|
||||
},
|
||||
],
|
||||
select: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
||||
viewpeople: [
|
||||
{
|
||||
id: 1,
|
||||
text: "基础员工",
|
||||
select: false,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
text: "中层管理",
|
||||
select: false,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: "专业人员",
|
||||
select: false,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: "高级管理",
|
||||
select: false,
|
||||
},
|
||||
],
|
||||
textarea1: "",
|
||||
textarealength: 0,
|
||||
});
|
||||
const score = (value, item) => {
|
||||
let arr = state.question;
|
||||
arr.map((i) => {
|
||||
if (i.id === value.id) {
|
||||
i.selectAnswer = item;
|
||||
}
|
||||
});
|
||||
state.question = arr;
|
||||
};
|
||||
const selectPeople = (value) => {
|
||||
let arr = state.viewpeople;
|
||||
arr.map((i) => {
|
||||
if (i.id === value.id) {
|
||||
i.select = !i.select;
|
||||
}
|
||||
});
|
||||
state.viewpeople = arr;
|
||||
};
|
||||
const textareaInput = (e) => {
|
||||
// console.log("eee", e);
|
||||
state.textarea1 = e;
|
||||
state.textarealength = e.length;
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
score,
|
||||
selectPeople,
|
||||
textareaInput,
|
||||
checkbox,
|
||||
checkbox2
|
||||
};
|
||||
},
|
||||
};
|
||||
import {useRoute} from "vue-router/dist/vue-router";
|
||||
import {request, usePage, useRequest} from "@/api/request";
|
||||
import {ASSESSMENT_QUERY, ASSESSMENT_SUBMIT, COMMENT_LIST, DISCUSS_DETAIL} from "@/api/api";
|
||||
|
||||
const {query: {id, discussSubmitId}} = useRoute()
|
||||
|
||||
|
||||
const {data} = useRequest(ASSESSMENT_QUERY(112), {})
|
||||
|
||||
function submit() {
|
||||
request(ASSESSMENT_SUBMIT, data).then(() => {
|
||||
console.log('提交成功')
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.surveydetail {
|
||||
@@ -204,18 +147,21 @@ export default {
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.prevnext {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
|
||||
.prev {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
@@ -224,6 +170,7 @@ export default {
|
||||
margin-top: 17px;
|
||||
margin-left: -11px;
|
||||
}
|
||||
|
||||
.bascinfo {
|
||||
width: 100%;
|
||||
min-height: 1032px;
|
||||
@@ -239,6 +186,7 @@ export default {
|
||||
font-weight: 500;
|
||||
color: #333330;
|
||||
}
|
||||
|
||||
.question .answer {
|
||||
margin-top: 30px;
|
||||
display: flex;
|
||||
@@ -247,6 +195,7 @@ export default {
|
||||
font-weight: 500;
|
||||
color: #56a3f9;
|
||||
}
|
||||
|
||||
.question .answer .answerC {
|
||||
width: 540px;
|
||||
height: 73px;
|
||||
@@ -272,12 +221,14 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.question .people {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #333330;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.question .words {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
@@ -286,10 +237,12 @@ export default {
|
||||
font-weight: 500;
|
||||
color: #333330;
|
||||
}
|
||||
|
||||
.question .el-textarea__inner {
|
||||
border-radius: 8px;
|
||||
background-color: rgba(245, 246, 247, 1);
|
||||
}
|
||||
|
||||
.submit {
|
||||
width: 126px;
|
||||
height: 46px;
|
||||
|
||||
134
vite.config.js
134
vite.config.js
@@ -2,73 +2,89 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 17:28:10
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-12-11 21:11:35
|
||||
* @LastEditTime: 2022-11-22 12:45:57
|
||||
* @FilePath: /fe-stu/vite.config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import { defineConfig } from 'vite'
|
||||
import {defineConfig} from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import legacy from '@vitejs/plugin-legacy'
|
||||
import { viteMockServe } from 'vite-plugin-mock'
|
||||
import {viteMockServe} from 'vite-plugin-mock'
|
||||
import topLevelAwait from "vite-plugin-top-level-await";
|
||||
|
||||
const path = require('path')
|
||||
|
||||
export default defineConfig(({ command }) =>
|
||||
({
|
||||
base: '/fe-student',
|
||||
plugins: [
|
||||
vue(),
|
||||
// legacy({
|
||||
// targets: ['chrome 64', 'defaults', 'not IE 11']
|
||||
// }),
|
||||
topLevelAwait({
|
||||
promiseExportName: '__tla',
|
||||
promiseImportName: i => `__tla_${i}`
|
||||
}),
|
||||
// viteMockServe({
|
||||
// mockPath: './src/mock/mocks',
|
||||
// })
|
||||
],
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: '@', replacement: path.resolve(__dirname, 'src') }
|
||||
]
|
||||
}, server: {
|
||||
proxy: {
|
||||
'/file/upload': {
|
||||
target: 'http://111.231.196.214:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/stu': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/queryVoteSubmitDetailById': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/work': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/discuss': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/discussSubmit': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/comment': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/vote': {
|
||||
target: 'http://111.231.196.214:12013/manageApi',
|
||||
changeOrigin: true,
|
||||
},
|
||||
export default defineConfig(({command}) =>
|
||||
({
|
||||
base: '/fe-student',
|
||||
plugins: [
|
||||
vue(),
|
||||
// legacy({
|
||||
// targets: ['chrome 64', 'defaults', 'not IE 11']
|
||||
// }),
|
||||
topLevelAwait({
|
||||
promiseExportName: '__tla',
|
||||
promiseImportName: i => `__tla_${i}`
|
||||
}),
|
||||
// viteMockServe({
|
||||
// mockPath: './src/mock/mocks',
|
||||
// })
|
||||
],
|
||||
resolve: {
|
||||
alias: [
|
||||
{find: '@', replacement: path.resolve(__dirname, 'src')}
|
||||
]
|
||||
}, server: {
|
||||
proxy: {
|
||||
'/file/upload': {
|
||||
target: 'http://111.231.196.214:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/stu': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/queryVoteSubmitDetailById': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/work': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/discuss': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/discussSubmit': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/comment': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/vote': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/admin': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},'/activity': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},'/liveBroadcast': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},'/examination': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},'/assessment': {
|
||||
target: 'http://localhost:30001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user