7 changed files with 1617 additions and 532 deletions
@ -0,0 +1,387 @@ |
|||||
|
<template> |
||||
|
<div class="dialog-h-content scroll-h"> |
||||
|
<div class="div_table"> |
||||
|
<el-button size="small" |
||||
|
class="diy-button--add" |
||||
|
@click="handleReject">审核拒绝</el-button> |
||||
|
<el-button size="small" |
||||
|
class="diy-button--add" |
||||
|
@click="handleAudit('pass')">审核通过</el-button> |
||||
|
|
||||
|
<el-table class="table" |
||||
|
:data="tableData" |
||||
|
border |
||||
|
@selection-change="selectionChange" |
||||
|
:height="tableHeight" |
||||
|
v-loading="tableLoading" |
||||
|
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
||||
|
style="width: 100%"> |
||||
|
<el-table-column type="selection" |
||||
|
:selectable="checkSelect" |
||||
|
width="55"> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="序号" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
type="index" |
||||
|
width="50"> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column prop="realName" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="姓名" |
||||
|
width="250"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="mobile" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="手机" |
||||
|
width="100"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column prop="idNum" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="身份证" |
||||
|
min-width="180"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="nickName" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="昵称" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="signUpActNum" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="报名活动个数" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="signInActNum" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="实际参加活动个数" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="obtainPointsActNum" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="获得积分活动个数" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="signUpTime" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="报名时间" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="statusShow" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="状态" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
|
||||
|
</el-table> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<!-- 拒绝理由 --> |
||||
|
|
||||
|
<el-dialog :visible.sync="cancleShow" |
||||
|
:close-on-click-modal="false" |
||||
|
:close-on-press-escape="false" |
||||
|
:append-to-body="true" |
||||
|
:title="'拒绝理由'" |
||||
|
width="550px" |
||||
|
top="5vh" |
||||
|
class="dialog-h" |
||||
|
@closed="cancleDiaClose"> |
||||
|
<div style="padding:30px"> |
||||
|
|
||||
|
<el-input class="item_width_5" |
||||
|
type="textarea" |
||||
|
maxlength="100" |
||||
|
show-word-limit |
||||
|
:rows="4" |
||||
|
placeholder="请输入拒绝理由" |
||||
|
v-model="cancelReason"></el-input> |
||||
|
<div style="display:flex; justify-content: center;margin-top:20px"> |
||||
|
<el-button style="margin-left:30px" |
||||
|
size="small" |
||||
|
class="diy-button--search" |
||||
|
@click="cancleDiaClose">取消</el-button> |
||||
|
<el-button style="margin-left:10px" |
||||
|
size="small" |
||||
|
class="diy-button--reset" |
||||
|
@click="handleAudit('refused')">确定</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapGetters } from 'vuex' |
||||
|
import { Loading } from 'element-ui' // 引入Loading服务 |
||||
|
import { requestPost } from '@/js/dai/request' |
||||
|
|
||||
|
let loading // 加载动画 |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
tableLoading: false, |
||||
|
actId: '', |
||||
|
tableData: [], |
||||
|
actUserRelationIdList: [], |
||||
|
|
||||
|
cancelReason: '', |
||||
|
cancleShow: false,//拒绝审核 |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
components: {}, |
||||
|
mounted () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
|
||||
|
async initTable (actId) { |
||||
|
this.actId = actId |
||||
|
await this.loadTable() |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
checkSelect (row, index) { |
||||
|
//待审核:auditing;已通过:passed;已拒绝:refused;已取消:canceled |
||||
|
let isChecked = false; |
||||
|
if (row.status === 'auditing') { // 判断里面是否存在某个参数 |
||||
|
isChecked = true |
||||
|
} else { |
||||
|
isChecked = false |
||||
|
} |
||||
|
return isChecked |
||||
|
}, |
||||
|
|
||||
|
selectionChange (selection) { |
||||
|
this.actUserRelationIdList = [] |
||||
|
this.actUserRelationIdList = selection |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
//加载form |
||||
|
async loadTable () { |
||||
|
this.tableLoading = true |
||||
|
// const url = '/heart/work/act/userlist' |
||||
|
const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/act/userlist' |
||||
|
let params = { |
||||
|
actId: this.actId |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
this.tableLoading = false |
||||
|
if (code === 0) { |
||||
|
|
||||
|
if (data.list && data.list.length > 0) { |
||||
|
data.list.forEach(item => { |
||||
|
//待审核:auditing;已通过:passed;已拒绝:refused;已取消:canceled |
||||
|
if (item.status === 'auditing') { |
||||
|
item.statusShow = '待审核' |
||||
|
} else if (item.status === 'passed') { |
||||
|
item.statusShow = '已通过' |
||||
|
} else if (item.status === 'refused') { |
||||
|
item.statusShow = '已拒绝' |
||||
|
} else if (item.status === 'canceled') { |
||||
|
item.statusShow = '已取消' |
||||
|
} else { |
||||
|
item.statusShow = '' |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
this.tableData = [...data.list] |
||||
|
} else { |
||||
|
this.tableData = [] |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
handleReject () { |
||||
|
// if (this.actUserRelationIdList.length === 0) { |
||||
|
// this.$message({ |
||||
|
// type: "info", |
||||
|
// message: "请选择人员" |
||||
|
// }); |
||||
|
// return false |
||||
|
// } |
||||
|
this.cancleShow = true |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
async handleComfirm (row, tableIndex) { |
||||
|
let valiMsg = this.validata(row) |
||||
|
if (valiMsg) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: valiMsg |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
|
||||
|
this.addReview(row, tableIndex) |
||||
|
|
||||
|
}, |
||||
|
async addReview (row, tableIndex) { |
||||
|
|
||||
|
let url = "/gov/org/placepatrolreviewrecord/add" |
||||
|
if (row.placePatrolReviewRecordId) { |
||||
|
url = "/gov/org/placepatrolreviewrecord/edit" |
||||
|
} |
||||
|
|
||||
|
let params = JSON.parse(JSON.stringify(row)) |
||||
|
params.inspectors = params.inspectorArray.join(',') |
||||
|
params.reviewTime = params.reviewTime + ' 00:00:00' |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
let array = data.reviewTime.split(' ') |
||||
|
data.reviewTime = array[0] |
||||
|
data.isEdit = false |
||||
|
data.isNew = false |
||||
|
|
||||
|
this.$set(this.tableData, tableIndex, data) |
||||
|
|
||||
|
} else { |
||||
|
|
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
async handleAudit (type) { |
||||
|
if (this.actUserRelationIdList.length === 0) { |
||||
|
this.$message({ |
||||
|
type: "info", |
||||
|
message: "请选择人员" |
||||
|
}); |
||||
|
return false |
||||
|
} |
||||
|
if (type = 'refused' && !this.cancelReason) { |
||||
|
this.$message({ |
||||
|
type: "info", |
||||
|
message: "请填写拒绝理由" |
||||
|
}); |
||||
|
return false |
||||
|
} |
||||
|
const url = "/heart/work/actuser/audit-user" |
||||
|
// const url = "http://yapi.elinkservice.cn/mock/245/heart/work/actuser/audit-user" |
||||
|
|
||||
|
let params = { |
||||
|
actId: this.actId, |
||||
|
type: type, |
||||
|
rejectReason: this.cancelReason, |
||||
|
actUserRelationIdList: this.actUserRelationIdList |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
|
||||
|
this.$message({ |
||||
|
type: "success", |
||||
|
message: "操作成功" |
||||
|
}); |
||||
|
|
||||
|
this.loadTable() |
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
cancleDiaClose () { |
||||
|
this.cancelReason = '' |
||||
|
this.cancleShow = false//审核拒绝 |
||||
|
}, |
||||
|
|
||||
|
handleCancle () { |
||||
|
this.$emit('dialogCancle') |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 开启加载动画 |
||||
|
startLoading () { |
||||
|
loading = Loading.service({ |
||||
|
lock: true, // 是否锁定 |
||||
|
text: '正在加载……', // 加载中需要显示的文字 |
||||
|
background: 'rgba(0,0,0,.7)' // 背景颜色 |
||||
|
}) |
||||
|
}, |
||||
|
// 结束加载动画 |
||||
|
endLoading () { |
||||
|
// clearTimeout(timer); |
||||
|
if (loading) { |
||||
|
loading.close() |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
tableHeight () { |
||||
|
|
||||
|
return (this.clientHeight - 360) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
...mapGetters(['clientHeight']) |
||||
|
|
||||
|
}, |
||||
|
props: { |
||||
|
|
||||
|
|
||||
|
resultList: { |
||||
|
type: Array, |
||||
|
default: [] |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
<style lang="scss" scoped > |
||||
|
@import "@/assets/scss/buttonstyle.scss"; |
||||
|
.item_width_1 { |
||||
|
width: 250px; |
||||
|
} |
||||
|
.item_width_2 { |
||||
|
width: 100px; |
||||
|
} |
||||
|
.div_table { |
||||
|
margin-top: 10px; |
||||
|
|
||||
|
.table { |
||||
|
margin-top: 10px; |
||||
|
} |
||||
|
} |
||||
|
.div_btn { |
||||
|
margin-top: 10px; |
||||
|
display: flex; |
||||
|
justify-content: flex-end; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,374 @@ |
|||||
|
<template> |
||||
|
<div class="dialog-h-content scroll-h"> |
||||
|
<div> |
||||
|
<el-form ref="ref_form" |
||||
|
:inline="false" |
||||
|
:model="formData" |
||||
|
:rules="dataRule" |
||||
|
class="div_form "> |
||||
|
<el-form-item label="实际活动时间" |
||||
|
label-width="150px" |
||||
|
style="display: block" |
||||
|
prop="actualStartTime"> |
||||
|
<el-date-picker v-model="formData.actualStartTime" |
||||
|
class="list_item_width_3" |
||||
|
type="datetime" |
||||
|
value-format="yyyy-MM-dd HH:mm" |
||||
|
format="yyyy-MM-dd HH:mm" |
||||
|
placeholder="开始时间"> |
||||
|
</el-date-picker> |
||||
|
<span class="data-tag">至</span> |
||||
|
<el-date-picker v-model="formData.actualEndTime" |
||||
|
class="list_item_width_3 data-tag" |
||||
|
type="datetime" |
||||
|
value-format="yyyy-MM-dd HH:mm" |
||||
|
format="yyyy-MM-dd HH:mm" |
||||
|
placeholder="结束时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="积分发放" |
||||
|
label-width="150px" |
||||
|
style="display: block" |
||||
|
prop="actualStartTime"> |
||||
|
|
||||
|
</el-form-item> |
||||
|
|
||||
|
<div class="div_table"> |
||||
|
<el-table class="m_table" |
||||
|
:data="tableData" |
||||
|
border |
||||
|
:height="tableHeight" |
||||
|
v-loading="tableLoading" |
||||
|
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"> |
||||
|
<el-table-column label="序号" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
type="index" |
||||
|
width="50"> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column prop="realName" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="姓名" |
||||
|
width="150"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column prop="nickName" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="昵称" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="signUpTime" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="报名时间" |
||||
|
width="150"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="signInFlagShow" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="是否签到" |
||||
|
width="100"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column prop="grantPointShow" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="操作" |
||||
|
min-width="200"> |
||||
|
|
||||
|
<template slot-scope="scope"> |
||||
|
|
||||
|
<el-radio v-model="scope.row.grantPointShow" |
||||
|
label="1">给分</el-radio> |
||||
|
<el-radio v-model="scope.row.grantPointShow" |
||||
|
label="2">不给分</el-radio> |
||||
|
|
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column prop="denyRewardReason" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="理由" |
||||
|
min-width="350"> |
||||
|
|
||||
|
<template slot-scope="scope"> |
||||
|
|
||||
|
<el-input class="item_width_5" |
||||
|
placeholder="请输入理由" |
||||
|
v-model="scope.row.denyRewardReason"> |
||||
|
</el-input> |
||||
|
|
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
</el-table> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
|
||||
|
</div> |
||||
|
<div class="div_btn"> |
||||
|
<el-button size="small" |
||||
|
@click="handleCancle">关 闭</el-button> |
||||
|
<el-button type="primary" |
||||
|
size="small" |
||||
|
@click="handleConfirm">确 定</el-button> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapGetters } from 'vuex' |
||||
|
import { Loading } from 'element-ui' // 引入Loading服务 |
||||
|
import { requestPost } from '@/js/dai/request' |
||||
|
|
||||
|
let loading // 加载动画 |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
tableLoading: false, |
||||
|
actId: '', |
||||
|
tableData: [], |
||||
|
|
||||
|
formData: { |
||||
|
actId: '', |
||||
|
actualStartTime: '', |
||||
|
actualEndTime: '', |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
components: {}, |
||||
|
mounted () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
|
||||
|
async initTable (actId) { |
||||
|
this.actId = actId |
||||
|
this.formData.actId = actId |
||||
|
this.formData.actualStartTime = this.actStartTime |
||||
|
this.formData.actualEndTime = this.actEndTime |
||||
|
|
||||
|
await this.loadTable() |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
//点击分队切换人员 |
||||
|
async hancleChangeTeam (row, index, tableIndex) { |
||||
|
this.tableData[tableIndex].inspectorArray = [...[]] |
||||
|
let teamId = this.teamsList[index].teamId |
||||
|
await this.loadInspectors(teamId, tableIndex) |
||||
|
}, |
||||
|
|
||||
|
//加载分队下人员 |
||||
|
async loadInspectors (teamId, tableIndex) { |
||||
|
|
||||
|
const url = '/gov/org/placepatrolteamstaff/getlist' |
||||
|
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteamstaff/getlist' |
||||
|
let params = { |
||||
|
teamId: teamId |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
// let obj = this.tableData[tableIndex] |
||||
|
this.tableData[tableIndex].inspectorsList = [...data] |
||||
|
// this.tableData[tableIndex]= |
||||
|
// obj.inspectorsList = data |
||||
|
// this.$set(this.tableData, tableIndex, obj) |
||||
|
console.log(this.tableData) |
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
//加载form |
||||
|
async loadTable () { |
||||
|
this.tableLoading = true |
||||
|
// const url = '/heart/work/act/userlist' |
||||
|
const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/act/userlist' |
||||
|
let params = { |
||||
|
actId: this.actId |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
this.tableLoading = false |
||||
|
if (code === 0) { |
||||
|
|
||||
|
if (data.list && data.list.length > 0) { |
||||
|
data.list.forEach(item => { |
||||
|
if (item.signInFlag) { |
||||
|
item.signInFlagShow = '是' |
||||
|
item.grantPointShow = '1' |
||||
|
item.grantPoint = true |
||||
|
|
||||
|
item.denyRewardReason = '' |
||||
|
} else { |
||||
|
item.signInFlagShow = '否' |
||||
|
item.grantPointShow = '2' |
||||
|
item.grantPoint = false |
||||
|
item.denyRewardReason = '活动未签到' |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
this.tableData = [...data.list] |
||||
|
} else { |
||||
|
this.tableData = [] |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async handleConfirm () { |
||||
|
if (!this.formData.actualStartTime || !this.formData.actualEndTime) { |
||||
|
this.$message({ |
||||
|
type: "info", |
||||
|
message: '请填写实际活动时间' |
||||
|
}); |
||||
|
return false |
||||
|
} |
||||
|
|
||||
|
|
||||
|
let userList = [] |
||||
|
let reqmsg = '' |
||||
|
// actUserRelationId grantPoint true:给分;false:不给分 denyRewardReason 拒绝理由 |
||||
|
this.tableData.forEach(item => { |
||||
|
let obj = {} |
||||
|
obj.actUserRelationId = item.userId |
||||
|
obj.denyRewardReason = item.denyRewardReason |
||||
|
|
||||
|
if (item.grantPointShow === '1') { |
||||
|
obj.grantPoint = true |
||||
|
} else { |
||||
|
obj.grantPoint = false |
||||
|
if (!item.denyRewardReason) { |
||||
|
reqmsg = '不给分的理由必填' |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
userList.push(obj) |
||||
|
}); |
||||
|
|
||||
|
if (reqmsg) { |
||||
|
this.$message({ |
||||
|
type: "info", |
||||
|
message: reqmsg |
||||
|
}); |
||||
|
return false |
||||
|
} else { |
||||
|
console.log(userList) |
||||
|
this.finishAct(userList) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
}, |
||||
|
async finishAct (userList) { |
||||
|
|
||||
|
// let url = "/heart/work/act/finish" |
||||
|
let url = "http://yapi.elinkservice.cn/mock/245/heart/work/act/finish" |
||||
|
|
||||
|
|
||||
|
let params = { |
||||
|
userList: userList, |
||||
|
...this.formData |
||||
|
} |
||||
|
|
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.$message({ |
||||
|
type: "success", |
||||
|
message: '操作成功' |
||||
|
}); |
||||
|
} else { |
||||
|
|
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
handleCancle () { |
||||
|
this.$emit('finishDiaClose') |
||||
|
}, |
||||
|
|
||||
|
// 开启加载动画 |
||||
|
startLoading () { |
||||
|
loading = Loading.service({ |
||||
|
lock: true, // 是否锁定 |
||||
|
text: '正在加载……', // 加载中需要显示的文字 |
||||
|
background: 'rgba(0,0,0,.7)' // 背景颜色 |
||||
|
}) |
||||
|
}, |
||||
|
// 结束加载动画 |
||||
|
endLoading () { |
||||
|
// clearTimeout(timer); |
||||
|
if (loading) { |
||||
|
loading.close() |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
actualStartTime: [ |
||||
|
{ required: true, message: '活动时间不能为空', trigger: 'blur' } |
||||
|
], |
||||
|
|
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
tableHeight () { |
||||
|
return (this.clientHeight - 440) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
...mapGetters(['clientHeight']) |
||||
|
|
||||
|
}, |
||||
|
props: { |
||||
|
|
||||
|
|
||||
|
actStartTime: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
actEndTime: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
<style lang="scss" scoped > |
||||
|
@import "@/assets/scss/modules/management/form-main.scss"; |
||||
|
|
||||
|
.div_table { |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
.m_table { |
||||
|
flex: 0 0 1200px; |
||||
|
// padding: 20px; |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,338 @@ |
|||||
|
<template> |
||||
|
<div class="dialog-h-content scroll-h"> |
||||
|
<div class="div_table"> |
||||
|
|
||||
|
<el-table class="table" |
||||
|
:data="tableData" |
||||
|
border |
||||
|
:height="tableHeight" |
||||
|
v-loading="tableLoading" |
||||
|
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}" |
||||
|
style="width: 100%"> |
||||
|
|
||||
|
<el-table-column label="序号" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
type="index" |
||||
|
width="50"> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column prop="realName" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="姓名" |
||||
|
width="250"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="mobile" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="手机" |
||||
|
width="100"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column prop="idNum" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="身份证" |
||||
|
min-width="180"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="nickName" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="昵称" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="signUpActNum" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="报名活动个数" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="signInActNum" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="实际参加活动个数" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="obtainPointsActNum" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="获得积分活动个数" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="signUpTime" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="报名时间" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
<el-table-column prop="statusShow" |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
label="状态" |
||||
|
width="120"> |
||||
|
|
||||
|
</el-table-column> |
||||
|
|
||||
|
</el-table> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapGetters } from 'vuex' |
||||
|
import { Loading } from 'element-ui' // 引入Loading服务 |
||||
|
import { requestPost } from '@/js/dai/request' |
||||
|
|
||||
|
let loading // 加载动画 |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
tableLoading: false, |
||||
|
actId: '', |
||||
|
tableData: [], |
||||
|
actUserRelationIdList: [], |
||||
|
|
||||
|
cancelReason: '', |
||||
|
cancleShow: false,//拒绝审核 |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
components: {}, |
||||
|
mounted () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
|
||||
|
async initTable (actId) { |
||||
|
this.actId = actId |
||||
|
await this.loadTable() |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
checkSelect (row, index) { |
||||
|
//待审核:auditing;已通过:passed;已拒绝:refused;已取消:canceled |
||||
|
let isChecked = false; |
||||
|
if (row.status === 'auditing') { // 判断里面是否存在某个参数 |
||||
|
isChecked = true |
||||
|
} else { |
||||
|
isChecked = false |
||||
|
} |
||||
|
return isChecked |
||||
|
}, |
||||
|
|
||||
|
selectionChange (selection) { |
||||
|
this.actUserRelationIdList = [] |
||||
|
this.actUserRelationIdList = selection |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
//加载form |
||||
|
async loadTable () { |
||||
|
this.tableLoading = true |
||||
|
// const url = '/heart/work/act/userlist' |
||||
|
const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/act/userlist' |
||||
|
let params = { |
||||
|
actId: this.actId |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
this.tableLoading = false |
||||
|
if (code === 0) { |
||||
|
|
||||
|
if (data.list && data.list.length > 0) { |
||||
|
data.list.forEach(item => { |
||||
|
//待审核:auditing;已通过:passed;已拒绝:refused;已取消:canceled |
||||
|
if (item.status === 'auditing') { |
||||
|
item.statusShow = '待审核' |
||||
|
} else if (item.status === 'passed') { |
||||
|
item.statusShow = '已通过' |
||||
|
} else if (item.status === 'refused') { |
||||
|
item.statusShow = '已拒绝' |
||||
|
} else if (item.status === 'canceled') { |
||||
|
item.statusShow = '已取消' |
||||
|
} else { |
||||
|
item.statusShow = '' |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
this.tableData = [...data.list] |
||||
|
} else { |
||||
|
this.tableData = [] |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
handleReject () { |
||||
|
// if (this.actUserRelationIdList.length === 0) { |
||||
|
// this.$message({ |
||||
|
// type: "info", |
||||
|
// message: "请选择人员" |
||||
|
// }); |
||||
|
// return false |
||||
|
// } |
||||
|
this.cancleShow = true |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
async handleComfirm (row, tableIndex) { |
||||
|
let valiMsg = this.validata(row) |
||||
|
if (valiMsg) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: valiMsg |
||||
|
}) |
||||
|
return false |
||||
|
} |
||||
|
|
||||
|
this.addReview(row, tableIndex) |
||||
|
|
||||
|
}, |
||||
|
async addReview (row, tableIndex) { |
||||
|
|
||||
|
let url = "/gov/org/placepatrolreviewrecord/add" |
||||
|
if (row.placePatrolReviewRecordId) { |
||||
|
url = "/gov/org/placepatrolreviewrecord/edit" |
||||
|
} |
||||
|
|
||||
|
let params = JSON.parse(JSON.stringify(row)) |
||||
|
params.inspectors = params.inspectorArray.join(',') |
||||
|
params.reviewTime = params.reviewTime + ' 00:00:00' |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
let array = data.reviewTime.split(' ') |
||||
|
data.reviewTime = array[0] |
||||
|
data.isEdit = false |
||||
|
data.isNew = false |
||||
|
|
||||
|
this.$set(this.tableData, tableIndex, data) |
||||
|
|
||||
|
} else { |
||||
|
|
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
async handleAudit (type) { |
||||
|
if (this.actUserRelationIdList.length === 0) { |
||||
|
this.$message({ |
||||
|
type: "info", |
||||
|
message: "请选择人员" |
||||
|
}); |
||||
|
return false |
||||
|
} |
||||
|
if (type = 'refused' && !this.cancelReason) { |
||||
|
this.$message({ |
||||
|
type: "info", |
||||
|
message: "请填写拒绝理由" |
||||
|
}); |
||||
|
return false |
||||
|
} |
||||
|
const url = "/heart/work/act/audit-user" |
||||
|
// const url = "http://yapi.elinkservice.cn/mock/245/heart/work/act/audit-user" |
||||
|
|
||||
|
let params = { |
||||
|
actId: this.actId, |
||||
|
type: type, |
||||
|
rejectReason: this.cancelReason, |
||||
|
actUserRelationIdList: this.actUserRelationIdList |
||||
|
} |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params) |
||||
|
|
||||
|
if (code === 0) { |
||||
|
|
||||
|
this.$message({ |
||||
|
type: "success", |
||||
|
message: "操作成功" |
||||
|
}); |
||||
|
|
||||
|
this.loadTable() |
||||
|
} else { |
||||
|
this.$message.error(msg) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
cancleDiaClose () { |
||||
|
this.cancelReason = '' |
||||
|
this.cancleShow = false//审核拒绝 |
||||
|
}, |
||||
|
|
||||
|
handleCancle () { |
||||
|
this.$emit('dialogCancle') |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 开启加载动画 |
||||
|
startLoading () { |
||||
|
loading = Loading.service({ |
||||
|
lock: true, // 是否锁定 |
||||
|
text: '正在加载……', // 加载中需要显示的文字 |
||||
|
background: 'rgba(0,0,0,.7)' // 背景颜色 |
||||
|
}) |
||||
|
}, |
||||
|
// 结束加载动画 |
||||
|
endLoading () { |
||||
|
// clearTimeout(timer); |
||||
|
if (loading) { |
||||
|
loading.close() |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
tableHeight () { |
||||
|
|
||||
|
return (this.clientHeight - 360) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
...mapGetters(['clientHeight']) |
||||
|
|
||||
|
}, |
||||
|
props: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
<style lang="scss" scoped > |
||||
|
@import "@/assets/scss/buttonstyle.scss"; |
||||
|
.item_width_1 { |
||||
|
width: 250px; |
||||
|
} |
||||
|
.item_width_2 { |
||||
|
width: 100px; |
||||
|
} |
||||
|
.div_table { |
||||
|
margin-top: 10px; |
||||
|
|
||||
|
.table { |
||||
|
margin-top: 10px; |
||||
|
} |
||||
|
} |
||||
|
.div_btn { |
||||
|
margin-top: 10px; |
||||
|
display: flex; |
||||
|
justify-content: flex-end; |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue