Commit ada678af by zhangleyuan

feat:处理创建人的筛选

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