Commit 0a1d36ef by dongjipeng

add

parent 50870ee6
......@@ -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": {
......
......@@ -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({
......
......@@ -24,10 +24,10 @@
</el-table-column>
<el-table-column
align="center"
width="400"
width="350"
label="活动照片">
<template scope="scope">
<img :src="$imgUrlFitness + scope.row.submitPhotoPath" width="220" height="60" style="margin: auto" />
<img :src="$imgUrlFitness + scope.row.submitPhotoPath" @click="imgHandle(scope.row.submitPhotoPath)" width="260" 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._getPhotoList()
this.getActivityList()
},
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>
......
<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._getPhotoList()
this.getActivityList()
},
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
}
})
}
......
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 sign in to comment