功能调整

sale
tianea 3 years ago
parent a3d75dae91
commit 1bf104b7d4

@ -16,6 +16,7 @@
border
fit
highlight-current-row
style="font-size:12px;"
>
<el-table-column label="用户名" align="center">
<template slot-scope="scope">
@ -117,7 +118,7 @@
<span>{{ scope.row.closeCount }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="300" class-name="small-padding fixed-width">
<el-table-column align="center" label="操作" class-name="small-padding fixed-width">
<template slot-scope="{row}">
<el-button type="primary" size="mini" @click="handleSend(row)">
交易记录
@ -136,7 +137,7 @@
@current-change="fetchData"
/>
<el-dialog :visible.sync="dialogFormVisible" style="width:100%" >
<trade-record :compId="compId" :stageId="stageId" :userInfo="userInfo" :date.sync="rankQuery.date" style="width:100%" />
<trade-record :compId="compId" :stageId="stageId" :userInfo.sync="userInfo" :date.sync="rankQuery.date" style="width:100%" />
</el-dialog>
</div>
</template>
@ -233,7 +234,7 @@ export default {
this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['用户名', '班级', '所属团队', '收益率折算分', '排名',"期初资金","总资产",'可用资金','市值','累计盈亏','浮动盈亏','累计手续费','累计收益率','基准收益率(沪深300)','年化收益率','最大回测','卡玛比率','夏普比率','开他次数','平仓次数']
const filterVal = ['name', 'className', 'teamName', 'financeScore', 'personalRank',"initFounds","nav",'available','marketValue','profitLoss','fpnl','baseRatio','pnlRatioAnnual','maxDrawdown','calmarRatio','sharpRatio','openCount','closeCount']
const filterVal = ['name', 'className', 'teamName', 'financeScore', 'personalRank',"initFounds","nav",'available','marketValue','profitLoss','fpnl','cumCommission','pnlRatio','baseRatio','pnlRatioAnnual','maxDrawdown','calmarRatio','sharpRatio','openCount','closeCount']
const list = this.list
const data = this.formatJson(filterVal, list)
console.log(data)
@ -308,7 +309,8 @@ export default {
.tz-line button{
margin-left: 10px;
}
.el-dialog {
div .el-dialog {
width: 80% !important;
font-size: 12px !important;
}
</style>

@ -1,5 +1,5 @@
<template>
<div>
<div style="width:100%">
<el-tabs v-model="activeName" @click="handleClick">
<el-tab-pane v-for="item in arr" :key="item.id" :label="item.name" :name="item.name" >
<!-- <keep-alive> -->
@ -202,6 +202,7 @@
<script>
import * as competitionApi from '@/api/competition'
import * as noteApi from '@/api/note'
import user from '../../../store/modules/user'
export default {
props:{
userInfo:{
@ -222,7 +223,7 @@ export default {
}
},
created(){
console.log(this.userInfo)
},
mounted(){
this.loadPosition()
@ -279,15 +280,15 @@ export default {
this.instruments = res.data.instruments.data
}
})
this.loadNote()
},
loadNote(){
noteApi.getById('').then(res=>{
if(res.code == 200){
var id = this.userInfo.userNo+"_"+this.userInfo.updateTime
noteApi.getById(id).then(res=>{
if(res.code == 200&&res.data){
this.note = res.data
}})
},
loadReport(){
},
numberFixed(num){
if(typeof(num) == 'number'){
@ -325,7 +326,6 @@ export default {
watch:{
userInfo:{
handler(nv,ov){
console.log(nv)
this.loadPosition()
},
deep: true
@ -333,5 +333,9 @@ export default {
}
}
</script>
<style scoped>
<style>
div .el-dialog {
width: 80% !important;
font-size: 12px !important;
}
</style>

@ -18,7 +18,7 @@
<div>
<div class="tz-inline">班级</div>
<span @click="changeLevel(null)" :class=" levelId == 0?'level-selected':''" >全部</span>
<span v-for="(item,$index) in classList" :key="$index" @click="changeLevel(item)" :class="levelId == item.id?'level-selected':''" > {{ item.name}}</span>
<span v-for="(item,$index) in classList" :key="$index" @click="changeLevel(item)" :class="levelId == item.outerId?'level-selected':''" > {{ item.name}}</span>
</div>
</div>
@ -28,11 +28,11 @@
<b-img src="/static/image/icon_ranking_1.png"/>
综合排行榜
</div>
<div v-if="selectStage.enableFinance" :class=" rankingId ==3? 'ranking-selected':''" @click="changeType(3)">
<div v-if="!selectStage&&selectStage.enableFinance" :class=" rankingId ==3? 'ranking-selected':''" @click="changeType(3)">
<b-img src="/static/image/icon_ranking_3.png"/>
证券投资赛项排行榜
</div>
<div v-if="selectStage.enableExam" :class=" rankingId ==2? 'ranking-selected':''" @click="changeType(2)">
<div v-if="selectStage&&selectStage.enableExam" :class=" rankingId ==2? 'ranking-selected':''" @click="changeType(2)">
<b-img src="/static/image/icon_ranking_2.png"/>
投资者教育赛项排行榜
</div>
@ -43,7 +43,7 @@
<div class="tz-left-tab">
<div v-if="competition.type == 1" :class="rankingSubType==1?'ranking-sub-type-selected':''" @click="changeType2(1)" >团队排行榜</div>
<div :class="rankingSubType==2?'ranking-sub-type-selected':''" @click="changeType2(2)" >个人排行榜</div>
<!-- <div v-if="!isMobilePlatform" :class="rankingSubType==3?'ranking-sub-type-selected':''" @click="changeType2(3)" >大屏排行榜</div> -->
<div v-if="!isMobilePlatform" :class="rankingSubType==3?'ranking-sub-type-selected':''" @click="changeType2(3)" >大屏排行榜</div>
</div>
<div class="tz-table-container" v-if="rankingSubType == 1">
<div class="tz-table-filter">
@ -89,7 +89,7 @@
备注
</b-col>
</b-row>
<b-row v-for="(item,$index) in teamRankList" :key="$index" class="tz-rank-content">
<b-row v-for="(item,$index) in teamRankList.slice(0,9)" :key="$index" class="tz-rank-content">
<b-col sm="">
<span :class="'tz-rank-'+item.rank">
{{item.rank}}
@ -126,6 +126,47 @@
</span>
</b-col>
</b-row>
<div class="s_container">
<div class="scroll-list">
<b-row v-for="(item,$index) in teamRankList.slice(10)" :key="$index" class="tz-rank-content">
<b-col sm="">
<span :class="'tz-rank-'+item.rank">
{{item.rank}}
</span>
</b-col>
<b-col sm="2" style="text-align:left;">
<!-- <tz-paomadeng v-if="item.name.length>6" :content="item.name" />-->
<span v-if="item.name.length<=wordLen">{{item.name}}</span>
<tz-tips v-if="item.name.length>wordLen" :content="item.name" :len="wordLen"/>
</b-col>
<b-col sm ="2" style="text-align:left;">
<!-- <tz-paomadeng v-if="item.school.length>6" :content="item.school" /> -->
<span v-if="!!item.className&&item.className.length<=wordLen">{{item.className}}</span>
<tz-tips v-if="!!item.className&&item.className.length>wordLen" :content="item.className" :len="wordLen"/>
</b-col>
<b-col sm="">
{{item.teacher}}
</b-col>
<b-col v-if="selectStage.enableExam" sm="">
{{numberFixed(item.examScore)}}
</b-col>
<b-col v-if="selectStage.enableFinance" sm="">
{{numberFixed(item.financeScore)}}
</b-col>
<b-col sm="">
{{numberFixed(item.combineScore)}}
</b-col>
<b-col sm>
{{numberFixed(item.totalScore)}}
</b-col>
<b-col sm @click="showMemberScore(item)">
<span>
查看
</span>
</b-col>
</b-row>
</div>
</div>
</b-container>
</div>
<div class="tz-table-container" v-if="rankingSubType == 2">
@ -169,42 +210,79 @@
备注
</b-col> -->
</b-row>
<b-row v-for="(item,$index) in rankList" :key="$index" class="tz-rank-content">
<b-col sm>
<span :class="'tz-rank-'+(item.personalRank)">
{{(item.personalRank)}}
</span>
</b-col>
<b-col sm="2" >
<!-- <tz-paomadeng v-if="item.name.length>6" :content="item.name" />-->
<span v-if="item.name.length<=wordLen">{{item.name}}</span>
<tz-tips v-if="item.name.length>wordLen" :content="item.name" :len="wordLen" :key="item.personalRank" />
</b-col>
<b-col sm ="2" style="text-align:left;">
<!-- <tz-paomadeng v-if="item.school.length>6" :content="item.school" /> -->
<span v-if="!!item.className&&item.className.length<=wordLen">{{item.className}}</span>
<tz-tips v-if="!!item.className&&item.className.length>wordLen" :content="item.className" :len="wordLen" :key="item.personalRank" />
</b-col>
<b-col sm>
{{item.teacher}}
</b-col>
<b-col v-if="selectStage.enableExam" sm>
{{numberFixed(item.examScore)}}
</b-col>
<b-col v-if="selectStage.enableFinance" sm>
{{numberFixed(item.financeScore)}}
</b-col>
<b-col sm>
{{ numberFixed(item.combineScore)}}
</b-col>
<!-- <b-col sm>
{{item.examCostTime}}
</b-col> -->
</b-row>
<b-row v-for="(item,$index) in rankList.slice(0,10)" :key="$index" class="tz-rank-content">
<b-col sm>
<span :class="'tz-rank-'+(item.personalRank)">
{{(item.personalRank)}}
</span>
</b-col>
<b-col sm="2" >
<!-- <tz-paomadeng v-if="item.name.length>6" :content="item.name" />-->
<span v-if="item.name.length<=wordLen">{{item.name}}</span>
<tz-tips v-if="item.name.length>wordLen" :content="item.name" :len="wordLen" :key="item.personalRank" />
</b-col>
<b-col sm ="2" style="text-align:left;">
<!-- <tz-paomadeng v-if="item.school.length>6" :content="item.school" /> -->
<span v-if="!!item.className&&item.className.length<=wordLen">{{item.className}}</span>
<tz-tips v-if="!!item.className&&item.className.length>wordLen" :content="item.className" :len="wordLen" :key="item.personalRank" />
</b-col>
<b-col sm>
{{item.teacher}}
</b-col>
<b-col v-if="selectStage.enableExam" sm>
{{numberFixed(item.examScore)}}
</b-col>
<b-col v-if="selectStage.enableFinance" sm>
{{numberFixed(item.financeScore)}}
</b-col>
<b-col sm>
{{ numberFixed(item.combineScore)}}
</b-col>
<!-- <b-col sm>
{{item.examCostTime}}
</b-col> -->
</b-row>
<div class="s_container">
<div class="scroll-list">
<b-row v-for="(item,$index) in rankList.slice(10)" :key="$index" class="tz-rank-content">
<b-col sm>
<span :class="'tz-rank-'+(item.personalRank)">
{{(item.personalRank)}}
</span>
</b-col>
<b-col sm="2" >
<!-- <tz-paomadeng v-if="item.name.length>6" :content="item.name" />-->
<span v-if="item.name.length<=wordLen">{{item.name}}</span>
<tz-tips v-if="item.name.length>wordLen" :content="item.name" :len="wordLen" :key="item.personalRank" />
</b-col>
<b-col sm ="2" style="text-align:left;">
<!-- <tz-paomadeng v-if="item.school.length>6" :content="item.school" /> -->
<span v-if="!!item.className&&item.className.length<=wordLen">{{item.className}}</span>
<tz-tips v-if="!!item.className&&item.className.length>wordLen" :content="item.className" :len="wordLen" :key="item.personalRank" />
</b-col>
<b-col sm>
{{item.teacher}}
</b-col>
<b-col v-if="selectStage.enableExam" sm>
{{numberFixed(item.examScore)}}
</b-col>
<b-col v-if="selectStage.enableFinance" sm>
{{numberFixed(item.financeScore)}}
</b-col>
<b-col sm>
{{ numberFixed(item.combineScore)}}
</b-col>
<!-- <b-col sm>
{{item.examCostTime}}
</b-col> -->
</b-row>
</div>
</div>
</b-container>
</div>
<b-container class="tz-table-container tz-full-fixed" v-if="rankingSubType == 3 &&isFullScreen" id="fullScreen" @click="fullScreen">
<div class="tz-full-bg">
<b-container class="tz-table-container tz-full-fixed" v-if="rankingSubType == 3">
<div class="tz-full-bg" id="fullScreen">
<div class="tz-full-title">
{{competition.name}}
</div>
@ -433,6 +511,7 @@ import { getInfo } from '@/utils/auth'
import * as competitionApi from '@/api/competition'
import PaoMaDeng from '@/components/paomadeng.vue'
import Tips from '@/components/tips'
import * as gradeApi from '@/api/grade'
export default {
props:{
competition:{
@ -442,6 +521,10 @@ export default {
},
watch:{
competition:function(nv){
if(this.competition.type==2){
this.queryData.type2=2
this.rankingSubType =2
}
this.loadData()
}
},
@ -459,7 +542,7 @@ export default {
stageList:[],
regionList:[],
levelList:[],
classList:[{id: 1, name: '测试1班'}],
classList:[],
rankList:[],
teamRankList: [],
dialogVisibale: false,
@ -585,14 +668,15 @@ export default {
this.rankingSubType = t
this.queryData.type2 = t
this.loadMemberRank()
if(t===3){
this.fullScreen()
}
},
fullScreen(){
this.isFullScreen =true
this.$nextTick(function(){
let full = document.getElementById("fullScreen")
this.launchIntoFullscreen(full)
})
},
launchIntoFullscreen(element){
if (element.requestFullscreen) {
@ -618,10 +702,20 @@ export default {
if(this.queryData.type2 == 3){
if(this.levelList){
let ids = ''
this.fullInfo.name = this.levelList[0].name
this.levelList[0].catList.forEach(cat=>{
ids+=cat.id+","
})
console.log( this.levelList)
if(!this.levelList||this.levelList.length==0){
this.fullInfo.name =''
}else{
this.fullInfo.name = this.levelList[0].name
}
if(!this.levelList||this.levelList.length==0){
}else{
this.levelList[0].catList.forEach(cat=>{
ids+=cat.id+","
})
}
if(ids.endsWith(",")){
ids = ids.substring(0,ids.length-1)
}
@ -798,6 +892,13 @@ export default {
})
})
}
gradeApi.list(this.competition.schoolId).then(res=>{
console.log(res.data.list.content)
if(res.code == 200){
this.classList = res.data.list.content
}
})
competitionApi.getGroup(this.competition.id,this.stageId).then(res=>{
if(res.code == 200){
res.data.list.forEach(g=>{
@ -820,21 +921,23 @@ export default {
this.wordLen = 7
}
this.userInfo = getInfo()
this.loadData()
},
mounted(){
let that = this
// window.addEventListener("resize",function(){
// if (window.outerHeight === screen.availHeight){
// if(window.outerWidth === screen.availWidth){
// that.isFullScreen = true
// }else{
// that.isFullScreen =false
// }
// }else{
// that.isFullScreen = false
// }
// })
document.addEventListener("fullscreenchange", function (e) {
if (document.fullscreenElement) {
console.log('进入全屏')
that.isFullScreen =true
document.getElementById("fullScreen").style="display:block";
} else {
console.log('退出全屏')
that.isFullScreen =false
document.getElementById("fullScreen").style="display:none";
}
})
},
components:{
"tz-paomadeng": PaoMaDeng,
@ -1284,4 +1387,27 @@ export default {
width: 2rem;
text-align: center;
}
.s_container {
position: relative;
/* 父容器需要有明确的高度 */
height: 330px;
width: 100%;
margin: auto;
overflow: hidden;
}
.s_container > .scroll-list {
position: absolute;
top: 0;
left: 0;
width: 100%;
animation: scroll 6s linear infinite normal;
}
@keyframes scroll {
100% {
/* 需要滚动内容的总高度 */
top: -300px;
}
}
</style>

@ -34,4 +34,5 @@ public class CompetitionDTO implements Serializable {
private String prize;
private List<CompetitionNews> news;
private List<CompetitionNews> schoolNews;
private Integer schoolId;
}

@ -20,4 +20,6 @@ public class MemberRankingDTO implements Serializable {
private Integer regionId;
private Integer provinceId;
private String className;
private Double totalRatio;
private Double yearRatio;
}

@ -9,7 +9,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/pc/competition/note")
public class MarketNotePcController {

@ -2,9 +2,12 @@ package com.tz.platform.system.api;
import com.tz.platform.common.core.api.ZhiYunApi;
import com.tz.platform.common.core.base.Result;
import com.tz.platform.feign.vo.GradeVo;
import com.tz.platform.system.pc.biz.GradeBiz;
import com.tz.platform.system.pc.biz.PCProvinceBiz;
import com.tz.platform.system.pc.biz.PCStudentLevelBiz;
import com.tz.platform.system.pc.biz.SchoolBiz;
import com.tz.platform.system.pc.dto.ListGradeDTO;
import com.tz.platform.system.pc.dto.ListStudentLevelDTO;
import com.tz.platform.system.pc.dto.ProvinceDTO;
import com.tz.platform.system.pc.dto.SchoolDTO;
@ -25,6 +28,9 @@ public class SystemController {
@Autowired
private SchoolBiz schoolBiz;
@Autowired
private GradeBiz gradeBiz;
@GetMapping(value = "province")
public Result<ProvinceDTO> provinceList(){
@ -42,4 +48,10 @@ public class SystemController {
public Result<SchoolDTO> addSchool(@RequestParam("id") Integer id,@RequestParam("name") String name,@RequestParam("level") Integer level,@RequestParam("province") String province){
return schoolBiz.save(id,name,level);
}
@RequestMapping(value = "grade")
public Result<ListGradeDTO> gradeList(@RequestParam("schoolId") Integer schoolId){
GradeVo vo = new GradeVo();
return gradeBiz.listBySchoolId(schoolId);
}
}

@ -65,6 +65,13 @@ public class GradeBiz {
return Result.success(dto);
}
public Result<ListGradeDTO> listBySchoolId(Integer schoolId){
ListGradeDTO dto = new ListGradeDTO();
Pageable pageable = PageRequest.of(0,100);
dto.setList(gradeDao.findAllBySchoolId(schoolId,pageable));
return Result.success(dto);
}
public Result<ListGradeDTO> list(GradeVO vo,Long userNo){
Integer pageNo = vo.getPageNo();
if(pageNo == null||pageNo<=0){

Loading…
Cancel
Save