Commit e9a6e1e4 by zhangleyuan

feat:处理店铺信息页

parent 0c2552da
...@@ -56,7 +56,8 @@ class LiveCourseList extends React.Component { ...@@ -56,7 +56,8 @@ class LiveCourseList extends React.Component {
this.state = { this.state = {
columns: [], columns: [],
openDownloadModal:false, openDownloadModal:false,
url:'' url:'',
RelatedPlanModalVisible:false
} }
} }
componentWillMount(){ componentWillMount(){
...@@ -520,9 +521,6 @@ class LiveCourseList extends React.Component { ...@@ -520,9 +521,6 @@ class LiveCourseList extends React.Component {
}, },
]; ];
} }
this.setState({ columns }) this.setState({ columns })
} }
handleAdminName = (adminArray)=>{ handleAdminName = (adminArray)=>{
...@@ -541,7 +539,7 @@ class LiveCourseList extends React.Component { ...@@ -541,7 +539,7 @@ class LiveCourseList extends React.Component {
<div className="live-course-more-menu"> <div className="live-course-more-menu">
<div <div
className="operate__item" className="operate__item"
onClick={()=>this.handleRelatedModalShow(item)}
>关联培训计划</div> >关联培训计划</div>
<div <div
className="operate__item" className="operate__item"
...@@ -663,7 +661,7 @@ class LiveCourseList extends React.Component { ...@@ -663,7 +661,7 @@ class LiveCourseList extends React.Component {
} }
window.open(htmlUrl); window.open(htmlUrl);
} }
handleRelatedModalShow = (item)
render() { render() {
const { total, query, courseList, loading} = this.props; const { total, query, courseList, loading} = this.props;
const { current, size } = query; const { current, size } = query;
...@@ -721,6 +719,11 @@ class LiveCourseList extends React.Component { ...@@ -721,6 +719,11 @@ class LiveCourseList extends React.Component {
}} }}
/> />
)} )}
{ RelatedPlanModalVisible &&
<RelatedPlanModal/>
}
<iframe src={url} style={{ display: "none" }} /> <iframe src={url} style={{ display: "none" }} />
<Route path={`${match.url}/live-course-data`} component={DataList} /> <Route path={`${match.url}/live-course-data`} component={DataList} />
</div> </div>
......
...@@ -22,7 +22,7 @@ class RelatedPlanModal extends React.Component { ...@@ -22,7 +22,7 @@ class RelatedPlanModal extends React.Component {
this.handleFetchDataList(); this.handleFetchDataList();
} }
// 获取运营师列表 // 获取培训计划列表
handleFetchDataList = () => { handleFetchDataList = () => {
const {query,size,totalCount} = this.state const {query,size,totalCount} = this.state
const params ={ const params ={
...@@ -57,17 +57,37 @@ class RelatedPlanModal extends React.Component { ...@@ -57,17 +57,37 @@ class RelatedPlanModal extends React.Component {
} }
// 请求表头 // 请求表头
parseColumns = () => { parsePlanColumns = () => {
const columns = [ const columns = [
{ {
title: '培训计划', title: '培训计划',
key: 'planName', key: 'planName',
dataIndex: 'planName' dataIndex: 'planName',
render:(val,record)=>{
return (
<span>{val}</span>
)
}
} }
]; ];
return columns; return columns;
} }
parseTaskColumns = (parentIndex) => {
const columns = [
{
title: '任务名称',
key: 'taskName',
dataIndex: 'taskName',
render:(val,record)=>{
return (
<span>{val}</span>
)
}
}
];
return columns;
}
render() { render() {
const { size,dataSource,totalCount,query,selectOperatorList} = this.state; const { size,dataSource,totalCount,query,selectOperatorList} = this.state;
const { visible } = this.props; const { visible } = this.props;
...@@ -89,10 +109,29 @@ class RelatedPlanModal extends React.Component { ...@@ -89,10 +109,29 @@ class RelatedPlanModal extends React.Component {
<div> <div>
<Table <Table
rowKey={record => record.planId} rowKey={record => record.planId}
className="plan-table"
dataSource={dataSource} dataSource={dataSource}
columns={this.parseColumns()} columns={this.parsePlanColumns()}
pagination={false} pagination={false}
expandedRowRender={(record,index) => {
if(!record.taskBaseVOList){
return
}
if (record.taskBaseVOList.length !== 0 ){
return <div>
<Table
pagination={false}
dataSource={record.taskBaseVOList}
columns={this.parseTaskColumns(index)}
className="child-table"
rowSelection={{
type: 'checkbox'
}}
/>
</div>
}
}}
rowClassName={(record,index)=>{if(index%2===0){return 'odd-row'}else{ return 'even-row'}}}
/> />
{dataSource.length >0 && {dataSource.length >0 &&
<div className="box-footer"> <div className="box-footer">
......
import React from 'react';
import { withRouter } from "react-router-dom";
class StoreInfo extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
render() {
return (
<div className="page">
</div>
)
}
}
export default withRouter(StoreInfo);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment