Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
happiness-plus-platform-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0a1d36ef
authored
Apr 30, 2020
by
dongjipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
50870ee6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
28 deletions
+78
-28
package.json
+2
-1
src/main.js
+36
-8
src/views/fitness/ActivityShenhe.vue
+28
-11
src/views/fitness/FitActivity.vue
+12
-8
No files found.
package.json
View file @
0a1d36ef
...
...
@@ -4,7 +4,8 @@
"private"
:
true
,
"scripts"
:
{
"serve"
:
"vue-cli-service serve"
,
"build"
:
"vue-cli-service build"
,
"alpha"
:
"vue-cli-service build --mode alpha"
,
"build"
:
"vue-cli-service build --mode build"
,
"lint"
:
"vue-cli-service lint"
},
"dependencies"
:
{
...
...
src/main.js
View file @
0a1d36ef
...
...
@@ -23,27 +23,59 @@ Vue.prototype.$qs = QS
const
DOMAIN_NAME
=
'cfldcn'
// const DOMAIN_NAME = 'cfldpe'
var
ssoHttp
=
''
// if (process.env.NODE_ENV === 'development') { // 开发
// ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/'
// Vue.prototype.$ssoHttp = ssoHttp
// axios.defaults.baseURL = 'http://10.2.98.32:8091/admin/'
// Vue.prototype.$baseURL = 'http://10.2.98.32:8091/admin/'
// Vue.prototype.$imgUrl = 'http://10.2.98.32:8091/admin/images/'
// Vue.prototype.$imgUrlFitness = 'http://10.2.98.32:8091/admin/exerciseImages/'
// } else { // 生产
// ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/'
// Vue.prototype.$ssoHttp = ssoHttp
// // cookie
// getCookie(ssoHttp)
// axios.defaults.baseURL = 'http://happy.' + DOMAIN_NAME + '.com/admin/'
// Vue.prototype.$baseURL = 'http://happy.' + DOMAIN_NAME + '.com/admin/'
// Vue.prototype.$imgUrl = 'http://happy.' + DOMAIN_NAME + '.com/admin/images/'
// Vue.prototype.$imgUrlFitness = 'http://happy.' + DOMAIN_NAME + '.com/admin/exerciseImages/'
// }
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
// 开发
// 判断环境变量,执行对应打包命令
console
.
log
(
'当前环境变量'
,
process
.
env
.
VUE_APP_TITLE
)
switch
(
process
.
env
.
VUE_APP_TITLE
)
{
case
'development'
:
ssoHttp
=
'http://sso.'
+
DOMAIN_NAME
+
'.com/'
Vue
.
prototype
.
$ssoHttp
=
ssoHttp
axios
.
defaults
.
baseURL
=
'http://10.2.98.32:8091/admin/'
Vue
.
prototype
.
$baseURL
=
'http://10.2.98.32:8091/admin/'
Vue
.
prototype
.
$imgUrl
=
'http://10.2.98.32:8091/admin/images/'
Vue
.
prototype
.
$imgUrlFitness
=
'http://10.2.98.32:8091/admin/exerciseImages/'
}
else
{
// 生产
break
case
'alpha'
:
// 注意这里的名字要和步骤二中设置的环境名字对应起来
ssoHttp
=
'http://sso.'
+
DOMAIN_NAME
+
'.com/'
Vue
.
prototype
.
$ssoHttp
=
ssoHttp
axios
.
defaults
.
baseURL
=
'http://10.2.98.32:8081/admin/'
Vue
.
prototype
.
$baseURL
=
'http://10.2.98.32:8081/admin/'
Vue
.
prototype
.
$imgUrl
=
'http://10.2.98.32:8081/admin/images/'
Vue
.
prototype
.
$imgUrlFitness
=
'http://10.2.98.32:8081/admin/exerciseImages/'
break
case
'production'
:
ssoHttp
=
'http://sso.'
+
DOMAIN_NAME
+
'.com/'
Vue
.
prototype
.
$ssoHttp
=
ssoHttp
// cookie
getCookie
(
ssoHttp
)
axios
.
defaults
.
baseURL
=
'http://happy.'
+
DOMAIN_NAME
+
'.com/admin/'
Vue
.
prototype
.
$baseURL
=
'http://happy.'
+
DOMAIN_NAME
+
'.com/admin/'
Vue
.
prototype
.
$imgUrl
=
'http://happy.'
+
DOMAIN_NAME
+
'.com/admin/images/'
Vue
.
prototype
.
$imgUrlFitness
=
'http://happy.'
+
DOMAIN_NAME
+
'.com/admin/exerciseImages/'
break
}
axios
.
defaults
.
timeout
=
50000
axios
.
defaults
.
headers
.
post
[
'Content-Type'
]
=
'application/x-www-form-urlencoded;charset=UTF-8'
axios
.
defaults
.
withCredentials
=
true
// Loading效果
const
elemLoading
=
{
loading
:
null
,
...
...
@@ -55,10 +87,6 @@ const elemLoading = {
}
}
axios
.
defaults
.
timeout
=
50000
axios
.
defaults
.
headers
.
post
[
'Content-Type'
]
=
'application/x-www-form-urlencoded;charset=UTF-8'
axios
.
defaults
.
withCredentials
=
true
// 请求拦截器
axios
.
interceptors
.
request
.
use
(
request
=>
{
elemLoading
.
start
({
...
...
src/views/fitness/ActivityShenhe.vue
View file @
0a1d36ef
...
...
@@ -24,10 +24,10 @@
</el-table-column>
<el-table-column
align=
"center"
width=
"
40
0"
width=
"
35
0"
label=
"活动照片"
>
<template
scope=
"scope"
>
<img
:src=
"$imgUrlFitness + scope.row.submitPhotoPath"
width=
"22
0"
height=
"60"
style=
"margin: auto"
/>
<img
:src=
"$imgUrlFitness + scope.row.submitPhotoPath"
@
click=
"imgHandle(scope.row.submitPhotoPath)"
width=
"26
0"
height=
"60"
style=
"margin: auto"
/>
</
template
>
</el-table-column>
<el-table-column
...
...
@@ -48,7 +48,8 @@
label=
"操作"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"onShenhe(scope.row)"
>
审核
</el-button>
<el-button
type=
"primary"
size=
"small"
v-if=
"scope.row.isCheck == 0"
@
click=
"onShenhe(scope.row)"
>
审核
</el-button>
<el-button
type=
"primary"
disabled
size=
"small"
v-else
>
已审核
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -62,6 +63,14 @@
:total=
"totalPage"
>
</el-pagination>
</div>
<el-dialog
title=
"活动照片"
:visible
.
sync=
"imgDialogVisible"
width=
"45%"
>
<div
class=
"img_warp"
>
<img
:src=
"$imgUrlFitness + bigImg"
alt=
""
style=
"width: 100%; height: auto"
>
</div>
</el-dialog>
</div>
</template>
...
...
@@ -85,7 +94,9 @@ export default {
personIdMdm
:
''
,
dept
:
''
,
p
:
''
,
c
:
''
c
:
''
,
bigImg
:
''
,
imgDialogVisible
:
false
}
},
mounted
()
{
...
...
@@ -97,26 +108,27 @@ export default {
},
handleCurrentChange
:
function
(
currentPage
)
{
this
.
currentPage
=
currentPage
this
.
_getPhoto
List
()
this
.
getActivity
List
()
},
getActivityList
()
{
this
.
$axios
.
get
(
'/exercise/exerciseActivityApplySubmitList'
,
{
params
:
{
'p'
:
this
.
currentPage
,
'c'
:
this
.
pageSize
,
'personIdMdm'
:
this
.
$store
.
state
.
userInfor
.
personIdMdm
,
'dept'
:
this
.
$store
.
state
.
userInfor
.
deptId
'c'
:
this
.
pageSize
}
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
)
{
this
.
totalPage
=
res
.
count
this
.
photoList
=
res
.
list
let
list
=
res
.
list
list
.
map
(
item
=>
{
item
.
activityTitle
=
'第五届华夏幸福长跑节线上赛'
})
this
.
photoList
=
list
}
})
},
onShenhe
(
data
)
{
console
.
log
(
data
)
if
(
data
.
id
&&
data
.
checkSubmitDistance
)
{
this
.
$axios
.
get
(
'/exercise/exerciseActivityApplySubmitCheck'
,
{
params
:
{
'applySubmitId'
:
data
.
id
,
...
...
@@ -132,6 +144,11 @@ export default {
}
})
}
},
imgHandle
(
imgUrl
)
{
// 查看大图
this
.
bigImg
=
imgUrl
this
.
imgDialogVisible
=
true
},
}
}
</
script
>
...
...
src/views/fitness/FitActivity.vue
View file @
0a1d36ef
<
template
>
<div>
<div
class=
"btn-warp tr mb20"
>
<!--
<el-button
type=
"primary"
size=
"small"
>
导出
</el-button>
-->
<el-button
type=
"primary"
class=
"el-button-link"
>
<a
:href=
"$baseURL + 'exercise/exerciseActivityApplyExport'"
>
导出
</a>
</el-button>
<el-button
type=
"primary"
class=
"el-button-link"
><router-link
to=
"/fitness/activityShenhe"
style=
"color: #fff"
>
活动审核
</router-link></el-button>
</div>
<el-table
...
...
@@ -14,8 +16,7 @@
</el-table-column>
<el-table-column
prop=
"activityTime"
align=
"center"
width=
"160"
width=
"270"
label=
"活动时间"
>
</el-table-column>
<el-table-column
...
...
@@ -85,20 +86,23 @@ export default {
},
handleCurrentChange
:
function
(
currentPage
)
{
this
.
currentPage
=
currentPage
this
.
_getPhoto
List
()
this
.
getActivity
List
()
},
getActivityList
()
{
this
.
$axios
.
get
(
'/exercise/exerciseActivityApplyList'
,
{
params
:
{
'p'
:
this
.
currentPage
,
'c'
:
this
.
pageSize
,
'personIdMdm'
:
this
.
$store
.
state
.
userInfor
.
personIdMdm
,
'dept'
:
this
.
$store
.
state
.
userInfor
.
deptId
'c'
:
this
.
pageSize
}
}).
then
(
res
=>
{
if
(
res
)
{
this
.
totalPage
=
res
.
count
this
.
photoList
=
res
.
list
let
list
=
res
.
list
list
.
map
(
item
=>
{
item
.
activityTitle
=
'第五届华夏幸福长跑节线上赛'
item
.
activityTime
=
'2020年4月30日 16:30 -- 5月5日 22:00'
})
this
.
photoList
=
list
}
})
}
...
...
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