mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 06:16:46 +08:00
'学习路径-关卡/任务拖动排序'
This commit is contained in:
12
.env
12
.env
@@ -5,21 +5,21 @@ VUE_APP_BASE_API=/manageApi
|
||||
#文件路径
|
||||
VUE_APP_FILE_PATH=/upload/
|
||||
# 代理url 本地调试,不可以用在其他地方
|
||||
VUE_APP_PROXY_URL=http://43.143.139.204/manageApi
|
||||
VUE_APP_PROXY_URL=//43.143.139.204/manageApi
|
||||
# 登录url
|
||||
VUE_APP_LOGIN_URL=https://u-pre.boe.com/web
|
||||
VUE_APP_LOGIN_URL=//u-pre.boe.com/web
|
||||
# boe域名
|
||||
VUE_APP_BOE_API_URL=https://u-pre.boe.com
|
||||
VUE_APP_BOE_API_URL=//u-pre.boe.com
|
||||
#打包路径
|
||||
VUE_APP_OUTPUT_DIR=./dist
|
||||
|
||||
# iframe嵌套url
|
||||
VUE_APP_IFRAME_URL=https://u-pre.boe.com/pc/iframe
|
||||
VUE_APP_IFRAME_URL=//u-pre.boe.com/pc/iframe
|
||||
# 学员端路由
|
||||
VUE_APP_IFRAME_STUDENT_URL=https://u-pre.boe.com/pc/loadingVUE_APP_BOE_API_URLVUE_APP_BOE_API_URL
|
||||
VUE_APP_IFRAME_STUDENT_URL=//u-pre.boe.com/pc/loading
|
||||
|
||||
# 课程二维码
|
||||
VUE_APP_COURSE_STUDY=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||
VUE_APP_COURSE_STUDY=//u-pre.boe.com/pc/course/studyindex?id=
|
||||
|
||||
# 导入学员模板
|
||||
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
|
||||
|
||||
4
.env.boe
4
.env.boe
@@ -2,9 +2,9 @@ NODE_ENV=boe
|
||||
VUE_APP_BASE=/manage
|
||||
VUE_APP_BASE_API=/manageApi
|
||||
|
||||
VUE_APP_LOGIN_URL=https://u-pre.boe.com/web
|
||||
VUE_APP_LOGIN_URL=//u-pre.boe.com/web
|
||||
|
||||
VUE_APP_BOE_API_URL=https://u-pre.boe.com
|
||||
VUE_APP_BOE_API_URL=//u-pre.boe.com
|
||||
|
||||
# 导入学员模板
|
||||
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
|
||||
12
.env.prod
12
.env.prod
@@ -2,15 +2,15 @@ NODE_ENV=prod
|
||||
VUE_APP_BASE=/manage
|
||||
VUE_APP_BASE_API=/manageApi
|
||||
|
||||
VUE_APP_PROXY_URL=https://u.boe.com/
|
||||
VUE_APP_PROXY_URL=//u.boe.com/
|
||||
|
||||
VUE_APP_LOGIN_URL=https://u.boe.com/web
|
||||
VUE_APP_LOGIN_URL=//u.boe.com/web
|
||||
|
||||
VUE_APP_BOE_API_URL=https://u.boe.com
|
||||
VUE_APP_BOE_API_URL=//u.boe.com
|
||||
|
||||
VUE_APP_IFRAME_URL=https://u.boe.com/pc/iframe
|
||||
VUE_APP_IFRAME_STUDENT_URL=https://u.boe.com/pc/loading
|
||||
VUE_APP_IFRAME_URL=//u.boe.com/pc/iframe
|
||||
VUE_APP_IFRAME_STUDENT_URL=//u.boe.com/pc/loading
|
||||
|
||||
VUE_APP_COURSE_STUDY=https://u.boe.com/pc/course/studyindex?id=
|
||||
VUE_APP_COURSE_STUDY=//u.boe.com/pc/course/studyindex?id=
|
||||
|
||||
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
|
||||
|
||||
12
.env.release
12
.env.release
@@ -2,15 +2,15 @@ NODE_ENV=release
|
||||
VUE_APP_BASE=/manage-release
|
||||
VUE_APP_BASE_API=/manageApi-release
|
||||
|
||||
VUE_APP_PROXY_URL=https://u-pre.boe.com/
|
||||
VUE_APP_LOGIN_URL=https://u.boe.com/web-release
|
||||
VUE_APP_PROXY_URL=//u-pre.boe.com/
|
||||
VUE_APP_LOGIN_URL=//u.boe.com/web-release
|
||||
|
||||
VUE_APP_BOE_API_URL=https://u.boe.com
|
||||
VUE_APP_BOE_API_URL=//u.boe.com
|
||||
|
||||
|
||||
VUE_APP_IFRAME_URL=https://u.boe.com/pc-release/iframe
|
||||
VUE_APP_IFRAME_STUDENT_URL=https://u.boe.com/pc-release/loading
|
||||
VUE_APP_IFRAME_URL=//u.boe.com/pc-release/iframe
|
||||
VUE_APP_IFRAME_STUDENT_URL=//u.boe.com/pc-release/loading
|
||||
|
||||
VUE_APP_COURSE_STUDY=https://u.boe.com/pc-release/course/studyindex?id=
|
||||
VUE_APP_COURSE_STUDY=//u.boe.com/pc-release/course/studyindex?id=
|
||||
|
||||
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
|
||||
@@ -1,2 +1,2 @@
|
||||
NODE_ENV=test
|
||||
VUE_APP_BOE_API_URL=https://u-pre.boe.com
|
||||
VUE_APP_BOE_API_URL=//u-pre.boe.com
|
||||
16
src/App.vue
16
src/App.vue
@@ -114,6 +114,22 @@ const getDictList = (param) => api1.getDictTree({setCode: param,}).then((res) =>
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ant-table-wrapper {
|
||||
.ant-table-content {
|
||||
.ant-table-thead th {
|
||||
background-color: #eff4fc !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
}
|
||||
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-btn-link {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-04 22:45:31
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-02-01 11:07:17
|
||||
* @LastEditTime: 2023-02-03 18:39:27
|
||||
* @FilePath: /fe-manage/src/api/index1.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
@@ -87,7 +87,8 @@ export const editLearnInfo = (obj) => http.post('/admin/router/editInfo', obj)
|
||||
|
||||
//项目基础信息-----------------------------------
|
||||
//项目积分榜单
|
||||
export const scoreRank = (obj) => http.post("/admin/project/scoreRank", obj);
|
||||
// export const scoreRank = (obj) => http.post("/admin/project/scoreRank", obj);
|
||||
export const scoreRank = (params) => http.get('/points/top/list', { params })
|
||||
//排行榜
|
||||
export const billboard = (obj) => http.post("/admin/project/billboard", obj);
|
||||
//项目基础信息-----------------------------------
|
||||
@@ -190,4 +191,14 @@ export const getImportStatus = (uuid) => http.get('/admin/student/getImportStatu
|
||||
// 面授课导入学员
|
||||
export const FaceTeachImportStudent = (obj) => http.post('/admin/student/importStudent', obj, { headers: { "Content-Type": "multipart/form-data" } })
|
||||
//成绩录入
|
||||
export const updateStudent = (obj) => http.post('/admin/student/homeWorkScoreEntry', obj)
|
||||
export const updateStudent = (obj) => http.post('/admin/student/homeWorkScoreEntry', obj)
|
||||
|
||||
|
||||
//获取证书列表
|
||||
export const certificate = (obj) => http.get('/admin/certificate/page', { params: obj })
|
||||
//添加证书
|
||||
export const saveupdatecertificate = (obj) => http.post('/admin/certificate/saveOrUpdate', obj)
|
||||
//删除证书
|
||||
export const certificatedel = (obj) => http.get('/admin/certificate/del', { params: obj })
|
||||
//证书详情
|
||||
export const certificatedetail = (obj) => http.post('/admin/certificate/get', obj)
|
||||
@@ -31,6 +31,7 @@ export const detailPlan = (obj) =>
|
||||
export const edit = (obj) => http.post("/admin/offcourse/edit", obj);
|
||||
//7新建或编辑面授课开课
|
||||
export const editPlan = (obj) => http.post("/admin/offcourse/editPlan", obj);
|
||||
export const copyCoursePlan = (params) => http.get("/admin/offcourse/copyCoursePlan", {params});
|
||||
//8课程导出
|
||||
export const exportP = (obj) => http.post("/admin/offcourse/export", obj);
|
||||
//9操作面授课(发布,撤回,删除,审核,停用)
|
||||
|
||||
@@ -277,12 +277,12 @@ const commonData = {
|
||||
const organizationalTree = []
|
||||
|
||||
//嵌套页面
|
||||
const iframeUrl = process.env.VUE_APP_IFRAME_URL
|
||||
const iframeUrl = window.location.protocol + process.env.VUE_APP_IFRAME_URL
|
||||
//学员端路由
|
||||
const studentUrl = process.env.VUE_APP_IFRAME_STUDENT_URL
|
||||
const studentUrl = window.location.protocol + process.env.VUE_APP_IFRAME_STUDENT_URL
|
||||
|
||||
//二维码
|
||||
const codeUrl = "https://u-pre.boe.com"
|
||||
const codeUrl = window.location.protocol + "//u-pre.boe.com"
|
||||
export {
|
||||
throttle,
|
||||
toDate,
|
||||
|
||||
@@ -197,7 +197,7 @@ export async function boeRequest(_url, params) {
|
||||
}
|
||||
}
|
||||
const body = method !== 'get' ? params || {} : {}
|
||||
url = process.env.NODE_ENV === 'development' ? url : process.env.VUE_APP_BOE_API_URL + url
|
||||
url = process.env.NODE_ENV === 'development' ? url : window.location.protocol + process.env.VUE_APP_BOE_API_URL + url
|
||||
return fetch(url, {
|
||||
method,
|
||||
headers: {
|
||||
|
||||
BIN
src/assets/images/taskpage/nocertificate.png
Normal file
BIN
src/assets/images/taskpage/nocertificate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
BIN
src/assets/images/taskpage/nocertificate2.png
Normal file
BIN
src/assets/images/taskpage/nocertificate2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@@ -81,7 +81,7 @@ const changeRole = (value) => {
|
||||
const logOut = () => {
|
||||
store.replaceState(createStore({state: {openpages: []}}).state);
|
||||
localStorage.clear();
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: '/login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: '/login'}) : (window.location.href = window.location.protocol + process.env.VUE_APP_LOGIN_URL)
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -282,65 +282,36 @@ export default {
|
||||
const ListOpera = () => {
|
||||
let arr = state.tabledata;
|
||||
arr.map((value) => {
|
||||
if(value.status == '已完成'){
|
||||
value.operation = (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
onClick={() => {
|
||||
state.CWvisible = true
|
||||
value.operation = (
|
||||
(value.examStatus || value.workStatus) && (<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
onClick={() => {
|
||||
state.CQvisible = true
|
||||
}}
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
{value.workStatus===1 && <a-button
|
||||
type="link"
|
||||
className="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
onClick={() => {
|
||||
state.CWvisible = true
|
||||
}}
|
||||
>
|
||||
查看作业2
|
||||
</a-button>}
|
||||
{value.examStatus===1 && <a-button
|
||||
type="link"
|
||||
className="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
onClick={() => {
|
||||
state.CQvisible = true
|
||||
}}
|
||||
>
|
||||
查看答卷3
|
||||
</a-button>}
|
||||
</div>)
|
||||
);
|
||||
} else {
|
||||
value.operation = (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
disabled
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
disabled
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
ListOpera();
|
||||
|
||||
@@ -53,21 +53,21 @@
|
||||
<a-tab-pane key="2" tab="榜单" force-render>
|
||||
<div class="scorelist">
|
||||
<div class="grouprightscore">
|
||||
<div class="sbutton" @click="typeChange(1)">
|
||||
<div class="sbutton" @click="typeChange(0)">
|
||||
<img
|
||||
v-if="stuValue === 2"
|
||||
v-if="stuValue === 1"
|
||||
src="../../assets/images/taskpage/stu0.png"
|
||||
/>
|
||||
<img v-else src="../../assets/images/taskpage/stu.png" />
|
||||
<div :class="stuValue === 2 ? '' : 'btn1'">学员积分榜</div>
|
||||
<div :class="stuValue === 1? '' : 'btn1'">学员积分榜</div>
|
||||
</div>
|
||||
<div class="sbutton" @click="typeChange(2)">
|
||||
<div class="sbutton" @click="typeChange(1)">
|
||||
<img
|
||||
v-if="stuValue === 2"
|
||||
v-if="stuValue === 1"
|
||||
src="../../assets/images/taskpage/group.png"
|
||||
/>
|
||||
<img v-else src="../../assets/images/taskpage/group0.png" />
|
||||
<div :class="stuValue === 2 ? 'btn1' : ''">小组积分榜</div>
|
||||
<div :class="stuValue === 1 ? 'btn1' : ''">小组积分榜</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group" style="justify-content: center">
|
||||
@@ -104,33 +104,33 @@
|
||||
</div>
|
||||
<div class="listdiv">
|
||||
<div class="slist">
|
||||
<a-list :data-source="stuValue === 1 ? datascoreg : datascore">
|
||||
<a-list :data-source="stuValue === 1 ? datascoreg : datascore" :loading="scoreRankLoading">
|
||||
<template #renderItem="{ item }">
|
||||
<div class="item">
|
||||
<div v-if="item.id == 1" class="itemleft">
|
||||
<div v-if="item.index == 1" class="itemleft">
|
||||
<div class="itemimage">
|
||||
<img src="../../assets/images/taskpage/gold.png" />
|
||||
</div>
|
||||
<div class="itemid">{{ item.id }}</div>
|
||||
<div class="itemid">{{ item.index }}</div>
|
||||
</div>
|
||||
<div v-else-if="item.id == 2" class="itemleft">
|
||||
<div v-else-if="item.index == 2" class="itemleft">
|
||||
<div class="itemimage">
|
||||
<img src="../../assets/images/taskpage/siler.png" />
|
||||
</div>
|
||||
<div class="itemid">{{ item.id }}</div>
|
||||
<div class="itemid">{{ item.index }}</div>
|
||||
</div>
|
||||
<div v-else-if="item.id == 3" class="itemleft">
|
||||
<div v-else-if="item.index == 3" class="itemleft">
|
||||
<div class="itemimage">
|
||||
<img src="../../assets/images/taskpage/copper.png" />
|
||||
</div>
|
||||
<div class="itemid">{{ item.id }}</div>
|
||||
<div class="itemid">{{ item.index }}</div>
|
||||
</div>
|
||||
<div v-else class="itemleft">
|
||||
<div class="elseid">{{ item.id }}</div>
|
||||
<div class="elseid">{{ item.index }}</div>
|
||||
</div>
|
||||
|
||||
<div class="itemcenter">{{ item.name }}</div>
|
||||
<div class="itemright">{{ item.score }}</div>
|
||||
<div class="itemright">{{ item.pointsCountStr }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-list>
|
||||
@@ -296,6 +296,7 @@ import { scoreRule } from "../../api/indexTaskadd"; //获取项目积分规则
|
||||
import { setScoreRule } from "../../api/indexTaskadd"; //设置项目积分规则
|
||||
import { getProjStu } from "../../api/indexProjStu";
|
||||
import { message } from "ant-design-vue";
|
||||
import {checkPer} from "@/utils/utils";
|
||||
export default {
|
||||
name: "ProjectScore",
|
||||
components: {
|
||||
@@ -390,67 +391,20 @@ export default {
|
||||
},
|
||||
],
|
||||
datascore: [
|
||||
{
|
||||
id: 1,
|
||||
name: "张三的名字很长很长很长",
|
||||
score: "10分",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "李四",
|
||||
score: "10分",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "王五的名字一定要比张三的还长",
|
||||
score: "10分",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "赵六",
|
||||
score: "10分",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "冯七",
|
||||
score: "10分",
|
||||
},
|
||||
|
||||
],
|
||||
datascoreg: [
|
||||
{
|
||||
id: 1,
|
||||
name: "第一组的同学们",
|
||||
score: "10分",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "第2组的同学们",
|
||||
score: "9分",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "第3组的同学们",
|
||||
score: "8分",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "第4组的同学们",
|
||||
score: "7分",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "第五组的同学们",
|
||||
score: "6分",
|
||||
},
|
||||
|
||||
],
|
||||
scoreRankLoading:true,
|
||||
valueName: "", //排行榜输入姓名
|
||||
valueDate: "", //排行榜输入日期
|
||||
noticeChecked: true,
|
||||
noticeContent: "请输入要发布的公告",
|
||||
activeKeyScore: "2",
|
||||
activeKeyScore: "1",
|
||||
stuName: "请输入姓名",
|
||||
todayvalue: "1",
|
||||
stuValue: false,
|
||||
stuValue: 0,
|
||||
Svisible: false,
|
||||
score1: null,
|
||||
done2: null,
|
||||
@@ -466,13 +420,14 @@ export default {
|
||||
seven1: null,
|
||||
seven2: null,
|
||||
edit: true,
|
||||
searchRankName: null, //榜单搜索名称
|
||||
searchRankName: "", //榜单搜索名称
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: null,
|
||||
searchNameValue: null, //学员获取的姓名
|
||||
checkStuId: null,
|
||||
proId: null,
|
||||
startTime: (new Date(new Date(new Date().toLocaleDateString()).getTime())).getTime().toString()
|
||||
});
|
||||
const getTableData = () => {
|
||||
let datas = state.tabledataStu;
|
||||
@@ -517,52 +472,86 @@ export default {
|
||||
const tabsChange = (e) => {
|
||||
if (e == 2) {
|
||||
// console.log('获取项目积分-榜单')
|
||||
scoreRank(1, 1);
|
||||
scoreRank();
|
||||
} else if (e == 3) {
|
||||
getScoreRule();
|
||||
}
|
||||
rankReset();
|
||||
state.todayvalue = "1";
|
||||
state.stuValue = 1;
|
||||
state.stuValue = 0;
|
||||
};
|
||||
|
||||
//重置
|
||||
const rankReset = () => {
|
||||
state.searchRankName = null;
|
||||
state.searchRankName = "";
|
||||
scoreRank();
|
||||
};
|
||||
// start -------榜单---------------榜单------------榜单------------------榜单---------
|
||||
//学员积分还是小组积分
|
||||
const typeChange = (num) => {
|
||||
state.stuValue = num;
|
||||
scoreRank(state.stuValue, state.todayvalue);
|
||||
console.log(num)
|
||||
state.stuValue = Number(num);
|
||||
scoreRank();
|
||||
};
|
||||
//选择时间
|
||||
const changeday = (e) => {
|
||||
state.todayvalue = e.target.value;
|
||||
scoreRank(state.stuValue, state.todayvalue);
|
||||
console.log('切换时间显示-今天-七天-近一个月', e.target.value)
|
||||
if(e.target.value==1){
|
||||
state.startTime = (new Date(new Date(new Date().toLocaleDateString()).getTime())).getTime().toString()
|
||||
}else if(e.target.value==2){
|
||||
state.startTime = ((new Date(new Date(new Date().toLocaleDateString()).getTime())).getTime() - 7*24*60*60*1000).toString()
|
||||
}else{
|
||||
state.startTime = ((new Date(new Date(new Date().toLocaleDateString()).getTime())).getTime() - 31*24*60*60*1000).toString()
|
||||
}
|
||||
scoreRank();
|
||||
};
|
||||
//搜索
|
||||
const searchRank = () => {
|
||||
scoreRank(state.stuValue, state.todayvalue);
|
||||
scoreRank();
|
||||
};
|
||||
//项目积分榜单
|
||||
const scoreRank = (period, type) => {
|
||||
console.log("projectId", props.projectId);
|
||||
state.scoreRankLoading = true;
|
||||
state.datascore = [];
|
||||
state.datascoreg = [];
|
||||
console.log("projectId----->", props.projectId,period, type);
|
||||
console.log('我是查询榜单传递的数据',{
|
||||
projectId: props.projectId, // 项目id
|
||||
name: state.searchRankName, // 名字,没有则传空字符串
|
||||
startTime:state.startTime, // 数据查询的起始时间 10位时间戳
|
||||
size: 5, // 前多少名
|
||||
type: Number(state.stuValue), // 查询类型 0 学员积分榜 1 小组积分榜
|
||||
})
|
||||
let obj = {
|
||||
name: state.searchRankName,
|
||||
pageNo: 1,
|
||||
pageSize: 5,
|
||||
period: Number(period),
|
||||
projectId: props.projectId,
|
||||
type: Number(type),
|
||||
projectId: props.projectId, // 项目id
|
||||
name: state.searchRankName, // 名字,没有则传空字符串
|
||||
startTime: state.startTime, // 数据查询的起始时间 10位时间戳
|
||||
size: 5, // 前多少名
|
||||
type: Number(state.stuValue), // 查询类型 0 学员积分榜 1 小组积分榜
|
||||
};
|
||||
|
||||
api
|
||||
.scoreRank(obj)
|
||||
.then((res) => {
|
||||
console.log("获取项目积分-榜单", res);
|
||||
if(res.data.code==200){
|
||||
state.datascore = res.data.data;
|
||||
state.datascoreg = res.data.data;
|
||||
state.scoreRankLoading = false;
|
||||
}else{
|
||||
state.datascore = [];
|
||||
state.datascoreg = [];
|
||||
state.scoreRankLoading = false;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取项目积分-榜单失败", err);
|
||||
message.destroy();
|
||||
message.error('榜单获取失败');
|
||||
state.datascore = [];
|
||||
state.datascoreg = [];
|
||||
state.scoreRankLoading = false;
|
||||
});
|
||||
};
|
||||
// end -----榜单----------------榜单----------------------榜单-----------榜单----------
|
||||
@@ -739,6 +728,7 @@ export default {
|
||||
searchStu,
|
||||
resetStud,
|
||||
getScoreRule,
|
||||
checkPer
|
||||
};
|
||||
},
|
||||
// computed: {
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="main_left">
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
@@ -31,15 +30,15 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
v-model:value="certificateName"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入活动名称"
|
||||
placeholder="请输入证书名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item">
|
||||
<!-- <div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
@@ -50,107 +49,215 @@
|
||||
<span style="margin-right: 3px">证书:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn11" @click="CreateCertificate" style="margin-top: 0px;">
|
||||
创建证书
|
||||
</button>
|
||||
<button
|
||||
class="xkbtn11"
|
||||
@click="CreateCertificate"
|
||||
style="margin-top: 0px"
|
||||
>
|
||||
创建证书
|
||||
</button>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="main_item" style="align-items: flex-start">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">证书封面:</span>
|
||||
</div>
|
||||
<div
|
||||
class="btnbox"
|
||||
style="flex-direction: column; align-items: flex-start"
|
||||
>
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="file"
|
||||
style="width: 200px"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
action="/manageApi/file/uploadFile"
|
||||
@change="handleChange"
|
||||
>
|
||||
<img v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
<div v-else>
|
||||
<loading-outlined v-if="loading"></loading-outlined>
|
||||
<plus-outlined v-else></plus-outlined>
|
||||
<div class="ant-upload-text">+</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<div style="font-size: 14px; color: #666">
|
||||
建议尺寸:750*348 格式支持jpg、gif、png、jpeg、svg、bmp
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">证书说明:</span>
|
||||
</div>
|
||||
<div class="textarea" style="width: 400px">
|
||||
<a-textarea
|
||||
v-model:value="certificateRemark"
|
||||
placeholder="请输入证书说明"
|
||||
allow-clear
|
||||
:rows="8"
|
||||
show-count
|
||||
:maxlength="200"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px;font-size: 16px;color: #333;">设置获得条件</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
|
||||
<span
|
||||
style="
|
||||
margin-right: 3px;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
"
|
||||
>设置获得条件</span
|
||||
>
|
||||
</div>
|
||||
<div class="btnbox"></div>
|
||||
</div>
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox" style="width:30px;">
|
||||
<span style="margin-right: 3px;font-size: 16px;color: #333;"></span>
|
||||
<div class="signbox" style="width: 30px">
|
||||
<span
|
||||
style="margin-right: 3px; font-size: 16px; color: #333"
|
||||
></span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group v-model:value="radioV1">
|
||||
<a-radio v-model:checked="checked" :value="1" @click="cloradio1">
|
||||
完成项目
|
||||
<a-radio-group
|
||||
v-model:value="condition"
|
||||
@change="selectCondition"
|
||||
>
|
||||
<a-radio v-model:checked="checked" :value="1">
|
||||
完成项目
|
||||
</a-radio>
|
||||
<br/>
|
||||
<div style="height:60px;margin-left: 24px;display: flex;align-items: center;">
|
||||
<a-radio-group v-model:value="large" size="small">
|
||||
<a-radio-button value="1">全部任务</a-radio-button>
|
||||
<a-radio-button value="2">完成必修任务</a-radio-button>
|
||||
</a-radio-group>
|
||||
<br />
|
||||
<div
|
||||
style="
|
||||
height: 60px;
|
||||
margin-left: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<a-radio-group v-model:value="large" size="small">
|
||||
<a-radio-button value="1">全部任务</a-radio-button>
|
||||
<a-radio-button value="2">完成必修任务</a-radio-button>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<a-radio v-model:checked="checked" :value="2" @click="cloradio1">
|
||||
完成阶段
|
||||
</a-radio>
|
||||
<br/>
|
||||
<div style="height:60px;margin-left: 24px;display: flex;align-items: center;">
|
||||
<a-select
|
||||
ref="select"
|
||||
size="small"
|
||||
placeholder="请选择阶段"
|
||||
v-model:value="value1"
|
||||
style="width: 120px"
|
||||
@focus="focus"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-select-option value="jack">第一阶段</a-select-option>
|
||||
<a-select-option value="lucy">第二阶段</a-select-option>
|
||||
<a-select-option value="Yiminghe">第三阶段</a-select-option>
|
||||
</a-select>
|
||||
<a-radio v-model:checked="checked" :value="2">
|
||||
完成阶段
|
||||
</a-radio>
|
||||
<br />
|
||||
<div
|
||||
style="
|
||||
height: 60px;
|
||||
margin-left: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<a-select
|
||||
ref="select"
|
||||
size="small"
|
||||
placeholder="请选择阶段"
|
||||
v-model:value="value1"
|
||||
style="width: 120px"
|
||||
@focus="focus"
|
||||
@change="selectStage"
|
||||
>
|
||||
<a-select-option value="jack">第一阶段</a-select-option>
|
||||
<a-select-option value="lucy">第二阶段</a-select-option>
|
||||
<a-select-option value="Yiminghe">第三阶段</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
<a-radio v-model:checked="checked" :value="3" @click="cloradio1">
|
||||
完成任务
|
||||
</a-radio>
|
||||
<br/>
|
||||
<div style="height:60px;margin-left: 24px;display: flex;align-items: center;">
|
||||
<a-select
|
||||
ref="select"
|
||||
size="small"
|
||||
placeholder="请选择任务"
|
||||
v-model:value="value1"
|
||||
style="width: 120px"
|
||||
@focus="focus"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-select-option value="jack">任务一</a-select-option>
|
||||
<a-select-option value="lucy">任务二</a-select-option>
|
||||
<a-select-option value="Yiminghe">任务三</a-select-option>
|
||||
</a-select>
|
||||
<a-radio v-model:checked="checked" :value="3">
|
||||
完成任务
|
||||
</a-radio>
|
||||
<br />
|
||||
<div
|
||||
style="
|
||||
height: 60px;
|
||||
margin-left: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<a-select
|
||||
ref="select"
|
||||
size="small"
|
||||
placeholder="请选择任务"
|
||||
v-model:value="value1"
|
||||
style="width: 120px"
|
||||
@focus="focus"
|
||||
@change="selectTask"
|
||||
>
|
||||
<a-select-option value="jack">任务一</a-select-option>
|
||||
<a-select-option value="lucy">任务二</a-select-option>
|
||||
<a-select-option value="Yiminghe">任务三</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
<a-radio v-model:checked="checked" :value="4" @click="cloradio1">
|
||||
考试合格
|
||||
</a-radio>
|
||||
<br/>
|
||||
<div style="height:60px;margin-left: 24px;display: flex;align-items: center;">
|
||||
<a-select
|
||||
ref="select"
|
||||
size="small"
|
||||
placeholder="请选择考试"
|
||||
v-model:value="value1"
|
||||
style="width: 120px"
|
||||
@focus="focus"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-select-option value="jack">考试一</a-select-option>
|
||||
<a-select-option value="lucy">考试二</a-select-option>
|
||||
<a-select-option value="Yiminghe">考试三</a-select-option>
|
||||
</a-select>
|
||||
<a-radio v-model:checked="checked" :value="4">
|
||||
考试合格
|
||||
</a-radio>
|
||||
<br />
|
||||
<div
|
||||
style="
|
||||
height: 60px;
|
||||
margin-left: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<a-select
|
||||
ref="select"
|
||||
size="small"
|
||||
placeholder="请选择考试"
|
||||
v-model:value="value1"
|
||||
style="width: 120px"
|
||||
@focus="focus"
|
||||
@change="selectExam"
|
||||
>
|
||||
<a-select-option value="jack">考试一</a-select-option>
|
||||
<a-select-option value="lucy">考试二</a-select-option>
|
||||
<a-select-option value="Yiminghe">考试三</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
<a-radio v-model:checked="checked" :value="5" @click="cloradio1">
|
||||
获得积分
|
||||
</a-radio>
|
||||
<br/>
|
||||
<div style="height:60px;margin-left: 24px;display: flex;align-items: center;">
|
||||
<a-button style="border:0px solid red;box-shadow: none;">高于</a-button>
|
||||
<a-input-number id="inputNumber" v-model:value="value" :min="1" :max="100" style="width:70px;" />
|
||||
<a-button style="border:0px solid red;box-shadow: none;">分可获得,当前项目积分为 10 分</a-button>
|
||||
<a-radio v-model:checked="checked" :value="5">
|
||||
获得积分
|
||||
</a-radio>
|
||||
<br />
|
||||
<div
|
||||
style="
|
||||
height: 60px;
|
||||
margin-left: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<a-button style="border: 0px solid red; box-shadow: none"
|
||||
>高于</a-button
|
||||
>
|
||||
<a-input-number
|
||||
id="inputNumber"
|
||||
v-model:value="value"
|
||||
:min="1"
|
||||
:max="100"
|
||||
style="width: 70px"
|
||||
/>
|
||||
<a-button style="border: 0px solid red; box-shadow: none"
|
||||
>分可获得,当前项目积分为 10 分</a-button
|
||||
>
|
||||
</div>
|
||||
<a-radio v-model:checked="checked" :value="6" @click="cloradio1">
|
||||
<!-- <a-radio v-model:checked="checked" :value="6" >
|
||||
完成作业
|
||||
</a-radio>
|
||||
<br/>
|
||||
@@ -159,7 +266,7 @@
|
||||
<a-input-number id="inputNumber" v-model:value="value" :min="1" :max="100" style="width:70px;" />
|
||||
<a-button style="border:0px solid red;box-shadow: none;">分可获得证书</a-button>
|
||||
</div>
|
||||
<a-radio v-model:checked="checked" :value="7" @click="cloradio1">
|
||||
<a-radio v-model:checked="checked" :value="7" >
|
||||
优秀小组长
|
||||
</a-radio>
|
||||
<br/>
|
||||
@@ -168,54 +275,43 @@
|
||||
<a-input-number id="inputNumber" v-model:value="value" :min="1" :max="100" style="width:70px;" />
|
||||
<a-button style="border:0px solid red;box-shadow: none;">分小组长可获得证书</a-button>
|
||||
</div>
|
||||
<a-radio v-model:checked="checked" :value="8" @click="cloradio1">
|
||||
<a-radio v-model:checked="checked" :value="8" >
|
||||
考勤按时签到可获得证书
|
||||
</a-radio>
|
||||
<br/>
|
||||
<div style="height:40px;"></div>
|
||||
</a-radio> -->
|
||||
<br />
|
||||
<div style="height: 40px"></div>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item" style="height: 40px">
|
||||
<!-- <div class="main_item" style="height: 40px">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px"></span>
|
||||
</div>
|
||||
<div class="btnbox"></div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1" @click="closeDrawer1">取消</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="updateActivityInfo">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<!-- 创建证书抽屉 -->
|
||||
<CreateCertificate
|
||||
v-model:CCertificate="CCertificate"
|
||||
/>
|
||||
<CreateCertificate v-model:CCertificate="CCertificate" />
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import * as api from "../../../api/indexActivity";
|
||||
import * as apiTask from "../../../api/indexTaskadd";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
import CreateCertificate from "../../../components/drawers/project/CreateCertificate";
|
||||
import { message } from "ant-design-vue";
|
||||
import dayjs from "dayjs";
|
||||
import CreateCertificate from "../../../components/drawers/project/CreateCertificate";
|
||||
|
||||
export default {
|
||||
name: "AddActive",
|
||||
name: "AddCertificate",
|
||||
components: {
|
||||
CreateCertificate
|
||||
CreateCertificate,
|
||||
},
|
||||
props: {
|
||||
ACertificate: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
EditActiveId: {
|
||||
projectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
@@ -224,311 +320,68 @@ export default {
|
||||
type: Boolean,
|
||||
default: null,
|
||||
},
|
||||
projectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
chooseStageId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerTaskId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
isLevel: {
|
||||
// 是否是关卡页面触发
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
EditWorkId: {
|
||||
// 要编辑的workId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: {
|
||||
// 要编辑的projectId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
isactive: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTemplateId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
ACertificate: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
inputV1: "",
|
||||
inputV2: "",
|
||||
inputV3: "",
|
||||
inputV4: "",
|
||||
inputV5: "",
|
||||
inputV6: "",
|
||||
textV1: "",
|
||||
textV2: "",
|
||||
radioV1: "",
|
||||
time: "",
|
||||
isClick: false,
|
||||
certificateName: "", //证书名称
|
||||
imageUrl: null, //证书封面
|
||||
imageName: null,
|
||||
certificateRemark: "", //证书说明
|
||||
condition: "", //选择条件
|
||||
|
||||
CCertificate: false,
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:ACertificate", false);
|
||||
ctx.emit("update:edit", false);
|
||||
state.radioV1 = "";
|
||||
state.inputV1 = "";
|
||||
state.inputV2 = "";
|
||||
state.inputV3 = "";
|
||||
state.inputV4 = "";
|
||||
state.inputV5 = "";
|
||||
state.inputV6 = "";
|
||||
state.textV1 = "";
|
||||
state.textV2 = "";
|
||||
state.time = "";
|
||||
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
};
|
||||
const closeDrawer1 = () => {
|
||||
ctx.emit("update:ACertificate", false);
|
||||
ctx.emit("update:edit", false);
|
||||
state.radioV1 = "";
|
||||
state.inputV1 = "";
|
||||
state.inputV2 = "";
|
||||
state.inputV3 = "";
|
||||
state.inputV4 = "";
|
||||
state.inputV5 = "";
|
||||
state.inputV6 = "";
|
||||
state.textV1 = "";
|
||||
state.textV2 = "";
|
||||
state.time = "";
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
};
|
||||
const queryActive = () => {
|
||||
api
|
||||
.getActivity(props.EditActiveId)
|
||||
.then((res) => {
|
||||
console.log("获取活动信息", res);
|
||||
//获取活动信息
|
||||
state.inputV1 = res.data.data.activityName;
|
||||
state.textV1 = res.data.data.activityNotice;
|
||||
state.textV2 = res.data.data.activityExplain;
|
||||
state.inputV2 = res.data.data.activityDuration;
|
||||
state.inputV3 = res.data.data.activityAddress;
|
||||
state.inputV5 = res.data.data.afterSignIn;
|
||||
state.inputV6 = res.data.data.signOutTime;
|
||||
state.inputV4 = res.data.data.beforeSignIn;
|
||||
state.radioV1 = Number(res.data.data.standardSettings);
|
||||
|
||||
state.time = [
|
||||
dayjs(res.data.data.activityStartTime, "YYYY-MM-DD HH:mm"),
|
||||
dayjs(res.data.data.activityEndTime, "YYYY-MM-DD HH:mm"),
|
||||
];
|
||||
})
|
||||
.catch(() => {});
|
||||
state.certificateName = "";
|
||||
state.certificateRemark = "";
|
||||
state.imageUrl = "";
|
||||
state.imageName = null;
|
||||
state.condition = "";
|
||||
state.CCertificate = false;
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
if (bool && props.edit) {
|
||||
queryActive();
|
||||
console.log("是编辑");
|
||||
}
|
||||
};
|
||||
const cloradio1 = (value) => {
|
||||
if (value != "") {
|
||||
state.radioV1 = "";
|
||||
}
|
||||
};
|
||||
const updateTask = async (res) => {
|
||||
if (props.isLevel == 1) {
|
||||
if (!props.isactive) {
|
||||
message.destroy();
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
await RouterEditTask({
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.activityId,
|
||||
duration: res.data.data.activityDuration,
|
||||
name: res.data.data.activityName,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 9,
|
||||
})
|
||||
.then(() => {
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
await apiTask
|
||||
.addTask({
|
||||
courseId: res.data.data.activityId,
|
||||
duration: res.data.data.activityDuration,
|
||||
name: res.data.data.activityName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId || 0,
|
||||
type: 9,
|
||||
})
|
||||
.then(() => {
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
//////message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
await apiTask
|
||||
.addTempTask({
|
||||
courseId: res.data.data.activityId,
|
||||
duration: res.data.data.activityDuration,
|
||||
name: res.data.data.activityName,
|
||||
projectTemplateId: props.projectTemplateId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId || 0,
|
||||
type: 9,
|
||||
})
|
||||
.then(() => {
|
||||
ctx.emit("changeData", false);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
};
|
||||
//创建活动
|
||||
const updateActivityInfo = () => {
|
||||
let c = 1111;
|
||||
if(c>0){
|
||||
closeDrawer();
|
||||
return
|
||||
}
|
||||
if (!state.inputV1) {
|
||||
message.destroy();
|
||||
return message.warning("请输入活动名称");
|
||||
}
|
||||
if (!state.textV1) {
|
||||
message.destroy();
|
||||
return message.warning("请输入活动公告");
|
||||
}
|
||||
if (!state.time) {
|
||||
message.destroy();
|
||||
return message.warning("请输入活动时间");
|
||||
}
|
||||
if (!state.inputV2) {
|
||||
message.destroy();
|
||||
return message.warning("请输入活动时长");
|
||||
}
|
||||
if (!state.inputV3) {
|
||||
message.destroy();
|
||||
return message.warning("请输入活动地址");
|
||||
}
|
||||
|
||||
if (state.isClick) {
|
||||
message.destroy();
|
||||
message.error("请勿频繁点击");
|
||||
return;
|
||||
}
|
||||
state.isClick = true;
|
||||
|
||||
let obj = {
|
||||
activityAddress: state.inputV3, //活动地址
|
||||
activityDuration: state.inputV2, //活动时长
|
||||
activityExplain: state.textV2, //活动说明
|
||||
activityEndTime: dayjs(state.time[1]).format("YYYY-MM-DD HH:mm"), //活动结束时间
|
||||
activityId: props.edit ? props.EditActiveId : 0, //活动ID
|
||||
activityName: state.inputV1, //活动名称
|
||||
activityNotice: state.textV1, //活动公告
|
||||
activityStartTime: dayjs(state.time[0]).format("YYYY-MM-DD HH:mm"), //活动开始时间
|
||||
activityTag: "", //活动逻辑删除标识
|
||||
afterSignIn: state.inputV5 ? state.inputV5 : 0, //活动开始后多少分钟签到
|
||||
beforeSignIn: state.inputV4 ? state.inputV4 : 0, //活动开始前多少分钟签到
|
||||
signOutTime: state.inputV6, //签退开始时间
|
||||
standardSettings: state.radioV1, //标准设置
|
||||
};
|
||||
console.log("obj", obj);
|
||||
if (props.edit) {
|
||||
//更新编辑活动信息
|
||||
api
|
||||
.updateActivity(obj)
|
||||
.then(async (res) => {
|
||||
closeDrawer();
|
||||
await updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy();
|
||||
message.success("更新成功");
|
||||
state.isClick = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("更新失败");
|
||||
state.isClick = false;
|
||||
});
|
||||
} else {
|
||||
//新建活动信息
|
||||
api
|
||||
.createActivity(obj)
|
||||
.then(async (res) => {
|
||||
message.destroy();
|
||||
message.success("创建成功");
|
||||
closeDrawer();
|
||||
await updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
state.isClick = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("创建失败");
|
||||
state.isClick = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const range = (start, end) => {
|
||||
const result = [];
|
||||
|
||||
for (let i = start; i < end; i++) {
|
||||
result.push(i);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
const disabledDate = (current) => {
|
||||
// Can not select days before today and today
|
||||
console.log("1111", dayjs().endOf("day"));
|
||||
return current && current < dayjs().startOf("day");
|
||||
};
|
||||
|
||||
const disabledDateTime = () => {
|
||||
return {
|
||||
disabledHours: () => range(0, 24).splice(4, 20),
|
||||
disabledMinutes: () => range(30, 60),
|
||||
disabledSeconds: () => [55, 56],
|
||||
};
|
||||
//选择的获得条件
|
||||
const selectCondition = (e) => {
|
||||
console.log("e.target.value;", e.target.value);
|
||||
};
|
||||
|
||||
// 创建证书
|
||||
function CreateCertificate() {
|
||||
state.CCertificate = true;
|
||||
state.CCertificate = true;
|
||||
}
|
||||
//上传封面
|
||||
const handleChange = (info) => {
|
||||
console.log("info", info);
|
||||
if (info.file.status === "uploading") {
|
||||
return;
|
||||
}
|
||||
if (info.file.status === "done") {
|
||||
console.log("上传图片返回的信息 %o", info.file.name);
|
||||
state.imageUrl = process.env.VUE_APP_FILE_PATH + info.file.name;
|
||||
state.imageName = info.file.name;
|
||||
}
|
||||
if (info.file.status === "error") {
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
closeDrawer1,
|
||||
cloradio1,
|
||||
updateActivityInfo,
|
||||
disabledDateTime,
|
||||
disabledDate,
|
||||
CreateCertificate
|
||||
selectCondition,
|
||||
handleChange,
|
||||
CreateCertificate,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -584,7 +437,7 @@ export default {
|
||||
}
|
||||
|
||||
.main_left {
|
||||
margin-top: 32px;
|
||||
// margin-top: 32px;
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<a-drawer
|
||||
:visible="CCertificate"
|
||||
class="drawerStyle CreateCertificate"
|
||||
width="35%"
|
||||
width="800px"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
@@ -40,14 +40,15 @@
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入证书名称"
|
||||
show-count :maxlength="20"
|
||||
show-count
|
||||
:maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main_item" style="align-items:flex-start;">
|
||||
|
||||
<div class="main_item" style="align-items: flex-start">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
@@ -57,26 +58,31 @@
|
||||
</div>
|
||||
<span style="margin-right: 3px">证书封面:</span>
|
||||
</div>
|
||||
<div class="btnbox" style="flex-direction:column;align-items:flex-start;">
|
||||
<div
|
||||
class="btnbox"
|
||||
style="flex-direction: column; align-items: flex-start"
|
||||
>
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="avatar"
|
||||
style="width:200px;"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
||||
:before-upload="beforeUpload"
|
||||
@change="handleChange"
|
||||
v-model:file-list="fileList"
|
||||
name="avatar"
|
||||
style="width: 200px"
|
||||
list-type="picture-card"
|
||||
class="avatar-uploader"
|
||||
:show-upload-list="false"
|
||||
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
||||
:before-upload="beforeUpload"
|
||||
@change="handleChange"
|
||||
>
|
||||
<img v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
<div v-else>
|
||||
<img v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||
<div v-else>
|
||||
<loading-outlined v-if="loading"></loading-outlined>
|
||||
<plus-outlined v-else></plus-outlined>
|
||||
<div class="ant-upload-text">+</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-upload>
|
||||
<div style="font-size:14px;color:#666;">建议尺寸:750*348 格式支持jpg、gif、png、jpeg、svg、bmp</div>
|
||||
<div style="font-size: 14px; color: #666">
|
||||
建议尺寸:750*348 格式支持jpg、gif、png、jpeg、svg、bmp
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -84,13 +90,14 @@
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">证书说明:</span>
|
||||
</div>
|
||||
<div class="textarea" style="width:400px;">
|
||||
<div class="textarea" style="width: 400px">
|
||||
<a-textarea
|
||||
v-model:value="textV1"
|
||||
placeholder="请输入证书说明"
|
||||
allow-clear
|
||||
:rows="6"
|
||||
show-count :maxlength="200"
|
||||
show-count
|
||||
:maxlength="200"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -158,7 +165,7 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTemplateId:{
|
||||
projectTemplateId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
@@ -169,7 +176,7 @@ export default {
|
||||
inputV2: "",
|
||||
textV1: "",
|
||||
title: null,
|
||||
isClick: false
|
||||
isClick: false,
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:CCertificate", false);
|
||||
@@ -197,7 +204,7 @@ export default {
|
||||
};
|
||||
const updateTask = async (res) => {
|
||||
if (props.isLevel == 1) {
|
||||
if(!props.isactive){
|
||||
if (!props.isactive) {
|
||||
message.destroy();
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
@@ -216,7 +223,7 @@ export default {
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
// message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
// message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
apiTask
|
||||
@@ -229,7 +236,7 @@ export default {
|
||||
type: 7,
|
||||
})
|
||||
.then(() => {
|
||||
// message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
|
||||
// message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
@@ -237,11 +244,10 @@ export default {
|
||||
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
|
||||
addTempTask({
|
||||
courseId: res.data.data.linkId,
|
||||
name: res.data.data.linkName,
|
||||
projectTemplateId:props.projectTemplateId,
|
||||
projectTemplateId: props.projectTemplateId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId || 0,
|
||||
type: 7,
|
||||
@@ -259,9 +265,9 @@ export default {
|
||||
//创建外链
|
||||
const updateRef = () => {
|
||||
let c = 1111;
|
||||
if(c>0){
|
||||
if (c > 0) {
|
||||
closeDrawer();
|
||||
return
|
||||
return;
|
||||
}
|
||||
if (!state.inputV1) return message.warning("请输入外链名称");
|
||||
if (!state.inputV2) {
|
||||
@@ -274,11 +280,11 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if(state.isClick){
|
||||
message.destroy();
|
||||
message.error('请勿频繁点击')
|
||||
return
|
||||
}
|
||||
if (state.isClick) {
|
||||
message.destroy();
|
||||
message.error("请勿频繁点击");
|
||||
return;
|
||||
}
|
||||
state.isClick = true;
|
||||
|
||||
let obj = {
|
||||
|
||||
@@ -416,7 +416,7 @@ export default {
|
||||
);
|
||||
},
|
||||
},
|
||||
{/**
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
@@ -424,16 +424,15 @@ export default {
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return text.record.finishStatus == 1 ? (
|
||||
<div
|
||||
style={{
|
||||
customRender: ({record:{examStatus,workStatus}}) => {
|
||||
return (examStatus || workStatus) && (<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
{workStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
@@ -442,8 +441,8 @@ export default {
|
||||
}}
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
</a-button>}
|
||||
{examStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
@@ -452,37 +451,10 @@ export default {
|
||||
}}
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
disabled
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
disabled
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
*/ },
|
||||
|
||||
</a-button>}
|
||||
</div>)
|
||||
}
|
||||
}
|
||||
],
|
||||
exportHomeWorkV: false,
|
||||
downloadUrl: null,
|
||||
|
||||
@@ -429,16 +429,15 @@ export default {
|
||||
const ListOpera = () => {
|
||||
let arr = state.tabledata;
|
||||
arr.map((value) => {
|
||||
if (value.finishStatus == 1) {
|
||||
value.operation = (
|
||||
<div
|
||||
(value.examStatus || value.workStatus) && (<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
{value.workStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;color: rgba(56, 125, 247, 1)"
|
||||
@@ -447,8 +446,8 @@ export default {
|
||||
}}
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
</a-button>}
|
||||
{value.workStatus===1 && <a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;color: rgba(56, 125, 247, 1)"
|
||||
@@ -457,38 +456,10 @@ export default {
|
||||
}}
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
</a-button>}
|
||||
</div>)
|
||||
);
|
||||
} else {
|
||||
value.operation = (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="margin-right:10px;color:rgba(56, 125, 247, 0.5)"
|
||||
disabled
|
||||
>
|
||||
查看作业
|
||||
</a-button>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="margin-right:10px;color:rgba(56, 125, 247, 0.5)"
|
||||
disabled
|
||||
>
|
||||
查看答卷
|
||||
</a-button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:FaceTeachModelVisible", false);
|
||||
|
||||
@@ -1,178 +1,182 @@
|
||||
//
|
||||
import store from '@/store'
|
||||
|
||||
export function traverseArr(arr, traverseObj, saveOld = false) {
|
||||
const newArr = [];
|
||||
if (arr.length !== 0) {
|
||||
arr.forEach((item) => {
|
||||
let obj = {};
|
||||
if (saveOld) {
|
||||
obj = {
|
||||
...item,
|
||||
};
|
||||
}
|
||||
if (Object.keys(traverseObj).length !== 0) {
|
||||
for (const key in traverseObj) {
|
||||
if (typeof traverseObj[key] === "string") {
|
||||
obj[key] = item[traverseObj[key]];
|
||||
} else {
|
||||
if (item[key] && item[key].length !== 0) {
|
||||
obj[key] = traverseArr(item[key], traverseObj);
|
||||
const newArr = [];
|
||||
if (arr.length !== 0) {
|
||||
arr.forEach((item) => {
|
||||
let obj = {};
|
||||
if (saveOld) {
|
||||
obj = {
|
||||
...item,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
newArr.push(obj);
|
||||
});
|
||||
}
|
||||
// console.log('newArr', newArr)
|
||||
return newArr;
|
||||
if (Object.keys(traverseObj).length !== 0) {
|
||||
for (const key in traverseObj) {
|
||||
if (typeof traverseObj[key] === "string") {
|
||||
obj[key] = item[traverseObj[key]];
|
||||
} else {
|
||||
if (item[key] && item[key].length !== 0) {
|
||||
obj[key] = traverseArr(item[key], traverseObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
newArr.push(obj);
|
||||
});
|
||||
}
|
||||
// console.log('newArr', newArr)
|
||||
return newArr;
|
||||
}
|
||||
|
||||
const admin = [5, 6, 8, 9, 11, 12]
|
||||
|
||||
export function checkPer(per) {
|
||||
if (!per) {
|
||||
return false
|
||||
}
|
||||
return (per + "").split(',').some(t => admin.some(s => s == t))
|
||||
if (store?.state?.userInfo?.roleList.some(t => t.code === 'learning-admin')) {
|
||||
return true
|
||||
}
|
||||
if (!per) {
|
||||
return false
|
||||
}
|
||||
return (per + "").split(',').some(t => admin.some(s => s == t))
|
||||
}
|
||||
|
||||
export function deepClone(obj) {
|
||||
let result = typeof obj.splice === "function" ? [] : {};
|
||||
if (obj && typeof obj === "object") {
|
||||
for (let key in obj) {
|
||||
if (obj[key] && typeof obj[key] === "object") {
|
||||
result[key] = deepClone(obj[key]);
|
||||
} else {
|
||||
result[key] = obj[key];
|
||||
}
|
||||
let result = typeof obj.splice === "function" ? [] : {};
|
||||
if (obj && typeof obj === "object") {
|
||||
for (let key in obj) {
|
||||
if (obj[key] && typeof obj[key] === "object") {
|
||||
result[key] = deepClone(obj[key]);
|
||||
} else {
|
||||
result[key] = obj[key];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return obj;
|
||||
return obj;
|
||||
}
|
||||
|
||||
export function deepCloneFilterString(obj, fillterKeys) {
|
||||
let result = typeof obj.splice === "function" ? [] : {};
|
||||
if (obj && typeof obj === "object") {
|
||||
for (let key in obj) {
|
||||
if (obj[key] && typeof obj[key] === "object") {
|
||||
result[key] = deepCloneFilterString(obj[key], fillterKeys);
|
||||
} else {
|
||||
result[key] = fillterKeys.includes(key) ? obj[key] : String(obj[key]);
|
||||
}
|
||||
let result = typeof obj.splice === "function" ? [] : {};
|
||||
if (obj && typeof obj === "object") {
|
||||
for (let key in obj) {
|
||||
if (obj[key] && typeof obj[key] === "object") {
|
||||
result[key] = deepCloneFilterString(obj[key], fillterKeys);
|
||||
} else {
|
||||
result[key] = fillterKeys.includes(key) ? obj[key] : String(obj[key]);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return obj;
|
||||
return obj;
|
||||
}
|
||||
|
||||
export function sortBy(arr, key) {
|
||||
return arr.sort((x, y) => {
|
||||
const valueX = parseInt(x[key]);
|
||||
const valueY = parseInt(y[key]);
|
||||
if (valueX > valueY) {
|
||||
return 1;
|
||||
}
|
||||
if (valueX < valueY) {
|
||||
return -1;
|
||||
}
|
||||
});
|
||||
return arr.sort((x, y) => {
|
||||
const valueX = parseInt(x[key]);
|
||||
const valueY = parseInt(y[key]);
|
||||
if (valueX > valueY) {
|
||||
return 1;
|
||||
}
|
||||
if (valueX < valueY) {
|
||||
return -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function filterCommon(arr, key) {
|
||||
let newData = {};
|
||||
arr.forEach((item) => {
|
||||
//新建属性名
|
||||
if (Object.keys(newData).indexOf("" + item[key]) === -1) {
|
||||
newData[item[key]] = [];
|
||||
}
|
||||
//对应插入属性值
|
||||
newData["" + item[key]].push(item);
|
||||
});
|
||||
return newData;
|
||||
let newData = {};
|
||||
arr.forEach((item) => {
|
||||
//新建属性名
|
||||
if (Object.keys(newData).indexOf("" + item[key]) === -1) {
|
||||
newData[item[key]] = [];
|
||||
}
|
||||
//对应插入属性值
|
||||
newData["" + item[key]].push(item);
|
||||
});
|
||||
return newData;
|
||||
}
|
||||
|
||||
export function getdateToTime(date) {
|
||||
let now = new Date(parseInt(date)),
|
||||
y = now.getFullYear(),
|
||||
m = now.getMonth() + 1,
|
||||
d = now.getDate(),
|
||||
hh = now.getHours(),
|
||||
mm = now.getMinutes();
|
||||
return `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d} ${hh}:${mm}`;
|
||||
let now = new Date(parseInt(date)),
|
||||
y = now.getFullYear(),
|
||||
m = now.getMonth() + 1,
|
||||
d = now.getDate(),
|
||||
hh = now.getHours(),
|
||||
mm = now.getMinutes();
|
||||
return `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d} ${hh}:${mm}`;
|
||||
}
|
||||
|
||||
export function getdateToDate(date) {
|
||||
let now = new Date(parseInt(date)),
|
||||
y = now.getFullYear(),
|
||||
m = now.getMonth() + 1,
|
||||
d = now.getDate();
|
||||
return `${y}${m < 10 ? "0" + m : m}${d < 10 ? "0" + d : d}`;
|
||||
let now = new Date(parseInt(date)),
|
||||
y = now.getFullYear(),
|
||||
m = now.getMonth() + 1,
|
||||
d = now.getDate();
|
||||
return `${y}${m < 10 ? "0" + m : m}${d < 10 ? "0" + d : d}`;
|
||||
}
|
||||
|
||||
//计算两个时间之间的时间差 多少天时分秒
|
||||
export function intervalTime(startTime) {
|
||||
const curTime = new Date().getTime(); //计算当前时间戳
|
||||
const date3 = curTime - startTime; //时间差的毫秒数
|
||||
//计算出相差天数
|
||||
const days = Math.floor(date3 / (24 * 3600 * 1000));
|
||||
//计算出小时数
|
||||
const leave1 = date3 % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
|
||||
const hours = Math.floor(leave1 / (3600 * 1000));
|
||||
//计算相差分钟数
|
||||
const leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
|
||||
const minutes = Math.floor(leave2 / (60 * 1000));
|
||||
//计算相差秒数
|
||||
const leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
|
||||
const seconds = Math.round(leave3 / 1000);
|
||||
return {
|
||||
days,
|
||||
hours,
|
||||
minutes,
|
||||
seconds,
|
||||
};
|
||||
const curTime = new Date().getTime(); //计算当前时间戳
|
||||
const date3 = curTime - startTime; //时间差的毫秒数
|
||||
//计算出相差天数
|
||||
const days = Math.floor(date3 / (24 * 3600 * 1000));
|
||||
//计算出小时数
|
||||
const leave1 = date3 % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
|
||||
const hours = Math.floor(leave1 / (3600 * 1000));
|
||||
//计算相差分钟数
|
||||
const leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
|
||||
const minutes = Math.floor(leave2 / (60 * 1000));
|
||||
//计算相差秒数
|
||||
const leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
|
||||
const seconds = Math.round(leave3 / 1000);
|
||||
return {
|
||||
days,
|
||||
hours,
|
||||
minutes,
|
||||
seconds,
|
||||
};
|
||||
}
|
||||
|
||||
// 分片处理
|
||||
export function batchLoadList(
|
||||
sourceData,
|
||||
dataTotal,
|
||||
splitNumber = 10,
|
||||
callback,
|
||||
complete
|
||||
sourceData,
|
||||
dataTotal,
|
||||
splitNumber = 10,
|
||||
callback,
|
||||
complete
|
||||
) {
|
||||
if (sourceData.length <= splitNumber) {
|
||||
typeof callback === "function" && callback(sourceData);
|
||||
typeof callback === "function" && complete();
|
||||
return;
|
||||
}
|
||||
let first = 0;
|
||||
const intTime = parseInt(String(dataTotal / splitNumber));
|
||||
const floatTime = sourceData.length % splitNumber;
|
||||
const total = intTime + (floatTime > 0 ? 1 : 0);
|
||||
for (let i = 0; i < total; i += 1) {
|
||||
const end = first + splitNumber;
|
||||
const splitArray = sourceData.slice(first, end);
|
||||
setTimeout(() => {
|
||||
typeof callback === "function" && callback(splitArray);
|
||||
if (i === total - 1) {
|
||||
// 分片处理完成
|
||||
if (sourceData.length <= splitNumber) {
|
||||
typeof callback === "function" && callback(sourceData);
|
||||
typeof callback === "function" && complete();
|
||||
}
|
||||
});
|
||||
first = end;
|
||||
}
|
||||
return;
|
||||
}
|
||||
let first = 0;
|
||||
const intTime = parseInt(String(dataTotal / splitNumber));
|
||||
const floatTime = sourceData.length % splitNumber;
|
||||
const total = intTime + (floatTime > 0 ? 1 : 0);
|
||||
for (let i = 0; i < total; i += 1) {
|
||||
const end = first + splitNumber;
|
||||
const splitArray = sourceData.slice(first, end);
|
||||
setTimeout(() => {
|
||||
typeof callback === "function" && callback(splitArray);
|
||||
if (i === total - 1) {
|
||||
// 分片处理完成
|
||||
typeof callback === "function" && complete();
|
||||
}
|
||||
});
|
||||
first = end;
|
||||
}
|
||||
}
|
||||
|
||||
export function newFile(code) {
|
||||
const blob = new Blob([code], {
|
||||
type: "application/vnd.ms-excel",
|
||||
});
|
||||
const linkNode = document.createElement("a");
|
||||
linkNode.style.display = "none";
|
||||
linkNode.href = URL.createObjectURL(blob); //生成一个Blob URL
|
||||
document.body.appendChild(linkNode);
|
||||
linkNode.click(); //模拟在按钮上的一次鼠标单击
|
||||
URL.revokeObjectURL(linkNode.href); // 释放URL 对象
|
||||
document.body.removeChild(linkNode);
|
||||
const blob = new Blob([code], {
|
||||
type: "application/vnd.ms-excel",
|
||||
});
|
||||
const linkNode = document.createElement("a");
|
||||
linkNode.style.display = "none";
|
||||
linkNode.href = URL.createObjectURL(blob); //生成一个Blob URL
|
||||
document.body.appendChild(linkNode);
|
||||
linkNode.click(); //模拟在按钮上的一次鼠标单击
|
||||
URL.revokeObjectURL(linkNode.href); // 释放URL 对象
|
||||
document.body.removeChild(linkNode);
|
||||
}
|
||||
|
||||
@@ -305,13 +305,15 @@
|
||||
<!-- 查看面授课弹框 end -->
|
||||
<!-- 确定新建面授课弹窗 -->
|
||||
<!-- 表格 -->
|
||||
<div class="tableBox">
|
||||
<div style="padding:10px 35px">
|
||||
<a-table
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="columns1"
|
||||
:data-source="tableData1"
|
||||
:loading="tableDataTotal1 === -1"
|
||||
:scroll="{ x: 600 }"
|
||||
:loading="tableLoading"
|
||||
:pagination="false"
|
||||
:scroll="{x:'max-content'}"
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
@@ -339,9 +341,10 @@
|
||||
</div>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="tableDataTotal1 > 10"
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize1"
|
||||
:current="currentPage1"
|
||||
:total="tableDataTotal1"
|
||||
@@ -753,7 +756,7 @@
|
||||
>
|
||||
删除
|
||||
</a-menu-item>
|
||||
<!--新加 二维码
|
||||
<!--新加 二维码
|
||||
<a-menu-item @click="qrcodeVisible(record, 1)">
|
||||
二维码
|
||||
</a-menu-item>-->
|
||||
@@ -1511,7 +1514,7 @@ import {
|
||||
addStudent,
|
||||
studentExport,
|
||||
handleStudent,
|
||||
getMemberInfoApi,
|
||||
getMemberInfoApi, copyCoursePlan,
|
||||
// listReview,
|
||||
// studyRecordList,
|
||||
} from "@/api/indexCourse";
|
||||
@@ -1548,24 +1551,24 @@ import {checkPer} from "@/utils/utils";
|
||||
|
||||
//列表表格
|
||||
const columns1 = [
|
||||
{
|
||||
title: "课程编号",
|
||||
width: 130,
|
||||
dataIndex: "offcourseNumber",
|
||||
key: "offcourseNumber",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
width: 400,
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
align: "left",
|
||||
customRender: ({ text }) => {
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "课程编号",
|
||||
width: 130,
|
||||
dataIndex: "offcourseNumber",
|
||||
key: "offcourseNumber",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "内容分类",
|
||||
width: 130,
|
||||
@@ -1678,7 +1681,7 @@ const columns1 = [
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
width: 160,
|
||||
width: 100,
|
||||
dataIndex: "createtime",
|
||||
key: "9",
|
||||
ellipsis: true,
|
||||
@@ -1689,7 +1692,7 @@ const columns1 = [
|
||||
},
|
||||
{
|
||||
title: "发布时间",
|
||||
width: 160,
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
dataIndex: "pubtime",
|
||||
key: "10",
|
||||
@@ -1715,7 +1718,7 @@ const columns1 = [
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 370,
|
||||
width: 250,
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
fixed: "right",
|
||||
@@ -2128,6 +2131,7 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
|
||||
const state = reactive({
|
||||
tableLoading:false,
|
||||
//新加
|
||||
stuColumns: [
|
||||
{
|
||||
@@ -2900,6 +2904,7 @@ export default defineComponent({
|
||||
|
||||
// 渲染列表1操作
|
||||
const getTableDate = async () => {
|
||||
state.tableLoading = true
|
||||
console.log("我是点击搜索的数据", state.sysTypeId);
|
||||
// let datas = state.tableData1;
|
||||
let startTime = "";
|
||||
@@ -2961,6 +2966,7 @@ export default defineComponent({
|
||||
findClassFullName(sysTypeOptions.value, itm.sysTypeId) || "-";
|
||||
});
|
||||
state.tableData1 = datas;
|
||||
state.tableLoading = false
|
||||
};
|
||||
|
||||
function findClassFullName(list, classify, name = "") {
|
||||
@@ -4033,38 +4039,12 @@ export default defineComponent({
|
||||
if (state.copy_hs) {
|
||||
console.log(2222222);
|
||||
if (state.offcourseId && state.offcoursePlanId) {
|
||||
console.log(87887);
|
||||
// 拿数据
|
||||
const item = await detailPlan({
|
||||
offcoursePlanId: Number(state.offcoursePlanId),
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) return res.data.data;
|
||||
});
|
||||
const obj = {
|
||||
offcourseId: item.offcourseId,
|
||||
offcoursePlanId: null, //开课ID,不传代表新增
|
||||
address: item.address,
|
||||
applyFlag: item.applyFlag,
|
||||
attach: item.attach,
|
||||
beginTime: new Date(item.beginTime) / 1000,
|
||||
completeType: item.completeType,
|
||||
endTime: new Date(item.endTime) / 1000,
|
||||
evalFlag: item.evalFlag,
|
||||
name: item.name + "(1)",
|
||||
signFlag: item.signFlag, //是否允许未报名的签到:1是0否
|
||||
//signWordFlag: item.signWordFlag, //签到是否需要口令:1是0否
|
||||
teacherId: item.teacherId,
|
||||
teacher: item.teacher,
|
||||
};
|
||||
console.log(obj);
|
||||
editPlan(obj).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
message.destroy();
|
||||
message.success("复制成功");
|
||||
getTableDate3();
|
||||
delete_exit1();
|
||||
rest();
|
||||
}
|
||||
copyCoursePlan({offcoursePlanId:state.offcourseId}).then(() => {
|
||||
message.destroy();
|
||||
message.success("复制成功");
|
||||
getTableDate3();
|
||||
delete_exit1();
|
||||
rest();
|
||||
});
|
||||
} else if (state.offcourseId) {
|
||||
console.log(87887);
|
||||
@@ -4713,7 +4693,7 @@ export default defineComponent({
|
||||
name: record.name ? record.name : "",
|
||||
url:
|
||||
type == 1
|
||||
? process.env.VUE_APP_COURSE_STUDY + record.offcourseId
|
||||
? window.location.protocol + process.env.VUE_APP_COURSE_STUDY + record.offcourseId
|
||||
: process.env.VUE_APP_BASE_API +
|
||||
`/admin/student/studentSign?taskId=${
|
||||
record.offcoursePlanId
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<!-- 搜索框及按钮 -->
|
||||
<!-- 无数据 -->
|
||||
<div class="datanull" v-if="tableDataTotal === 0">
|
||||
<div class="datanull" v-if="!tableDataTotal">
|
||||
<div class="nodata_box">
|
||||
<div class="left">
|
||||
<img src="../../assets/images/taskpage/left1.png" />
|
||||
@@ -87,18 +87,13 @@
|
||||
</div>
|
||||
<!-- 无数据 -->
|
||||
<!-- 表格 -->
|
||||
<div
|
||||
class="tableBox"
|
||||
v-if="tableDataTotal !== 0"
|
||||
style="padding-bottom: 0px; position: relative"
|
||||
>
|
||||
<div v-if="tableDataTotal" style="padding:10px 35px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
style="border: 1px solid #f2f6fe;"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableLoading"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ x: 1550 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
>
|
||||
@@ -131,8 +126,8 @@
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
@@ -1135,38 +1130,27 @@ export default {
|
||||
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
// {
|
||||
// title: "序号",
|
||||
// dataIndex: "number",
|
||||
// key: "number",
|
||||
// width: 100,
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
{
|
||||
title: "路径图名称",
|
||||
dataIndex: "manager",
|
||||
key: "manager",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
align: "left",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
width: 400,
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "state",
|
||||
width: "10%",
|
||||
key: "state",
|
||||
//width: 100,
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "creater",
|
||||
width: "10%",
|
||||
key: "creater",
|
||||
// width: 100,
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
@@ -1174,7 +1158,7 @@ export default {
|
||||
title: "发布时间",
|
||||
dataIndex: "pubtime",
|
||||
key: "pubtime",
|
||||
width: "15%",
|
||||
width: 200,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
@@ -1182,17 +1166,18 @@ export default {
|
||||
title: "创建时间",
|
||||
dataIndex: "cretime",
|
||||
key: "cretime",
|
||||
width: "15%",
|
||||
align: "center",
|
||||
width: 200,
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
width: "20%",
|
||||
align: "right",
|
||||
fixed: "right",
|
||||
className: "h",
|
||||
width: 250,
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
];
|
||||
|
||||
@@ -26,16 +26,31 @@
|
||||
<a-popover placement="topLeft" trigger="click">
|
||||
<template #content>
|
||||
<div style="width: 130px">
|
||||
{{ element.remark ? element.remark : "暂无说明" }}
|
||||
<div>
|
||||
{{ element.remark ? element.remark : "暂无说明" }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #title>
|
||||
<span>关卡说明</span>
|
||||
<!-- <span style="float:right">
|
||||
{{ element.status === 0 ? '草稿' : element.status === 1 ? '已发布' : '' }}
|
||||
</span> -->
|
||||
</template>
|
||||
<div class="script">
|
||||
<span style="font-size: 12px; color: #ffffff">说明</span>
|
||||
<div style="display:flex;justify-content: flex-start;margin-right: 8px;">
|
||||
<div class="script">
|
||||
<span style="font-size: 12px; color: #ffffff">说明</span>
|
||||
</div>
|
||||
<!-- <div class="script">
|
||||
<span style="font-size: 12px; color: #ffffff">{{
|
||||
element.status === 0 ? '草稿' : element.status
|
||||
=== 1 ? '已发布' : ''
|
||||
}}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</a-popover>
|
||||
|
||||
<div class="imgIcon" @click="showModal(element)"></div>
|
||||
</div>
|
||||
<div class="boxs_right">
|
||||
@@ -387,7 +402,8 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="boom" :style="{ minHeight: level.length > 6 ? ((level.length - 6) * 106 + 512) + 'px' : 512 + 'px' }">
|
||||
<div class="boom"
|
||||
:style="{ minHeight: level.length > 6 ? ((level.length - 6) * 106 + 512) + 'px' : 512 + 'px' }">
|
||||
<div class="boomcen">
|
||||
<div class="title">
|
||||
<div class="tit_left">
|
||||
@@ -444,6 +460,7 @@
|
||||
<div style="width: 120px; text-align: center">任务名称</div>
|
||||
<div style="width: 120px; text-align: center">必修/选修</div>
|
||||
<div style="width: 87px; text-align: center">时长</div>
|
||||
<div style="width: 87px; text-align: center">状态</div>
|
||||
<div style="width: 120px; text-align: center; margin-right: 20px">
|
||||
操作
|
||||
</div>
|
||||
@@ -517,6 +534,10 @@
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div style="width: 87px; text-align: center">
|
||||
{{ element.status === 0 ? '草稿' : element.status === 1 ? '已发布' : '' }}
|
||||
</div>
|
||||
<div style="
|
||||
width: 120px;
|
||||
text-align: center;
|
||||
@@ -840,7 +861,7 @@ import AddRef from "../../components/drawers/AddRef.vue";
|
||||
import AddProject from "../../components/drawers/AddProject.vue";
|
||||
import AddFaceteach from "../../components/drawers/AddFaceteach.vue";
|
||||
import * as api from "../../api/indexLevel";
|
||||
import { GetRouterDetail,changeChapterSort , changeTasklistSort} from "../../api/indexTask";
|
||||
import { GetRouterDetail, changeChapterSort, changeTasklistSort } from "../../api/indexTask";
|
||||
import { message } from "ant-design-vue";
|
||||
import { storage } from "../../api/storage";
|
||||
import { deleteStudyTask } from "../../api/indexStudy";
|
||||
@@ -1115,16 +1136,16 @@ export default {
|
||||
});
|
||||
};
|
||||
// 关卡拖动排序
|
||||
const changeSort = ()=>{
|
||||
const sortArr = state.level.map(s=>s.sort).sort((a,b)=> Number(a)-Number(b))
|
||||
state.level.map((s,i)=>{
|
||||
const changeSort = () => {
|
||||
const sortArr = state.level.map(s => s.sort).sort((a, b) => Number(a) - Number(b))
|
||||
state.level.map((s, i) => {
|
||||
s.sort = sortArr[i]
|
||||
return s
|
||||
})
|
||||
|
||||
changeChapterSort(state.level).then((res)=>{
|
||||
changeChapterSort(state.level).then((res) => {
|
||||
console.log(res)
|
||||
if(res.data.code===200){
|
||||
if (res.data.code === 200) {
|
||||
message.success('关卡顺序已修改')
|
||||
}
|
||||
// getDetail()
|
||||
@@ -1132,20 +1153,20 @@ export default {
|
||||
}
|
||||
|
||||
// 任务拖动排序
|
||||
const onEnd = ()=>{
|
||||
const sortArr = state.tableData.map(s=>s.sort).sort((a,b)=> Number(a)-Number(b))
|
||||
state.tableData.map((s,i)=>{
|
||||
const onEnd = () => {
|
||||
const sortArr = state.tableData.map(s => s.sort).sort((a, b) => Number(a) - Number(b))
|
||||
state.tableData.map((s, i) => {
|
||||
s.sort = sortArr[i]
|
||||
return s
|
||||
})
|
||||
changeTasklistSort(state.tableData).then(res=>{
|
||||
})
|
||||
changeTasklistSort(state.tableData).then(res => {
|
||||
console.log(res)
|
||||
if(res.data.code===200){
|
||||
if (res.data.code === 200) {
|
||||
message.success('任务顺序已修改')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//在线抽屉
|
||||
const showDrawerAddOnline = (id, eleId) => {
|
||||
state.addonlinevisible = true;
|
||||
@@ -2368,11 +2389,11 @@ export default {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 56px;
|
||||
width: 46px;
|
||||
height: 24px;
|
||||
background: #ffb64e;
|
||||
border-radius: 6px;
|
||||
margin-right: 12px;
|
||||
margin-right: 5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,19 +83,19 @@
|
||||
</div>
|
||||
<!-- 搜索框及按钮 -->
|
||||
<!-- 表格 -->
|
||||
<div class="tableBox">
|
||||
<div style="padding:10px 35px">
|
||||
<a-table
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
style="border: 1px solid #f2f6fe;"
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
:loading="tableLoading"
|
||||
:scroll="{ x: 700 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:header-cell-style="{'text-align':'center'}"
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space align="start">
|
||||
<a-space>
|
||||
<a-button v-if="(record.status===0 || record.status===2 || record.status===-5) && checkPer(record.permissions)" @click="handleEdit(record)" type="link">编辑</a-button>
|
||||
<a-button v-if="record.type===1 && checkPer(record.permissions)" @click="createSub(record)" type="link">创建子项目</a-button>
|
||||
<a-button v-if="record.type===2 && checkPer(record.permissions)" @click="createClass(record)" type="link">创建班级</a-button>
|
||||
@@ -125,8 +125,8 @@
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="searchParam.pageNo"
|
||||
:total="tableDataTotal"
|
||||
@@ -138,7 +138,7 @@
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<!-- 无项目 -->
|
||||
<div class="tableBox" style="display: none">
|
||||
<div style="display: none">
|
||||
<div
|
||||
class="taskbox"
|
||||
@click="showModal1"
|
||||
@@ -1341,30 +1341,26 @@ export default {
|
||||
title: "项目名称",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
width: 380,
|
||||
// align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
// customRender: (text, record) => {
|
||||
// console.log(text, record);
|
||||
// return <span>{text.text}</span>;
|
||||
// },
|
||||
width: 400,
|
||||
},
|
||||
{
|
||||
title: "项目经理",
|
||||
dataIndex: "manager",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
key: "manager",
|
||||
width: 300,
|
||||
align: "center",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
dataIndex: "status",
|
||||
// width: "30%",
|
||||
className: "h",
|
||||
key: "status",
|
||||
width: 100,
|
||||
align: "center",
|
||||
width: 100,
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -1385,15 +1381,15 @@ export default {
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "createName",
|
||||
// width: "30%",
|
||||
className: "h",
|
||||
key: "createName",
|
||||
width: 100,
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "是否审核",
|
||||
dataIndex: "status",
|
||||
// width: "30%",
|
||||
className: "h",
|
||||
key: "status",
|
||||
width: 100,
|
||||
align: "center",
|
||||
@@ -1419,16 +1415,18 @@ export default {
|
||||
title: "创建时间",
|
||||
dataIndex: "createTime",
|
||||
key: "createTime",
|
||||
width: 180,
|
||||
className: "h",
|
||||
width: 200,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
key: "operation",
|
||||
width: 350,
|
||||
className: "h",
|
||||
align: "right",
|
||||
fixed: "right",
|
||||
width: 300,
|
||||
scopedSlots: {customRender: "action"}
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -423,7 +423,7 @@
|
||||
批量面授报名
|
||||
</button> -->
|
||||
<router-link
|
||||
v-if="checkPer(permissions)"
|
||||
v-if="checkPer(permissions)"
|
||||
:to="{ path: `/taskadd`, query: { projectId: projectId } }"
|
||||
>
|
||||
<button class="edit">
|
||||
@@ -840,7 +840,10 @@
|
||||
<div class="split"></div>
|
||||
<a-tabs v-model:activeKey="activeKeyNotice">
|
||||
<a-tab-pane key="11" tab="公告">
|
||||
<NoticePub :permissions="permissions" v-model:projectId="projectId"></NoticePub>
|
||||
<NoticePub
|
||||
:permissions="permissions"
|
||||
v-model:projectId="projectId"
|
||||
></NoticePub>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="12" tab="历史公告" force-render>
|
||||
<NoticeHis
|
||||
@@ -851,7 +854,10 @@
|
||||
</a-tabs>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="5" tab="项目积分">
|
||||
<ProjectScore :permissions="permissions" :projectId="projectId"></ProjectScore>
|
||||
<ProjectScore
|
||||
:permissions="permissions"
|
||||
:projectId="projectId"
|
||||
></ProjectScore>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="6" tab="排行榜">
|
||||
<div class="split"></div>
|
||||
@@ -971,7 +977,7 @@
|
||||
<div class="split"></div>
|
||||
<!-- 没有证书显示的页面 -->
|
||||
<div
|
||||
v-if="3 > 7"
|
||||
v-if="3> 7"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -980,12 +986,14 @@
|
||||
flex-direction: column;
|
||||
"
|
||||
>
|
||||
<img
|
||||
src="@/assets/images/nodata.png"
|
||||
style="width: 212px; height: 212px"
|
||||
alt=""
|
||||
/>
|
||||
<button class="xkbtn11" @click="addCertificate">添加证书</button>
|
||||
<div class="certificate" @click="addCertificate">
|
||||
<img
|
||||
style="width: 68px; height: 79px"
|
||||
src="../../assets/images/taskpage/nocertificate2.png"
|
||||
/>
|
||||
<div style="font-size: 20px;color: #409EFF;margin-top:16px">无证书</div>
|
||||
<div style="font-size: 14px;color: #878B92;">请点击新建证书</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 有证书显示的页面 -->
|
||||
<div v-else style="padding: 36px; display: flex; min-height: 400px">
|
||||
@@ -1098,7 +1106,11 @@
|
||||
<div class="img"></div>
|
||||
<div class="ed">编辑</div>
|
||||
</div> -->
|
||||
<div class="edit" v-if="status != 3 && checkPer(permissions)" @click="toEdit">
|
||||
<div
|
||||
class="edit"
|
||||
v-if="status != 3 && checkPer(permissions)"
|
||||
@click="toEdit"
|
||||
>
|
||||
<div class="img"></div>
|
||||
<div class="ed">编辑</div>
|
||||
</div>
|
||||
@@ -1431,7 +1443,10 @@
|
||||
/>
|
||||
|
||||
<!-- 添加证书抽屉 -->
|
||||
<AddCertificate v-model:ACertificate="ACertificate" />
|
||||
<AddCertificate
|
||||
v-model:ACertificate="ACertificate"
|
||||
v-model:projectId="projectId"
|
||||
/>
|
||||
|
||||
<!-- 创建证书抽屉 -->
|
||||
<CreateCertificate v-model:CCertificate="CCertificate" />
|
||||
@@ -2108,7 +2123,7 @@ import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import TableStudent from "@/components/student/TableStudent";
|
||||
import { getStuPage } from "@/api/index1";
|
||||
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
|
||||
import {checkPer} from "@/utils/utils";
|
||||
import { checkPer } from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
name: "taskPage",
|
||||
@@ -2147,7 +2162,7 @@ export default {
|
||||
const store = useStore();
|
||||
const route = useRoute();
|
||||
const state = reactive({
|
||||
permissions:'',
|
||||
permissions: "",
|
||||
screenHeight: document.body.clientHeight,
|
||||
screenWidth: document.body.clientWidth,
|
||||
editRecord: {},
|
||||
@@ -4544,6 +4559,7 @@ export default {
|
||||
/* 证书 */
|
||||
}
|
||||
function addCertificate() {
|
||||
console.log("点击添加证书");
|
||||
state.ACertificate = true;
|
||||
}
|
||||
|
||||
@@ -7520,6 +7536,16 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.certificate {
|
||||
width: 412px;
|
||||
height: 212px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-image: url(../../assets/images/taskpage/nocertificate.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.DelModal {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="delete" @click="handleDel">删除</div>
|
||||
</div>
|
||||
<!--
|
||||
|
||||
<div class="name uploadContent">
|
||||
<a-upload
|
||||
v-show="!curItem.imgVal"
|
||||
@@ -44,7 +44,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -15,14 +15,13 @@ module.exports = defineConfig({
|
||||
port: 8080,
|
||||
proxy: {
|
||||
"/manageApi": {
|
||||
target: 'http://127.0.0.1:30001',
|
||||
// process.env.VUE_APP_PROXY_URL,
|
||||
target: 'http:' + process.env.VUE_APP_PROXY_URL,
|
||||
changeOrigin: true, //表示是否改变原域名
|
||||
pathRewrite: {
|
||||
"^/manageApi": "",
|
||||
},
|
||||
}, "/userbasic": {
|
||||
target: process.env.VUE_APP_BOE_API_URL,
|
||||
target: 'https:' + process.env.VUE_APP_BOE_API_URL,
|
||||
changeOrigin: true, //表示是否改变原域名
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user