mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 03:46:48 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-stu into develop
This commit is contained in:
3
.env
3
.env
@@ -1,5 +1,5 @@
|
|||||||
VITE_BASE=/fe-student
|
VITE_BASE=/fe-student
|
||||||
VITE_BASE_API=/
|
VITE_BASE_API=
|
||||||
VITE_BASE_LOGIN_URL=https://u-pre.boe.com/web/
|
VITE_BASE_LOGIN_URL=https://u-pre.boe.com/web/
|
||||||
VITE_PROXY_URL=http://111.231.196.214:30001
|
VITE_PROXY_URL=http://111.231.196.214:30001
|
||||||
|
|
||||||
@@ -13,3 +13,4 @@ VITE_BOE_EXAM_DETAIL_URL=https://u-pre.boe.com/pc/exam/test?id=
|
|||||||
VITE_BOE_API_URL=https://u-pre.boe.com
|
VITE_BOE_API_URL=https://u-pre.boe.com
|
||||||
|
|
||||||
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
|
VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
|
||||||
|
# VITE_TASK_WHITE_TYPE=-8-,-12-
|
||||||
@@ -16,7 +16,8 @@
|
|||||||
"axios": "^1.1.3",
|
"axios": "^1.1.3",
|
||||||
"core-js": "^3.26.0",
|
"core-js": "^3.26.0",
|
||||||
"dayjs": "^1.11.6",
|
"dayjs": "^1.11.6",
|
||||||
"element-plus": "^2.2.20",
|
"element-plus": "^2.2.27",
|
||||||
|
"json-bigint": "^1.0.0",
|
||||||
"vue": "^3.2.45",
|
"vue": "^3.2.45",
|
||||||
"vue-router": "^4.1.6",
|
"vue-router": "^4.1.6",
|
||||||
"vuex": "^4.1.0"
|
"vuex": "^4.1.0"
|
||||||
|
|||||||
9722
pnpm-lock.yaml
generated
9722
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -2,13 +2,13 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-12-11 16:57:58
|
* @Date: 2022-12-11 16:57:58
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2022-12-17 14:59:41
|
* @LastEditTime: 2022-12-18 18:37:26
|
||||||
* @FilePath: /fe-stu/src/api/api.js
|
* @FilePath: /fe-stu/src/api/api.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
export const LOGIN = '/admin/CheckUser/userLogin post'
|
export const LOGIN = '/admin/CheckUser/userLogin post'
|
||||||
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
// export const FILE_UPLOAD = 'http://111.231.196.214:30001/file/upload'
|
||||||
export const FILE_UPLOAD = import.meta.env.VITE_BASE_API + '/file/upload'
|
export const FILE_UPLOAD = '/file/upload'
|
||||||
export const COMMON_TOKEN = 'https://upload-z2.qiniup.com'
|
export const COMMON_TOKEN = 'https://upload-z2.qiniup.com'
|
||||||
export const ROUTER_CHAPTER_LIST = '/stu/router/chapterList'
|
export const ROUTER_CHAPTER_LIST = '/stu/router/chapterList'
|
||||||
export const ROUTER_LIST = '/stu/router/list post'
|
export const ROUTER_LIST = '/stu/router/list post'
|
||||||
@@ -18,6 +18,8 @@ export const PROJECT_PROCESS = '/stu/project/process'
|
|||||||
export const ROUTER_UNCOMPLETE_LIST = '/stu/router/unCompleteTaskList post'
|
export const ROUTER_UNCOMPLETE_LIST = '/stu/router/unCompleteTaskList post'
|
||||||
export const TAS_ACTIVITY_DETAIL = '/activity'
|
export const TAS_ACTIVITY_DETAIL = '/activity'
|
||||||
export const TASK_ACTIVITY_SIGN = '/stu/task/activity/sign post'
|
export const TASK_ACTIVITY_SIGN = '/stu/task/activity/sign post'
|
||||||
|
export const TASK_OFFCOURSE_NOTASK_SIGN = '/stu/task/offcourse/notask/sign post'
|
||||||
|
export const TASK_OFFCOURSE_SIGN = '/stu/task/offcourse/sign post'
|
||||||
export const TASK_BROADCAST_COMMIT = '/stu/task/broadcast/commit'
|
export const TASK_BROADCAST_COMMIT = '/stu/task/broadcast/commit'
|
||||||
export const TASK_BROADCAST_DETAIL = '/liveBroadcast'
|
export const TASK_BROADCAST_DETAIL = '/liveBroadcast'
|
||||||
export const TASK_BROADCAST_SIGN = '/stu/task/broadcast/sign post'
|
export const TASK_BROADCAST_SIGN = '/stu/task/broadcast/sign post'
|
||||||
@@ -52,3 +54,6 @@ export const ASSESSMENT_QUERY = assessmentId => `/stu/task/evaluate/get`
|
|||||||
export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post'
|
export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post'
|
||||||
|
|
||||||
export const ACTIVITY = '/activity'
|
export const ACTIVITY = '/activity'
|
||||||
|
|
||||||
|
export const STUDY_RECORD = '/stu/task/thirdTask/submit post'
|
||||||
|
export const PROJECT_LIST = '/stu/project/list post'
|
||||||
@@ -2,7 +2,8 @@ import router from "@/router";
|
|||||||
import { reactive, ref, toRefs, watch } from "vue";
|
import { reactive, ref, toRefs, watch } from "vue";
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { getCookie } from "@/api/utils";
|
import { getCookie } from "@/api/utils";
|
||||||
|
import JSONBigInt from 'json-bigint';
|
||||||
|
const JSONBigIntStr = JSONBigInt({ storeAsString: true });
|
||||||
export function usePage(_url, param) {
|
export function usePage(_url, param) {
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@@ -130,19 +131,16 @@ export async function boeRequest(_url, params) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const body = method !== 'get' ? params || {} : {}
|
const body = method !== 'get' ? params || {} : {}
|
||||||
return axios({
|
return fetch(url,{
|
||||||
url,
|
|
||||||
method,
|
method,
|
||||||
headers: {
|
headers:{
|
||||||
token: getCookie('token'),
|
token: getCookie('token'),
|
||||||
...method !== 'get' ? { 'Content-Type': 'application/json' } : {}
|
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
||||||
},
|
},
|
||||||
baseURL: '',
|
...method !== 'get' ? {body: JSON.stringify(body)} : {}
|
||||||
...method !== 'get' ? { data: JSON.stringify(body) } : {}
|
}).then(res=>{
|
||||||
}).then(resp => resp.data).then(response => {
|
return res.text()
|
||||||
return response
|
}).then(res=>{
|
||||||
}).catch(e => {
|
return JSONBigIntStr.parse(res)
|
||||||
console.log(e)
|
|
||||||
// router.push({path: '/login'})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,3 @@
|
|||||||
<!--
|
|
||||||
* @Author: lixg lixg@dongwu-inc.com
|
|
||||||
* @Date: 2022-12-11 16:57:58
|
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
|
||||||
* @LastEditTime: 2022-12-17 14:51:44
|
|
||||||
* @FilePath: /fe-stu/src/components/img/UploadImg.vue
|
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<el-upload
|
<el-upload
|
||||||
:file-list="files"
|
:file-list="files"
|
||||||
@@ -13,7 +5,9 @@
|
|||||||
method="POST"
|
method="POST"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:on-change="handleChange"
|
:on-change="handleChange"
|
||||||
|
:limit="max"
|
||||||
ref="imageRef"
|
ref="imageRef"
|
||||||
|
:on-exceed="exceed"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<div>
|
<div>
|
||||||
@@ -23,56 +17,64 @@
|
|||||||
</el-upload>
|
</el-upload>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { FILE_UPLOAD } from "@/api/api";
|
import {FILE_UPLOAD} from "@/api/api";
|
||||||
import { defineProps, ref } from "vue";
|
import {defineProps, ref, watch} from "vue";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
const { modelValue = [] } = defineProps({
|
const props = defineProps({
|
||||||
modelValue: [],
|
value: [],
|
||||||
});
|
max: {
|
||||||
|
type: Number,
|
||||||
|
default: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const emit = defineEmits();
|
const emit = defineEmits()
|
||||||
|
|
||||||
const files = ref(modelValue);
|
const files = ref([])
|
||||||
const imageRef = ref();
|
const imageRef = ref()
|
||||||
|
|
||||||
|
watch(props.value, () => {
|
||||||
|
props.value.length || (files.value = props.value)
|
||||||
|
})
|
||||||
|
|
||||||
|
function exceed() {
|
||||||
|
ElMessage.error(`只能上传${props.max}个附件`);
|
||||||
|
}
|
||||||
|
|
||||||
function handleChange(e) {
|
function handleChange(e) {
|
||||||
console.log("上传", e);
|
|
||||||
if (e.response && e.response.code === 200) {
|
if (e.response && e.response.code === 200) {
|
||||||
e.url = e.response.data;
|
e.url = e.response.data
|
||||||
}
|
}
|
||||||
|
|
||||||
const index = files.value.findIndex((f) => f.uid === e.uid);
|
const index = files.value.findIndex(f => f.uid === e.uid)
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
files.value.unshift(e);
|
files.value.unshift(e)
|
||||||
} else {
|
} else {
|
||||||
files.value[index] = e;
|
files.value[index] = e
|
||||||
}
|
}
|
||||||
emit("update:modelValue", files);
|
emit('update:value', files.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove(i) {
|
function remove(i) {
|
||||||
files.value.splice(i, 1);
|
files.value.splice(i, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
function reUpload(i) {
|
function reUpload(i) {
|
||||||
if (
|
if (files.value[i].status === 'ready' || files.value[i].status === 'uploading') {
|
||||||
files.value[i].status === "ready" ||
|
imageRef.value.abort(files.value[i].raw)
|
||||||
files.value[i].status === "uploading"
|
files.value[i].status = 'abort';
|
||||||
) {
|
} else if (files.value[i].status === 'fail' || files.value[i].status === 'abort') {
|
||||||
imageRef.value.abort(files.value[i].raw);
|
imageRef.value.handleStart(files.value[i].raw)
|
||||||
files.value[i].status = "abort";
|
imageRef.value.submit()
|
||||||
} else if (
|
|
||||||
files.value[i].status === "fail" ||
|
|
||||||
files.value[i].status === "abort"
|
|
||||||
) {
|
|
||||||
imageRef.value.handleStart(files.value[i].raw);
|
|
||||||
imageRef.value.submit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function abort(i) {
|
function abort(i) {
|
||||||
imageRef.value.abort(files.value[i].raw);
|
imageRef.value.abort(files.value[i].raw)
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ reUpload, remove });
|
|
||||||
|
defineExpose({reUpload, remove})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
10
src/main.js
10
src/main.js
@@ -1,4 +1,12 @@
|
|||||||
import {createApp} from 'vue'
|
/*
|
||||||
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
|
* @Date: 2022-12-11 16:57:58
|
||||||
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
|
* @LastEditTime: 2022-12-18 16:31:00
|
||||||
|
* @FilePath: /fe-stu/src/main.js
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
*/
|
||||||
|
import { createApp } from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
|
|||||||
@@ -52,8 +52,7 @@
|
|||||||
class="btn"
|
class="btn"
|
||||||
style="margin-right: 20px"
|
style="margin-right: 20px"
|
||||||
:style="{
|
:style="{
|
||||||
background:
|
background: data.signFlag ? '#999' : 'rgb(57, 146, 249)',
|
||||||
data.signFlag || !isAllowSign ? '#999' : 'rgb(57, 146, 249)',
|
|
||||||
}"
|
}"
|
||||||
@click="signClick"
|
@click="signClick"
|
||||||
>{{ data.signFlag ? "已签到" : "签到" }}
|
>{{ data.signFlag ? "已签到" : "签到" }}
|
||||||
@@ -236,13 +235,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, reactive, toRefs, watch } from "vue";
|
import { computed, reactive, toRefs, watch, onUnmounted } from "vue";
|
||||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||||
import { request, useRequest } from "@/api/request";
|
import { request, useRequest } from "@/api/request";
|
||||||
import { STU_OFFCOURSE_DETAIL } from "@/api/api";
|
import {
|
||||||
|
STU_OFFCOURSE_DETAIL,
|
||||||
|
TASK_OFFCOURSE_NOTASK_SIGN,
|
||||||
|
TASK_OFFCOURSE_SIGN,
|
||||||
|
TASK_BROADCAST_SIGN,
|
||||||
|
} from "@/api/api";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useUserInfo } from "@/api/utils";
|
import { useUserInfo } from "@/api/utils";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const returnclick = () => {
|
const returnclick = () => {
|
||||||
router.back();
|
router.back();
|
||||||
@@ -273,56 +277,45 @@ let timer = null;
|
|||||||
//判断能否签到
|
//判断能否签到
|
||||||
function isSignClick() {
|
function isSignClick() {
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
|
let beginTime = new Date(data.value.planDto.beginTime).getTime();
|
||||||
|
let endTime = !data.value.planDto.afterStart
|
||||||
|
? new Date(data.value.planDto.endTime).getTime()
|
||||||
|
: new Date(data.value.planDto.beginTime).getTime();
|
||||||
|
let nowTime = new Date().getTime();
|
||||||
if (data.value.planDto.beforeStart && data.value.planDto.afterStart) {
|
if (data.value.planDto.beforeStart && data.value.planDto.afterStart) {
|
||||||
//有开始前有开始后
|
//有开始前有开始后
|
||||||
let beginTime =
|
beginTime = beginTime - data.value.planDto.beforeStart * 60 * 1000;
|
||||||
new Date(data.value.planDto.beginTime).getTime() -
|
endTime = endTime + data.value.planDto.afterStart * 60 * 1000;
|
||||||
data.value.planDto.beforeStart * 60 * 1000;
|
console.log("1111");
|
||||||
let endTime =
|
|
||||||
new Date(data.value.planDto.beginTime).getTime() +
|
|
||||||
data.value.planDto.afterStart * 60 * 1000;
|
|
||||||
let nowTime = new Date().getTime();
|
|
||||||
if (nowTime < endTime && nowTime > beginTime) {
|
|
||||||
state.isAllowSign = true;
|
|
||||||
} else {
|
|
||||||
state.isAllowSign = false;
|
|
||||||
}
|
|
||||||
} else if (
|
|
||||||
!data.value.planDto.beforeStart &&
|
|
||||||
!data.value.planDto.afterStart
|
|
||||||
) {
|
|
||||||
//开始前开始后都没有
|
|
||||||
state.isAllowSign = true;
|
|
||||||
} else if (
|
} else if (
|
||||||
data.value.planDto.beforeStart &&
|
data.value.planDto.beforeStart &&
|
||||||
!data.value.planDto.afterStart
|
!data.value.planDto.afterStart
|
||||||
) {
|
) {
|
||||||
//只有开始前无开始后
|
//只有开始前无开始后
|
||||||
let beginTime =
|
beginTime = beginTime - data.value.planDto.beforeStart * 60 * 1000;
|
||||||
new Date(data.value.planDto.beginTime).getTime() -
|
console.log("11112222");
|
||||||
data.value.planDto.beforeStart * 60 * 1000;
|
|
||||||
let nowTime = new Date().getTime();
|
|
||||||
if (nowTime > beginTime) {
|
|
||||||
state.isAllowSign = true;
|
|
||||||
} else {
|
|
||||||
state.isAllowSign = false;
|
|
||||||
}
|
|
||||||
} else if (
|
} else if (
|
||||||
!data.value.planDto.beforeStart &&
|
!data.value.planDto.beforeStart &&
|
||||||
data.value.planDto.afterStart
|
data.value.planDto.afterStart
|
||||||
) {
|
) {
|
||||||
//无开始前有开始后
|
//无开始前有开始后
|
||||||
let endTime =
|
endTime = endTime + data.value.planDto.afterStart * 60 * 1000;
|
||||||
new Date(data.value.planDto.beginTime).getTime() +
|
console.log("1111333");
|
||||||
data.value.planDto.afterStart * 60 * 1000;
|
}
|
||||||
let nowTime = new Date().getTime();
|
if (nowTime < endTime && nowTime > beginTime) {
|
||||||
if (nowTime < endTime) {
|
|
||||||
state.isAllowSign = true;
|
state.isAllowSign = true;
|
||||||
} else {
|
} else {
|
||||||
state.isAllowSign = false;
|
state.isAllowSign = false;
|
||||||
}
|
}
|
||||||
}
|
// console.log(
|
||||||
console.log("isAllowSign", state.isAllowSign);
|
// "isAllowSign",
|
||||||
|
// state.isAllowSign,
|
||||||
|
// nowTime,
|
||||||
|
// endTime,
|
||||||
|
// beginTime,
|
||||||
|
// nowTime < endTime,
|
||||||
|
// nowTime > beginTime
|
||||||
|
// );
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
isSignClick();
|
isSignClick();
|
||||||
@@ -332,14 +325,26 @@ const signClick = () => {
|
|||||||
if (data.value.signFlag) {
|
if (data.value.signFlag) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("data.signFlag", data.value.signFlag);
|
// console.log(
|
||||||
if (!isAllowSign) {
|
// "data.signFlag",
|
||||||
|
// data.value.signFlag,
|
||||||
|
// state.isAllowSign,
|
||||||
|
// !state.isAllowSign
|
||||||
|
// );
|
||||||
|
if (!state.isAllowSign) {
|
||||||
|
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
|
||||||
ElMessage.info("未在签到范围内");
|
ElMessage.info("未在签到范围内");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
2;
|
||||||
data.value.signFlag = 1;
|
data.value.signFlag = 1;
|
||||||
ElMessage.info("签到成功");
|
ElMessage.info("签到成功");
|
||||||
request(TASK_BROADCAST_SIGN, { courseId: courseId, taskId, type });
|
|
||||||
|
if (taskId) {
|
||||||
|
request(TASK_OFFCOURSE_SIGN, { courseId: courseId, taskId, type });
|
||||||
|
} else {
|
||||||
|
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId });
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function toSurvery() {
|
function toSurvery() {
|
||||||
@@ -378,6 +383,12 @@ function toExamItem(obj) {
|
|||||||
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId); //测评
|
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId); //测评
|
||||||
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (timer) {
|
||||||
|
clearInterval(timer);
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
|||||||
@@ -57,12 +57,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<UploadImg v-model="fileList" ref="uploadRef">
|
<UploadImg v-model:value="fileList" ref="uploadRef">
|
||||||
<button
|
<button
|
||||||
class="shangchuan"
|
class="shangchuan"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
@mousemove="showFileList = 1"
|
|
||||||
@mouseout="showFileList = 0"
|
|
||||||
>
|
>
|
||||||
上传
|
上传
|
||||||
</button>
|
</button>
|
||||||
@@ -197,6 +195,9 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ value.workUploadContent }}
|
{{ value.workUploadContent }}
|
||||||
|
<span style="margin-left: 10px">
|
||||||
|
<el-link target="_blank" type="primary" :href="value.workUploadAddress?.split(',')[0] || ''">{{value.workUploadAddress?.split(',')[0].split('/').at(-1)|| ''}}</el-link>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -274,7 +275,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, toRefs } from "vue";
|
import {computed, reactive, ref, toRefs} from "vue";
|
||||||
import { request, useRequest } from "@/api/request";
|
import { request, useRequest } from "@/api/request";
|
||||||
import {
|
import {
|
||||||
TASK_WORK_COMMIT,
|
TASK_WORK_COMMIT,
|
||||||
@@ -293,7 +294,6 @@ import {ElMessage} from "element-plus";
|
|||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
const uploadRef = ref();
|
const uploadRef = ref();
|
||||||
|
|
||||||
const showFileList = ref(0);
|
|
||||||
const centerDialogVisible =ref(false);
|
const centerDialogVisible =ref(false);
|
||||||
const sbValue = ref({
|
const sbValue = ref({
|
||||||
content: "",
|
content: "",
|
||||||
@@ -312,15 +312,15 @@ const { data } = useRequest(TASK_WORK_DETAIL, { workId, taskId });
|
|||||||
const { data: submitList } = useRequest(TASK_WORK_SUBMIT_LIST, {
|
const { data: submitList } = useRequest(TASK_WORK_SUBMIT_LIST, {
|
||||||
workerId: workId,
|
workerId: workId,
|
||||||
});
|
});
|
||||||
const handleClose=()=> {
|
|
||||||
router.back();
|
|
||||||
};
|
|
||||||
const open=()=>{
|
const open=()=>{
|
||||||
centerDialogVisible.value = true
|
centerDialogVisible.value = true
|
||||||
};
|
};
|
||||||
|
const showFileList = computed(()=>{
|
||||||
|
return fileList.value.length
|
||||||
|
})
|
||||||
|
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
console.log(sbValue.value);
|
|
||||||
console.log(fileList);
|
|
||||||
if(!sbValue.value.content){
|
if(!sbValue.value.content){
|
||||||
|
|
||||||
return ElMessage.warning("请输入作业内容");
|
return ElMessage.warning("请输入作业内容");
|
||||||
@@ -337,6 +337,7 @@ const handleClick = () => {
|
|||||||
open();
|
open();
|
||||||
});
|
});
|
||||||
sbValue.value.content = "";
|
sbValue.value.content = "";
|
||||||
|
fileList.value = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
function remove(i) {
|
function remove(i) {
|
||||||
@@ -485,8 +486,8 @@ function reUpload(i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.square {
|
.square {
|
||||||
width: 475px;
|
padding-bottom: 40px;
|
||||||
height: 243px;
|
width: 600px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0px 1px 24px 0px rgba(0, 0, 0, 0.11);
|
box-shadow: 0px 1px 24px 0px rgba(0, 0, 0, 0.11);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|||||||
@@ -15,14 +15,14 @@
|
|||||||
<div class="title">
|
<div class="title">
|
||||||
<div class="titleL">{{ i.stageName }}</div>
|
<div class="titleL">{{ i.stageName }}</div>
|
||||||
<div class="titleR" :style="{ display: 'flex' }">
|
<div class="titleR" :style="{ display: 'flex' }">
|
||||||
<img src="../../assets/image/pathdetails/circle.png"/>
|
<img src="../../assets/image/pathdetails/circle.png" />
|
||||||
<div class="titleRT">进行中</div>
|
<div class="titleRT">进行中</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="titleR"
|
class="titleR"
|
||||||
:style="{ display: i.status === 2 ? 'flex' : 'none' }"
|
:style="{ display: i.status === 2 ? 'flex' : 'none' }"
|
||||||
>
|
>
|
||||||
<img src="../../assets/image/pathdetails/circle2.png"/>
|
<img src="../../assets/image/pathdetails/circle2.png" />
|
||||||
<div class="titleRT" style="color: rgba(102, 102, 102, 1)">
|
<div class="titleRT" style="color: rgba(102, 102, 102, 1)">
|
||||||
未开始
|
未开始
|
||||||
</div>
|
</div>
|
||||||
@@ -30,7 +30,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="course"
|
class="course"
|
||||||
v-for="(value, index) in i.taskProcessList.filter(e=>!whiteTypes(e.type))"
|
v-for="(value, index) in i.taskProcessList.filter(
|
||||||
|
(e) => !whiteTypes(e.type)
|
||||||
|
)"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
@@ -98,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="goclass" @click="toFinish(value,i.name)">
|
<div class="goclass" @click="toFinish(value, i.name, i.stageId)">
|
||||||
{{
|
{{
|
||||||
value.status === 1
|
value.status === 1
|
||||||
? "已完成"
|
? "已完成"
|
||||||
@@ -131,8 +133,8 @@
|
|||||||
<div class="detailRT">
|
<div class="detailRT">
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane label="课程公告" name="first">
|
<el-tab-pane label="课程公告" name="first">
|
||||||
<div class="notice">{{data}}
|
<div class="notice">
|
||||||
{{ data.remark || '暂无公告' }}
|
{{ data.remark || "暂无公告" }}
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!--
|
<!--
|
||||||
@@ -178,15 +180,15 @@
|
|||||||
class="teacheritem"
|
class="teacheritem"
|
||||||
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }"
|
:style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }"
|
||||||
>
|
>
|
||||||
<img class="peopleimg" :src="`/upload${userInfo.avatar}`"/>
|
<img class="peopleimg" :src="`/upload${userInfo.avatar}`" />
|
||||||
<div style="margin-left: 17px">
|
<div style="margin-left: 17px">
|
||||||
<div class="teacherName">
|
<div class="teacherName">
|
||||||
<div style="margin-right: 5px">
|
<div style="margin-right: 5px">
|
||||||
{{ userInfo?.realName }}
|
{{ userInfo?.realName }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div v-for="(item, key) in data.userInfoBo?.medal" :key="key">-->
|
<!-- <div v-for="(item, key) in data.userInfoBo?.medal" :key="key">-->
|
||||||
<!-- <img class="teacherMedal" :src="item"/>-->
|
<!-- <img class="teacherMedal" :src="item"/>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="introduce">{{ userInfo?.bandDesc }}</div>
|
<div class="introduce">{{ userInfo?.bandDesc }}</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,7 +209,6 @@
|
|||||||
<div class="ratebtn">继续学习</div>
|
<div class="ratebtn">继续学习</div>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-top: 16px">
|
<div style="margin-top: 16px">
|
||||||
<div class="progressBox">
|
<div class="progressBox">
|
||||||
<div>总进度</div>
|
<div>总进度</div>
|
||||||
@@ -301,7 +302,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, reactive, ref} from "vue";
|
import { computed, reactive, ref } from "vue";
|
||||||
import word from "@/assets/image/file/word.png";
|
import word from "@/assets/image/file/word.png";
|
||||||
import ppt from "@/assets/image/file/ppt.png";
|
import ppt from "@/assets/image/file/ppt.png";
|
||||||
import pdf from "@/assets/image/file/pdf.png";
|
import pdf from "@/assets/image/file/pdf.png";
|
||||||
@@ -311,20 +312,27 @@ import medal1 from "@/assets/image/medal/medal1.png";
|
|||||||
import medal2 from "@/assets/image/medal/medal2.png";
|
import medal2 from "@/assets/image/medal/medal2.png";
|
||||||
import medal3 from "@/assets/image/medal/medal3.png";
|
import medal3 from "@/assets/image/medal/medal3.png";
|
||||||
import img from "@/assets/image/uploadimg.png";
|
import img from "@/assets/image/uploadimg.png";
|
||||||
import {useRequest, request} from "@/api/request";
|
import { useRequest, request } from "@/api/request";
|
||||||
import {PROJECT_PROCESS, ROUTER_PROCESS, LINK_DETAILS} from "@/api/api";
|
import {
|
||||||
import {useRoute, useRouter} from "vue-router";
|
PROJECT_PROCESS,
|
||||||
|
ROUTER_PROCESS,
|
||||||
|
LINK_DETAILS,
|
||||||
|
STUDY_RECORD,
|
||||||
|
} from "@/api/api";
|
||||||
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import {ElMessage} from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
query: {courseId, projectId},
|
query: { courseId, projectId },
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const returnclick = () => {
|
const returnclick = () => {
|
||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
const {data} = useRequest(PROJECT_PROCESS, {projectId: projectId || courseId});
|
const { data } = useRequest(PROJECT_PROCESS, {
|
||||||
|
projectId: projectId || courseId,
|
||||||
|
});
|
||||||
const userInfo = computed(() => store.state.userInfo);
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
|
|
||||||
const activeName = ref("first");
|
const activeName = ref("first");
|
||||||
@@ -332,7 +340,7 @@ const activeName = ref("first");
|
|||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
console.log(tab, event);
|
console.log(tab, event);
|
||||||
};
|
};
|
||||||
const path = {1: "path"};
|
const path = { 1: "path" };
|
||||||
|
|
||||||
const types = ref({
|
const types = ref({
|
||||||
typeName: {
|
typeName: {
|
||||||
@@ -372,34 +380,61 @@ const types = ref({
|
|||||||
4: "/homeworkpage",
|
4: "/homeworkpage",
|
||||||
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
5: import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||||
6: "/livebroadcast",
|
6: "/livebroadcast",
|
||||||
7: ({courseId}) => request(LINK_DETAILS(courseId), {}).then(({data: {linkAddress}}) => window.open(linkAddress)),//外联
|
7: ({ courseId }) =>
|
||||||
|
request(LINK_DETAILS(courseId), {}).then(({ data: { linkAddress } }) =>
|
||||||
|
window.open(linkAddress)
|
||||||
|
), //外联
|
||||||
8: "/discusspage",
|
8: "/discusspage",
|
||||||
9: "/moreactive",
|
9: "/moreactive",
|
||||||
10: ({evaTyp, targetId}) => window.open((evaTyp === 1 ? import.meta.env.VITE_BOE_TEST_DETAIL_URL : import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId), //测评
|
10: ({ evaType, targetId }) =>
|
||||||
|
window.open(
|
||||||
|
(evaType == 0
|
||||||
|
? import.meta.env.VITE_BOE_TEST_DETAIL_URL
|
||||||
|
: import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId
|
||||||
|
), //测评
|
||||||
11: "/surveydetail",
|
11: "/surveydetail",
|
||||||
12: "/ballotpage",
|
12: "/ballotpage",
|
||||||
13: "/projectdetails",
|
13: "/projectdetails",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function toFinish(d,sName) {
|
function toFinish(d, sName, chapterId) {
|
||||||
|
console.log("dddddd", d);
|
||||||
if (!types.value.path[d.type]) {
|
if (!types.value.path[d.type]) {
|
||||||
ElMessage.error("暂时未开放");
|
ElMessage.error("暂时未开放");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (d.type == 3 || d.type == 7) {
|
||||||
if (typeof types.value.path[d.type] === 'string') {
|
request(STUDY_RECORD, {
|
||||||
types.value.path[d.type] && types.value.path[d.type].startsWith("http") && window.open(types.value.path[d.type] + d.targetId)
|
studentId: data.value.userInfoBo.userId,
|
||||||
types.value.path[d.type] && types.value.path[d.type].startsWith("/") && router.push({
|
targetId: data.value.routerId,
|
||||||
|
logo: 2,
|
||||||
|
stageOrChapterId: chapterId,
|
||||||
|
taskId: d.projectTaskId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (typeof types.value.path[d.type] === "string") {
|
||||||
|
types.value.path[d.type] &&
|
||||||
|
types.value.path[d.type].startsWith("http") &&
|
||||||
|
window.open(types.value.path[d.type] + d.targetId);
|
||||||
|
types.value.path[d.type] &&
|
||||||
|
types.value.path[d.type].startsWith("/") &&
|
||||||
|
router.push({
|
||||||
path: types.value.path[d.type],
|
path: types.value.path[d.type],
|
||||||
query: {id: d.routerTaskId, type: 2, courseId: d.courseId, pName: data.value.name, sName},
|
query: {
|
||||||
})
|
id: d.projectTaskId,
|
||||||
} else if (typeof types.value.path[d.type] === 'function') {
|
type: 2,
|
||||||
types.value.path[d.type](d)
|
courseId: d.courseId,
|
||||||
|
pName: data.value.name,
|
||||||
|
sName,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else if (typeof types.value.path[d.type] === "function") {
|
||||||
|
types.value.path[d.type](d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function whiteTypes(type){
|
function whiteTypes(type) {
|
||||||
return import.meta.env.VITE_TASK_WHITE_TYPE.includes('-' + type +'-')
|
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
298
src/views/project/ProjectManage.vue
Normal file
298
src/views/project/ProjectManage.vue
Normal file
@@ -0,0 +1,298 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
|
* @Date: 2022-12-18 15:56:03
|
||||||
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
|
* @LastEditTime: 2022-12-18 21:04:56
|
||||||
|
* @FilePath: /fe-stu/src/views/project/ProjectList.vue
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="projectManage">
|
||||||
|
<div class="content">
|
||||||
|
<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> -->
|
||||||
|
<div style="width: 200px; margin-right: 20px">
|
||||||
|
<el-input v-model="projectname" placeholder="请输入项目名称" />
|
||||||
|
</div>
|
||||||
|
<div style="width: 420px">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="searchTime"
|
||||||
|
type="datetimerange"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
@change="selectTime"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="searchBtn"
|
||||||
|
@click="searchClick"
|
||||||
|
style="margin-left: 20px"
|
||||||
|
>
|
||||||
|
搜索
|
||||||
|
</button>
|
||||||
|
<button class="searchBtn" @click="resetClick">重置</button>
|
||||||
|
</div>
|
||||||
|
<div class="projectList" v-for="(i, k) in data" :key="k">
|
||||||
|
<div style="display: flex">
|
||||||
|
<img
|
||||||
|
style="width: 253px; height: 144px; border-radius: 4px"
|
||||||
|
:src="i.picUrl"
|
||||||
|
/>
|
||||||
|
<div style="margin-left: 29px">
|
||||||
|
<div class="projectName" :title="i.name">
|
||||||
|
{{ i.name }}
|
||||||
|
</div>
|
||||||
|
<div class="progress">
|
||||||
|
<div class="progressNow">当前进度:</div>
|
||||||
|
<div style="width: 115px">
|
||||||
|
<el-progress
|
||||||
|
:percentage="parseInt(i.finishTaskNum / i.totalTaskNum) * 100"
|
||||||
|
:show-text="false"
|
||||||
|
:stroke-width="8"
|
||||||
|
color="rgba(255, 160, 80, 1)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="progressNum">
|
||||||
|
{{
|
||||||
|
i.finishTaskNum && i.totalTaskNum
|
||||||
|
? parseInt(i.finishTaskNum / i.totalTaskNum) * 100
|
||||||
|
: 0
|
||||||
|
}}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="studyNew">最新一次学习时间:{{ i.lastStudyTime }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="tobestarted"
|
||||||
|
v-if="i.status == 2"
|
||||||
|
@click="goProjectDetails(i)"
|
||||||
|
>
|
||||||
|
待开始
|
||||||
|
</div>
|
||||||
|
<div class="gostudy" v-if="i.status == 0" @click="goProjectDetails(i)">
|
||||||
|
去学习
|
||||||
|
</div>
|
||||||
|
<div class="finish" v-if="i.status == 1" @click="goProjectDetails(i)">
|
||||||
|
已完成
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="tobestarted"
|
||||||
|
v-if="i.status == 3"
|
||||||
|
@click="goProjectDetails(i)"
|
||||||
|
>
|
||||||
|
已结束
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { reactive, toRefs, ref, onMounted, computed } from "vue";
|
||||||
|
|
||||||
|
import { boeRequest, request, usePage, useRequest } from "@/api/request";
|
||||||
|
import {
|
||||||
|
ROUTER_CHAPTER_LIST,
|
||||||
|
PROJECT_LIST,
|
||||||
|
ROUTER_UNCOMPLETE_LIST,
|
||||||
|
} from "@/api/api";
|
||||||
|
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import store from "@/store";
|
||||||
|
const projectClassify = [];
|
||||||
|
const studyProgress = [];
|
||||||
|
const pageNo = ref("");
|
||||||
|
const pageSize = ref("");
|
||||||
|
const currentPage = ref("");
|
||||||
|
const projectTotal = ref("");
|
||||||
|
|
||||||
|
//搜索--------------start-----------------------------------------
|
||||||
|
const projectname = ref(""); //项目名称
|
||||||
|
const searchTime = ref(""); //选择时间
|
||||||
|
|
||||||
|
//搜索
|
||||||
|
const searchClick = () => {
|
||||||
|
console.log("点击搜索", projectname.value, searchTime.value);
|
||||||
|
let beginTime = null;
|
||||||
|
let endTime = null;
|
||||||
|
if (searchTime.value) {
|
||||||
|
beginTime = new Date(searchTime.value[0]).getTime();
|
||||||
|
endTime = new Date(searchTime.value[1]).getTime();
|
||||||
|
}
|
||||||
|
request(PROJECT_LIST, {
|
||||||
|
// beginTime: disDetail.value.discussId,
|
||||||
|
// endTime: replayComment.value.content,
|
||||||
|
// key: projectname.value,
|
||||||
|
// pageNo: pageNo,
|
||||||
|
// pageSize: pageSize,
|
||||||
|
}).then(() => {
|
||||||
|
commonFetch();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//重置
|
||||||
|
const resetClick = () => {
|
||||||
|
searchTime.value = "";
|
||||||
|
projectname.value = "";
|
||||||
|
console.log("点击重置");
|
||||||
|
};
|
||||||
|
//搜索--------------end-----------------------------------------
|
||||||
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
|
const { data } = usePage(PROJECT_LIST, {});
|
||||||
|
console.log("datadata", data);
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const goProjectDetails = (value) => {
|
||||||
|
router.push({
|
||||||
|
path: "/projectdetails",
|
||||||
|
query: { projectId: value.projectId },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.projectManage {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 800px;
|
||||||
|
//border-radius: 8px;
|
||||||
|
background-color: rgba(255, 255, 255, 1);
|
||||||
|
display: flex;
|
||||||
|
// background-color: #ccc;
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
// flex: 1;
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-left: 81px;
|
||||||
|
.title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
.search {
|
||||||
|
margin-top: 31px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.searchBtn {
|
||||||
|
width: 100px;
|
||||||
|
height: 35px;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background: #387df7;
|
||||||
|
border: 1px solid #387df7;
|
||||||
|
color: #ffffff;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.projectList {
|
||||||
|
margin-top: 40px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.projectName {
|
||||||
|
width: 270px;
|
||||||
|
margin-top: 12px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 25px;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.progress {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.el-progress-bar__outer {
|
||||||
|
background-color: rgba(255, 160, 80, 0.19);
|
||||||
|
}
|
||||||
|
.progressNow {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
.progressNum {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 17px;
|
||||||
|
margin-left: 26px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.studyNew {
|
||||||
|
margin-top: 16px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
.tobestarted {
|
||||||
|
width: 140px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid #387df7;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #387df7;
|
||||||
|
line-height: 22px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-right: 120px;
|
||||||
|
}
|
||||||
|
.gostudy {
|
||||||
|
width: 140px;
|
||||||
|
height: 40px;
|
||||||
|
background: #387df7;
|
||||||
|
box-shadow: 1px 2px 15px 1px rgba(56, 125, 247, 0.34);
|
||||||
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 22px;
|
||||||
|
margin-right: 120px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.finish {
|
||||||
|
width: 140px;
|
||||||
|
height: 40px;
|
||||||
|
background: rgba(56, 125, 247, 0.6);
|
||||||
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 22px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
:style="{
|
:style="{
|
||||||
background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
|
background: `${types.path[value.type] ? '#2478ff' : '#999'}`,
|
||||||
}"
|
}"
|
||||||
@click="toFinish(value, i.chapterName)"
|
@click="toFinish(value, i.chapterName, i.chapterId)"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
value.status === 1
|
value.status === 1
|
||||||
@@ -329,7 +329,7 @@ import medal2 from "@/assets/image/medal/medal2.png";
|
|||||||
import medal3 from "@/assets/image/medal/medal3.png";
|
import medal3 from "@/assets/image/medal/medal3.png";
|
||||||
import img from "@/assets/image/uploadimg.png";
|
import img from "@/assets/image/uploadimg.png";
|
||||||
import { boeRequest, useRequest, request } from "@/api/request";
|
import { boeRequest, useRequest, request } from "@/api/request";
|
||||||
import { ROUTER_PROCESS, LINK_DETAILS } from "@/api/api";
|
import { ROUTER_PROCESS, LINK_DETAILS, STUDY_RECORD } from "@/api/api";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { useUserInfo } from "@/api/utils";
|
import { useUserInfo } from "@/api/utils";
|
||||||
@@ -343,7 +343,7 @@ const returnclick = () => {
|
|||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
const { data } = useRequest(ROUTER_PROCESS, { routerId });
|
const { data } = useRequest(ROUTER_PROCESS, { routerId });
|
||||||
|
console.log("data", data);
|
||||||
const userInfo = computed(() => store.state.userInfo);
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
console.log("userInfo", userInfo);
|
console.log("userInfo", userInfo);
|
||||||
const activeName = ref("first");
|
const activeName = ref("first");
|
||||||
@@ -409,13 +409,23 @@ const types = ref({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function toFinish(d, sName) {
|
function toFinish(d, sName, chapterId) {
|
||||||
if (!types.value.path[d.type]) {
|
if (!types.value.path[d.type]) {
|
||||||
ElMessage.error("暂时未开放");
|
ElMessage.error("暂时未开放");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (d.type == 3 || d.type == 7) {
|
||||||
|
request(STUDY_RECORD, {
|
||||||
|
studentId: data.value.userInfoBo.userId,
|
||||||
|
targetId: data.value.routerId,
|
||||||
|
logo: 1,
|
||||||
|
stageOrChapterId: chapterId,
|
||||||
|
taskId: d.routerTaskId,
|
||||||
|
});
|
||||||
|
}
|
||||||
if (typeof types.value.path[d.type] === "string") {
|
if (typeof types.value.path[d.type] === "string") {
|
||||||
|
console.log("dddddd", d);
|
||||||
|
|
||||||
types.value.path[d.type] &&
|
types.value.path[d.type] &&
|
||||||
types.value.path[d.type].startsWith("http") &&
|
types.value.path[d.type].startsWith("http") &&
|
||||||
window.open(types.value.path[d.type] + d.targetId);
|
window.open(types.value.path[d.type] + d.targetId);
|
||||||
|
|||||||
Reference in New Issue
Block a user