mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
feat:增加项目积分的学员获取
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-11-04 22:45:31
|
* @Date: 2022-11-04 22:45:31
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2022-11-06 16:48:50
|
* @LastEditTime: 2022-11-07 11:12:01
|
||||||
* @FilePath: /fe-manage/src/api/index1.js
|
* @FilePath: /fe-manage/src/api/index1.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
|
||||||
*/
|
*/
|
||||||
@@ -72,12 +72,22 @@ export const addStudent = (obj) => http.post('/admin/router/addStudent', obj);
|
|||||||
|
|
||||||
|
|
||||||
//项目基础信息-----------------------------------
|
//项目基础信息-----------------------------------
|
||||||
|
//学员获取
|
||||||
|
export const getProjectStudent=(obj)=>http.post('/admin/project/studentList',obj)
|
||||||
//项目积分榜单
|
//项目积分榜单
|
||||||
export const scoreRank = (obj) => http.post('/admin/project/scoreRank', obj);
|
export const scoreRank = (obj) => http.post('/admin/project/scoreRank', obj);
|
||||||
|
//获取规则
|
||||||
|
export const scoreRule=(projectId)=>http.get('/admin/project/scoreRule',{
|
||||||
|
params: {
|
||||||
|
projectId: projectId,
|
||||||
|
}
|
||||||
|
})
|
||||||
//排行榜
|
//排行榜
|
||||||
export const billboard = (obj) => http.post('/admin/project/billboard', obj);
|
export const billboard = (obj) => http.post('/admin/project/billboard', obj);
|
||||||
|
|
||||||
//项目基础信息-----------------------------------
|
//项目基础信息-----------------------------------
|
||||||
|
|
||||||
|
|
||||||
// 测试方法
|
// 测试方法
|
||||||
// import * as api from '../../api/index'
|
// import * as api from '../../api/index'
|
||||||
// api.getLearnPath({}).then(res => {
|
// api.getLearnPath({}).then(res => {
|
||||||
|
|||||||
@@ -9,16 +9,16 @@
|
|||||||
<div class="groupname" style="width: 42px">姓名:</div>
|
<div class="groupname" style="width: 42px">姓名:</div>
|
||||||
<a-input
|
<a-input
|
||||||
class="ant-input"
|
class="ant-input"
|
||||||
v-model:value="value"
|
v-model:value="studentName"
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="groupright">
|
<div class="groupright">
|
||||||
<div class="btn1">
|
<div class="btn1" @click="searchProjectStudent">
|
||||||
<img src="../../assets/images/courseManage/search0.png" />
|
<img src="../../assets/images/courseManage/search0.png" />
|
||||||
<span class="btn1text">搜索</span>
|
<span class="btn1text">搜索</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn2">
|
<div class="btn2" @click="projectStudentReset">
|
||||||
<img src="../../assets/images/courseManage/reset1.png" />
|
<img src="../../assets/images/courseManage/reset1.png" />
|
||||||
<span class="btn2text">重置</span>
|
<span class="btn2text">重置</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -367,13 +367,17 @@ export default {
|
|||||||
activeKeyScore: "2",
|
activeKeyScore: "2",
|
||||||
stuName: "请输入姓名",
|
stuName: "请输入姓名",
|
||||||
todayvalue: "1",
|
todayvalue: "1",
|
||||||
tableDataTotal: 30,
|
|
||||||
stuValue: false,
|
stuValue: false,
|
||||||
Svisible: false,
|
Svisible: false,
|
||||||
score1: 5,
|
score1: 5,
|
||||||
score2: 5,
|
score2: 5,
|
||||||
edit: true,
|
edit: true,
|
||||||
searchRankName:null,//榜单搜索名称
|
searchRankName:null,//榜单搜索名称
|
||||||
|
studentName:null,//学员搜索名称
|
||||||
|
pageSize:10,
|
||||||
|
currentPage:1,
|
||||||
|
tableDataTotal: -1,
|
||||||
});
|
});
|
||||||
const getTableData = () => {
|
const getTableData = () => {
|
||||||
let datas = state.tabledataStu;
|
let datas = state.tabledataStu;
|
||||||
@@ -399,21 +403,59 @@ export default {
|
|||||||
getTableData();
|
getTableData();
|
||||||
|
|
||||||
const tabsChange = (e) => {
|
const tabsChange = (e) => {
|
||||||
|
if (e == 1) {
|
||||||
|
// console.log('获取项目积分-学员')
|
||||||
|
getProjectStudent();
|
||||||
|
}
|
||||||
if (e == 2) {
|
if (e == 2) {
|
||||||
// console.log('获取项目积分-榜单')
|
// console.log('获取项目积分-榜单')
|
||||||
scoreRank(1, 1);
|
scoreRank(1, 1);
|
||||||
}
|
}
|
||||||
|
if(e==3){
|
||||||
|
scoreRule()
|
||||||
|
}
|
||||||
|
projectStudentReset()
|
||||||
rankReset()
|
rankReset()
|
||||||
state.todayvalue='1'
|
state.todayvalue='1'
|
||||||
state.stuValue=1
|
state.stuValue=1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// start -------学员---------------学员------------学员------------------学员---------
|
||||||
|
//重置
|
||||||
|
const projectStudentReset=()=>{
|
||||||
|
state.studentName=null
|
||||||
|
}
|
||||||
|
//搜索
|
||||||
|
const searchProjectStudent = () => {
|
||||||
|
state.currentPage=1
|
||||||
|
getProjectStudent()
|
||||||
|
};
|
||||||
|
//项目积分榜单
|
||||||
|
const getProjectStudent = () => {
|
||||||
|
console.log("projectId", props.projectId,state.studentName);
|
||||||
|
let obj = {
|
||||||
|
projectId:props.projectId,
|
||||||
|
pageSize:state.pageSize,
|
||||||
|
pageNo:state.currentPage,
|
||||||
|
name:state.studentName,
|
||||||
|
};
|
||||||
|
api
|
||||||
|
.getProjectStudent(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("获取项目积分-学员", res);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("获取项目积分-学员", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// end -----学员----------------学员----------------------学员-----------学员----------
|
||||||
|
|
||||||
|
|
||||||
|
// start -------榜单---------------榜单------------榜单------------------榜单---------
|
||||||
//重置
|
//重置
|
||||||
const rankReset=()=>{
|
const rankReset=()=>{
|
||||||
state.searchRankName=null
|
state.searchRankName=null
|
||||||
}
|
}
|
||||||
// start -------榜单---------------榜单------------榜单------------------榜单---------
|
|
||||||
//学员积分还是小组积分
|
//学员积分还是小组积分
|
||||||
const typeChange = (num) => {
|
const typeChange = (num) => {
|
||||||
state.stuValue = num;
|
state.stuValue = num;
|
||||||
@@ -449,6 +491,22 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
// end -----榜单----------------榜单----------------------榜单-----------榜单----------
|
// end -----榜单----------------榜单----------------------榜单-----------榜单----------
|
||||||
|
|
||||||
|
// start -------获取规则---------------获取规则------------获取规则------------------获取规则---------
|
||||||
|
|
||||||
|
//获取规则
|
||||||
|
const scoreRule = () => {
|
||||||
|
console.log("projectId", props.projectId);
|
||||||
|
api
|
||||||
|
.scoreRule(props.projectId)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("获取项目积分-获取规则", res);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("获取项目积分-获取规则", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// end -----获取规则----------------获取规则----------------------获取规则-----------获取规则----------
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
typeChange,
|
typeChange,
|
||||||
@@ -456,7 +514,11 @@ export default {
|
|||||||
searchRank,
|
searchRank,
|
||||||
rankReset,
|
rankReset,
|
||||||
tabsChange,
|
tabsChange,
|
||||||
|
projectStudentReset,
|
||||||
|
searchProjectStudent,
|
||||||
|
getProjectStudent,
|
||||||
scoreRank,
|
scoreRank,
|
||||||
|
scoreRule,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@@ -1060,7 +1060,6 @@ export default {
|
|||||||
const getStageData = (tableData) => {
|
const getStageData = (tableData) => {
|
||||||
let data = tableData;
|
let data = tableData;
|
||||||
let array = [];
|
let array = [];
|
||||||
console.log('tableData',data)
|
|
||||||
data.map((value) => {
|
data.map((value) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
id: value.stageId,
|
id: value.stageId,
|
||||||
@@ -2350,9 +2349,9 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center; // background-color: #bfa;
|
align-items: center; // background-color: #bfa;
|
||||||
.chosen {
|
// .chosen {
|
||||||
// background-color: pink;
|
// // background-color: pink;
|
||||||
}
|
// }
|
||||||
.ghost {
|
.ghost {
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
opacity: 0 !important;
|
opacity: 0 !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user