Commit 8082dd2d by zhangleyuan

feat:处理合并代码后的冲突

parents c1803b0d 4d4b2d2d
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
"less-loader": "^6.2.0", "less-loader": "^6.2.0",
"microevent": "^1.0.0", "microevent": "^1.0.0",
"mini-css-extract-plugin": "0.9.0", "mini-css-extract-plugin": "0.9.0",
"moment": "^2.27.0", "moment": "^2.20.1",
"optimize-css-assets-webpack-plugin": "5.0.3", "optimize-css-assets-webpack-plugin": "5.0.3",
"photoclip": "3.4.8", "photoclip": "3.4.8",
"pnp-webpack-plugin": "1.6.4", "pnp-webpack-plugin": "1.6.4",
......
...@@ -9,7 +9,6 @@ import React from 'react' ...@@ -9,7 +9,6 @@ import React from 'react'
import { message } from "antd"; import { message } from "antd";
import moment from 'moment'; import moment from 'moment';
require("./MultipleDatePicker.less"); require("./MultipleDatePicker.less");
class MultipleDatePicker extends React.Component { class MultipleDatePicker extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
......
/* /*
* @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-18 10:13:36
* @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
......
...@@ -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,16 +226,21 @@ handleChangeBasicInfo = (field, value) => { ...@@ -223,16 +226,21 @@ handleChangeBasicInfo = (field, value) => {
} }
// 修改上课信息 // 修改上课信息
handleChangeClassInfo = (field, value ,_teacherName) => { handleChangeClassInfo = (field, value ,type, optionValue) => {
const _value = value ? value.valueOf() : null; const _value = value ? value.valueOf() : null;
const { teacherName } = this.state.addLiveClassInfo; const { teacherName } = this.state.addLiveClassInfo;
const { assistantNames } = this.state.addLiveClassInfo;
const { assistantStoreUserId } = this.state.addLiveClassInfo
this.setState({ this.setState({
addLiveClassInfo: { addLiveClassInfo: {
...this.state.addLiveClassInfo, ...this.state.addLiveClassInfo,
[field]: _value, [field]: _value,
teacherName:_teacherName?_teacherName:teacherName teacherName:type==='teacherType'?optionValue:teacherName,
assistantNames:type==='assistantType'?_.pluck(optionValue, "children"):assistantNames,
assistantStoreUserId:type==='assistantType'?_.pluck(optionValue, "key"):assistantStoreUserId,
} }
}); });
// 批量开始时间改变,结束时间自动同步一致 // 批量开始时间改变,结束时间自动同步一致
if (field === 'startTime') { if (field === 'startTime') {
this.setState({ this.setState({
......
...@@ -35,6 +35,7 @@ class AddLiveBasic extends React.Component { ...@@ -35,6 +35,7 @@ class AddLiveBasic extends React.Component {
} }
} }
componentWillUnmount() { componentWillUnmount() {
} }
componentDidMount(){ componentDidMount(){
...@@ -281,19 +282,21 @@ class AddLiveBasic extends React.Component { ...@@ -281,19 +282,21 @@ class AddLiveBasic extends React.Component {
onClose={() => this.setState({ showCutModal: false })} onClose={() => this.setState({ showCutModal: false })}
reUpload={() => { this.state.currentInputFile.click() }} reUpload={() => { this.state.currentInputFile.click() }}
/> />
{showSelectFileModal &&
<SelectPrepareFileModal <SelectPrepareFileModal
operateType="select" key="basic"
multiple={false} operateType="select"
accept="image/jpeg,image/png,image/jpg" multiple={false}
selectTypeList={['JPG', 'JPEG', 'PNG']} accept="image/jpeg,image/png,image/jpg"
tooltip='支持文件类型:jpg、jpeg、png' selectTypeList={['JPG', 'JPEG', 'PNG']}
isOpen={showSelectFileModal} tooltip='支持文件类型:jpg、jpeg、png'
onClose={() => { isOpen={showSelectFileModal}
this.setState({ showSelectFileModal: false }) onClose={() => {
}} this.setState({ showSelectFileModal: false })
onSelect={this.handleSelectCover} }}
/> onSelect={this.handleSelectCover}
/>
}
<Modal <Modal
title="设置图片" title="设置图片"
width={1080} width={1080}
......
...@@ -48,13 +48,18 @@ class AddLiveClass extends React.Component { ...@@ -48,13 +48,18 @@ 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.assistantStoreUserId);
}
}
getTeacherList(current = 1, selectList){ getTeacherList(current = 1, selectList){
const { teacherQuery,teacherList} = this.state; const { teacherQuery,teacherList} = this.state;
const _query = { const _query = {
...teacherQuery, ...teacherQuery,
current, current,
size:10 size:15
}; };
StoreService.getStoreUserBasicPage( _query).then((res) => { StoreService.getStoreUserBasicPage( _query).then((res) => {
const { result = {} } = res; const { result = {} } = res;
...@@ -69,11 +74,13 @@ class AddLiveClass extends React.Component { ...@@ -69,11 +74,13 @@ class AddLiveClass extends React.Component {
// 获取助教老师列表 // 获取助教老师列表
getAssistantList = (current = 1, selectList) => { getAssistantList = (current = 1, selectList) => {
const { assistantQuery,assistantList} = this.state; const { assistantQuery,assistantList} = this.state;
const { assistantStoreUserId } = this.props.data;
const idList = selectList ? selectList : assistantStoreUserId;
const _query = { const _query = {
...assistantQuery, ...assistantQuery,
current, current,
size:10 idList,
size: idList.length <= 10 ? 10 : idList.length + 10
}; };
StoreService.getStoreUserBasicPage( _query).then((res) => { StoreService.getStoreUserBasicPage( _query).then((res) => {
const { result = {} } = res; const { result = {} } = res;
...@@ -245,13 +252,13 @@ class AddLiveClass extends React.Component { ...@@ -245,13 +252,13 @@ class AddLiveClass extends React.Component {
</div> </div>
} }
<div className="teacher"> <div className="teacher" id="teacher">
<span className="label"><span className="require">* </span>讲师:</span> <span className="label"><span className="require">* </span>讲师:</span>
<Select <Select
placeholder="请选择讲师" placeholder="请选择讲师"
// key={teacherName} // key={teacherName}
// defaultValue={teacherName} // defaultValue={teacherName}
value={teacherId} value={teacherName}
style={{ width: 240, marginTop: 6 }} style={{ width: 240, marginTop: 6 }}
disabled={!isEdit ? true: false} disabled={!isEdit ? true: false}
showSearch showSearch
...@@ -259,8 +266,9 @@ class AddLiveClass extends React.Component { ...@@ -259,8 +266,9 @@ 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
this.setState({ this.setState({
...@@ -269,6 +277,9 @@ class AddLiveClass extends React.Component { ...@@ -269,6 +277,9 @@ class AddLiveClass extends React.Component {
this.getTeacherList() this.getTeacherList()
}) })
}} }}
getPopupContainer={() =>
document.getElementById("teacher")
}
> >
{_.map(teacherList, (item, index) => { {_.map(teacherList, (item, index) => {
if( !assistant.includes(item.userId) ){ if( !assistant.includes(item.userId) ){
...@@ -280,7 +291,7 @@ class AddLiveClass extends React.Component { ...@@ -280,7 +291,7 @@ class AddLiveClass extends React.Component {
</Select> </Select>
</div> </div>
<div className="assistant-teacher"> <div className="assistant-teacher" id="assistant-teacher">
<span className="label">助教:</span> <span className="label">助教:</span>
<Select <Select
id="assistant" id="assistant"
...@@ -297,7 +308,7 @@ class AddLiveClass extends React.Component { ...@@ -297,7 +308,7 @@ class AddLiveClass extends React.Component {
onPopupScroll={this.handleScrollAssistantList} onPopupScroll={this.handleScrollAssistantList}
onChange={(value,option) => { onChange={(value,option) => {
console.log('option',option); console.log('option',option);
this.props.onChange('assistant',value) this.props.onChange('assistant',value,'assistantType',option)
}} }}
onSearch={(value) => { onSearch={(value) => {
assistantQuery.nickName = value assistantQuery.nickName = value
...@@ -307,12 +318,14 @@ class AddLiveClass extends React.Component { ...@@ -307,12 +318,14 @@ class AddLiveClass extends React.Component {
this.getAssistantList() this.getAssistantList()
}) })
}} }}
getPopupContainer={() =>
document.getElementById("assistant-teacher")
}
> >
{_.map(assistantList, (item, index) => { {_.map(assistantList, (item, index) => {
if(item.userId !== teacherId){ if(item.userId !== teacherId){
return ( return (
<Select.Option value={item.userId} key={item.userId}>{item.nickName}</Select.Option> <Select.Option value={item.userId} key={item.id}>{item.nickName}</Select.Option>
); );
} }
......
...@@ -391,17 +391,21 @@ class AddLiveIntro extends React.Component { ...@@ -391,17 +391,21 @@ class AddLiveIntro extends React.Component {
</div> </div>
</div> </div>
{/* 选择暖场图文件弹窗 */} {/* 选择暖场图文件弹窗 */}
<SelectPrepareFileModal { showSelectFileModal &&
operateType="select" <SelectPrepareFileModal
accept={selectType==="INTRO"?"image/jpeg,image/png,image/jpg":"video/mp4,image/jpeg,image/png,image/jpg"} key="instro"
selectTypeList={ selectType==="INTRO" ? ['JPG', 'JPEG', 'PNG']: ['MP4', 'JPG', 'JPEG', 'PNG'] } operateType="select"
tooltip={ selectType==="INTRO"?'支持文件类型:jpg、jpeg、png':'支持文件类型:jpg、jpeg、png、mp4'} accept={selectType==="INTRO"?"image/jpeg,image/png,image/jpg":"video/mp4,image/jpeg,image/png,image/jpg"}
isOpen={showSelectFileModal} selectTypeList={ selectType==="INTRO" ? ['JPG', 'JPEG', 'PNG']: ['MP4', 'JPG', 'JPEG', 'PNG'] }
onClose={() => { tooltip={ selectType==="INTRO"?'支持文件类型:jpg、jpeg、png':'支持文件类型:jpg、jpeg、png、mp4'}
this.setState({ showSelectFileModal: false }) isOpen={showSelectFileModal}
}} onClose={() => {
onSelect={this.handleSelectVideo} this.setState({ showSelectFileModal: false })
/> }}
onSelect={this.handleSelectVideo}
/>
}
</div> </div>
) )
......
...@@ -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 {
...@@ -68,7 +68,7 @@ class VideoCourseList extends React.Component { ...@@ -68,7 +68,7 @@ class VideoCourseList extends React.Component {
title: '视频课', title: '视频课',
key: 'scheduleName', key: 'scheduleName',
dataIndex: 'scheduleName', dataIndex: 'scheduleName',
width: '20%', width:'15%',
render: (val, record) => { render: (val, record) => {
const { coverUrl, scheduleVideoUrl } = record; const { coverUrl, scheduleVideoUrl } = record;
return ( return (
...@@ -90,6 +90,7 @@ class VideoCourseList extends React.Component { ...@@ -90,6 +90,7 @@ class VideoCourseList extends React.Component {
title: '课程分类', title: '课程分类',
key: 'categoryName', key: 'categoryName',
dataIndex: 'categoryName', dataIndex: 'categoryName',
width: '10%',
render: (val, record) => { render: (val, record) => {
return ( return (
<div className="record__item"> <div className="record__item">
...@@ -102,6 +103,7 @@ class VideoCourseList extends React.Component { ...@@ -102,6 +103,7 @@ class VideoCourseList extends React.Component {
title: '创建人', title: '创建人',
key: 'createName', key: 'createName',
dataIndex: 'createName', dataIndex: 'createName',
width: '8%',
render: (val) => { render: (val) => {
return ( return (
<div> <div>
...@@ -123,7 +125,7 @@ class VideoCourseList extends React.Component { ...@@ -123,7 +125,7 @@ class VideoCourseList extends React.Component {
<span>店铺展示</span> <span>店铺展示</span>
<Tooltip title={<div>开启后,用户可在店铺内查看到此课程。若课程“未成功开课”,则系统会自动“关闭”店铺展示。<br/>关闭后,店铺内不再展示此课程,但用户仍可通过分享的海报/链接查看此课程。</div>}><i className="icon iconfont" style={{ marginLeft: '5px',cursor:'pointer',color:'#bfbfbf'}}>&#xe61d;</i></Tooltip> <Tooltip title={<div>开启后,用户可在店铺内查看到此课程。若课程“未成功开课”,则系统会自动“关闭”店铺展示。<br/>关闭后,店铺内不再展示此课程,但用户仍可通过分享的海报/链接查看此课程。</div>}><i className="icon iconfont" style={{ marginLeft: '5px',cursor:'pointer',color:'#bfbfbf'}}>&#xe61d;</i></Tooltip>
</span>, </span>,
width: "7%", width: '12%',
dataIndex: "courseware", dataIndex: "courseware",
render: (val, item, index) => { render: (val, item, index) => {
return ( return (
...@@ -144,6 +146,7 @@ class VideoCourseList extends React.Component { ...@@ -144,6 +146,7 @@ class VideoCourseList extends React.Component {
}, },
{ {
title: '创建时间', title: '创建时间',
width: "10%",
key: 'created', key: 'created',
dataIndex: 'created', dataIndex: 'created',
sorter: true, sorter: true,
...@@ -153,6 +156,7 @@ class VideoCourseList extends React.Component { ...@@ -153,6 +156,7 @@ class VideoCourseList extends React.Component {
}, },
{ {
title: '更新时间', title: '更新时间',
width: "10%",
key: 'updated', key: 'updated',
dataIndex: 'updated', dataIndex: 'updated',
sorter: true, sorter: true,
...@@ -164,6 +168,7 @@ class VideoCourseList extends React.Component { ...@@ -164,6 +168,7 @@ class VideoCourseList extends React.Component {
title: '操作', title: '操作',
key: 'operate', key: 'operate',
dataIndex: 'operate', dataIndex: 'operate',
width: "20%",
render: (val, record) => { render: (val, record) => {
return ( return (
<div className="operate"> <div className="operate">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
margin-top: 12px; margin-top: 12px;
.operate-text { .operate-text {
color: #FF8534; color: #5289FA;
cursor: pointer; cursor: pointer;
} }
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
display: flex; display: flex;
&__item { &__item {
color: #FF8534; color: #5289FA;
cursor: pointer; cursor: pointer;
&.split { &.split {
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
} }
} }
} }
.record__item { .record__item {
display: flex; display: flex;
......
...@@ -76,7 +76,17 @@ class SelectPrepareFileModal extends React.Component { ...@@ -76,7 +76,17 @@ class SelectPrepareFileModal extends React.Component {
showNonCompliantFileModal: false, showNonCompliantFileModal: false,
} }
} }
componentDidMount() {
const { diskList = [], currentRootDisk} = this.props;
const _currentRootDisk = diskList[0] || currentRootDisk || defaultRootDisk;
this.setState({
query: defaultQuery,
currentRootDisk: _currentRootDisk,
folderPathList: [_currentRootDisk],
}, () => {
this.handleFetchFolderList();
});
}
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
const { diskList = [], currentRootDisk} = nextProps; const { diskList = [], currentRootDisk} = nextProps;
if (nextProps.isOpen) { if (nextProps.isOpen) {
......
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