Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
9f132cf5
Commit
9f132cf5
authored
Feb 21, 2020
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP新增需求完成
parent
354b19fb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
156 additions
and
21 deletions
+156
-21
index.html
index.html
+1
-1
api.js
src/common/api.js
+1
-0
createtheme.js
src/models/createtheme.js
+31
-5
officialtheme.js
src/models/officialtheme.js
+12
-11
detail.js
src/pages/newtheme/customsclock/detail.js
+83
-2
index.js
src/pages/officialweb/index.js
+3
-1
themeclass.js
src/pages/officialweb/themeclass/themeclass.js
+0
-1
createtheme.js
src/services/createtheme.js
+8
-0
exportexcel.js
src/utils/exportexcel.js
+17
-0
No files found.
index.html
View file @
9f132cf5
...
...
@@ -18,5 +18,5 @@
</head>
<body>
<div
id=
"root"
></div>
<script
type=
"text/javascript"
src=
"/dist/main.
857db3
.js"
></script></body>
<script
type=
"text/javascript"
src=
"/dist/main.
7a5d06
.js"
></script></body>
</html>
\ No newline at end of file
src/common/api.js
View file @
9f132cf5
...
...
@@ -181,6 +181,7 @@ export default {
edit_unlock_subject
:
`
${
dakaapi
}
member/unlock_subject/update`
,
unlockSubjectDetail
:
`
${
dakaapi
}
member/unlock_subject/detail`
,
unlockAddSubjectCount
:
`
${
dakaapi
}
member/unlock_subject/add_subject_count`
,
unlock_student_export
:
`
${
dakaapi
}
member/erp/student/unlock_student_export`
,
},
getschooluuid
:
`
${
dakaapi
}
member/school_uuid`
,
analyzeCenter
:
{
...
...
src/models/createtheme.js
View file @
9f132cf5
...
...
@@ -20,6 +20,7 @@ import * as uploader from '../services/uploader';
import
{
calendar
}
from
'../utils/calendar'
;
import
*
as
goodsAjax
from
'../services/integral'
;
import
*
as
commonAjax
from
'../services/common'
;
import
exportExcel
from
'../utils/exportexcel'
;
export
default
{
namespace
:
'createtheme'
,
state
:
{
...
...
@@ -158,7 +159,7 @@ export default {
},
],
sign_up_content
:
''
,
ad_banner
:
''
,
ad_banner
:
'
https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/morethemeindex/adbanner.png
'
,
jump_type
:
1
,
},
radioname
:
''
,
...
...
@@ -513,14 +514,14 @@ export default {
push_status
:
emigratedDate
.
data
.
push_status
,
push_time
:
emigratedDate
.
data
.
push_time
,
sign_up_status
:
emigratedDate
.
data
.
sign_up_status
,
banner
:
emigratedDate
.
data
.
banner
?
emigratedDate
.
data
.
banner
:
''
,
banner
:
emigratedDate
.
data
.
banner
?
emigratedDate
.
data
.
banner
:
'
https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png
'
,
content
:
emigratedDate
.
data
.
introduce
&&
emigratedDate
.
data
.
introduce
!=
null
&&
JSON
.
parse
(
emigratedDate
.
data
.
introduce
)
&&
JSON
.
parse
(
emigratedDate
.
data
.
introduce
)[
0
]
&&
JSON
.
parse
(
emigratedDate
.
data
.
introduce
)[
0
].
content
?
JSON
.
parse
(
emigratedDate
.
data
.
introduce
)
:
[
{
title
:
emigratedDate
.
data
.
introduce
&&
emigratedDate
.
data
.
introduce
!=
null
&&
JSON
.
parse
(
emigratedDate
.
data
.
introduce
).
title
?
JSON
.
parse
(
emigratedDate
.
data
.
introduce
).
title
:
''
,
content
:
emigratedDate
.
data
.
introduce
&&
emigratedDate
.
data
.
introduce
!=
null
&&
JSON
.
parse
(
emigratedDate
.
data
.
introduce
).
content
?
JSON
.
parse
(
emigratedDate
.
data
.
introduce
).
content
:
(
JSON
.
parse
(
emigratedDate
.
data
.
introduce
)
||
[]),
},
],
ad_banner
:
emigratedDate
.
data
.
ad_banner
,
ad_banner
:
emigratedDate
.
data
.
ad_banner
?
emigratedDate
.
data
.
ad_banner
:
'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/morethemeindex/adbanner.png'
,
jump_type
:
emigratedDate
.
data
.
jump_type
,
},
radioname
:
emigratedDate
.
data
.
sign_up_content
?
JSON
.
parse
(
emigratedDate
.
data
.
sign_up_content
).
radioname
:
''
,
...
...
@@ -1533,7 +1534,7 @@ export default {
},
],
sign_up_content
:
''
,
ad_banner
:
''
,
ad_banner
:
'
https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/morethemeindex/adbanner.png
'
,
jump_type
:
1
,
},
radioList
:
[],
...
...
@@ -2203,6 +2204,31 @@ export default {
});
}
},
// 闯关学员导出 UnlockStudentExport
*
exportStudentExcel
({
payload
},
{
call
,
put
,
select
})
{
const
{
columns
}
=
payload
;
const
{
emigratedObj
}
=
yield
select
(
state
=>
state
.
createtheme
);
const
loading
=
message
.
loading
(
'导出数据中...'
,
1
);
const
data
=
yield
call
(
themeAjax
.
UnlockStudentExport
,
{
mode_id
:
emigratedObj
.
id
,
});
setTimeout
(
loading
);
if
(
data
.
code
==
200
)
{
const
list
=
(
data
.
data
&&
data
.
data
.
list
)
||
[];
if
(
list
.
length
>
0
)
{
exportExcel
(
columns
,
list
,
'闯关打卡学员列表.xlsx'
,
'unlockStudent'
);
}
else
{
message
.
error
(
'暂时没有数据可以导出!'
,
0.5
);
}
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
pageInit
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'updateState'
,
...
...
@@ -2342,7 +2368,7 @@ export default {
},
],
sign_up_content
:
''
,
ad_banner
:
''
,
ad_banner
:
'
https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/morethemeindex/adbanner.png
'
,
jump_type
:
1
,
},
radioname
:
''
,
...
...
src/models/officialtheme.js
View file @
9f132cf5
...
...
@@ -274,10 +274,13 @@ export default {
themeSortLoading
,
courseList
,
}
=
yield
select
(
state
=>
state
.
officialtheme
);
if
(
courseList
.
length
===
0
)
{
message
.
error
(
'请先添加课程之后在进行排序'
,
0.5
);
return
;
}
if
(
themeSortLoading
)
{
return
;
}
console
.
log
(
JSON
.
stringify
(
courseList
),
'JSON.stringify(courseList)'
);
yield
put
({
type
:
'updateState'
,
payload
:
{
...
...
@@ -314,20 +317,18 @@ export default {
const
{
index
,
direction
}
=
payload
;
const
{
courseList
}
=
yield
select
(
state
=>
state
.
officialtheme
);
const
newContent
=
[];
console
.
log
(
index
,
'index'
);
console
.
log
(
direction
,
'direction'
);
const
currentImg
=
courseList
[
index
];
const
preImg
=
courseList
[
index
-
1
];
const
afterImg
=
courseList
[
index
+
1
];
if
(
direction
==
'up'
)
{
courseList
.
splice
(
index
-
1
,
2
,
currentImg
,
preImg
);
}
else
if
(
direction
==
'down'
)
{
courseList
.
splice
(
index
,
2
,
afterImg
,
currentImg
);
}
// eslint-disable-next-line array-callback-return
courseList
.
map
(((
item
,
tp
)
=>
{
newContent
.
push
(
Object
.
assign
(
item
,
{
sort
:
tp
+
1
}));
}));
const
currentImg
=
newContent
[
index
];
const
preImg
=
newContent
[
index
-
1
];
const
afterImg
=
newContent
[
index
+
1
];
if
(
direction
==
'up'
)
{
newContent
.
splice
(
index
-
1
,
2
,
currentImg
,
preImg
);
}
else
if
(
direction
==
'down'
)
{
newContent
.
splice
(
index
,
2
,
afterImg
,
currentImg
);
}
yield
put
({
type
:
'updateState'
,
payload
:
{
...
...
src/pages/newtheme/customsclock/detail.js
View file @
9f132cf5
...
...
@@ -121,7 +121,6 @@ class SuccessStoreForm extends React.Component {
}
delete
=
(
record
)
=>
{
const
{
dispatch
}
=
this
.
props
;
console
.
log
(
record
,
'record'
);
if
(
record
.
sort
===
1
)
{
message
.
error
(
'第一关不能删除!'
,
0.5
);
return
;
...
...
@@ -150,6 +149,15 @@ class SuccessStoreForm extends React.Component {
},
});
}
exportExcelStudent
=
(
columns
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'createtheme/exportStudentExcel'
,
payload
:
{
columns
,
},
});
}
render
()
{
const
{
form
:
{
getFieldDecorator
,
getFieldValue
},
...
...
@@ -160,7 +168,6 @@ class SuccessStoreForm extends React.Component {
previewQrcode
,
downloadTitle
,
}
=
this
.
props
;
console
.
log
(
emigratedObj
,
'emigratedObj'
);
const
columns
=
[
{
title
:
'关卡名称'
,
...
...
@@ -219,6 +226,78 @@ class SuccessStoreForm extends React.Component {
},
},
];
const
exportColumns
=
[
{
title
:
'微信昵称'
,
dataIndex
:
'wechat_user'
,
key
:
'wechat_user'
,
render
:
(
text
,
record
)
=>
{
return
(
<
span
>
{
record
.
wechat_user
&&
record
.
wechat_user
.
nickname
?
record
.
wechat_user
.
nickname
:
'-'
}
<
/span
>
);
},
},
{
title
:
'闯关数'
,
dataIndex
:
'unlock_count'
,
key
:
'unlock_count'
,
},
{
title
:
'被点评'
,
dataIndex
:
'review_count'
,
key
:
'review_count'
,
},
{
title
:
'老师评分总分'
,
dataIndex
:
'review_score'
,
key
:
'review_score'
,
},
{
title
:
'被点赞'
,
dataIndex
:
'passive_like_count'
,
key
:
'passive_like_count'
,
},
{
title
:
'精选数量'
,
dataIndex
:
'place_top_at_count'
,
key
:
'place_top_at_count'
,
},
{
title
:
'带来访客'
,
dataIndex
:
'total_share_uv'
,
key
:
'total_share_uv'
,
},
{
title
:
'姓名'
,
dataIndex
:
'name'
,
key
:
'name'
,
render
:
(
text
,
record
)
=>
{
return
(
<
span
>
{
record
.
infoCollection
&&
record
.
infoCollection
.
name
?
record
.
infoCollection
.
name
:
'-'
}
<
/span
>
);
},
},
{
title
:
'手机号'
,
dataIndex
:
'mobile'
,
key
:
'mobile'
,
render
:
(
text
,
record
)
=>
{
return
(
<
span
>
{
record
.
infoCollection
&&
record
.
infoCollection
.
mobile
?
record
.
infoCollection
.
mobile
:
'-'
}
<
/span
>
);
},
},
{
title
:
'信息收集'
,
dataIndex
:
'value'
,
key
:
'value'
,
render
:
(
text
,
record
)
=>
{
return
(
<
span
>
{
record
.
infoCollection
&&
record
.
infoCollection
.
content
?
JSON
.
parse
(
record
.
infoCollection
.
content
).
value
:
'-'
}
<
/span
>
);
},
},
];
return
(
<
div
className
=
{
pageStyle
.
container
}
>
...
...
@@ -231,6 +310,8 @@ class SuccessStoreForm extends React.Component {
<
/div
>
<
/div
>
<
div
>
<
span
className
=
"hreflink"
onClick
=
{()
=>
this
.
exportExcelStudent
(
exportColumns
)}
>
导出学员
<
/span
>
<
Divider
type
=
"vertical"
/>
<
span
className
=
"hreflink"
onClick
=
{()
=>
this
.
handleRemark
(
emigratedObj
)}
>
点评作业
<
/span
>
<
Divider
type
=
"vertical"
/>
<
span
className
=
"hreflink"
onClick
=
{()
=>
this
.
editStore
(
emigratedObj
.
id
)}
>
编辑
<
/span
>
...
...
src/pages/officialweb/index.js
View file @
9f132cf5
...
...
@@ -193,7 +193,9 @@ class Officialweb extends React.Component {
<
Button
type
=
"primary"
onClick
=
{
this
.
editor
}
className
=
{
pageStyle
.
editBtn
}
>
装修主页
<
/Button
>
<
/BtnPermission
>
}
<
Button
type
=
"primary"
onClick
=
{
this
.
editThemeClass
}
className
=
{
pageStyle
.
editBtn
}
style
=
{{
marginLeft
:
30
}}
>
装修主题课
<
/Button
>
<
BtnPermission
btnId
=
"80001"
>
<
Button
type
=
"primary"
onClick
=
{
this
.
editThemeClass
}
className
=
{
pageStyle
.
editBtn
}
style
=
{{
marginLeft
:
30
}}
>
装修主题课
<
/Button
>
<
/BtnPermission
>
<
div
className
=
{
pageStyle
.
websiteeditdesc
}
>
左图是您微官网当前的预览效果。
<
br
/>
...
...
src/pages/officialweb/themeclass/themeclass.js
View file @
9f132cf5
...
...
@@ -184,7 +184,6 @@ class ThemeClassForm extends React.Component {
themeListParams
,
themeSortLoading
,
}
=
this
.
props
;
console
.
log
(
courseList
,
'courseList'
);
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
topHead
}
>
...
...
src/services/createtheme.js
View file @
9f132cf5
...
...
@@ -109,3 +109,11 @@ export function unlockDelete(params) {
data
,
});
}
export
function
UnlockStudentExport
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
createtheme
.
unlock_student_export
}
?
${
data
}
`
,
method
:
'GET'
,
data
,
});
}
src/utils/exportexcel.js
View file @
9f132cf5
...
...
@@ -36,6 +36,23 @@ function exportExcel(headers, data, fileName = 'XXX.xlsx', type) {
};
});
break
;
case
'unlockStudent'
:
// eslint-disable-next-line array-callback-return
thisdata
=
data
.
map
((
item
)
=>
{
return
{
wechat_user
:
item
.
wechat_user
&&
item
.
wechat_user
.
nickname
?
item
.
wechat_user
.
nickname
:
''
,
unlock_count
:
item
.
unlock_count
?
item
.
unlock_count
:
'-'
,
review_count
:
item
.
review_count
,
review_score
:
item
.
review_score
,
passive_like_count
:
item
.
passive_like_count
,
place_top_at_count
:
item
.
place_top_at_count
,
total_share_uv
:
item
.
total_share_uv
,
name
:
item
.
infoCollection
&&
item
.
infoCollection
.
name
?
item
.
infoCollection
.
name
:
''
,
mobile
:
item
.
infoCollection
&&
item
.
infoCollection
.
mobile
?
item
.
infoCollection
.
mobile
:
''
,
value
:
item
.
infoCollection
&&
item
.
infoCollection
.
content
?
JSON
.
parse
(
item
.
infoCollection
.
content
).
value
:
''
,
};
});
break
;
default
:
thisdata
=
data
;
break
;
...
...
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