Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
6d490341
Commit
6d490341
authored
Aug 17, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
fix:解决合并代码的冲突
parents
402be304
1d5170d0
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
91 additions
and
35 deletions
+91
-35
src/common/js/user.ts
+22
-15
src/modules/root/Header.jsx
+5
-4
src/modules/task-center/train-task/AddTrainTask.jsx
+13
-7
src/modules/task-center/train-task/components/BasicInfo.jsx
+3
-3
src/modules/task-center/train-task/components/BasicInfo.less
+5
-0
src/modules/task-center/train-task/modal/ChooseAssignorModal.jsx
+16
-0
src/modules/task-center/train-task/modal/ChooseAssignorModal.less
+12
-0
src/modules/task-center/train-task/modal/ChooseCollaboratorModal.jsx
+9
-6
src/modules/task-center/train-task/modal/ChooseCollaboratorModal.less
+6
-0
No files found.
src/common/js/user.ts
View file @
6d490341
/*
/*
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-31 09:34:25
* @Date: 2020-08-31 09:34:25
* @LastEditors:
Please set LastEditors
* @LastEditors:
yuananting
* @LastEditTime: 2021-0
7-20 17:41:20
* @LastEditTime: 2021-0
8-17 19:20:33
* @Description:
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
import
Storage
from
'./storage'
;
import
Storage
from
'./storage'
;
import
{
PREFIX
,
USER_PREFIX
}
from
'@/domains/basic-domain/constants'
;
import
{
PREFIX
,
USER_PREFIX
}
from
'@/domains/basic-domain/constants'
;
declare
var
window
:
any
;
declare
var
window
:
any
;
class
User
{
class
User
{
getExpirationTime
()
{
getExpirationTime
()
{
return
Storage
.
get
(
`
${
PREFIX
}
_expiration_time`
)
return
Storage
.
get
(
`
${
PREFIX
}
_expiration_time`
)
;
}
}
getVersion
()
{
getVersion
()
{
return
Storage
.
getObj
(
`
${
PREFIX
}
_version`
)
return
Storage
.
getObj
(
`
${
PREFIX
}
_version`
)
;
}
}
getStoreId
(){
getStoreId
()
{
return
window
.
currentStoreUserInfo
.
storeId
||
Storage
.
get
(
`
${
PREFIX
}
_storeId`
)
return
window
.
currentStoreUserInfo
.
storeId
||
Storage
.
get
(
`
${
PREFIX
}
_storeId`
);
}
}
getEnterpriseId
()
{
getEnterpriseId
()
{
...
@@ -40,6 +39,10 @@ class User {
...
@@ -40,6 +39,10 @@ class User {
return
window
.
currentStoreUserInfo
.
storeUserId
||
Storage
.
get
(
`
${
PREFIX
}
_storeUserId`
);
return
window
.
currentStoreUserInfo
.
storeUserId
||
Storage
.
get
(
`
${
PREFIX
}
_storeUserId`
);
}
}
getStoreUserName
()
{
return
Storage
.
get
(
`
${
PREFIX
}
_storeUserName`
);
}
getCustomerId
()
{
getCustomerId
()
{
return
Storage
.
get
(
`
${
PREFIX
}
_customerId`
);
return
Storage
.
get
(
`
${
PREFIX
}
_customerId`
);
}
}
...
@@ -48,7 +51,7 @@ class User {
...
@@ -48,7 +51,7 @@ class User {
return
window
.
currentStoreUserInfo
.
userId
||
Storage
.
get
(
`
${
PREFIX
}
_userId`
);
return
window
.
currentStoreUserInfo
.
userId
||
Storage
.
get
(
`
${
PREFIX
}
_userId`
);
}
}
getAvatar
(){
getAvatar
()
{
return
Storage
.
get
(
`
${
PREFIX
}
_avatar`
);
return
Storage
.
get
(
`
${
PREFIX
}
_avatar`
);
}
}
...
@@ -64,16 +67,16 @@ class User {
...
@@ -64,16 +67,16 @@ class User {
return
Storage
.
get
(
`
${
PREFIX
}
_isAdmin`
);
return
Storage
.
get
(
`
${
PREFIX
}
_isAdmin`
);
}
}
setExpirationTime
(
value
:
number
)
{
setExpirationTime
(
value
:
number
)
{
return
Storage
.
set
(
`
${
PREFIX
}
_expiration_time`
,
value
)
return
Storage
.
set
(
`
${
PREFIX
}
_expiration_time`
,
value
);
}
}
setVersion
(
value
:
any
)
{
setVersion
(
value
:
any
)
{
return
Storage
.
setObj
(
`
${
PREFIX
}
_version`
,
value
)
return
Storage
.
setObj
(
`
${
PREFIX
}
_version`
,
value
);
}
}
setStoreId
(
value
:
any
)
{
setStoreId
(
value
:
any
)
{
return
Storage
.
set
(
`
${
PREFIX
}
_storeId`
,
value
)
return
Storage
.
set
(
`
${
PREFIX
}
_storeId`
,
value
);
}
}
setEnterpriseId
(
value
:
any
)
{
setEnterpriseId
(
value
:
any
)
{
...
@@ -92,6 +95,10 @@ class User {
...
@@ -92,6 +95,10 @@ class User {
return
Storage
.
set
(
`
${
PREFIX
}
_storeUserId`
,
value
);
return
Storage
.
set
(
`
${
PREFIX
}
_storeUserId`
,
value
);
}
}
setStoreUserName
(
value
:
any
)
{
return
Storage
.
set
(
`
${
PREFIX
}
_storeUserName`
,
value
);
}
setCustomerId
(
value
:
any
)
{
setCustomerId
(
value
:
any
)
{
return
Storage
.
set
(
`
${
PREFIX
}
_customerId`
,
value
);
return
Storage
.
set
(
`
${
PREFIX
}
_customerId`
,
value
);
}
}
...
...
src/modules/root/Header.jsx
View file @
6d490341
/*
/*
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @Date: 2019-09-10 18:26:03
* @LastEditors:
Please set LastEditors
* @LastEditors:
yuananting
* @LastEditTime: 2021-08-1
1 20:26:53
* @LastEditTime: 2021-08-1
7 19:19:42
* @Description:
* @Description:
*/
*/
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
'react'
;
...
@@ -53,12 +53,12 @@ function Header(props) {
...
@@ -53,12 +53,12 @@ function Header(props) {
setStoreName
(
value
);
setStoreName
(
value
);
});
});
getStoreList
();
getStoreList
();
},
[]);
},
[
getStoreList
,
handleConvertShortUrl
,
htmlUrl
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
storeUserId
&&
getUserInfo
();
storeUserId
&&
getUserInfo
();
enterpriseId
?
getEnterpriseUser
()
:
User
.
setIsAdmin
(
false
);
enterpriseId
?
getEnterpriseUser
()
:
User
.
setIsAdmin
(
false
);
},
[
storeUserId
]);
},
[
enterpriseId
,
getEnterpriseUser
,
storeUserId
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
messageHelpRef
.
current
)
{
if
(
!
messageHelpRef
.
current
)
{
...
@@ -81,6 +81,7 @@ function Header(props) {
...
@@ -81,6 +81,7 @@ function Header(props) {
setPhone
(
phone
);
setPhone
(
phone
);
setAvatar
(
res
.
result
.
avatar
);
setAvatar
(
res
.
result
.
avatar
);
User
.
setAvatar
(
res
.
result
.
avatar
);
User
.
setAvatar
(
res
.
result
.
avatar
);
User
.
setStoreUserName
(
weChatAccount
);
});
});
}
}
...
...
src/modules/task-center/train-task/AddTrainTask.jsx
View file @
6d490341
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-07-29 13:57:03
* @Date: 2021-07-29 13:57:03
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-08-17 1
8:21:3
5
* @LastEditTime: 2021-08-17 1
9:14:5
5
* @Description: 任务中心-培训任务-新建页面
* @Description: 任务中心-培训任务-新建页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
@@ -23,17 +23,23 @@ import Bus from '@/core/bus';
...
@@ -23,17 +23,23 @@ import Bus from '@/core/bus';
import
$
from
'jquery'
;
import
$
from
'jquery'
;
function
AddTrainTask
()
{
function
AddTrainTask
()
{
const
type
=
getParameterByName
(
'type'
);
const
type
=
window
.
getParameterByName
(
'type'
);
const
taskId
=
getParameterByName
(
'taskId'
);
const
taskId
=
window
.
getParameterByName
(
'taskId'
);
const
taskState
=
getParameterByName
(
'taskState'
);
const
taskState
=
window
.
getParameterByName
(
'taskState'
);
const
defaultCover
=
'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png'
;
const
defaultCover
=
'https://image.xiaomaiketang.com/xm/rEAetaTEh3.png'
;
const
DEFAULT_BASIC_INFO
=
{
const
DEFAULT_BASIC_INFO
=
{
createId
:
User
.
getStoreUserId
(),
taskName
:
''
,
// 培训任务名称
taskName
:
''
,
// 培训任务名称
coverUrl
:
defaultCover
,
coverUrl
:
defaultCover
,
coverId
:
null
,
coverId
:
null
,
helpStoreUserIds
:
[],
// 指定协同者id
helpStoreUserIds
:
[
{
checkedId
:
User
.
getStoreUserId
(),
checkedName
:
User
.
getStoreUserName
()
},
],
// 指定协同者id
timeType
:
'FOREVER'
,
// 培训时间,默认永久有效
timeType
:
'FOREVER'
,
// 培训时间,默认永久有效
startTime
:
null
,
// 固定时间段-开始时间
startTime
:
null
,
// 固定时间段-开始时间
endTime
:
null
,
// 固定时间段-结束时间
endTime
:
null
,
// 固定时间段-结束时间
...
@@ -199,7 +205,7 @@ function AddTrainTask() {
...
@@ -199,7 +205,7 @@ function AddTrainTask() {
// 确认保存新建
// 确认保存新建
function
submitRemote
(
introduceId
,
issue
)
{
function
submitRemote
(
introduceId
,
issue
)
{
const
{
assignList
,
endTime
,
helpStoreUserIds
,
learnType
,
startTime
,
taskName
,
timeType
,
coverId
}
=
basicInfo
;
const
{
createId
,
assignList
,
endTime
,
helpStoreUserIds
,
learnType
,
startTime
,
taskName
,
timeType
,
coverId
}
=
basicInfo
;
let
_scheduleMediaRequests
=
[];
let
_scheduleMediaRequests
=
[];
...
@@ -241,7 +247,7 @@ function AddTrainTask() {
...
@@ -241,7 +247,7 @@ function AddTrainTask() {
const
commonParams
=
{
const
commonParams
=
{
assignList
:
_assignList
,
assignList
:
_assignList
,
createId
:
User
.
getStoreUserId
()
,
createId
,
endTime
,
endTime
,
helpStoreUserIds
:
_helpStoreUserIds
,
// 协同者集合
helpStoreUserIds
:
_helpStoreUserIds
,
// 协同者集合
issueState
:
issue
,
// 是否发布
issueState
:
issue
,
// 是否发布
...
...
src/modules/task-center/train-task/components/BasicInfo.jsx
View file @
6d490341
...
@@ -24,9 +24,9 @@ const { RangePicker } = DatePicker;
...
@@ -24,9 +24,9 @@ const { RangePicker } = DatePicker;
const
FormItem
=
Form
.
Item
;
const
FormItem
=
Form
.
Item
;
function
BasicInfo
(
props
)
{
function
BasicInfo
(
props
)
{
const
taskState
=
getParameterByName
(
'taskState'
);
const
taskState
=
window
.
getParameterByName
(
'taskState'
);
const
type
=
getParameterByName
(
'type'
);
const
type
=
window
.
getParameterByName
(
'type'
);
const
originTimeType
=
getParameterByName
(
'timeType'
);
const
originTimeType
=
window
.
getParameterByName
(
'timeType'
);
const
{
basicInfo
,
startCheck
}
=
props
;
const
{
basicInfo
,
startCheck
}
=
props
;
const
{
createId
,
taskName
,
coverUrl
,
helpStoreUserIds
,
timeType
,
startTime
,
endTime
,
learnType
,
assignList
,
introduce
,
loadintroduce
}
=
basicInfo
;
const
{
createId
,
taskName
,
coverUrl
,
helpStoreUserIds
,
timeType
,
startTime
,
endTime
,
learnType
,
assignList
,
introduce
,
loadintroduce
}
=
basicInfo
;
...
...
src/modules/task-center/train-task/components/BasicInfo.less
View file @
6d490341
...
@@ -86,6 +86,11 @@
...
@@ -86,6 +86,11 @@
font-size: 14px;
font-size: 14px;
color: #cccccc;
color: #cccccc;
}
}
.disabled {
color: #ccc !important;
cursor: not-allowed !important;
pointer-events: none !important;
}
}
}
.learning-model-tips {
.learning-model-tips {
...
...
src/modules/task-center/train-task/modal/ChooseAssignorModal.jsx
View file @
6d490341
...
@@ -16,6 +16,7 @@ import WWOpenDataCom from '@/components/WWOpenDataCom';
...
@@ -16,6 +16,7 @@ import WWOpenDataCom from '@/components/WWOpenDataCom';
import
_
from
'underscore'
;
import
_
from
'underscore'
;
import
'./ChooseAssignorModal.less'
;
import
'./ChooseAssignorModal.less'
;
import
$
from
'jquery'
;
import
$
from
'jquery'
;
import
LottieIcon
from
'@/components/LottieIcon'
;
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
const
{
DirectoryTree
}
=
Tree
;
const
{
DirectoryTree
}
=
Tree
;
...
@@ -412,6 +413,8 @@ function ChooseAssignorModal(props) {
...
@@ -412,6 +413,8 @@ function ChooseAssignorModal(props) {
<
TabPane
key=
'customGroupTab'
tab=
'自定义分组'
></
TabPane
>
<
TabPane
key=
'customGroupTab'
tab=
'自定义分组'
></
TabPane
>
</
Tabs
>
</
Tabs
>
<
div
className=
'tree-con'
>
<
div
className=
'tree-con'
>
<
Choose
>
<
When
condition=
{
structureData
.
length
>
0
}
>
<
DirectoryTree
<
DirectoryTree
defaultExpandAll
defaultExpandAll
checkable
checkable
...
@@ -442,6 +445,11 @@ function ChooseAssignorModal(props) {
...
@@ -442,6 +445,11 @@ function ChooseAssignorModal(props) {
);
);
}
}
}
}
/>
/>
</
When
>
<
Otherwise
>
<
LottieIcon
title=
'搜索无结果'
type=
'search'
size=
{
150
}
/>
</
Otherwise
>
</
Choose
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -453,6 +461,8 @@ function ChooseAssignorModal(props) {
...
@@ -453,6 +461,8 @@ function ChooseAssignorModal(props) {
</
span
>
</
span
>
</
div
>
</
div
>
<
div
className=
'data-body'
>
<
div
className=
'data-body'
>
<
Choose
>
<
When
condition=
{
checkedAssignorList
.
length
>
0
}
>
{
checkedAssignorList
.
map
((
item
,
index
)
=>
{
{
checkedAssignorList
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
div
className=
'selected-item'
>
<
div
className=
'selected-item'
>
...
@@ -483,6 +493,12 @@ function ChooseAssignorModal(props) {
...
@@ -483,6 +493,12 @@ function ChooseAssignorModal(props) {
</
div
>
</
div
>
);
);
})
}
})
}
</
When
>
<
Otherwise
>
<
LottieIcon
title=
'暂无数据'
type=
'college'
size=
{
150
}
/>
</
Otherwise
>
</
Choose
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/modules/task-center/train-task/modal/ChooseAssignorModal.less
View file @
6d490341
...
@@ -78,6 +78,12 @@
...
@@ -78,6 +78,12 @@
font-size: 14px !important;
font-size: 14px !important;
}
}
}
}
.lottie-icon {
margin-top: 64px;
.lottie-icon__title {
color: #666666;
}
}
.tree-con {
.tree-con {
overflow-y: scroll;
overflow-y: scroll;
overflow-x: hidden;
overflow-x: hidden;
...
@@ -137,6 +143,12 @@
...
@@ -137,6 +143,12 @@
overflow-y: scroll;
overflow-y: scroll;
overflow-x: hidden;
overflow-x: hidden;
max-height: 370px;
max-height: 370px;
.lottie-icon {
margin-top: 76px;
.lottie-icon__title {
color: #666666;
}
}
.selected-item {
.selected-item {
padding: 12px 12px 12px 16px;
padding: 12px 12px 12px 16px;
display: flex;
display: flex;
...
...
src/modules/task-center/train-task/modal/ChooseCollaboratorModal.jsx
View file @
6d490341
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-08-12 16:27:38
* @Date: 2021-08-12 16:27:38
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-08-1
3 19:39:34
* @LastEditTime: 2021-08-1
7 19:10:02
* @Description: 新建培训任务-选择协同人员
* @Description: 新建培训任务-选择协同人员
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
@@ -10,14 +10,10 @@
...
@@ -10,14 +10,10 @@
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Modal
,
Input
,
Tooltip
,
List
,
Checkbox
}
from
'antd'
;
import
{
Modal
,
Input
,
Tooltip
,
List
,
Checkbox
}
from
'antd'
;
import
{
XMTable
}
from
'@/components'
;
import
college
from
'@/common/lottie/college.json'
;
import
Service
from
'@/common/js/service'
;
import
User
from
'@/common/js/user'
;
import
StoreService
from
'@/domains/store-domain/storeService'
;
import
StoreService
from
'@/domains/store-domain/storeService'
;
import
search
from
'@/common/lottie/search'
;
import
'./ChooseCollaboratorModal.less'
;
import
'./ChooseCollaboratorModal.less'
;
import
WWOpenDataCom
from
'@/components/WWOpenDataCom'
;
import
WWOpenDataCom
from
'@/components/WWOpenDataCom'
;
import
LottieIcon
from
'@/components/LottieIcon'
;
import
_
from
'underscore'
;
import
_
from
'underscore'
;
...
@@ -186,6 +182,8 @@ function ChooseCollaboratorModal(props) {
...
@@ -186,6 +182,8 @@ function ChooseCollaboratorModal(props) {
enterButton=
{
<
span
className=
'icon iconfont'
>

</
span
>
}
enterButton=
{
<
span
className=
'icon iconfont'
>

</
span
>
}
/>
/>
<
div
className=
'data-body'
>
<
div
className=
'data-body'
>
<
Choose
>
<
When
condition=
{
employeeList
.
length
>
0
}
>
<
List
<
List
header=
{
header=
{
<
Checkbox
checked=
{
allChecked
}
onChange=
{
handleCheckedAll
}
>
<
Checkbox
checked=
{
allChecked
}
onChange=
{
handleCheckedAll
}
>
...
@@ -216,6 +214,11 @@ function ChooseCollaboratorModal(props) {
...
@@ -216,6 +214,11 @@ function ChooseCollaboratorModal(props) {
</
List
.
Item
>
</
List
.
Item
>
)
}
)
}
/>
/>
</
When
>
<
Otherwise
>
<
LottieIcon
title=
'搜索无结果'
type=
'search'
size=
{
150
}
/>
</
Otherwise
>
</
Choose
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'right-list'
>
<
div
className=
'right-list'
>
...
...
src/modules/task-center/train-task/modal/ChooseCollaboratorModal.less
View file @
6d490341
...
@@ -12,6 +12,12 @@
...
@@ -12,6 +12,12 @@
overflow-x: hidden;
overflow-x: hidden;
max-height: 370px;
max-height: 370px;
padding-right: 16px;
padding-right: 16px;
.lottie-icon {
margin-top: 76px;
.lottie-icon__title {
color: #666666;
}
}
.ant-list {
.ant-list {
.ant-list-item:hover {
.ant-list-item:hover {
background-color: #f3f6fa;
background-color: #f3f6fa;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment