Commit 1f2942d7 by zhangleyuan

feat:处理讲师id显示为数字

parent be506377
/* /*
* @Author: 陈剑宇 * @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01 * @Date: 2020-05-07 14:43:01
* @LastEditTime: 2021-01-14 19:31:30 * @LastEditTime: 2021-01-16 18:00:10
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @Description: * @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts * @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
import { MapInterface } from '@/domains/basic-domain/interface' import { MapInterface } from '@/domains/basic-domain/interface'
// 默认是 dev 环境 // 默认是 dev 环境
const ENV: string = process.env.DEPLOY_ENV || 'rc'; const ENV: string = process.env.DEPLOY_ENV || 'dev';
console.log("process.env.DEPLOY_ENV",process) console.log("process.env.DEPLOY_ENV",process)
const BASIC_HOST_MAP: MapInterface = { const BASIC_HOST_MAP: MapInterface = {
dev: 'https://dev-heimdall.xiaomai5.com/', dev: 'https://dev-heimdall.xiaomai5.com/',
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-20 09:21:40 * @Date: 2020-08-20 09:21:40
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-11 15:35:49 * @LastEditTime: 2021-01-16 18:00:18
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
import { MapInterface } from '@/domains/basic-domain/interface' import { MapInterface } from '@/domains/basic-domain/interface'
const ENV: string = process.env.DEPLOY_ENV || 'rc'; const ENV: string = process.env.DEPLOY_ENV || 'dev';
const appIdMap: MapInterface = { const appIdMap: MapInterface = {
dev: 'wx3ea60e78ddfa277e', dev: 'wx3ea60e78ddfa277e',
......
...@@ -82,6 +82,7 @@ class AddLive extends React.Component { ...@@ -82,6 +82,7 @@ class AddLive extends React.Component {
teacherId: null, teacherId: null,
teacherName: null, teacherName: null,
assistant:[], assistant:[],
assistantStoreUserId:[],
assistantNames:[], assistantNames:[],
liveDate: null, liveDate: null,
timeHorizonStart: null, timeHorizonStart: null,
...@@ -170,6 +171,7 @@ class AddLive extends React.Component { ...@@ -170,6 +171,7 @@ class AddLive extends React.Component {
const timeHorizonStart = startTime; const timeHorizonStart = startTime;
const timeHorizonEnd = endTime; const timeHorizonEnd = endTime;
const assistant = _.pluck(admins, "adminId"); const assistant = _.pluck(admins, "adminId");
const assistantStoreUserId = _.pluck(admins, "adminStoreUserId"); //编辑时的选中的助教的查询用storeUserId查询
const assistantNames = _.pluck(admins, "adminName"); const assistantNames = _.pluck(admins, "adminName");
const addLiveClassInfo = { const addLiveClassInfo = {
assistant, assistant,
...@@ -181,7 +183,8 @@ class AddLive extends React.Component { ...@@ -181,7 +183,8 @@ class AddLive extends React.Component {
timeHorizonEnd, timeHorizonEnd,
startTime, startTime,
endTime, endTime,
assistantNames assistantNames,
assistantStoreUserId
} }
// liveCourseMediaRequests = liveCourseMediaRequests.length // liveCourseMediaRequests = liveCourseMediaRequests.length
...@@ -223,7 +226,7 @@ handleChangeBasicInfo = (field, value) => { ...@@ -223,7 +226,7 @@ handleChangeBasicInfo = (field, value) => {
} }
// 修改上课信息 // 修改上课信息
handleChangeClassInfo = (field, value ,_teacherName) => { handleChangeClassInfo = (field, value ,type, name) => {
const _value = value ? value.valueOf() : null; const _value = value ? value.valueOf() : null;
const { teacherName } = this.state.addLiveClassInfo; const { teacherName } = this.state.addLiveClassInfo;
this.setState({ this.setState({
...@@ -233,6 +236,7 @@ handleChangeBasicInfo = (field, value) => { ...@@ -233,6 +236,7 @@ handleChangeBasicInfo = (field, value) => {
teacherName:_teacherName?_teacherName:teacherName teacherName:_teacherName?_teacherName:teacherName
} }
}); });
// 批量开始时间改变,结束时间自动同步一致 // 批量开始时间改变,结束时间自动同步一致
if (field === 'startTime') { if (field === 'startTime') {
this.setState({ this.setState({
......
...@@ -48,7 +48,12 @@ class AddLiveClass extends React.Component { ...@@ -48,7 +48,12 @@ class AddLiveClass extends React.Component {
this.getTeacherList(); this.getTeacherList();
this.getAssistantList(); this.getAssistantList();
} }
componentWillReceiveProps(nextProps) {
if(nextProps.data.assistantStoreUserId.length > 0) {
// 获取助教老师列表
// this.getAssistantList(1, nextProps.data.assistant);
}
}
getTeacherList(current = 1, selectList){ getTeacherList(current = 1, selectList){
const { teacherQuery,teacherList} = this.state; const { teacherQuery,teacherList} = this.state;
const _query = { const _query = {
...@@ -69,7 +74,8 @@ class AddLiveClass extends React.Component { ...@@ -69,7 +74,8 @@ class AddLiveClass extends React.Component {
// 获取助教老师列表 // 获取助教老师列表
getAssistantList = (current = 1, selectList) => { getAssistantList = (current = 1, selectList) => {
const { assistantQuery,assistantList} = this.state; const { assistantQuery,assistantList} = this.state;
const { teacherId, assistant } = this.props.data;
const idList = selectList;
const _query = { const _query = {
...assistantQuery, ...assistantQuery,
current, current,
...@@ -259,7 +265,7 @@ class AddLiveClass extends React.Component { ...@@ -259,7 +265,7 @@ class AddLiveClass extends React.Component {
onPopupScroll={this.handleScrollTeacherList} onPopupScroll={this.handleScrollTeacherList}
onChange={(value,option) => { onChange={(value,option) => {
console.log("value",value); console.log("value",value);
this.props.onChange('teacherId',value,option.children) this.props.onChange('teacherId',value,'teacherType',option.children)
}} }}
onSearch={(value) => { onSearch={(value) => {
teacherQuery.nickName = value teacherQuery.nickName = value
...@@ -287,7 +293,7 @@ class AddLiveClass extends React.Component { ...@@ -287,7 +293,7 @@ class AddLiveClass extends React.Component {
placeholder="请选择助教老师" placeholder="请选择助教老师"
// key={assistantNames} // key={assistantNames}
// defaultValue={assistantNames} // defaultValue={assistantNames}
value={assistant} value={assistantNames}
disabled={!isEdit ? true: false} disabled={!isEdit ? true: false}
mode={'multiple'} mode={'multiple'}
showSearch showSearch
...@@ -296,8 +302,7 @@ class AddLiveClass extends React.Component { ...@@ -296,8 +302,7 @@ class AddLiveClass extends React.Component {
filterOption={(input, option) => option} filterOption={(input, option) => option}
onPopupScroll={this.handleScrollAssistantList} onPopupScroll={this.handleScrollAssistantList}
onChange={(value,option) => { onChange={(value,option) => {
console.log('option',option); this.props.onChange('assistant',value,'assistantType',option.children)
this.props.onChange('assistant',value)
}} }}
onSearch={(value) => { onSearch={(value) => {
assistantQuery.nickName = value assistantQuery.nickName = value
......
...@@ -23,7 +23,7 @@ import User from '@/common/js/user' ...@@ -23,7 +23,7 @@ import User from '@/common/js/user'
import './VideoCourseList.less'; import './VideoCourseList.less';
const ENV = process.env.DEPLOY_ENV || 'rc'; const ENV = process.env.DEPLOY_ENV || 'dev';
class VideoCourseList extends React.Component { class VideoCourseList extends React.Component {
......
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