Commit ada678af by zhangleyuan

feat:处理创建人的筛选

parent 7deb0218
...@@ -142,7 +142,7 @@ class RelatedPlanModal extends React.Component { ...@@ -142,7 +142,7 @@ class RelatedPlanModal extends React.Component {
getSelectLength = (selectList)=>{ getSelectLength = (selectList)=>{
let num = 0; let num = 0;
for(let key in selectList ){ for(let key in selectList ){
if(selectList[key].taskBaseVOList){ if(selectList[key].taskBaseVOList.length > 0){
num = num + 1 num = num + 1
} }
} }
...@@ -175,10 +175,16 @@ class RelatedPlanModal extends React.Component { ...@@ -175,10 +175,16 @@ class RelatedPlanModal extends React.Component {
enterButton={<span className="icon iconfont">&#xe832;</span>} enterButton={<span className="icon iconfont">&#xe832;</span>}
/> />
</div> </div>
<div className="select-container"> <div className="select-container">
<span className="icon iconfont tip">&#xe6f2;</span> <span className="con">
<span className="text">已选择{this.getSelectLength(selectPlanList)}个任务</span> <div>
<span className="clear" onClick={this.clearSelect}>清空</span> <span className="icon iconfont tip">&#xe6f2;</span>
<span className="text">已选择{this.getSelectLength(selectPlanList)}个任务</span>
</div>
<div>
<span className="clear" onClick={this.clearSelect}>清空</span>
</div>
</span>
</div> </div>
<div> <div>
<Table <Table
......
...@@ -4,26 +4,30 @@ ...@@ -4,26 +4,30 @@
} }
.select-container{ .select-container{
margin-bottom:12px; margin-bottom:12px;
background: #FFF4DD; .con{
border-radius: 4px; background: #FFF4DD;
padding:6px 16px; border-radius: 4px;
width: 207px; padding:6px 16px;
height: 32px; display: inline-flex;
.tip{ align-items: center;
font-size:14px; justify-content: space-between;
color:#FF9D14; .tip{
margin-right:8px; font-size:14px;
} color:#FF9D14;
.text{ margin-right:8px;
font-size:14px; }
color:#666; .text{
margin-right:30px; font-size:14px;
} color:#666;
.clear{ margin-right:30px;
color:#5289FA; }
font-size:14px; .clear{
color:#5289FA;
} font-size:14px;
}
}
} }
.plan-table{ .plan-table{
.taskName{ .taskName{
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhangleyuan * @Author: zhangleyuan
* @Date: 2021-02-20 16:13:39 * @Date: 2021-02-20 16:13:39
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-15 10:33:56 * @LastEditTime: 2021-03-15 14:19:22
* @Description: 描述一下 * @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -28,7 +28,6 @@ const defaultBasicData = { ...@@ -28,7 +28,6 @@ const defaultBasicData = {
operateType:'All_Operate', operateType:'All_Operate',
percentCompleteLive:80, percentCompleteLive:80,
percentCompleteVideo:80, percentCompleteVideo:80,
} }
const defaultTaskList = []; const defaultTaskList = [];
...@@ -108,7 +107,7 @@ function AddPlan() { ...@@ -108,7 +107,7 @@ function AddPlan() {
setHasGetDetail(true); setHasGetDetail(true);
}) })
} }
function handleChangeBasicInfo(field, value){ function handleChangeBasicInfo(field, value,option){
setBasicData( { setBasicData( {
...basicData, ...basicData,
[field]: value, [field]: value,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhangleyuan * @Author: zhangleyuan
* @Date: 2021-02-20 16:45:51 * @Date: 2021-02-20 16:45:51
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-03-11 16:29:59 * @LastEditTime: 2021-03-15 14:47:39
* @Description: 描述一下 * @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -253,7 +253,7 @@ class BasicInfo extends React.Component{ ...@@ -253,7 +253,7 @@ class BasicInfo extends React.Component{
<TextArea <TextArea
placeholder="请输入培训计划简介" placeholder="请输入培训计划简介"
maxLength={200} maxLength={200}
style={{ width: 480 }} style={{ width: '552px',height:'90px'}}
className="instro-textarea" className="instro-textarea"
value={instro} value={instro}
onChange={(e)=>this.props.onChange('instro', e.target.value)} onChange={(e)=>this.props.onChange('instro', e.target.value)}
......
...@@ -105,7 +105,7 @@ class EmployeeShareData extends React.Component { ...@@ -105,7 +105,7 @@ class EmployeeShareData extends React.Component {
}) })
} }
watchDataView = (record)=>{ watchDataView = (record)=>{
Bus.trigger('watchDataView',record.storeUserId); Bus.trigger('watchDataView',record);
} }
// 请求表头 // 请求表头
parselumns = () => { parselumns = () => {
...@@ -216,7 +216,7 @@ class EmployeeShareData extends React.Component { ...@@ -216,7 +216,7 @@ class EmployeeShareData extends React.Component {
return ( return (
<div className="employee-share-data"> <div className="employee-share-data">
<div className="search-container"> <div className="search-container">
<Search placeholder="搜索员工姓名手机号" onChange={(e) => { this.handleChangNickname(e.target.value)}} onSearch={ () => { this.handleFetchDataList()}} style={{ width: 200 }} enterButton={<span className="icon iconfont">&#xe832;</span>}/> <Search placeholder="搜索员工姓名手机号" onChange={(e) => { this.handleChangNickname(e.target.value)}} onSearch={ () => { this.handleFetchDataList()}} style={{ width: 200 }} enterButton={<span className="icon iconfont">&#xe832;</span>}/>
</div> </div>
<div> <div>
<Table <Table
......
...@@ -36,7 +36,7 @@ class UserLearningData extends React.Component { ...@@ -36,7 +36,7 @@ class UserLearningData extends React.Component {
}, },
totalCount:0, totalCount:0,
userLearnDetailModalSHow:false, userLearnDetailModalSHow:false,
unbundEmployeeModalVisible:false unbundEmployeeModalVisible:false,
} }
} }
componentDidMount(){ componentDidMount(){
...@@ -354,7 +354,7 @@ class UserLearningData extends React.Component { ...@@ -354,7 +354,7 @@ class UserLearningData extends React.Component {
</div> </div>
<div> <div>
<Table <Table
rowKey={record => record.id} rowKey={record => record.storeCustomerId}
dataSource={dataSource} dataSource={dataSource}
columns={this.parselumns()} columns={this.parselumns()}
pagination={false} pagination={false}
......
...@@ -24,7 +24,7 @@ const DEFAULT_QUERY = { ...@@ -24,7 +24,7 @@ const DEFAULT_QUERY = {
startTime: null, startTime: null,
endTime:null, endTime:null,
learnState:null, learnState:null,
operateId: null operateId: null,
} }
const defaultCreatorQuery = { const defaultCreatorQuery = {
size: 10, size: 10,
...@@ -35,30 +35,35 @@ function UserLearningDataFilter(props) { ...@@ -35,30 +35,35 @@ function UserLearningDataFilter(props) {
const [expandFilter, setExpandFilter] = useState(false); const [expandFilter, setExpandFilter] = useState(false);
const [query,setQuery] = useState(DEFAULT_QUERY); const [query,setQuery] = useState(DEFAULT_QUERY);
const [operateName,setOperateName] = useState(null)
const [hasNext,setHasNext] = useState(false); const [hasNext,setHasNext] = useState(false);
const [creatorQuery,setCreatorQuery] = useState(defaultCreatorQuery); const [creatorQuery,setCreatorQuery] = useState(defaultCreatorQuery);
const [creatorList,setCreatorList] = useState([]); const [creatorList,setCreatorList] = useState([]);
useEffect(() => { useEffect(() => {
Bus.bind('watchDataView',(value) => handleChangeCreatorQuery(value)) Bus.bind('watchDataView',(record) => handleChangeCreatorQuery(record))
}, []); }, []);
useEffect(() => { useEffect(() => {
getCreatorList(); getCreatorList();
}, []); }, []);
function handleChangeCreatorQuery (value){ function handleChangeCreatorQuery (record){
const _creatorQuery = {...creatorQuery}; const _creatorQuery = {...creatorQuery};
_creatorQuery.operateId = value; _creatorQuery.operateId = record.storeUserId;
setCreatorQuery(_creatorQuery); setCreatorQuery(_creatorQuery);
handleChangeQuery('operateId', record.storeUserId,record.storeUserName)
} }
// 改变搜索条件 // 改变搜索条件
function handleChangeQuery(field, value){ function handleChangeQuery(field,value,optionValue){
const _query ={ const _query ={
...query, ...query,
[field]: value, [field]: value,
current: 1, current: 1,
} }
setQuery(_query); setQuery(_query);
if(field === 'operateId'){
setOperateName(optionValue)
}
if (field === 'customerName') return; if (field === 'customerName') return;
props.onChange( _query); props.onChange( _query);
} }
...@@ -136,16 +141,21 @@ function UserLearningDataFilter(props) { ...@@ -136,16 +141,21 @@ function UserLearningDataFilter(props) {
<span className="label lead-label">负责人:</span> <span className="label lead-label">负责人:</span>
<Select <Select
id="leadSelect" id="leadSelect"
placeholder="请选择创建人" placeholder="请选择员工"
style={{width:"calc(100% - 70px)"}} style={{width:"calc(100% - 70px)"}}
showSearch showSearch
allowClear allowClear
filterOption={(input, option) => option} filterOption={(input, option) => option}
suffixIcon={<span className="icon iconfont" style={{fontSize:'12px',color:'#BFBFBF'}}>&#xe835;</span>} suffixIcon={<span className="icon iconfont" style={{fontSize:'12px',color:'#BFBFBF'}}>&#xe835;</span>}
onPopupScroll={handleScrollCreatorList} onPopupScroll={handleScrollCreatorList}
value={query.operateId} value={operateName}
onChange={(value) => { onChange={(value,option) => {
handleChangeQuery('operateId', value) if(option){
handleChangeQuery('operateId',value,option.children)
}else{
handleChangeQuery('operateId',value,"")
}
}} }}
onSearch={(value) => { onSearch={(value) => {
creatorQuery.nickName = value creatorQuery.nickName = value
......
...@@ -192,6 +192,7 @@ class UserLearnDetailModal extends React.Component { ...@@ -192,6 +192,7 @@ class UserLearnDetailModal extends React.Component {
<Modal <Modal
title="用户学习详情" title="用户学习详情"
onCancel={this.props.onClose} onCancel={this.props.onClose}
onOk={this.props.onClose}
maskClosable={false} maskClosable={false}
visible={visible} visible={visible}
className="user-Learn-modal" className="user-Learn-modal"
......
...@@ -200,7 +200,10 @@ class SelectOperatorModal extends React.Component { ...@@ -200,7 +200,10 @@ class SelectOperatorModal extends React.Component {
width:'40%', width:'40%',
render: (val, record) => { render: (val, record) => {
return ( return (
<span>{formatDate('YYYY-MM-DD H:i', record.startTime)}</span> <div>
<div>{formatDate('YYYY-MM-DD H:i', record.startTime)}~</div>
<div>{formatDate('YYYY-MM-DD H:i', record.endTime)}</div>
</div>
) )
} }
}, },
......
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