Commit 1f2942d7 by zhangleyuan

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

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