mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 03:46:48 +08:00
投票
This commit is contained in:
@@ -14,6 +14,7 @@ export const COMMON_TOKEN = 'https://upload-z2.qiniup.com'
|
||||
export const ROUTER_CHAPTER_LIST = '/stu/router/chapterList'
|
||||
export const ROUTER_LIST = '/stu/router/list post'
|
||||
export const ROUTER_PROCESS = '/stu/router/process'
|
||||
export const PROJECT_PROCESS = '/stu/project/process'
|
||||
export const ROUTER_UNCOMPLETE_LIST = '/stu/router/unCompleteTaskList post'
|
||||
export const TAS_ACTIVITY_DETAIL = '/activity'
|
||||
export const TASK_ACTIVITY_SIGN = '/activitySubmit/updateActivitySignInStatus post'
|
||||
|
||||
@@ -236,13 +236,13 @@ const state = reactive({
|
||||
const {textarea1} = toRefs(state);
|
||||
const router = useRouter()
|
||||
|
||||
const {query: {id: taskId, type}} = useRoute()
|
||||
const {query: {courseId:workId,type}} = useRoute()
|
||||
|
||||
const {data} = useRequest(TASK_WORK_DETAIL, {taskId, type})
|
||||
const {data: submitList} = useRequest(TASK_WORK_SUBMIT_LIST, {taskId, type})
|
||||
const {data} = useRequest(TASK_WORK_DETAIL, {workId})
|
||||
const {data: submitList} = useRequest(TASK_WORK_SUBMIT_LIST, {workId})
|
||||
|
||||
const handleClick = () => {
|
||||
request(TASK_WORK_COMMIT, {projectOrRouterLogo: type, workUploadContent: textarea1.value, taskId}).then(res => {
|
||||
request(TASK_WORK_COMMIT, {projectOrRouterLogo: type, workUploadContent: textarea1.value, workId}).then(res => {
|
||||
submitList.value.unshift(res.data)
|
||||
})
|
||||
textarea1.value=''
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="titleL">{{ i.chapterName }}</div>
|
||||
<div
|
||||
class="titleR"
|
||||
:style="{ display: i.status === 1 ? 'flex' : 'none' }"
|
||||
:style="{ display: 'flex' }"
|
||||
>
|
||||
<img src="../../assets/image/pathdetails/circle.png"/>
|
||||
<div class="titleRT">进行中</div>
|
||||
@@ -39,7 +39,12 @@
|
||||
<div>
|
||||
<div class="coursename">{{ value.name }}</div>
|
||||
<div class="coursetag">
|
||||
<!-- todo #路径详情 缺少标签-->
|
||||
<div class="tag1" style="margin-right: 11px; margin-top: 16px">必修</div>
|
||||
<div class="tag3" style="margin-right: 11px; margin-top: 16px">{{
|
||||
types.typeName[value.type] || ''
|
||||
}}
|
||||
</div>
|
||||
|
||||
<!-- <div-->
|
||||
<!-- v-for="(item, key) in value.flag"-->
|
||||
<!-- :key="key"-->
|
||||
@@ -96,19 +101,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div :style="{ display: value.status === 1 ? 'block' : 'none' }">
|
||||
<div
|
||||
class="goclass"
|
||||
:style="{ display: value.currentRatio === 0 ? 'none' : 'flex' }"
|
||||
>
|
||||
去上课
|
||||
</div>
|
||||
<img
|
||||
style="width: 76px; height: 76px; margin-right: 61px"
|
||||
:style="{ display: value.currentRatio === 0 ? 'flex' : 'none' }"
|
||||
src="../../assets/image/pathdetails/notstarted.png"
|
||||
/>
|
||||
<div class="goclass" @click="toFinish(value)">
|
||||
{{
|
||||
types.toName[value.type] || ''
|
||||
}}
|
||||
</div>
|
||||
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
||||
<!-- <div-->
|
||||
<!-- class="goclass"-->
|
||||
<!-- :style="{ display: value.currentRatio === 0 ? 'none' : 'flex' }">去上课-->
|
||||
<!-- </div>-->
|
||||
<!-- <img-->
|
||||
<!-- style="width: 76px; height: 76px; margin-right: 61px"-->
|
||||
<!-- :style="{ display: value.currentRatio === 0 ? 'flex' : 'none' }"-->
|
||||
<!-- src="../../assets/image/pathdetails/notstarted.png"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="tag1">必修</div>
|
||||
@@ -170,25 +178,18 @@
|
||||
</div>
|
||||
<!-- todo #路径详情 个人信息缺少img和介绍-->
|
||||
<div
|
||||
v-for="(el, index) in [data.userInfoBo]"
|
||||
:key="el.id"
|
||||
class="teacheritem"
|
||||
:style="{
|
||||
'border-bottom':
|
||||
index === teacher.length - 1
|
||||
? null
|
||||
: '1px solid rgba(56, 125, 247, 0.2)',
|
||||
}"
|
||||
:style="{'border-bottom': '1px solid rgba(56, 125, 247, 0.2)'}"
|
||||
>
|
||||
<img class="peopleimg" :src="el.peopleimg"/>
|
||||
<img class="peopleimg" :src="data.userInfoBo?.peopleimg"/>
|
||||
<div style="margin-left: 17px">
|
||||
<div class="teacherName">
|
||||
<div style="margin-right: 5px">{{ el.userName }}</div>
|
||||
<div v-for="(item, key) in el.medal" :key="key">
|
||||
<div style="margin-right: 5px">{{ data.userInfoBo?.userName }}</div>
|
||||
<div v-for="(item, key) in data.userInfoBo?.medal" :key="key">
|
||||
<img class="teacherMedal" :src="item"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="introduce">{{ el.introduce }}</div>
|
||||
<div class="introduce">{{ data.userInfoBo?.introduce }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -302,8 +303,8 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {reactive, toRefs} from "vue";
|
||||
<script setup>
|
||||
import {reactive, ref} from "vue";
|
||||
import word from '@/assets/image/file/word.png'
|
||||
import ppt from '@/assets/image/file/ppt.png'
|
||||
import pdf from '@/assets/image/file/pdf.png'
|
||||
@@ -314,14 +315,14 @@ import medal2 from '@/assets/image/medal/medal2.png'
|
||||
import medal3 from '@/assets/image/medal/medal3.png'
|
||||
import img from '@/assets/image/uploadimg.png'
|
||||
import {useRequest} from "@/api/request";
|
||||
import {ROUTER_PROCESS} from "@/api/api";
|
||||
import {PROJECT_PROCESS, ROUTER_PROCESS} from "@/api/api";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
|
||||
export default {
|
||||
name: "PathDetails",
|
||||
setup() {
|
||||
const {data} = useRequest(ROUTER_PROCESS, {})
|
||||
|
||||
const {query: {projectId}} = useRoute()
|
||||
const router = useRouter()
|
||||
const {data} = useRequest(PROJECT_PROCESS, {projectId})
|
||||
const state = reactive({
|
||||
activeName: "first",
|
||||
course: [
|
||||
{
|
||||
state: 1, //1:进行中 2:未开始
|
||||
@@ -503,19 +504,68 @@ export default {
|
||||
],
|
||||
},
|
||||
],
|
||||
totalprogress: 30, //总进度
|
||||
compulsoryprogress: 10, //必修进度
|
||||
});
|
||||
const activeName = ref('first')
|
||||
const totalprogress = ref(30)
|
||||
const compulsoryprogress = ref(10)
|
||||
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event);
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
handleClick,
|
||||
data,
|
||||
};
|
||||
const path = {1: 'path'}
|
||||
|
||||
const types = ref({
|
||||
typeName: {
|
||||
1: '在线',
|
||||
2: '面授',
|
||||
3: '案例',
|
||||
4: '作业',
|
||||
5: '考试',
|
||||
6: '直播',
|
||||
7: '外链',
|
||||
8: '讨论',
|
||||
9: '活动',
|
||||
10: '测评',
|
||||
11: '评估',
|
||||
12: '投票',
|
||||
13: '项目',
|
||||
},
|
||||
};
|
||||
toName: {
|
||||
1: '去上课',
|
||||
2: '去上课',
|
||||
3: '案例',
|
||||
4: '去完成',
|
||||
5: '去完成',
|
||||
6: '去签到',
|
||||
7: '外链',
|
||||
8: '去讨论',
|
||||
9: '去完成',
|
||||
10: '去完成',
|
||||
11: '去完成',
|
||||
12: '去投票',
|
||||
13: '去完成',
|
||||
},
|
||||
path: {
|
||||
1: '去上课',
|
||||
2: '/faceteach',
|
||||
3: '案例',
|
||||
4: '/homeworkpage',
|
||||
5: '去完成',
|
||||
6: '/livebroadcast',
|
||||
7: '外链',
|
||||
8: '/discusspage',
|
||||
9: '/moreactive',
|
||||
10: '/starttest',
|
||||
11: '/surveydetail',
|
||||
12: '/ballotpage',
|
||||
13: '去完成'
|
||||
}
|
||||
})
|
||||
|
||||
function toFinish(d) {
|
||||
router.push({path: types.value.path[d.type], query: {id: d.routerTaskId, type: 1, courseId: d.courseId}})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
|
||||
Reference in New Issue
Block a user