diff --git a/src/api/index1.js b/src/api/index1.js index 16e7ee9d..cab6920e 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-04 22:45:31 * @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 * @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 scoreRule=(projectId)=>http.get('/admin/project/scoreRule',{ + params: { + projectId: projectId, + } +}) //排行榜 export const billboard = (obj) => http.post('/admin/project/billboard', obj); + //项目基础信息----------------------------------- + // 测试方法 // import * as api from '../../api/index' // api.getLearnPath({}).then(res => { diff --git a/src/components/drawers/ProjectScore.vue b/src/components/drawers/ProjectScore.vue index 0ba76354..ea35085c 100644 --- a/src/components/drawers/ProjectScore.vue +++ b/src/components/drawers/ProjectScore.vue @@ -9,16 +9,16 @@
姓名:
-
+
搜索
-
+
重置
@@ -367,13 +367,17 @@ export default { activeKeyScore: "2", stuName: "请输入姓名", todayvalue: "1", - tableDataTotal: 30, + stuValue: false, Svisible: false, score1: 5, score2: 5, edit: true, searchRankName:null,//榜单搜索名称 + studentName:null,//学员搜索名称 + pageSize:10, + currentPage:1, + tableDataTotal: -1, }); const getTableData = () => { let datas = state.tabledataStu; @@ -399,21 +403,59 @@ export default { getTableData(); const tabsChange = (e) => { + if (e == 1) { + // console.log('获取项目积分-学员') + getProjectStudent(); + } if (e == 2) { // console.log('获取项目积分-榜单') scoreRank(1, 1); } + if(e==3){ + scoreRule() + } + projectStudentReset() rankReset() state.todayvalue='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=()=>{ state.searchRankName=null } - // start -------榜单---------------榜单------------榜单------------------榜单--------- //学员积分还是小组积分 const typeChange = (num) => { state.stuValue = num; @@ -449,6 +491,22 @@ export default { }); }; // 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 { ...toRefs(state), typeChange, @@ -456,7 +514,11 @@ export default { searchRank, rankReset, tabsChange, + projectStudentReset, + searchProjectStudent, + getProjectStudent, scoreRank, + scoreRule, }; }, computed: { diff --git a/src/views/projectcenter/TaskAdd.vue b/src/views/projectcenter/TaskAdd.vue index 00176535..9c7179dc 100644 --- a/src/views/projectcenter/TaskAdd.vue +++ b/src/views/projectcenter/TaskAdd.vue @@ -1060,7 +1060,6 @@ export default { const getStageData = (tableData) => { let data = tableData; let array = []; - console.log('tableData',data) data.map((value) => { let obj = { id: value.stageId, @@ -2350,9 +2349,9 @@ export default { display: flex; flex-direction: column; align-items: center; // background-color: #bfa; - .chosen { - // background-color: pink; - } + // .chosen { + // // background-color: pink; + // } .ghost { // background-color: red; opacity: 0 !important;