Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into courseware

courseware
杨树林 5 years ago
commit 5410388a94

@ -973,15 +973,15 @@ class GamesController < ApplicationController
if res && res['code'].to_i != 0
raise("实训云平台繁忙繁忙等级99")
end
# @vnc_url = res['showServer']
@vnc_url =
if request.subdomain == "pre-newweb" || request.subdomain == "test-newweb"
# 无域名版本
"http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
else
# 有域名版本
"https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless"
end
@vnc_url = res['showServer']
# @vnc_url =
# if request.subdomain == "pre-newweb" || request.subdomain == "test-newweb"
# # 无域名版本
# "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
# else
# # 有域名版本
# "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless"
# end
@vnc_evaluate = shixun.vnc_evaluate
rescue Exception => e
Rails.logger.error(e.message)

@ -188,6 +188,12 @@
padding-top: 20px;
padding-bottom: 20px;
}
.teacherentrydivss{
padding-left: 20px;
padding-right: 20px;
padding-top: 20px;
padding-bottom: 20px;
}
.teachedivp{
font-size:16px;
font-family:Microsoft YaHei;

@ -33,7 +33,7 @@ class Videostatisticscom extends Component {
<div className="ws100s edu-back-white sortinxdirection" style={{
position: "relative"
}}>
<div className="ws100s teacherentrydivs ">
<div className="ws100s teacherentrydivss ">
<div className="ws100s sortinxdirection">
<div className="ws50s sptits">视频统计总览</div>
<div className="ws50s sptitss xaxisreverseorder">播放数据从{this.props.watch_staticsdata&&this.props.watch_staticsdata.begin_at?this.props.watch_staticsdata.begin_at:0}开始统计</div>

@ -1,6 +1,6 @@
import React, {Component} from "react";
import '../../signin/css/signincdi.css';
import {Pagination, Table, Menu, Dropdown} from 'antd';
import {Pagination, Table, Menu, Dropdown,Spin} from 'antd';
import {getImageUrl, sortDirections} from 'educoder';
import axios from 'axios';
import LoadingSpin from "../../../../common/LoadingSpin";
@ -38,7 +38,12 @@ class Videostatisticscomtwo extends Component {
className: 'font-14 maxnamewidth100s',
width: '100px',
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">{record.user_name}</span>
<span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.user_name}>{record.user_name}</a>
</span>
),
},
{
@ -63,7 +68,9 @@ class Videostatisticscomtwo extends Component {
sorter: true,
sortDirections: sortDirections,
render: (text, record) => (
<span style={{width: '150px'}} className="maxnamewidth150s">{record.total_duration}</span>
<span style={{width: '150px'}} className="maxnamewidth150s"><a className="maxnamewidth150s" style={{
color:"#333333"
}} title={record.total_duration}>{record.total_duration}</a></span>
),
},
{
@ -76,7 +83,11 @@ class Videostatisticscomtwo extends Component {
sorter: true,
sortDirections: sortDirections,
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">{record.feq}</span>
<span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.feq}>{record.feq}</a>
</span>
),
},
{
@ -87,7 +98,11 @@ class Videostatisticscomtwo extends Component {
className: 'font-14 maxnamewidth100s',
width: '100px',
render: (text, record) => (
<span style={{width: '100px', color: '#5091FF'}} className="xiaoshou">{record.start_at}</span>
<span style={{width: '100px'}} >
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title= {record.start_at}> {record.start_at}</a>
</span>
),
},
{
@ -98,7 +113,11 @@ class Videostatisticscomtwo extends Component {
className: 'font-14 maxnamewidth100s',
width: '100px',
render: (text, record) => (
<span style={{width: '100px', color: '#5091FF'}} className="xiaoshou">{record.end_at}</span>
<span style={{width: '100px'}} >
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title= {record.end_at}>{record.end_at}</a>
</span>
),
}
],
@ -409,7 +428,7 @@ class Videostatisticscomtwo extends Component {
return (
<React.Fragment>
<div className="ws100s">
<div className="ws100s teacherentrydivs edu-back-white ">
<div className="ws100s teacherentrydivss edu-back-white ">
<div className="ws100s sortinxdirection">
<div className="ws50s sptits">视频名称视频名称</div>
<div className="ws50s sptitss xaxisreverseorder font-14" style={{
@ -452,15 +471,8 @@ class Videostatisticscomtwo extends Component {
`
}
</style>
{
loading === true ?
<div style={{
minHeight: "400px",
}} className="ws100s">
<LoadingSpin></LoadingSpin>
</div>
:
<div className="ws100s ysltableo teacherentrydivs">
<div className="ws100s ysltableo">
{
data.length === 0 ?
<div style={{
@ -469,17 +481,18 @@ class Videostatisticscomtwo extends Component {
<NoneDatas></NoneDatas>
</div>
:
<Spin spinning={loading}>
<Table
columns={columnsstu}
dataSource={data}
pagination={false}
onChange={this.table1handleChange}
/>
</Spin>
}
</div>
}
</div>

@ -1,7 +1,7 @@
import React, {Component} from "react";
import '../../signin/css/signincdi.css';
import {Pagination,Table} from 'antd';
import {getImageUrl,sortDirections} from 'educoder';
import {Pagination,Table,Spin} from 'antd';
import {getImageUrl,sortDirections,formatSeconds} from 'educoder';
import axios from 'axios';
import LoadingSpin from "../../../../common/LoadingSpin";
import NoneDatas from "../../signin/component/NoneDatas";
@ -34,7 +34,12 @@ class Videostatisticslist extends Component {
className: 'font-14 maxnamewidth150s',
width: '150px',
render: (text, record) => (
<span style={{width: '150px'}} className="maxnamewidth150s">{record.title}</span>
<span style={{width: '150px'}} className="maxnamewidth150s">
<a className="maxnamewidth150s" style={{
color:"#333333"
}} title={record.title}>{record.title}</a>
</span>
),
},
{
@ -55,12 +60,17 @@ class Videostatisticslist extends Component {
dataIndex: 'total_time',
key: 'total_time',
align: "center",
className: 'font-14 maxnamewidth150s',
width: '150px',
className: 'font-14 maxnamewidth100s',
width: '100px',
sorter: true,
sortDirections: sortDirections,
render: (text, record) => (
<span style={{width: '150px'}} className="maxnamewidth150s">{record.total_time}</span>
<span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.total_time}>{record.total_time}</a>
</span>
),
},
{
@ -71,7 +81,12 @@ class Videostatisticslist extends Component {
className: 'font-14 maxnamewidth100s',
width: '100px',
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">{record.user_name}</span>
<span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.user_name}>{record.user_name}</a>
</span>
),
},
{
@ -80,9 +95,9 @@ class Videostatisticslist extends Component {
key: 'id',
align: "center",
className: 'font-14',
width: '90px',
width: '50px',
render: (text, record) => (
<span style={{width: '90px',color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.tisticsbools(true,record.id)}>详情</span>
<span style={{width: '50px',color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.tisticsbools(true,record.id)}>详情</span>
),
}
],
@ -137,7 +152,7 @@ class Videostatisticslist extends Component {
number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
title: response.data.videos[i].title,
people_num: response.data.videos[i].people_num,
total_time: response.data.videos[i].total_time,
total_time: response.data.videos[i].total_time?formatSeconds(response.data.videos[i].total_time):0,
user_name: response.data.videos[i].user_name,
id: response.data.videos[i].id,
})
@ -235,7 +250,7 @@ class Videostatisticslist extends Component {
<React.Fragment>
<div className="ws100s mt20">
<div className="ws100s edu-back-white">
<div className="ws100s teacherentrydivs ">
<div className="ws100s teacherentrydivss ">
<div className="ws100s sortinxdirection">
<div className="ws100s sptits">统计详情</div>
</div>
@ -250,14 +265,7 @@ class Videostatisticslist extends Component {
`
}
</style>
{
loading===true?
<div style={{
minHeight: "400px",
}} className="ws100s">
<LoadingSpin></LoadingSpin>
</div>
:
<div className="ws100s ysltableo teacherentrydivs">
{
data.length===0?
@ -267,6 +275,7 @@ class Videostatisticslist extends Component {
<NoneDatas></NoneDatas>
</div>
:
<Spin spinning={loading}>
<Table
columns={columnsstu}
dataSource={data}
@ -274,11 +283,11 @@ class Videostatisticslist extends Component {
onChange={this.table1handleChange}
/>
</Spin>
}
</div>
}
</div>

@ -74,7 +74,8 @@ function VideoInReviewItem (props) {
<div className="df buttonRow mb10">
{/* <div className={"play_duration"}>累计学习时长:{play_duration} h</div> */}
{/* <span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}{people_num}</span> */}
{link ?<span className="time"> </span>:<span className="time">{
{link||total_time===undefined?<span className="time"> </span>:<span className="time">{
formatSeconds(total_time)}
{/* total_time<60?total_time+' s':total_time/60<60?(total_time/60).toFixed(0)+' min':(total_time/3600).toFixed(1)+ ' h' */}
</span>}
@ -82,7 +83,7 @@ function VideoInReviewItem (props) {
<div className="df buttonRow">
{/* 2019-09-01 10:00:22 */}
<span className={"dianjilianicon"}>
{!people_num || (people_num && people_num)===0 ? "" : <Tooltip title="观看人数" placement="bottom">
{total_time===undefined?'':!people_num || (people_num && people_num)===0 ? "" : <Tooltip title="观看人数" placement="bottom">
<i className={`icon-dianjiliang iconfont dianjilianicon font-12`}> {!people_num || (people_num && people_num)===0?"":people_num}</i>
</Tooltip> }
</span>

Loading…
Cancel
Save