feat:合并

This commit is contained in:
lixg
2023-02-02 18:47:57 +08:00
17 changed files with 2865 additions and 149 deletions

910
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,6 +12,7 @@
"build:test": "vite build --mode test"
},
"dependencies": {
"@wangeditor/editor-for-vue": "^5.1.12",
"ant-design-vue": "^3.2.15",
"axios": "^1.1.3",
"core-js": "^3.26.0",

View File

@@ -47,7 +47,10 @@ export const DISCUSS_SUBMIT_REVIEW_LIST = '/discussSubmit/queryDiscussSubmitAndR
export const COMMENT_LIST = '/comment/list'
export const VOTE_DETAIL2 = voteId => `/vote/queryVoteAndVoteStemDetailByVoteId?voteId=${voteId} post`
export const VOTE_DETAIL2 = `/voteSubmit/queryVoteTaskDetailById post`
// 投票详情接口
export const VOTE_DETAIL_SUBMIT = `/voteSubmit/vote/commit post`
export const COMMENT_ADD = '/comment post'
export const COMMENT_PRAISE = '/comment/praise post'
export const COMMENT_COLLECTION = '/comment/collection post'
@@ -61,4 +64,14 @@ export const ACTIVITY = '/activity'
export const STUDY_RECORD = '/stu/task/thirdTask/submit post'
export const PROJECT_LIST = '/stu/project/list post'
export const FACETEACH_SIGNUP = `/stu/project/stuFaceTeachSignUp`
export const FACETEACH_SIGNUP = `/stu/project/stuFaceTeachSignUp`
// 外部考试详情接口
export const EXTERNALEXAM = `/external/exam/queryExternalExam`
// 外链详情接口
export const LINKGETONE = `/link/getOne`
// 讨论模块
// -- 根据讨论的Id查询讨论发表的帖子
export const QueryDiscussSubmitDetailByDiscussId = '/discussSubmit/queryDiscussSubmitDetailByDiscussId post'

View File

@@ -41,7 +41,7 @@ export function usePage(_url, param, callback) {
};
}
export function useRequest(_url, params = {}) {
export function useRequest(_url, params = {}, callback) {
const state = reactive({
data: {},
@@ -58,6 +58,7 @@ export function useRequest(_url, params = {}) {
request(_url, params).then(r => {
state.data = r.data
state.loading = false
callback(r)
})
}
@@ -148,4 +149,14 @@ export async function boeRequest(_url, params) {
}).then(res => {
return JSONBigIntStr.parse(res)
})
}
}
const httpupload = axios.create({
baseURL: process.env.VUE_APP_BASE_API,
timeout: 1000 * 15,
headers: { "Content-Type": "multipart/form-data" },
});
export const fileUp = (data) => httpupload.post("/file/upload", data, {
headers: { "Content-Type": "multipart/form-data" },
});

View File

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -13,9 +13,9 @@
</template>
<script setup>
import {computed, defineProps, ref, watch} from "vue";
import back from '@/assets/image/pathdetails/组 21.png'
import nameBack from '@/assets/image/pathdetails/组 23.png'
import currentBack from '@/assets/image/pathdetails/组 23(1).png'
import back from '@/assets/image/pathdetails/pathDetailBack.png'
import nameBack from '@/assets/image/pathdetails/pathDetailImg.png'
import currentBack from '@/assets/image/pathdetails/pathDetailImgSelect.png'
import {useRouter} from "vue-router/dist/vue-router";
const props = defineProps({

View File

@@ -22,7 +22,7 @@
</div>
</div>
<!-- 面包屑导航 -->
<div class="debateTitle">投票{{ dataInfo?.voteName }}</div>
<div class="debateTitle">投票{{ state.dataInfo?.voteName }}</div>
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detail">
@@ -41,8 +41,8 @@
<div class="item allbox1">
<div class="item1" style="color: #089dff">
{{
dataInfo.numberOfInvolved || dataInfo.numberOfInvolved == 0
? dataInfo.numberOfInvolved
state.dataInfo.numberOfInvolved || state.dataInfo.numberOfInvolved == 0
? state.dataInfo.numberOfInvolved
: "-"
}}
</div>
@@ -51,8 +51,8 @@
<div class="item allbox2">
<div class="item1" style="color: #387df7">
{{
dataInfo.votesTotal || dataInfo.votesTotal == 0
? dataInfo.votesTotal
state.dataInfo.votesTotal || state.dataInfo.votesTotal == 0
? state.dataInfo.votesTotal
: "-"
}}
</div>
@@ -61,8 +61,8 @@
<div class="item allbox3">
<div class="item1" style="color: #00c6ff">
{{
dataInfo.numberOfBrowse || dataInfo.numberOfBrowse == 0
? dataInfo.numberOfBrowse
state.dataInfo.numberOfBrowse || state.dataInfo.numberOfBrowse == 0
? state.dataInfo.numberOfBrowse
: "-"
}}
</div>
@@ -81,7 +81,7 @@
<div class="join">
<div
v-for="(item, index) in dataInfo.ballotVo?.voteStemVoList"
v-for="(item, index) in state.dataInfo.ballotVo?.voteStemVoList"
:key="index"
style="margin-bottom: 41px"
>
@@ -96,16 +96,16 @@
style="
width: 140px;
margin-right: 114px;
margin-bottom: 25px;
"
>
<img
margin-bottom: 25px;">
<!-- <img
style="width: 140px; height: 140px; border-radius: 8px"
:src="value.optionPictureAddress"
/>
/> -->
<div class="radio">
<label>
<input type="radio" name="one" value="right"/>
<label @click="choiceQuestion(key,value.optionId,state.dataInfo,index)">
<!-- <input type="radio" name="one" value="right"/> -->
<div v-if="value.isAnswer" style="width:10px;height:10px;background:#4a9cf8;position:relative;left:15px;border-radius:10px;"></div>
<div v-else style="width:10px;height:10px;background:#fff;position:relative;left:15px;border-radius:10px;"></div>
<div class="option"></div>
<div class="opt-text">{{ value.optionName }}</div>
</label>
@@ -115,14 +115,16 @@
</div>
</div>
<div
style="
width: 100%;
style="width: 100%;
display: flex;
justify-content: center;
margin-top: 30px;
"
>
<button class="submitbtn btn01" @click="submitVote">提交</button>
margin-top: 30px;">
<button
class="submitbtn btn01"
:style="{background: (new Date().getTime() > new Date(state.dataInfo.voteEndTime).getTime() || new Date().getTime() < new Date(state.dataInfo.voteStartTime).getTime() )? '#ccc' : state.dataInfo.isSubmit?'#ccc':'' }"
@click="submitVote(state.dataInfo)">
{{state.dataInfo.isSubmit?'已提交':'提交'}}
</button>
</div>
</div>
<div class="right">
@@ -137,9 +139,9 @@
<div class="timebox clearfix">
<div class="innertime">
{{
dataInfo?.voteStartTime
state.dataInfo?.voteStartTime
}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
dataInfo?.voteEndTime
state.dataInfo?.voteEndTime
}}
</div>
<div class="endtime clearfix">
@@ -147,11 +149,11 @@
距离结束还有&nbsp;&nbsp;
<span class="te">{{
parseInt(
dayjs(dataInfo?.voteEndTime).diff(dayjs(), "minute") / 60
dayjs(state.dataInfo?.voteEndTime).diff(dayjs(), "minute") / 60
)
}}</span
>&nbsp;&nbsp; 小时&nbsp;&nbsp;<span class="te">{{
dayjs(dataInfo?.voteEndTime).diff(dayjs(), "minute") % 60
dayjs(state.dataInfo?.voteEndTime).diff(dayjs(), "minute") % 60
}}</span
>&nbsp;&nbsp;分钟
</div>
@@ -170,7 +172,7 @@
<div
class="explaincontent"
v-html="
dataInfo?.voteExplain ? dataInfo?.voteExplain : '暂无说明'
state.dataInfo?.voteExplain ? state.dataInfo?.voteExplain : '暂无说明'
"
></div>
</div>
@@ -183,13 +185,16 @@
</template>
<script setup>
import {useRequest} from "@/api/request";
import {useRequest,request} from "@/api/request";
import {
VOTE_DETAIL2,
VOTE_DETAIL_SUBMIT
} from "@/api/api";
import dayjs from "dayjs";
import {useRoute} from "vue-router/dist/vue-router";
import {watch, reactive, toRefs} from "vue";
import store from "@/store";
import { ElMessage } from "element-plus";
import {useRoute,useRouter} from "vue-router/dist/vue-router";
import {computed, reactive, toRefs} from "vue";
// const { data } = useRequest(TASK_VOTE_DETAIL, {});
// console.log("datadatadata", data);
// const state = reactive({
@@ -197,12 +202,135 @@ import {watch, reactive, toRefs} from "vue";
// });
// let { votedetail } = toRefs(state);
const {
query: {courseId, pName, sName},
query: {courseId, pName, sName, chapterOrStageId, infoId, id, btype},
} = useRoute();
//获取基本信息
const {data: dataInfo} = useRequest(VOTE_DETAIL2(courseId));
const router = useRouter();
const returnclick = () => {
router.back();
};
const state = reactive({
dataInfo: {},
});
//获取基本信息
// const {data: dataInfo} = useRequest(VOTE_DETAIL2(courseId));
const userInfo = computed(() => store.state.userInfo);
let timer = setInterval(() => {
if(userInfo.value.id){
clearInterval(timer)
console.log('获取信息传递参数',{
"chapterOrStageId": chapterOrStageId ? chapterOrStageId : 0,
"courseId": courseId,
"studentId": userInfo.value.id,
"targetId": infoId,
"type": btype
})
request(VOTE_DETAIL2, {
"chapterOrStageId": chapterOrStageId ? chapterOrStageId : 0,
"courseId": courseId,
"studentId": userInfo.value.id,
"targetId": infoId,
"type": btype
}).then(res=>{
console.log(res)
state.dataInfo = res.data
}).catch(err=>{
console.log(err)
});
}
}, 500);
console.log('我是获取的投票基本信息', state.dataInfo)
// 答题时间
const answerTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
// 选择题目
const choiceQuestion = (order, id, dates, torder) => {
// 当已经提交过时候 不让选择题目
if(state.dataInfo.isSubmit){
return
}
console.log('当前选择题目的id及序号', order, id, dates,torder)
for(let i=0;i<dates.ballotVo.voteStemVoList[torder].optionDetailList.length;i++){
dates.ballotVo.voteStemVoList[torder].optionDetailList[i].isAnswer = false;
}
dates.ballotVo.voteStemVoList[torder].optionDetailList[order].isAnswer = true;
console.log(state.dataInfo)
}
// 提交投票
const submitVote = () => {
console.log(state.dataInfo)
let nowTime = new Date().getTime()
let maxTime = new Date(state.dataInfo.voteEndTime).getTime()
let minTime = new Date(state.dataInfo.voteStartTime).getTime()
console.log(nowTime, maxTime, minTime)
// 当未到开始时间
if(nowTime < minTime || nowTime > maxTime) {
ElMessage.error("未到投票开始时间")
return
}
// 当已经提交过时候 不让提交即可
if(state.dataInfo.isSubmit){
return
}
let isSubmit = true;
let isSubArr = []
for(let i=0;i<state.dataInfo.ballotVo.voteStemVoList.length;i++){
for(let j=0; j<state.dataInfo.ballotVo.voteStemVoList[i].optionDetailList.length;j++){
if(state.dataInfo.ballotVo.voteStemVoList[i].optionDetailList[j].isAnswer){
isSubArr[i] = state.dataInfo.ballotVo.voteStemVoList[i].optionDetailList[j].isAnswer
break
}else{
isSubArr[i] = false
}
}
}
for(let i=0; i<isSubArr.length;i++){
if(isSubArr[i]==false){
isSubmit = false
}
}
if(isSubmit==false){
ElMessage.error("请选择投票问题后进行提交")
return
}
let obj = {
"beginTime": answerTime,
"chapterOrStageId": chapterOrStageId ? chapterOrStageId : 0,
"result": JSON.stringify(state.dataInfo),
"targetId": infoId, // 项目 路径图 id
"taskId": id,
"type": btype, // 1 项目 2 路径图
"voteId": state.dataInfo.voteId
}
console.log('我是投票提交的信息', obj)
useRequest(VOTE_DETAIL_SUBMIT,obj,(e)=>{
console.log(e)
request(VOTE_DETAIL2, {
"chapterOrStageId": chapterOrStageId ? chapterOrStageId : 0,
"courseId": courseId,
"studentId": userInfo.value.id,
"targetId": infoId,
"type": btype
}).then(res=>{
console.log(res)
ElMessage.success("投票成功")
state.dataInfo = res.data
}).catch(err=>{
console.log(err)
});
})
};
</script>

View File

@@ -36,48 +36,47 @@
</div>
<!-- 面包屑导航 -->
<!-- 标题 -->
<div class="title">{{ info.name }}</div>
<div class="title">讨论{{ state.info.discussDtoList[0].discussName }}</div>
<!-- 标题 -->
<!-- 详细内容 -->
<div class="bascinfo clearfix">
<!-- 中间部分 -->
<div class="middletitle">
<div class="title">
{{ info.name }}
{{ state.info.discussDtoList[0].discussName }}
</div>
<!-- <button class="btn">发表帖子</button>-->
<button class="btn" @click="showPostModal">发表帖子</button>
</div>
<div>
<div class="line clearfix">
<div class="linetitle">{{ info.sName }}</div>
<div class="linetitle">{{ state.info.discussDtoList[0].discussName }}</div>
<div class="radi"></div>
<div class="intime">进行中</div>
</div>
<div class="allbtn">
<button :class="`btnone ${param.searchType == 1 ? 'active' : ''}`">
<button :class="`btnone ${state.searchType == 1 ? 'active' : ''}`" @click="nowPost(state.info.discussDtoList[0].discussId)">
最新
</button>
<button
:class="`btntwo ${param.searchType == 2 ? 'active' : ''}`"
style="margin-left: 20px"
>
最热
:class="`btnone ${state.searchType == 2 ? 'active' : ''}`"
style="margin-left: 20px" @click="hotPost(state.info.discussDtoList[0].discussId)">
最热
</button>
</div>
<div
class="discusslist"
v-for="(d, j) in info?.discussDtoList"
v-for="(d, j) in state?.postList"
:key="j"
>
<div class="itemtitle">{{ d.discussName }}</div>
<div class="itemdiscuss">
{{ d.discussExplain }}
<div class="itemtitle" @click="comment(d)">{{ d.discussSubmitTitle }}</div>
<div class="itemdiscuss" @click="comment(d)">
{{ d.discussSubmitContent }}
</div>
<div class="allstar clearfix">
<div @click="comment(d)" style="display: flex; cursor: pointer">
<span class="iconfont icon-pinglun" style="color: #b3bdc4"></span>
<div class="count">{{ d.commentNum || 0 }}</div>
<div class="count">{{ d.discussReviewCount || 0 }}</div>
</div>
<div @click="like(d)" style="display: flex; cursor: pointer">
<span
@@ -87,7 +86,7 @@
marginLeft: '19px',
}"
></span>
<div class="count">{{ d.praiseNum || 0 }}</div>
<div class="count">{{ d.discussLikeCount || 0 }}</div>
</div>
<div @click="collection(d)" style="display: flex; cursor: pointer">
<span
@@ -97,22 +96,73 @@
marginLeft: '19px',
}"
></span>
<div class="count">{{ d.collectionNum || 0 }}</div>
<div class="count">{{ d.discussCollectionCount || 0 }}</div>
</div>
</div>
<div class="thinline"></div>
</div>
<div
style="display:flex;justify-content:center;align-items:center;margin-top:36px;">
<!-- 分页 -->
<el-pagination
v-model:current-page="state.currentPage"
:page-size="state.pageSize"
:small="small"
layout="prev, pager, next, jumper"
:total="state.total"
@current-change="handleCurrentChange"
/>
</div>
</div>
</div>
<!-- 详细内容 -->
<!-- 富文本 -->
<el-dialog title="" top="" v-model="dialogVisible" :show-close="false"
style="display:flex;justify-content:center;align-items:center;flex-direction: column;"
width="80%">
<div style="width:100%;margin-bottom: 12px;">
<el-input v-model="titleName" placeholder="请输入标题" />
</div>
<div style="border: 1px solid #ccc">
<Toolbar style="border-bottom: 1px solid #ccc" :editor="editorRef" :defaultConfig="toolbarConfig"
:mode="mode" />
<Editor style="height: 450px; overflow-y: hidden" v-model="valueHtml" :defaultConfig="editorConfig"
:mode="mode" @onCreated="handleCreated" />
</div>
<div style="width:100%;height:80px;display:flex;justify-content:center;align-items:center;margin-top:20px;">
<button
class="submitbtn btn01"
style="margin-right:40px;"
@click="cancelPost">
取消
</button>
<button
class="submitbtn btn01"
@click="submitPost">
发布
</button>
</div>
</el-dialog>
<!-- 富文本 -->
</div>
</template>
<script setup>
import { request, useRequest } from "@/api/request";
import { COMMENT_COLLECTION, COMMENT_PRAISE, DISCUSS_LIST } from "@/api/api";
import { reactive, ref, toRefs } from "vue";
import {
COMMENT_COLLECTION,
COMMENT_PRAISE,
DISCUSS_LIST,
QueryDiscussSubmitDetailByDiscussId,
FILE_UPLOAD
} from "@/api/api";
import "@wangeditor/editor/dist/css/style.css";
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import { reactive, ref, toRefs, shallowRef } from "vue";
import { useRoute, useRouter } from "vue-router";
import { fileUp } from "../../api/request";
const router = useRouter();
const returnclick = () => {
@@ -126,14 +176,239 @@ const param = ref({
type,
id,
});
const { data: info } = useRequest(DISCUSS_LIST, param.value);
const dialogVisible = ref(false);
const titleName = ref("");
const state = reactive({
activeName: "first",
info:{},
pageNo:1,
pageSize:10,
searchType:1,
postList: [], //帖子列表
total:0, // 帖子总条数
currentPage: 1
});
// 编辑器实例,必须用 shallowRef
const editorRef = shallowRef();
// 内容 HTML
const valueHtml = ref("");
const toolbarConfig = {
excludeKeys: ["insertVideo", "insertImage"],
};
const editorConfig = { placeholder: "请输入内容...", MENU_CONF: {} };
editorConfig.MENU_CONF["uploadImage"] = {
// 自定义上传
async customUpload(file, insertFn) {
const formData = new FormData();
formData.append("file", file);
fileUp(formData).then((res) => {
if (res.data.code === 200) {
// 最后插入图片 url alt href
insertFn(res.data.data, file.name, res.data.data);
}
});
},
};
const handleCreated = (editor) => {
editorRef.value = editor; // 记录 editor 实例,重要!
};
useRequest(DISCUSS_LIST, param.value, (e)=>{
console.log('我是获取的讨论详情数据', e)
state.info = e.data;
// 获取该讨论下面的帖子
console.log('我是查询讨论下帖子的参数',{
"discussId": e.data.discussDtoList[0].discussId,
"pageNo": state.pageNo,
"pageSize": state.pageSize,
"searchType": state.searchType
})
useRequest(
QueryDiscussSubmitDetailByDiscussId,
{
"discussId": e.data.discussDtoList[0].discussId,
"pageNo": state.pageNo,
"pageSize": state.pageSize,
"searchType": state.searchType
},
(e)=>{
console.log('我是当前讨论下的帖子',e)
state.postList = e.data.rows;
state.total = e.data.total;
// 添加一条假的数据 供测试使用
state.postList =[
{
"createTime": "",
"createUser": 0,
"discussCollectionCount": "234",
"discussId": "",
"discussLikeCount": "3576",
"discussReviewCount": "12353",
"discussSubmitContent": "帖子的内容----帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容",
"discussSubmitId": "",
"discussSubmitPictureAddress": "",
"discussSubmitTitle": "我是一个用来测试的帖子标题",
"stuId": "",
"stuName": "",
"updateTime": "",
"updateUser": 0,
"submitReviewVoList": [
{
"createTime": "",
"createUser": 0,
"discussLikeCount": "",
"discussReviewContent": "",
"discussReviewFlag": "",
"discussReviewId": "",
"discussReviewPictureAddress": "",
"discussSubmitId": "",
"stuId": "",
"stuName": "",
"submitReplyVoList": [
{
"createTime": "",
"createUser": 0,
"discussReplyId": 0,
"discussReviewId": "",
"replyContent": "",
"replyFlag": "",
"replyPictureAddress": "",
"reviewStuId": "",
"reviewStuName": "",
"stuId": "",
"stuName": "",
"updateTime": "",
"updateUser": 0
}
],
"updateTime": "",
"updateUser": 0
}
]
}
]
state.total = 100;
})
});
// 获取帖子
function getPostList(discussId) {
console.log({
"discussId": discussId,
"pageNo": state.pageNo,
"pageSize": state.pageSize,
"searchType": state.searchType
})
useRequest(
QueryDiscussSubmitDetailByDiscussId,
{
"discussId": discussId,
"pageNo": state.pageNo,
"pageSize": state.pageSize,
"searchType": state.searchType
},
(e)=>{
console.log('我是当前讨论下的帖子',e)
state.postList = e.data.rows;
state.total = e.data.total;
// 添加一条假的数据 供测试使用
state.postList =[
{
"createTime": "",
"createUser": 0,
"discussCollectionCount": "234",
"discussId": "",
"discussLikeCount": "3576",
"discussReviewCount": "12353",
"discussSubmitContent": "帖子的内容----帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容",
"discussSubmitId": "",
"discussSubmitPictureAddress": "",
"discussSubmitTitle": "我是一个用来测试的帖子标题",
"stuId": "",
"stuName": "",
"updateTime": "",
"updateUser": 0,
"submitReviewVoList": [
{
"createTime": "",
"createUser": 0,
"discussLikeCount": "",
"discussReviewContent": "",
"discussReviewFlag": "",
"discussReviewId": "",
"discussReviewPictureAddress": "",
"discussSubmitId": "",
"stuId": "",
"stuName": "",
"submitReplyVoList": [
{
"createTime": "",
"createUser": 0,
"discussReplyId": 0,
"discussReviewId": "",
"replyContent": "",
"replyFlag": "",
"replyPictureAddress": "",
"reviewStuId": "",
"reviewStuName": "",
"stuId": "",
"stuName": "",
"updateTime": "",
"updateUser": 0
}
],
"updateTime": "",
"updateUser": 0
}
]
}
]
state.total = 100;
})
}
// 最新
function nowPost(id) {
state.searchType = 1;
state.pageNo = 1;
state.currentPage = 1;
getPostList(id);
}
// 最热
function hotPost() {
state.searchType = 2;
state.pageNo = 1;
state.currentPage = 1;
getPostList(id);
}
// 分页
function handleCurrentChange(e, k) {
console.log('分页打印', e, k)
state.currentPage = e;
state.pageNo = e;
getPostList(state.info.discussDtoList[0].discussId);
}
function comment({ discussId: id }) {
router.push({ path: "discussdetail", query: { id, type } });
router.push({ path: "discussdetail", query: { id, type, pName, sName} });
}
function like(d) {
@@ -147,6 +422,23 @@ function collection(d) {
d.collected = !d.collected;
request(COMMENT_COLLECTION, { targetId: d.discussId, type: 4 });
}
// 发表帖子
function showPostModal() {
dialogVisible.value = true;
}
function submitPost() {
dialogVisible.value = false;
}
// 取消发布
function cancelPost() {
dialogVisible.value = false;
}
</script>
<style scoped lang="scss">
@@ -320,6 +612,7 @@ function collection(d) {
font-weight: 500;
color: #333333;
margin-right: 88px;
cursor: pointer;
}
.itemdiscuss {
@@ -330,6 +623,7 @@ function collection(d) {
font-weight: 500;
color: #666666;
line-height: 24px;
cursor: pointer;
}
.allstar {

View File

@@ -37,14 +37,14 @@
</div>
<!-- 面包屑导航 -->
<!-- 标题 -->
<div class="title">调研管理者进阶腾飞班 - 班内成员讨论</div>
<div class="title">讨论管理者进阶腾飞班 - 班内成员讨论</div>
<!-- 标题 -->
<!-- 详细内容 -->
<div class="bascinfo clearfix">
<!-- 中间部分 -->
<div class="middletitle">
<div class="title">
{{ disDetail.projectName }}
{{ disDetail.projectName }}
</div>
<!-- <button class="btn">回复</button>-->
</div>
@@ -72,7 +72,7 @@
color: disDetail.praised ? 'red' : '#b3bdc4',
marginLeft: '19px',
}"
></span>
></span>
<div class="count">{{ disDetail.praiseNum || 0 }}</div>
</div>
<div
@@ -94,7 +94,7 @@
<div class="count">{{ disDetail.collectionNum || 0 }}</div>
</div>
</div>
<div class="contentmid">
<div class="contentmid">
{{ disDetail.discussExplain }}
</div>
</div>
@@ -289,7 +289,7 @@
</template>
<script setup>
import { reactive, ref, toRefs } from "vue";
import { useRoute } from "vue-router/dist/vue-router";
import { useRoute, useRouter } from "vue-router/dist/vue-router";
import { request, usePage, useRequest } from "@/api/request";
import {
COMMENT_ADD,
@@ -301,6 +301,11 @@ import {
} from "@/api/api";
import UploadImg from "@/components/img/UploadImg.vue";
const router = useRouter();
const returnclick = () => {
router.back();
};
const {
query: { id, discussSubmitId, type, pName, sName },
} = useRoute();
@@ -310,7 +315,26 @@ const { data: commontList, fetchData: commonFetch } = usePage(COMMENT_LIST, {
type: 1,
});
const { data: disDetail } = useRequest(DISCUSS_DETAIL, { id, type });
// const { data: disDetail } = useRequest(DISCUSS_DETAIL, { id, type });
const disDetail = ref({});
useRequest(DISCUSS_DETAIL, { id, type }, (e)=>{
console.log(e)
disDetail.value = e.data
// 模拟数据
disDetail.value = {
projectName:'讨论考勤模块',
stageName:'讨论考勤模块',
discussName:'我是一个用来测试的帖子标题',
praised:true,
praiseNum:888,
collected:true,
collectionNum:3465,
discussExplain:'帖子的内容----帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容 试内容展示我是帖子的测试内容展示我是帖子的测试内容展示我是帖子的测试内容展示我是帖子的测试内容展示',
}
})
const fileList = ref([]);
const commentSubmitFileList = ref([]);

View File

@@ -133,30 +133,28 @@
<!-- <pre class="notice">{{ data.notice || "暂无公告" }}</pre> -->
<div class="notice">{{ data.notice || "暂无公告" }}</div>
</el-tab-pane>
<!--
<el-tab-pane label="共享文档" name="second">
<div style="padding: 19px 30px 17px 28px">-->
<!-- <div-->
<!-- v-for="(value, index) in sharedoc"-->
<!-- :key="index"-->
<!-- style="-->
<!-- display: flex;-->
<!-- align-items: center;-->
<!-- margin-bottom: 15px;-->
<!-- "-->
<!-- >-->
<!-- <img :src="value.img" style="width: 22px; height: 26px" />-->
<!-- <div class="sharedocname">{{ value.name }}</div>-->
<!-- <div class="download">-->
<!-- <img-->
<!-- src="../../assets/image/download.png"-->
<!-- style="width: 16px; height: 15px"-->
<!-- />-->
<!-- <div style="margin-left: 7px">下载</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>
</el-tab-pane>-->
<el-tab-pane label="共享文档" name="second">
<div style="padding: 19px 30px 17px 28px">
<div
v-for="(value, index) in JSON.parse(data.attach?data.attach:'[]')"
:key="index"
style="
display: flex;
align-items: center;
margin-bottom: 15px;">
<!-- <img :src="value.img" style="width: 22px; height: 26px"/> -->
<FileTypeImg :v-model="value.name? value.name : value.slice(value.lastIndexOf('/')+1,value.indexOf('-')) + value.slice(value.lastIndexOf('.'))" :style="{width: '22px',height: '26px'}"></FileTypeImg>
<div class="sharedocname">{{ value.name }}</div>
<div class="download">
<img
src="../../assets/image/download.png"
style="width: 16px; height: 15px"
/>
<div style="margin-left: 7px" @click="downloadFile(value.response.data)">下载</div>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<!-- 课程公告及共享文档 -->
@@ -190,11 +188,12 @@
<div class="text" style="margin-left: 9px">学习进度</div>
<div class="box"></div>
</div>
<!--
<div class="rate">
<div class="ratetext">上次学到:启航班-领导寄语</div>
<div class="ratebtn">继续学习</div>
</div>-->
<div class="rate">
<div class="ratetext">上次学到:{{ data.lastLearned }}</div>
<div v-if="data.lastLearned" class="ratebtn" @click="continueLearn(data.lastLearned, data.stageProcessList)">继续学习</div>
</div>
<div style="margin-top: 16px">
<div class="progressBox">
<div>总进度</div>
@@ -287,6 +286,7 @@ import { useRoute, useRouter } from "vue-router";
import store from "@/store";
import { ElMessage } from "element-plus";
import {PROJECT} from "@/api/CONST";
import FileTypeImg from "@/components/FileTypeImg.vue";
const {
query: { courseId, projectId },
@@ -458,6 +458,23 @@ function toFinish(d, sName, chapterOrStageId) {
dialogVisible.value = true;
return
}
// 此处判断外部考试跳转
if(d.startTime==null || d.endTime==null){
router.push({
path: '/externalexamination',
query: {
id: d.projectTaskId,
type: PROJECT,
infoId: data.value.projectId,
courseId: d.courseId,
pName: data.value.name,
sName,
chapterOrStageId,
exname: d.name, // 考试名称
},
});
return
}
}
// 评估 停用
if (d.type == 11) {
@@ -509,6 +526,23 @@ function toFinish(d, sName, chapterOrStageId) {
stageOrChapterId: chapterOrStageId,
taskId: d.projectTaskId,
});
// 此处判断外链跳转详情界面
if(d.type==7){
router.push({
path: '/outerchain',
query: {
id: d.projectTaskId,
type: PROJECT,
infoId: data.value.projectId,
courseId: d.courseId,
pName: data.value.name,
sName,
chapterOrStageId,
exname: d.name, // 外链名称
},
});
return
}
}
if (typeof types.value.path[d.type] === "string") {
@@ -527,6 +561,7 @@ function toFinish(d, sName, chapterOrStageId) {
pName: data.value.name,
sName,
chapterOrStageId,
btype: 1
},
});
} else if (typeof types.value.path[d.type] === "function") {
@@ -547,6 +582,35 @@ const queryAllStatus = (data) => {
}
return true;
}
// 共享文档下载
function downloadFile(url){
window.open(url);
}
// 继续学习
function continueLearn(taskname, datas){
console.log('我是当前的列表展示信息',data)
console.log(datas)
let jumpinfo
let stageName
let stageId
for(let i=0; i<datas.length; i++){
let kk = datas[i].taskProcessList
for(let j=0; j<kk.length; j++){
if(kk[j].name==taskname){
jumpinfo = kk[i]
stageId = datas[i].stageId
stageName = datas[i].stageName
break
}
}
}
console.log(jumpinfo, stageName, stageId)
toFinish(jumpinfo, stageName, stageId )
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">

View File

@@ -12,24 +12,32 @@
<div class="title">我的项目</div>
<div class="search">
<!-- <el-select v-model="value" class="m-2" placeholder="Select">
<el-option
v-for="item in projectClassify"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-model="value" class="m-2" placeholder="Select">
<el-option
v-for="item in studyProgress"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> -->
<el-option
v-for="item in projectClassify"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> -->
<div style="width: 200px; margin-right: 20px">
<el-input v-model="projectname" placeholder="请输入项目名称" />
</div>
<el-select
@change="choiceStatus"
v-model="stateValue"
class="m-2"
placeholder="请选择学习进度"
style="width: 200px; margin-right: 20px">
<el-option
v-for="item in studyProgress"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="width: 420px">
<el-date-picker v-model="searchTime" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" :size="size" @change="selectTime"/>
@@ -52,7 +60,7 @@
</div>
<div v-else class="projectList" v-for="(i, k) in projectList" :key="k">
<div style="display: flex">
<img style="width: 253px; height: 144px; border-radius: 4px" :src="i.picUrl" />
<img style="width: 253px; height: 175px; border-radius: 4px" :src="i.picUrl" />
<div style="margin-left: 29px">
<div class="projectName" :title="i.name">
{{ i.name }}
@@ -70,6 +78,7 @@
</div>
</div>
<div class="studyNew" v-if="i.lastStudyTime">最新一次学习时间{{ i.lastStudyTime }}</div>
<div class="studyNew">项目起止时间{{ i.beginTime }} ~ {{ i.endTime }}</div>
</div>
</div>
<div class="tobestarted" v-if="i.status == 2" @click="goProjectDetails(i)">
@@ -131,7 +140,24 @@ import { ElLoading } from 'element-plus';
const router = useRouter();
const projectClassify = [];
const studyProgress = [];
const studyProgress = [
{
value:0,
label:"未开始"
},
{
value:1,
label:"进行中"
},
{
value:2,
label:"已完成"
},
{
value:3,
label:"已结束"
},
];
const projectList = ref([]); //项目列表
const pageSize = ref(60); //每页条数
const currentPage = ref(1); //当前页数
@@ -140,6 +166,7 @@ const projectname = ref(""); //项目名称
const searchTime = ref(""); //选择时间
const beginTime = ref(""); //结束时间
const endTime = ref(""); //开始时间
const stateValue = ref(undefined)
const dialogVisible = ref(false)
const userInfo = computed(() => store.state.userInfo);
@@ -154,12 +181,21 @@ const getProject = () => {
text: 'Loading',
background: 'rgba(0, 0, 0, 0.7)'
})
console.log('我是搜索传递的参数',{
beginTime: beginTime.value,
endTime: endTime.value,
key: projectname.value,
pageNo: currentPage.value,
pageSize: pageSize.value,
status: stateValue.value
})
request(PROJECT_LIST, {
beginTime: beginTime.value,
endTime: endTime.value,
key: projectname.value,
pageNo: currentPage.value,
pageSize: pageSize.value,
status: stateValue.value
})
.then((res) => {
console.log("获取成功", res);
@@ -205,6 +241,7 @@ const resetClick = () => {
currentPage.value = 1;
beginTime.value = "";
endTime.value = "";
stateValue.value ="";
getProject();
console.log("点击重置");
};
@@ -229,6 +266,13 @@ const goProjectDetails = (value) => {
,'_top')}`
);
};
// 项目状态
const choiceStatus = (e) => {
console.log(e)
stateValue.value = e
}
</script>
<style lang="scss">
.projectManage {

View File

@@ -6,9 +6,9 @@
<div class="pdname">
{{ data.name }}
<el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300"
:content="data.remark">
<template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
<el-popover v-if="data.chapterRemark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300"
:content="data.chapterRemark">
<template #reference><span style="font-size: 16px;font-weight: 600;">关卡说明></span></template>
</el-popover>
</div>
@@ -123,30 +123,29 @@
{{ data.remark || "暂无说明" }}
</div>
</el-tab-pane>
<!--
<el-tab-pane label="共享文档" name="second"> -->
<!-- <div style="padding: 19px 30px 17px 28px">-->
<!-- <div-->
<!-- v-for="(value, index) in sharedoc"-->
<!-- :key="index"-->
<!-- style="-->
<!-- display: flex;-->
<!-- align-items: center;-->
<!-- margin-bottom: 15px;-->
<!-- "-->
<!-- >-->
<!-- <img :src="value.img" style="width: 22px; height: 26px"/>-->
<!-- <div class="sharedocname">{{ value.name }}</div>-->
<!-- <div class="download">-->
<!-- <img-->
<!-- src="../../assets/image/download.png"-->
<!-- style="width: 16px; height: 15px"-->
<!-- />-->
<!-- <div style="margin-left: 7px">下载</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-tab-pane>-->
<el-tab-pane label="共享文档" name="second">
<div style="padding: 19px 30px 17px 28px">
<div
v-for="(value, index) in JSON.parse(data.attach?data.attach:'[]')"
:key="index"
style="
display: flex;
align-items: center;
margin-bottom: 15px;">
<!-- <img :src="value.img" style="width: 22px; height: 26px"/> -->
<FileTypeImg :v-model="value.name? value.name : value.slice(value.lastIndexOf('/')+1,value.indexOf('-')) + value.slice(value.lastIndexOf('.'))" :style="{width: '22px',height: '26px'}"></FileTypeImg>
<div class="sharedocname">{{ value.name }}</div>
<div class="download">
<img
src="../../assets/image/download.png"
style="width: 16px; height: 15px"
/>
<div style="margin-left: 7px" @click="downloadFile(value.response.data)">下载</div>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<!-- 课程公告及共享文档 -->
@@ -180,11 +179,11 @@
<div class="text" style="margin-left: 9px">学习进度</div>
<div class="box"></div>
</div>
<!--
<div class="rate">
<div class="ratetext">上次学到:{{ data.lastLearned }}</div>
<div class="ratebtn">继续学习</div>
</div>-->
<div class="rate">
<div class="ratetext">上次学到:{{ data.lastLearned }}</div>
<div v-if="data.lastLearned" class="ratebtn" @click="continueLearn(data.lastLearned, data.taskBoList)">继续学习</div>
</div>
<div style="margin-top: 16px">
<div class="progressBox">
<div>总进度</div>
@@ -283,6 +282,7 @@ import { useRoute, useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import store from "@/store";
import {ROUTER} from "@/api/CONST";
import FileTypeImg from "@/components/FileTypeImg.vue";
const {
query: { routerId, routerName },
@@ -404,6 +404,23 @@ function toFinish(d) {
dialogVisible.value = true;
return
}
// 此处判断外部考试跳转
if(d.startTime==null || d.endTime==null){
router.push({
path: '/externalexamination',
query: {
id: d.routerTaskId,
type: ROUTER,
infoId: routerId,
courseId: d.courseId,
pName: data.value.name,
sName: data.value.currentStageName,
chapterOrStageId: data.value.currentStageId,
exname: d.name, // 考试名称
},
});
return
}
}
// 评估 停用
if (d.type == 11) {
@@ -450,6 +467,24 @@ function toFinish(d) {
stageOrChapterId: data.value.currentStageId,
taskId: d.routerTaskId,
});
// 此处判断外链跳转详情界面
if(d.type==7){
router.push({
path: '/outerchain',
query: {
id: d.routerTaskId,
type: ROUTER,
infoId: routerId,
courseId: d.courseId,
pName: data.value.name,
sName: data.value.currentStageName,
chapterOrStageId: data.value.currentStageId,
exname: d.name, // 外链名称
},
});
return
}
}
if (typeof types.value.path[d.type] === "string") {
types.value.path[d.type] &&
@@ -466,7 +501,8 @@ function toFinish(d) {
courseId: d.courseId,
pName: data.value.name,
sName: data.value.currentStageName,
chapterOrStageId: data.value.currentStageId
chapterOrStageId: data.value.currentStageId,
btype: 2
},
});
} else if (typeof types.value.path[d.type] === "function") {
@@ -476,9 +512,30 @@ function toFinish(d) {
}
}
function whiteTypes(type) {
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
}
// 共享文档下载
function downloadFile(url){
window.open(url);
}
// 继续学习
function continueLearn(taskname, datas){
console.log('我是当前的列表展示信息',data)
console.log(datas)
let jumpinfo
for(let i=0; i<datas.length; i++){
if(datas[i].name==taskname){
jumpinfo = datas[i]
}
}
console.log(jumpinfo)
toFinish(jumpinfo)
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->

View File

@@ -0,0 +1,574 @@
<template>
<div class="moreactive" style="padding: 30px">
<!-- 面包屑导航 -->
<div class="crumb">
<div>{{ pName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div>{{ sName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700; font-size: 16px">考试详情</div>
<!--
<div class="preNext">
<button class="btn btn01"></button>
<span class="content" style="margin-left: 6px">上一个</span>
<span class="content" style="margin-left: 31px">下一个</span>
<button class="btn btn02" style="margin-left: 6px"></button>
</div>
-->
<div class="return">
<div style="display: flex" @click="returnclick">
<el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" src="../../assets/image/return.png" />返回</el-button>
</div>
</div>
</div>
<!-- 面包屑导航 -->
<!-- <div class="debateTitle">考试{{ dataInfo?.voteName }}</div> -->
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detail">
<div class="detailT">
<div class="left">
<div class="debateTitle" style="color:rgba(51, 51, 51, 1);font-size:20px;margin-top:46px;">考试{{ exname }}</div>
<div class="title">
<img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">数据来源</div>
<div class="box"></div>
</div>
<!-- <div style="display: flex; align-items: center"></div> -->
<div class="all" style="font-size:14px;color:rgba(51, 51, 48, 1);">
{{ state.datainfo.source ? state.datainfo.source : "-" }}
</div>
</div>
</div>
<div class="detailT" style="margin-top:20px;height:671px;">
<div class="left">
<div class="title">
<img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">考试说明</div>
<div class="box"></div>
</div>
<!-- <div style="display: flex; align-items: center"></div> -->
<div class="all" style="font-size:14px;color:rgba(51, 51, 48, 1);">
<div>
{{ state.datainfo.externalExplain ? state.datainfo.externalExplain : "暂无考试说明" }}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 详细信息 -->
</div>
</template>
<script setup>
import {useRequest, request} from "@/api/request";
import {
VOTE_DETAIL2,
EXTERNALEXAM
} from "@/api/api";
import {reactive} from "vue";
import {useRoute,useRouter} from "vue-router/dist/vue-router";
const {
query: {courseId, pName, sName, chapterOrStageId, infoId, id, exname},
} = useRoute();
const router = useRouter();
const returnclick = () => {
router.back();
};
const state = reactive({
datainfo: {}
})
//获取基本信息
request(EXTERNALEXAM, {externalId:courseId}).then(res=>{
console.log(res)
state.datainfo = res.data
}).catch(err=>{
console.log(err)
});
console.log('我是获取的考试基本信息', state.dataInfo)
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.clearfix:before,
.clearfix:after {
content: "";
display: table;
clear: both;
}
.moreactive {
.crumb {
color: #fff;
display: flex;
font-size: 14px;
line-height: 24px;
position: relative;
}
.return{
position: absolute;
right: 10%;
.text{
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
.preNext {
position: absolute;
right: 0px;
.content {
font-size: 14px;
color: #fff;
width: 43px;
height: 14px;
display: inline-block;
position: relative;
top: -6px;
cursor: pointer;
}
.btn {
width: 23px;
height: 23px;
border-radius: 50%;
border: 0;
cursor: pointer;
}
.btn01 {
background-image: url("../../assets/image/prev.png");
}
.btn02 {
background-image: url("../../assets/image/next.png");
}
}
.debateTitle {
margin-top: 15px;
font-size: 20px;
line-height: 24px;
height: 24px;
font-weight: 600;
color: #fff;
margin-left: -10px;
}
.detailinfo {
width: 100%;
margin-top: 20px;
display: flex;
.detail {
flex: 1;
// margin-right: 20px;
.detailT {
min-height: 95px;
background: #ffffff;
border-radius: 8px;
color: rgba(51, 51, 51, 1);
display: flex;
padding-bottom: 20px;
.left {
margin-left: 48px;
flex: 1;
}
.right {
width: 417px;
margin-right: 48px;
.righttitle {
display: flex;
padding-top: 39px;
position: relative;
.text {
margin-left: 8px;
font-size: 16px;
color: rgba(51, 51, 51, 1);
font-weight: 800;
}
.box {
width: 75px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 23px;
top: 53px;
}
}
.timebox {
width: 417px;
height: 149px;
background: linear-gradient(90deg, #b6c6e1 0%, #89aed6 100%);
border-radius: 4px;
margin-top: 42px;
}
.innertime {
margin-top: 17px;
margin-left: 55px;
font-size: 14px;
font-weight: 500;
color: #ffffff;
line-height: 24px;
}
.endtime {
margin-left: 10px;
margin-top: 16px;
width: 397px;
height: 81px;
background: #f2f5f7;
border-radius: 0px 8px 0px 8px;
.endtimetext {
margin-top: 25px;
margin-left: 46px;
.te {
font-size: 28px;
font-weight: 800;
color: #4a9cf8;
line-height: 24px;
}
}
}
.explain {
margin-top: 30px;
width: 416px;
padding-bottom: 50px;
background: #f2f5f7;
border-radius: 8px;
}
.explaincontent {
width: 368px;
font-size: 16px;
font-weight: 500;
color: #333330;
line-height: 24px;
margin-left: 24px;
margin-top: 47px;
}
}
.title {
display: flex;
align-items: center;
padding-top: 39px;
position: relative;
}
.title .text {
margin-left: 8px;
font-size: 16px;
color: rgba(51, 51, 51, 1);
font-weight: 800;
}
.title .box {
width: 75px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 23px;
top: 53px;
}
.all {
display: flex;
justify-content: space-between;
// width: 1280px;
margin-right: 48px;
margin-top: 43px;
.allbox1 {
margin-right: 22px;
background: linear-gradient(
0deg,
rgba(160, 193, 230, 0) 0%,
rgba(161, 195, 231, 0.2) 100%
);
}
.allbox2 {
margin-right: 22px;
background: linear-gradient(
0deg,
rgba(177, 219, 229, 0) 0%,
rgba(172, 216, 227, 0.2) 100%
);
}
.allbox3 {
background: linear-gradient(
0deg,
rgba(195, 209, 234, 0) 0%,
rgba(191, 206, 231, 0.2) 100%
);
}
.item {
// width: 410px;
width: calc(100% - 44px);
height: 149px;
text-align: center;
border-radius: 4px;
.item1 {
color: #089dff;
font-size: 24px;
font-weight: bold;
margin-top: 36px;
}
.item2 {
color: #333330;
font-size: 14px;
margin-top: 29px;
}
}
}
.join {
// width: 1280px;
margin-right: 48px;
// min-height: 408px;
// background: #f5f6f7;
// border-radius: 8px;
margin-top: 32px;
margin-left: 21px;
flex: 1;
.stem {
display: flex;
font-size: 16px;
font-weight: 500;
color: #333330;
line-height: 38px;
}
.options {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.radio {
margin-top: 14px;
margin-left: -16px;
position: relative;
}
.radio label {
line-height: 20px;
position: relative;
display: flex;
align-items: center;
font-weight: normal;
.opt-text {
font-size: 14px;
font-weight: bold;
color: #333330;
line-height: 18px;
margin-left: 10px;
}
}
.radio .option {
width: 19px;
height: 18px;
// position: absolute;
// top: 1px;
// // top: 32px;
// left: 0px;
background-size: cover;
background: url(../../assets/image/noselect.png) no-repeat;
background-size: cover;
}
.radio input[type="radio"] {
display: inline-block;
margin-right: -3px;
opacity: 0;
}
.radio input[type="radio"]:checked + div {
background: url(../../assets/image/select.png) no-repeat;
background-size: cover;
}
.imgcontent {
display: flex;
.imgone {
width: 140px;
height: 140px;
border-radius: 8px;
background-image: url(../../assets/image/px.png);
background-size: 100% 100%;
background-position: center;
}
}
.ontitle {
margin-top: 27px;
font-size: 14px;
color: #333330;
}
}
}
.detailB {
min-height: 363px;
background: #ffffff;
border-radius: 8px;
margin-top: 20px;
.el-tabs__item {
height: 69px;
padding: 25px 7px 0px 52px;
font-size: 14px;
font-weight: 500;
}
.el-tabs__nav-wrap::after {
background-color: rgba(56, 125, 247, 0.2);
}
.enclosure {
height: 89px;
margin-left: 51px;
margin-right: 40px;
// border-bottom: 1px solid rgba(56, 125, 247, 0.2);
display: flex;
justify-content: space-between;
align-items: center;
.enclosureL {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 400;
color: #677d86;
line-height: 24px;
}
.download {
display: flex;
align-items: center;
font-size: 16px;
font-weight: 400;
color: #2478ff;
line-height: 24px;
cursor: pointer;
}
}
.work {
margin-left: 51px;
margin-right: 40px;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 37px;
}
.work .question {
font-size: 14px;
font-weight: 500;
color: #333330;
line-height: 18px;
}
.work .active {
width: 82px;
height: 28px;
background: linear-gradient(90deg, #a5d4e0 0%, #b4dce6 100%);
border-radius: 4px;
font-size: 14px;
font-weight: 500;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-right: 11px;
}
.work .unactive {
width: 80px;
height: 26px;
border: 1px solid #a5d4e0;
border-radius: 4px;
font-size: 14px;
font-weight: 500;
color: #a5d4e0;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 11px;
cursor: pointer;
}
.work .btncolor {
background: linear-gradient(90deg, #84aad2 0%, #a4c5e9 100%);
}
.work .bordercolor {
border: 1px solid #85aad2;
}
.work .fontcolor {
color: rgba(133, 170, 210, 1);
}
.work .submit {
width: 126px;
height: 46px;
background: #2478ff;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
border-radius: 4px;
font-size: 16px;
font-weight: 800;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,598 @@
<template>
<div class="moreactive" style="padding: 30px">
<!-- 面包屑导航 -->
<div class="crumb">
<div>{{ pName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div>{{ sName }}</div>
<div style="margin-left: 6px; margin-right: 6px">/</div>
<div style="font-weight: 700; font-size: 16px">外链详情</div>
<!--
<div class="preNext">
<button class="btn btn01"></button>
<span class="content" style="margin-left: 6px">上一个</span>
<span class="content" style="margin-left: 31px">下一个</span>
<button class="btn btn02" style="margin-left: 6px"></button>
</div>
-->
<div class="return">
<div style="display: flex" @click="returnclick">
<el-button style="color:#0073FB"> <img class="img2" style="margin-right:11px;cursor: pointer;" src="../../assets/image/return.png" />返回</el-button>
</div>
</div>
</div>
<!-- 面包屑导航 -->
<!-- <div class="debateTitle">考试{{ dataInfo?.voteName }}</div> -->
<!-- 详细信息 -->
<div class="detailinfo">
<div class="detail">
<div class="detailT">
<div class="left">
<div class="debateTitle" style="color:rgba(51, 51, 51, 1);font-size:20px;margin-top:46px;">外链{{ exname }}</div>
<div style="display: flex;justify-content: space-between;align-items: center;">
<div class="title">
<img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">链接网址</div>
<div class="box"></div>
</div>
<div class="">
<button class="tijiao" @click="handleClick(state.datainfo.linkAddress)">查看</button>
</div>
</div>
<div class="all" style="font-size:14px;color:rgba(51, 51, 48, 1);">
{{ state.datainfo.linkAddress ? state.datainfo.linkAddress : "-" }}
</div>
</div>
</div>
<div class="detailT" style="margin-top:20px;height:671px;">
<div class="left">
<div class="title">
<img
style="width: 20px; height: 20px"
src="../../assets/image/yuan.png"
/>
<div class="text">链接说明</div>
<div class="box"></div>
</div>
<!-- <div style="display: flex; align-items: center"></div> -->
<div class="all" style="font-size:14px;color:rgba(51, 51, 48, 1);">
<div>
{{ state.datainfo.linkDescription ? state.datainfo.linkDescription : "暂无链接说明" }}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 详细信息 -->
</div>
</template>
<script setup>
import {useRequest, request} from "@/api/request";
import {
LINKGETONE
} from "@/api/api";
import {reactive} from "vue";
import {useRoute,useRouter} from "vue-router/dist/vue-router";
const {
query: {courseId, pName, sName, chapterOrStageId, infoId, id, exname},
} = useRoute();
const router = useRouter();
const returnclick = () => {
router.back();
};
const state = reactive({
datainfo: {}
})
//获取基本信息
request(LINKGETONE, {linkId:courseId}).then(res=>{
console.log(res)
state.datainfo = res.data
}).catch(err=>{
console.log(err)
});
console.log('我是获取的外链基本信息', state.dataInfo)
// 查看外链
const handleClick = (url) => {
window.open(url);
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.tijiao {
z-index: 999;
cursor: pointer;
margin-top: 22px;
margin-right: 40px;
width: 33px;
height: 16px;
font-size: 16px;
font-weight: 800;
color: #ffffff;
line-height: 24px;
border: 0;
background-color: #fff;
width: 162px;
height: 62px;
background-image: url("../../assets/image/tijiao.png");
}
.clearfix:before,
.clearfix:after {
content: "";
display: table;
clear: both;
}
.moreactive {
.crumb {
color: #fff;
display: flex;
font-size: 14px;
line-height: 24px;
position: relative;
}
.return{
position: absolute;
right: 10%;
.text{
text-align: center;
display: flex;
flex-direction: row;
align-items: center;
}
}
.preNext {
position: absolute;
right: 0px;
.content {
font-size: 14px;
color: #fff;
width: 43px;
height: 14px;
display: inline-block;
position: relative;
top: -6px;
cursor: pointer;
}
.btn {
width: 23px;
height: 23px;
border-radius: 50%;
border: 0;
cursor: pointer;
}
.btn01 {
background-image: url("../../assets/image/prev.png");
}
.btn02 {
background-image: url("../../assets/image/next.png");
}
}
.debateTitle {
margin-top: 15px;
font-size: 20px;
line-height: 24px;
height: 24px;
font-weight: 600;
color: #fff;
margin-left: -10px;
}
.detailinfo {
width: 100%;
margin-top: 20px;
display: flex;
.detail {
flex: 1;
// margin-right: 20px;
.detailT {
min-height: 95px;
background: #ffffff;
border-radius: 8px;
color: rgba(51, 51, 51, 1);
display: flex;
padding-bottom: 20px;
.left {
margin-left: 48px;
flex: 1;
}
.right {
width: 417px;
margin-right: 48px;
.righttitle {
display: flex;
padding-top: 39px;
position: relative;
.text {
margin-left: 8px;
font-size: 16px;
color: rgba(51, 51, 51, 1);
font-weight: 800;
}
.box {
width: 75px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 23px;
top: 53px;
}
}
.timebox {
width: 417px;
height: 149px;
background: linear-gradient(90deg, #b6c6e1 0%, #89aed6 100%);
border-radius: 4px;
margin-top: 42px;
}
.innertime {
margin-top: 17px;
margin-left: 55px;
font-size: 14px;
font-weight: 500;
color: #ffffff;
line-height: 24px;
}
.endtime {
margin-left: 10px;
margin-top: 16px;
width: 397px;
height: 81px;
background: #f2f5f7;
border-radius: 0px 8px 0px 8px;
.endtimetext {
margin-top: 25px;
margin-left: 46px;
.te {
font-size: 28px;
font-weight: 800;
color: #4a9cf8;
line-height: 24px;
}
}
}
.explain {
margin-top: 30px;
width: 416px;
padding-bottom: 50px;
background: #f2f5f7;
border-radius: 8px;
}
.explaincontent {
width: 368px;
font-size: 16px;
font-weight: 500;
color: #333330;
line-height: 24px;
margin-left: 24px;
margin-top: 47px;
}
}
.title {
display: flex;
align-items: center;
padding-top: 39px;
position: relative;
}
.title .text {
margin-left: 8px;
font-size: 16px;
color: rgba(51, 51, 51, 1);
font-weight: 800;
}
.title .box {
width: 75px;
height: 10px;
background-color: rgba(36, 120, 255, 0.15);
position: absolute;
left: 23px;
top: 53px;
}
.all {
display: flex;
justify-content: space-between;
// width: 1280px;
margin-right: 48px;
margin-top: 43px;
.allbox1 {
margin-right: 22px;
background: linear-gradient(
0deg,
rgba(160, 193, 230, 0) 0%,
rgba(161, 195, 231, 0.2) 100%
);
}
.allbox2 {
margin-right: 22px;
background: linear-gradient(
0deg,
rgba(177, 219, 229, 0) 0%,
rgba(172, 216, 227, 0.2) 100%
);
}
.allbox3 {
background: linear-gradient(
0deg,
rgba(195, 209, 234, 0) 0%,
rgba(191, 206, 231, 0.2) 100%
);
}
.item {
// width: 410px;
width: calc(100% - 44px);
height: 149px;
text-align: center;
border-radius: 4px;
.item1 {
color: #089dff;
font-size: 24px;
font-weight: bold;
margin-top: 36px;
}
.item2 {
color: #333330;
font-size: 14px;
margin-top: 29px;
}
}
}
.join {
// width: 1280px;
margin-right: 48px;
// min-height: 408px;
// background: #f5f6f7;
// border-radius: 8px;
margin-top: 32px;
margin-left: 21px;
flex: 1;
.stem {
display: flex;
font-size: 16px;
font-weight: 500;
color: #333330;
line-height: 38px;
}
.options {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.radio {
margin-top: 14px;
margin-left: -16px;
position: relative;
}
.radio label {
line-height: 20px;
position: relative;
display: flex;
align-items: center;
font-weight: normal;
.opt-text {
font-size: 14px;
font-weight: bold;
color: #333330;
line-height: 18px;
margin-left: 10px;
}
}
.radio .option {
width: 19px;
height: 18px;
// position: absolute;
// top: 1px;
// // top: 32px;
// left: 0px;
background-size: cover;
background: url(../../assets/image/noselect.png) no-repeat;
background-size: cover;
}
.radio input[type="radio"] {
display: inline-block;
margin-right: -3px;
opacity: 0;
}
.radio input[type="radio"]:checked + div {
background: url(../../assets/image/select.png) no-repeat;
background-size: cover;
}
.imgcontent {
display: flex;
.imgone {
width: 140px;
height: 140px;
border-radius: 8px;
background-image: url(../../assets/image/px.png);
background-size: 100% 100%;
background-position: center;
}
}
.ontitle {
margin-top: 27px;
font-size: 14px;
color: #333330;
}
}
}
.detailB {
min-height: 363px;
background: #ffffff;
border-radius: 8px;
margin-top: 20px;
.el-tabs__item {
height: 69px;
padding: 25px 7px 0px 52px;
font-size: 14px;
font-weight: 500;
}
.el-tabs__nav-wrap::after {
background-color: rgba(56, 125, 247, 0.2);
}
.enclosure {
height: 89px;
margin-left: 51px;
margin-right: 40px;
// border-bottom: 1px solid rgba(56, 125, 247, 0.2);
display: flex;
justify-content: space-between;
align-items: center;
.enclosureL {
display: flex;
align-items: center;
font-size: 14px;
font-weight: 400;
color: #677d86;
line-height: 24px;
}
.download {
display: flex;
align-items: center;
font-size: 16px;
font-weight: 400;
color: #2478ff;
line-height: 24px;
cursor: pointer;
}
}
.work {
margin-left: 51px;
margin-right: 40px;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 37px;
}
.work .question {
font-size: 14px;
font-weight: 500;
color: #333330;
line-height: 18px;
}
.work .active {
width: 82px;
height: 28px;
background: linear-gradient(90deg, #a5d4e0 0%, #b4dce6 100%);
border-radius: 4px;
font-size: 14px;
font-weight: 500;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
margin-right: 11px;
}
.work .unactive {
width: 80px;
height: 26px;
border: 1px solid #a5d4e0;
border-radius: 4px;
font-size: 14px;
font-weight: 500;
color: #a5d4e0;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 11px;
cursor: pointer;
}
.work .btncolor {
background: linear-gradient(90deg, #84aad2 0%, #a4c5e9 100%);
}
.work .bordercolor {
border: 1px solid #85aad2;
}
.work .fontcolor {
color: rgba(133, 170, 210, 1);
}
.work .submit {
width: 126px;
height: 46px;
background: #2478ff;
box-shadow: 0px 1px 8px 0px rgba(56, 125, 247, 0.7);
border-radius: 4px;
font-size: 16px;
font-weight: 800;
color: #ffffff;
line-height: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
}
}
}
</style>

View File

@@ -92,10 +92,16 @@ export default defineConfig(({ command, mode }) =>
changeOrigin: true,
}, '/link': {
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true,
changeOrigin: true,
}, '/onlineClasses/queryOnlineClassesStudyDetail': {
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true,
},'/external/exam/queryExternalExam': {
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true,
},'/link/getOne': {
target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
changeOrigin: true,
},
}
}