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
d9a4bd20
Commit
d9a4bd20
authored
May 10, 2021
by
chenshu
Browse files
Options
Browse Files
Download
Plain Diff
fix:merge
parents
7f27308b
819fc92a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
65 additions
and
51 deletions
+65
-51
src/core/global.less
+0
-1
src/modules/course-manage/graphics-course/AddGraphicsCourse.jsx
+0
-1
src/modules/root/App.tsx
+5
-1
src/modules/root/CollegeManagePage.jsx
+15
-18
src/modules/root/ErrorCollege.jsx
+19
-1
src/modules/root/Header.jsx
+8
-8
src/modules/root/Header.less
+2
-1
src/modules/store-manage/EmployeeAddOrEditModal.less
+2
-1
src/modules/store-manage/EmployeeAddOrEditModal.tsx
+14
-19
No files found.
src/core/global.less
View file @
d9a4bd20
...
...
@@ -1305,7 +1305,6 @@ input:focus {
.ant-modal-content {
.ant-modal-body {
min-height: 130px;
max-height: 600px;
overflow: auto;
// padding-top:0px!important;
.xm-page-control {
...
...
src/modules/course-manage/graphics-course/AddGraphicsCourse.jsx
View file @
d9a4bd20
...
...
@@ -301,7 +301,6 @@ class AddGraphicsCourse extends React.Component {
//上传图片
uploadCoverImage
=
(
imageFile
)
=>
{
debugger
const
{
folderName
}
=
imageFile
;
const
fileName
=
window
.
random_string
(
16
)
+
folderName
.
slice
(
folderName
.
lastIndexOf
(
"."
));
const
self
=
this
;
...
...
src/modules/root/App.tsx
View file @
d9a4bd20
...
...
@@ -41,6 +41,10 @@ const App: React.FC = (props: any) => {
}
},
[])
useEffect
(()
=>
{
getStorePermission
();
},
[
window
.
location
.
hash
])
function
getStorePermission
()
{
const
params
=
{
storeId
:
User
.
getStoreId
(),
...
...
@@ -120,7 +124,7 @@ const App: React.FC = (props: any) => {
return
(
<
div
id=
"home"
>
<
Header
handleMenuType=
{
handleMenuType
}
menuType=
{
menuType
}
/>
<
Header
id=
"app"
handleMenuType=
{
handleMenuType
}
menuType=
{
menuType
}
/>
<
ConfigProvider
locale=
{
zhCN
}
autoInsertSpaceInButton=
{
false
}
>
<
Main
menuType=
{
menuType
}
/>
</
ConfigProvider
>
...
...
src/modules/root/CollegeManagePage.jsx
View file @
d9a4bd20
...
...
@@ -45,6 +45,7 @@ export default class CollegeManagePage extends React.Component {
getStoreList
()
{
const
{
enterpriseId
}
=
this
.
state
;
if
(
!
enterpriseId
)
return
null
;
const
params
=
{
enterpriseId
,
userId
:
User
.
getUserId
(),
...
...
@@ -52,7 +53,7 @@ export default class CollegeManagePage extends React.Component {
Service
.
Hades
(
'public/customerHades/getStoreListUser'
,
params
).
then
((
res
)
=>
{
const
list
=
res
.
result
;
if
(
!
User
.
getStoreId
())
{
const
mainStore
=
_
.
find
(
list
,
item
=>
item
.
mainStore
)
||
{};
const
mainStore
=
_
.
find
(
list
,
item
=>
item
.
mainStore
)
||
list
[
0
]
||
{};
User
.
setStoreId
(
mainStore
.
id
);
User
.
setStoreUserId
(
mainStore
.
storeUserId
);
}
...
...
@@ -73,7 +74,17 @@ export default class CollegeManagePage extends React.Component {
okText
:
'我知道了'
,
})
}
else
{
this
.
changeCollege
(
item
,
bool
);
Modal
.
confirm
({
title
:
'确定停用吗?'
,
content
:
'停用学院,所有学院相关信息不可使用,用户无法继续学习,请谨慎操作!'
,
icon
:
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>,
onOk
:
()
=>
{
this
.
changeCollege
(
item
,
bool
);
},
okText
:
'停用'
,
cancelText
:
'取消'
,
})
}
})
}
...
...
@@ -94,12 +105,7 @@ export default class CollegeManagePage extends React.Component {
handleLogout
()
{
BaseService
.
logout
({}).
then
((
res
)
=>
{
User
.
removeUserId
();
User
.
removeToken
();
User
.
removeEnterpriseId
();
User
.
clearUserInfo
();
const
htmlUrl
=
`
${
LIVE_SHARE
}
store/index?id=
${
User
.
getCustomerStoreId
()
||
User
.
getStoreId
()}
&userId=
${
User
.
getUserId
()}
&from=work_weixin`
;
window
.
location
.
href
=
htmlUrl
;
window
.
RCHistory
.
push
(
'/login'
);
});
}
...
...
@@ -186,16 +192,7 @@ export default class CollegeManagePage extends React.Component {
if
(
item
.
state
!==
'VALID'
)
return
null
;
e
.
preventDefault
();
e
.
stopPropagation
();
Modal
.
confirm
({
title
:
'确定停用吗?'
,
content
:
'禁用学院,所有学院相关信息不可使用,用户无法继续学习,请谨慎操作!'
,
icon
:
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>,
onOk
:
()
=>
{
this
.
checkCollege
(
item
,
false
);
},
okText
:
'停用'
,
cancelText
:
'取消'
,
})
this
.
checkCollege
(
item
,
false
);
}
}
>
{
item
.
state
===
'VALID'
?
'停用'
:
'已停用'
}
</
span
>
}
...
...
src/modules/root/ErrorCollege.jsx
View file @
d9a4bd20
import
User
from
'@/common/js/user'
;
import
React
from
'react'
;
import
Header
from
'./Header'
import
Service
from
"@/common/js/service"
;
import
'./ErrorCollege.less'
;
export
default
class
ErrorCollege
extends
React
.
Component
{
...
...
@@ -10,6 +11,23 @@ export default class ErrorCollege extends React.Component {
menuType
:
true
,
}
}
componentDidMount
()
{
this
.
getStorePermission
();
}
getStorePermission
()
{
const
params
=
{
storeId
:
User
.
getStoreId
(),
};
Service
.
Hades
(
'public/customerHades/whetherStopStore'
,
params
).
then
((
res
)
=>
{
if
(
!
res
.
result
)
{
window
.
RCHistory
.
replace
({
pathname
:
'/home'
,
})
}
});
}
handleMenuType
()
{
this
.
setState
({
menuType
:
!
menuType
});
...
...
@@ -19,7 +37,7 @@ export default class ErrorCollege extends React.Component {
const
{
menuType
}
=
this
.
state
;
return
(
<
div
className=
"error-college-page"
>
<
Header
handleMenuType=
{
this
.
handleMenuType
}
menuType=
{
menuType
}
/>
<
Header
id=
"error"
handleMenuType=
{
this
.
handleMenuType
}
menuType=
{
menuType
}
/>
<
div
className=
"error-college-box"
>
<
img
src=
"https://image.xiaomaiketang.com/xm/MQRaYkbr6J.png"
className=
"error-college-image"
/>
<
span
className=
"error-college-tip"
>
{
User
.
getStoreName
()
}
已停用
</
span
>
...
...
src/modules/root/Header.jsx
View file @
d9a4bd20
...
...
@@ -78,13 +78,15 @@ function Header(props) {
}
function
getStoreList
()
{
if
(
!
enterpriseId
)
return
null
;
const
params
=
{
enterpriseId
,
userId
:
User
.
getUserId
(),
};
Service
.
Hades
(
'public/customerHades/getStoreListUser'
,
params
).
then
((
res
)
=>
{
setList
(
res
.
result
);
listRef
.
current
=
res
.
result
;
const
newList
=
_
.
filter
(
res
.
result
,
item
=>
item
.
state
===
'VALID'
);
setList
(
newList
);
listRef
.
current
=
newList
;
});
}
...
...
@@ -182,12 +184,7 @@ function Header(props) {
function
handleLogout
()
{
BaseService
.
logout
({}).
then
((
res
)
=>
{
User
.
removeUserId
();
User
.
removeToken
();
User
.
removeEnterpriseId
();
User
.
clearUserInfo
();
const
url
=
`
${
LIVE_SHARE
}
store/index?id=
${
User
.
getCustomerStoreId
()
||
User
.
getStoreId
()}
&userId=
${
User
.
getUserId
()}
&from=work_weixin`
;
window
.
location
.
href
=
url
;
window
.
RCHistory
.
push
(
'/login'
);
});
}
...
...
@@ -267,6 +264,9 @@ function Header(props) {
<
RadioGroup
onChange=
{
(
e
)
=>
{
setStoreId
(
e
.
target
.
value
)
User
.
setStoreId
(
e
.
target
.
value
);
window
.
RCHistory
.
push
(
'/home'
);
window
.
location
.
reload
();
}
}
value=
{
storeId
}
id=
"college-radio-group"
...
...
src/modules/root/Header.less
View file @
d9a4bd20
...
...
@@ -220,6 +220,7 @@
border-radius: 2px;
display: none;
padding-right: 0;
z-index: 10;
&.active {
display: block;
}
...
...
@@ -231,7 +232,7 @@
.ant-radio-group {
overflow-y: auto;
width: 100%;
height: 190px;
max-
height: 190px;
}
.ant-radio-wrapper {
display: flex;
...
...
src/modules/store-manage/EmployeeAddOrEditModal.less
View file @
d9a4bd20
...
...
@@ -12,11 +12,12 @@
margin-top: 5px !important;
}
.radio-tip {
padding-left: 24px;
font-size: 14px;
font-weight: 400;
color: #999;
line-height: 20px;
white-space: nowrap;
margin: 6px 0 16px;
}
.avatar-box {
text-align: center;
...
...
src/modules/store-manage/EmployeeAddOrEditModal.tsx
View file @
d9a4bd20
...
...
@@ -83,8 +83,8 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
},
[
props
.
choosedItem
.
nickName
]);
const
layout
=
{
labelCol
:
{
span
:
5
},
wrapperCol
:
{
span
:
1
2
},
labelCol
:
{
span
:
6
},
wrapperCol
:
{
span
:
1
8
},
};
function
handleChangeRole
(
value
:
string
)
{
...
...
@@ -210,8 +210,8 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
maskClosable=
{
false
}
closeIcon=
{
<
span
className=
"icon iconfont modal-close-icon"
>

</
span
>
}
>
<
Row
>
<
Col
span=
{
1
6
}
>
<
Row
style=
{
{
height
:
271
}
}
>
<
Col
span=
{
1
8
}
>
<
Form
{
...
layout
}
form=
{
form
}
...
...
@@ -223,9 +223,8 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
name=
"nickName"
rules=
{
[{
required
:
true
}]
}
validateStatus=
{
nameStatus
}
help=
{
nameErrorMsg
}
style=
{
{
marginBottom
:
'-2px !important'
}
}
className=
"mt-4"
help=
{
nameErrorMsg
||
undefined
}
style=
{
{
marginBottom
:
0
}
}
>
<
Input
style=
{
{
width
:
200
}
}
...
...
@@ -239,8 +238,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
<
Form
.
Item
label=
"企业微信账号"
name=
"weChatAccount"
style=
{
{
marginBottom
:
'-2px !important'
}
}
className=
"mt-10"
>
<
Tooltip
title=
{
props
.
choosedItem
.
weChatAccount
}
>
<
div
style=
{
{
...
...
@@ -257,8 +254,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
rules=
{
[{
required
:
true
}]
}
validateStatus=
{
phoneStatus
}
help=
{
phoneErrorMessage
}
style=
{
{
marginBottom
:
'-2px !important'
}
}
className=
"mt-10"
>
<
Input
style=
{
{
width
:
200
}
}
...
...
@@ -290,12 +285,6 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
}
}
className=
"mt5"
>
<
Radio
value=
{
"CloudOperator"
}
className=
"mt-4"
>
<
span
style=
{
{
color
:
"#333"
}
}
>
运营师
</
span
>
<
p
className=
"radio-tip"
>
仅可查看/转发培训计划内容,并查看其负责的用户学习进度
</
p
>
</
Radio
>
<
Radio
value=
{
"CloudLecturer"
}
className=
"mt-4"
>
<
span
style=
{
{
color
:
"#333"
}
}
>
普通讲师
</
span
>
<
p
className=
"radio-tip"
>
...
...
@@ -306,12 +295,18 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
<
span
style=
{
{
color
:
"#333"
}
}
>
管理员
</
span
>
<
p
className=
"radio-tip"
>
可执行学院中所有的操作
</
p
>
</
Radio
>
<
Radio
value=
{
"CloudOperator"
}
className=
"mt-4"
>
<
span
style=
{
{
color
:
"#333"
}
}
>
运营师
</
span
>
<
p
className=
"radio-tip"
>
仅可查看/转发培训计划内容,并查看其负责的用户学习进度
</
p
>
</
Radio
>
</
RadioGroup
>
</
Form
.
Item
>
</
Form
>
</
Col
>
<
Col
span=
{
8
}
>
<
Col
span=
{
6
}
>
<
div
className=
"avatar-box"
>
<
div
className=
"avatar-text"
>
头像
</
div
>
<
div
className=
"avatart-img"
>
...
...
@@ -319,7 +314,7 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
</
div
>
<
div
className=
"upload-avatar"
>
<
Button
id=
"click_upload_btn"
onClick=
{
_onUpload
}
>
点击上传
上传头像
</
Button
>
<
input
type=
"file"
...
...
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