Skip to content

Commit

Permalink
Merge branch 'tea_dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
j128919965 committed Jul 3, 2020
2 parents 86b6131 + 5ec117d commit 77d9b1a
Show file tree
Hide file tree
Showing 30 changed files with 4,000 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ site/node_modules
site/build
site/*.log
node_modules/
/build
/*.log
.idea
2,393 changes: 2,393 additions & 0 deletions site/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"preact-async-route": "^2.2.1",
"preact-render-to-string": "^5.1.2",
"preact-router": "^3.2.1",
"react-highlight-words": "^0.16.0",
"sass-loader": "^8.0.2"
}
}
2 changes: 1 addition & 1 deletion site/size-plugin.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions site/src/app/t/auditFD/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component } from 'preact';

import style from './style';
import './style.scss';

export default class Home extends Component {
render() {
return (
<div >
<div className="g-home">
Login

</div>
Expand Down
15 changes: 15 additions & 0 deletions site/src/app/t/auditFD/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.g-home {
display: flex;
flex-direction: column;
width: 1080px;

.m-list {
display: flex;
flex-direction: column;
}

}

.t1{
color: white;
}
5 changes: 2 additions & 3 deletions site/src/app/t/auditOP/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Component } from 'preact';

import style from './style';
import './style.scss';

export default class Home extends Component {
render() {
return (
<div >
<div className="g-home">
Login

</div>
);
}
Expand Down
15 changes: 15 additions & 0 deletions site/src/app/t/auditOP/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.g-home {
display: flex;
flex-direction: column;
width: 1080px;

.m-list {
display: flex;
flex-direction: column;
}

}

.t1{
color: white;
}
71 changes: 71 additions & 0 deletions site/src/app/t/auditTP/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[data-component="audittp"]{

.context {
background: #fff;
width: 950px;
overflow: auto;
}

.main{
padding: 15px 75px;
box-sizing: border-box;
width: 950px;
}

.table{
margin-top: 46px;
}

table,tbody.ant-table-body{
display: flex;
flex-direction: column;
}

.ant-table-row,
.ant-table-thead>tr{
display: flex;
}

.ant-table-row,
.ant-table-tbody>tr{
width: 100%;
text-align: center;
}

.ant-table-thead>tr th:first-child{
width: 150px;
}

.ant-table-tbody>tr td:first-child{
width: 150px;
}

.ant-table-thead>tr th:nth-child(2){
width: 400px;
}

.ant-table-tbody>tr td:nth-child(2){
width: 400px;
}

.ant-table-thead>tr th:nth-child(3){
padding-right: 50px;
width: 250px;
}

.ant-table-tbody>tr td:nth-child(3){
width: 250px;
}

.ant-table-expanded-row td{
width: 100% !important;
}

.ant-modal-mask{
background-color: rgba(0, 0, 0, 0.2);
}

.ant-descriptions-item-label {
width: 120px;
}
}
23 changes: 23 additions & 0 deletions site/src/component/ContentT/AllTpoicList/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
table,tbody.ant-table-body{
display: flex;
flex-direction: column;
width: 100%;
}

.ant-table-row,
.ant-table-thead>tr{
display: flex;
}
.ant-spin-nested-loading{
width: 100%;
}

.ant-table-thead>tr>th {
width: 33%;
text-align: center;
}

.ant-table-row>td{
width: 33%;
text-align: center;
}
96 changes: 96 additions & 0 deletions site/src/component/ContentT/AllTpoicList/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import BaseActions from '../../BaseActions';
import * as urls from '../../../constant/urls'
import { Card,Input,Tag,Table,Tooltip } from 'antd';
import style from './index.css'

const {TextArea} = Input;
import { UserOutlined,BookOutlined ,AlignLeftOutlined,TagsOutlined } from '@ant-design/icons';




export default class AllTopicList extends BaseActions{
constructor(p){
super(p)
}

state={
list:[]
}

columns = [
{
title: '课题ID',
dataIndex: 'id',
key: 'id',
render:(val,c)=>{
return(
<div>
{this.props.uid==c.tid&&
<Tooltip placement="top" title={"我的课题"}>
<span>{val}</span>
</Tooltip>
}
{
this.props.uid!=c.tid&&
<span>{val}</span>
}
</div>

)
}
},
{
title: '课题名',
dataIndex: 'name',
key: 'name',
},
{
title:'研究领域',
dataIndex:'area',
key:'area',
render:(r) => (
r.map((x)=>
<Tag color={x.color}>
{x.name}
</Tag>
)
)
}
]

mysort(arr){
let uid = this.props.uid;
let index = 0;
for(let i in arr){
if(arr[i].tid!=uid)continue;
let temp = arr[i];
arr[i] = arr[index];
arr[index] = temp;
index++;
}
}

componentDidMount= async ()=>{
let data = await this.get(urls.API_TEACHER_GET_ALL_TOPIC)
data = data.data;
this.mysort(data);
this.setState({
list:data
})

}

render(){
return(
<div>
<Table className="all-topic-list"
pagination={ {pageSize:8} }
columns={this.columns}
dataSource={this.state.list} >

</Table>
</div>
)
}
}
51 changes: 51 additions & 0 deletions site/src/component/ContentT/Check/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.check-block{
width: 100%;
overflow-y: auto;
font-size: 18px;
}

.title{
padding: 15px 0;
display: flex;
justify-content: space-between;
align-items: center;
}


.fail-block{
display: flex;
justify-content: space-between;
}


.ant-collapse > .ant-collapse-item > .ant-collapse-header{
cursor: auto;
}

.ant-collapse > .ant-collapse-item > .ant-collapse-header>span{
cursor: pointer;
}

.state-extra{
display: flex;
}

.icons{
width: 100px;
margin: 0 20px 0 0 ;
display: flex;
flex-direction: row-reverse;
}

.icons>span{
cursor: pointer;
}

.ant-collapse .ant-collapse-item-disabled > .ant-collapse-header, .ant-collapse .ant-collapse-item-disabled > .ant-collapse-header > .arrow{
color: rgba(0, 0, 0, 0.85);
}

.title>span>button{
margin: 20px;
width: 120px;
}
Loading

0 comments on commit 77d9b1a

Please sign in to comment.