From b4584ab3e88d283c0d68c1686ce6de4d1b401492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Mar 2020 22:57:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/signin/css/signincdi.css | 6 ++++ .../component/Videostatisticscom.js | 2 +- .../component/Videostatisticscomtwo.js | 22 ++++++--------- .../component/Videostatisticslist.js | 28 ++++++++----------- 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css index 7ad9a0d0c..bd45185b9 100644 --- a/public/react/src/modules/courses/signin/css/signincdi.css +++ b/public/react/src/modules/courses/signin/css/signincdi.css @@ -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; diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js index 457c6d1f3..1111b6509 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js @@ -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> diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index f6a9b51de..ed72d6bb2 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -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"; @@ -98,7 +98,7 @@ class Videostatisticscomtwo extends Component { className: 'font-14 maxnamewidth100s', width: '100px', render: (text, record) => ( - <span style={{width: '100px'}} className="xiaoshou"> + <span style={{width: '100px'}} > <a className="maxnamewidth100s" style={{ color:"#333333" }} title= {record.start_at}> {record.start_at}</a> @@ -113,7 +113,7 @@ class Videostatisticscomtwo extends Component { className: 'font-14 maxnamewidth100s', width: '100px', render: (text, record) => ( - <span style={{width: '100px'}} className="xiaoshou"> + <span style={{width: '100px'}} > <a className="maxnamewidth100s" style={{ color:"#333333" }} title= {record.end_at}>{record.end_at}</a> @@ -428,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={{ @@ -471,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={{ @@ -488,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> diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js index c44102e45..e26e1d48b 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js @@ -1,6 +1,6 @@ import React, {Component} from "react"; import '../../signin/css/signincdi.css'; -import {Pagination,Table} from 'antd'; +import {Pagination,Table,Spin} from 'antd'; import {getImageUrl,sortDirections} from 'educoder'; import axios from 'axios'; import LoadingSpin from "../../../../common/LoadingSpin"; @@ -60,13 +60,13 @@ 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"> - <a className="maxnamewidth150s" style={{ + <span style={{width: '100px'}} className="maxnamewidth100s"> + <a className="maxnamewidth100s" style={{ color:"#333333" }} title={record.total_time}>{record.total_time}</a> @@ -95,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> ), } ], @@ -250,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> @@ -265,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? @@ -282,6 +275,7 @@ class Videostatisticslist extends Component { <NoneDatas></NoneDatas> </div> : + <Spin spinning={loading}> <Table columns={columnsstu} dataSource={data} @@ -289,11 +283,11 @@ class Videostatisticslist extends Component { onChange={this.table1handleChange} /> + </Spin> } </div> - } </div>