积分
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
<script>
|
||||
import Detail from './components/Detail'
|
||||
import List from './components/List'
|
||||
import Add from './components/Add'
|
||||
|
||||
export default {
|
||||
name: 'AppIntegratingAudit',
|
||||
@@ -29,7 +28,6 @@
|
||||
},
|
||||
|
||||
components: {
|
||||
Add,
|
||||
List,
|
||||
Detail
|
||||
},
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
<template>
|
||||
<ai-detail class="content-add">
|
||||
<template slot="title">
|
||||
<ai-title :title="params.id ? '编辑帖子' : '我要发帖'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="发帖信息">
|
||||
<template #content>
|
||||
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
||||
<el-form-item label="发布单位" prop="publishDepartName" style="width: 100%;" :rules="[{ required: true, message: '请选择单位', trigger: 'change' }]">
|
||||
<ai-picker :instance="instance" multiple @pick="e => onUserChange(e)" dialogTitle="选择部门" action="/app/wxcp/wxdepartment/departList">
|
||||
<div class="time-select">
|
||||
<span class="dept-name" style="color:#999;" v-if="!form.publishDepartName">选择部门</span>
|
||||
<span class="dept-name" v-else>{{form.publishDepartName}}</span>
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</div>
|
||||
</ai-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布内容" prop="content" style="width: 100%;" :rules="[{required: true, message: '请输入发布内容', trigger: 'change'}]">
|
||||
<!-- <ai-editor v-model="form.content" :instance="instance"/> -->
|
||||
<el-input type="textarea" placeholder="请输入内容" v-model="form.content" rows="8" maxlength="500" :show-word-limit="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="files" style="width: 100%;">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
v-model="form.files"
|
||||
isShowTip
|
||||
:limit="9">
|
||||
</ai-uploader>
|
||||
</el-form-item>
|
||||
<el-form-item prop="themeId" style="width: 100%;" label="关联话题">
|
||||
<ai-select v-model="form.themeId" :selectList="talkList" placeholder="请选择关联话题" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="confirm">提交</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'Add',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
info: {},
|
||||
form: {
|
||||
themeId: '',
|
||||
content: '',
|
||||
files: [],
|
||||
publishDepartName: '',
|
||||
publishDepartIdList: [],
|
||||
},
|
||||
id: '',
|
||||
department: [],
|
||||
talkList: [],
|
||||
isFlag: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getInfo(this.params.id)
|
||||
}
|
||||
this.getTalkList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data
|
||||
this.form.publishDepartIdList = this.form.publishDepartId.split(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
if(this.isFlag) return
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.isFlag = true
|
||||
this.instance.post(`/app/appneighborhoodassistance/addOrUpdate`, {
|
||||
...this.form,
|
||||
publishDepartId: this.form.publishDepartIdList.join(',')
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
setTimeout(() => {
|
||||
this.cancel(true)
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
},
|
||||
|
||||
onChange (e) {
|
||||
if (e.length) {
|
||||
this.form.publishDepartIdList = e.map(v => v.id)
|
||||
this.form.publishDepartName = e.map(v => v.name).join(',')
|
||||
} else {
|
||||
this.form.publishDepartIdList = ''
|
||||
this.form.publishDepartName = ''
|
||||
}
|
||||
},
|
||||
|
||||
onUserChange (e) {
|
||||
this.deptList = e
|
||||
this.onChange(e)
|
||||
},
|
||||
|
||||
getTalkList() {
|
||||
this.instance.post(`/app/appneighborhoodassistancetheme/list?size=100`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.talkList = []
|
||||
res.data.records.map((item) => {
|
||||
this.talkList.push({
|
||||
dictName: item.title,
|
||||
dictValue: item.id
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.time-select {
|
||||
padding: 0 16px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
border: 1px solid #d0d4dc;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
.el-icon-arrow-down {
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,71 +1,52 @@
|
||||
<template>
|
||||
<ai-detail class="detail">
|
||||
<template slot="title">
|
||||
<ai-title title="帖子详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
<ai-title title="积分审核" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="帖子信息">
|
||||
<ai-card title="基本信息">
|
||||
<template #right>
|
||||
<el-button size="small" type="primary" @click="isShow = true" v-if="info.status === '0'">审核</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
<div class="talk-info">
|
||||
<div class="user">
|
||||
<img :src="info.createUserAvatar" alt="">
|
||||
<div class="info">
|
||||
<h2>{{info.createUserName}}</h2>
|
||||
<div class="time-flex">
|
||||
<span class="area-name">{{info.publishDepartName}}</span>
|
||||
<span>{{info.createTime}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<span v-if="info.themeId">#【{{info.themeInfo.title}}】</span>{{info.content}}
|
||||
</div>
|
||||
<ai-uploader :instance="instance" disabled v-model="info.files">
|
||||
</ai-uploader>
|
||||
</div>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="评论信息">
|
||||
<template #content>
|
||||
<div class="comment-list" v-if="commontList.length">
|
||||
<div class="title">评论</div>
|
||||
<div class="item" v-for="(item, index) in commontList" :key="index">
|
||||
<div class="user">
|
||||
<img :src="item.createUserAvatar" alt="">
|
||||
<div class="info-flex">
|
||||
<h2>{{item.createUserName}}</h2>
|
||||
<span>{{item.createTime}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-flex">
|
||||
<p>{{item.content}}</p>
|
||||
<div @click="delCommontOrReply('评论', item.id)">删除</div>
|
||||
</div>
|
||||
<div class="reply-list" v-if="item.replyList && item.replyList.length && item.isShowReply">
|
||||
<div class="reply-item" v-for="(reply, indexs) in item.replyList" :key="indexs">
|
||||
<div class="reply-user">
|
||||
<img :src="item.createUserAvatar" alt="">
|
||||
<div class="reply-name">
|
||||
<span>{{reply.createUserName}}</span>回复<span>{{item.createUserName}}</span>
|
||||
</div>
|
||||
<span class="reply-time">{{reply.createTime}}</span>
|
||||
</div>
|
||||
<div class="content-flex">
|
||||
<p>{{reply.content}}</p>
|
||||
<div @click="delCommontOrReply('回复', reply.id)">删除</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reply-more" @click="item.isShowReply = !item.isShowReply" :class="[item.isShowReply ? 'active' : '']">
|
||||
<span class="line"></span>{{item.isShowReply ? '收起' : `展开${item.replyList.length}条回复`}}
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ai-empty v-else>暂无评论</ai-empty>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="事件类型" isLine :value="info.applyItemName"></ai-info-item>
|
||||
<ai-info-item label="申请人" :value="info.createUserName"></ai-info-item>
|
||||
<ai-info-item label="手机号" :value="info.detail"></ai-info-item>
|
||||
<ai-info-item label="所属地区" :value="info.areaName"></ai-info-item>
|
||||
<ai-info-item label="所属网格" :value="info.girdName"></ai-info-item>
|
||||
<ai-info-item label="审核时间" :value="info.auditTime"></ai-info-item>
|
||||
<ai-info-item label="状态" :value="dict.getLabel('appIntegralApplyEventStatus', info.status)"></ai-info-item>
|
||||
<ai-info-item label="事件描述" isLine :value="info.content"></ai-info-item>
|
||||
<ai-info-item label="活动图片" isLine>
|
||||
<ai-uploader
|
||||
disabled
|
||||
:instance="instance"
|
||||
:value="info.files">
|
||||
</ai-uploader>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-dialog
|
||||
:visible.sync="isShow"
|
||||
@onConfirm="onConfirm"
|
||||
@close="onClose"
|
||||
width="890px"
|
||||
title="审核">
|
||||
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
||||
<el-form-item label="是否通过" prop="auditStatus" style="width: 100%;" :rules="[{required: true, message: '请选择是否通过', trigger: 'change'}]">
|
||||
<el-radio-group v-model="form.auditStatus">
|
||||
<el-radio label="0">否</el-radio>
|
||||
<el-radio label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="auditDesc" v-if="form.auditStatus === '0'" label="审批意见" style="width: 100%" :rules="[{required: true, message: '请输入审批意见', trigger: 'blur'}]">
|
||||
<el-input size="small" type="textarea" :rows="5" v-model="form.auditDesc" clearable placeholder="请输入审批意见"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
@@ -82,36 +63,22 @@
|
||||
|
||||
data () {
|
||||
return {
|
||||
commontList: [],
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
getAvatar(row){
|
||||
return row.avatar||row.photo||'https://cdn.cunwuyun.cn/dvcp/h5/defaultAvatar.png'
|
||||
form: {
|
||||
auditDesc: '',
|
||||
auditStatus: ''
|
||||
},
|
||||
isShow: false
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.getInfo()
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appneighborhoodassistance/commontList?id=${this.params.id}&size=100`).then(res => {
|
||||
if (res.code == 0) {
|
||||
res.data.records.map((item) => {
|
||||
item.isShowReply = false
|
||||
})
|
||||
this.commontList = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getInfo () {
|
||||
this.instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${this.params.id}`).then(res => {
|
||||
this.instance.post(`/app/appintegraluserapply/queryDetailById?id=${this.params.id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data) {
|
||||
this.info = res.data
|
||||
@@ -120,175 +87,40 @@
|
||||
})
|
||||
},
|
||||
|
||||
onClose () {
|
||||
this.id = ''
|
||||
this.form.auditDesc = ''
|
||||
this.form.auditStatus = ''
|
||||
},
|
||||
|
||||
onConfirm () {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/appintegraluserapply/auditById`, {
|
||||
...this.form,
|
||||
id: this.params.id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('审核成功!')
|
||||
this.isShow = false
|
||||
this.getInfo()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel () {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: true
|
||||
})
|
||||
},
|
||||
|
||||
delCommontOrReply(text, id) {
|
||||
this.$confirm(`确定删除该${text}?`).then(() => {
|
||||
this.instance.post(`/app/appneighborhoodassistance/delComment?id=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.detail {
|
||||
.talk-info {
|
||||
.user {
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.info {
|
||||
width: calc(100% - 76px);
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
line-height: 30px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.time-flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
line-height: 30px;
|
||||
.area-name {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
font-size: 16px;
|
||||
line-height: 32px;
|
||||
word-break: break-all;
|
||||
span {
|
||||
color: #26f;
|
||||
}
|
||||
}
|
||||
}
|
||||
.comment-list {
|
||||
.title {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
line-height: 40px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.item {
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding-bottom: 16px;
|
||||
.user {
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.info-flex {
|
||||
width: calc(100% - 76px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 60px;
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
}
|
||||
span {
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-flex {
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
line-height: 30px;
|
||||
margin-bottom: 8px;
|
||||
padding-left: 76px;
|
||||
p {
|
||||
width: calc(100% - 50px);
|
||||
word-break: break-all;
|
||||
}
|
||||
div {
|
||||
color: #26f;
|
||||
width: 50px;
|
||||
text-align: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.reply-list {
|
||||
padding-left: 100px;
|
||||
.reply-item {
|
||||
margin-bottom: 8px;
|
||||
.reply-user {
|
||||
font-size: 14px;
|
||||
img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.reply-name {
|
||||
display: inline-block;
|
||||
color: #333;
|
||||
width: 300px;
|
||||
span {
|
||||
display: inline-block;
|
||||
color: #666;
|
||||
margin: 0 8px;
|
||||
}
|
||||
}
|
||||
.reply-time {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.content-flex {
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
padding-left: 58px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.reply-more {
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
color: #333;
|
||||
.line {
|
||||
display: inline-block;
|
||||
width: 120px;
|
||||
border-top: 1px solid #eee;
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.el-icon-arrow-down {
|
||||
transition: all ease 0.5s;
|
||||
transform: rotate(0);
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
&.active .el-icon-arrow-down {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,22 +1,60 @@
|
||||
<template>
|
||||
<ai-list class="notice">
|
||||
<ai-list class="AppIntegratingAudit">
|
||||
<template slot="title">
|
||||
<ai-title title="积分审核" isShowBottomBorder isShowArea :hideLevel="hideLevel-1" v-model="search.areaId" @change="changeArea">
|
||||
<ai-title title="积分审核" isShowBottomBorder isShowArea :hideLevel="hideLevel-1" @change="changeArea">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
<el-cascader
|
||||
size="small"
|
||||
v-model="search.ids"
|
||||
:options="rulesOps"
|
||||
placeholder="请选择事件/类型"
|
||||
clearable
|
||||
:props="rulesProps"
|
||||
@change="search.current = 1, getList()"
|
||||
ref="eventTypeSearch">
|
||||
</el-cascader>
|
||||
<el-date-picker
|
||||
v-model="dateList"
|
||||
@change="search.current = 1,getList()"
|
||||
type="daterange"
|
||||
v-model="search.beginDate"
|
||||
type="date"
|
||||
size="small"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
placeholder="选择开始日期"
|
||||
@change="search.current = 1, getList()">
|
||||
</el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="search.endDate"
|
||||
type="date"
|
||||
size="small"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择结束日期"
|
||||
@change="search.current = 1, getList()">
|
||||
</el-date-picker>
|
||||
<ai-picker
|
||||
:instance="instance"
|
||||
:multiple="false"
|
||||
dialogTitle="选择网格"
|
||||
:ops="{ label: 'girdName' }"
|
||||
pageTitle="网格"
|
||||
action="/app/appgirdinfo/girdList"
|
||||
v-model="search.filterCriteria"
|
||||
@change="search.current = 1, getList()">
|
||||
<div class="userSelcet">
|
||||
<span style="color: #606266;" v-if="search.createUserId">{{ name }}</span>
|
||||
<span v-else>创建人</span>
|
||||
<i class="el-icon-arrow-up" v-if="!search.createUserId"></i>
|
||||
<i class="el-icon-circle-close" v-if="search.createUserId" @click.stop="user = [], search.createUserId = '', name = '', search.current = 1, getList()"></i>
|
||||
</div>
|
||||
</ai-picker>
|
||||
<ai-select
|
||||
v-model="search.status"
|
||||
@change="(page.current = 1), getList()"
|
||||
placeholder="请选择状态"
|
||||
:selectList="$dict.getDict('appIntegralApplyEventStatus')">
|
||||
</ai-select>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
@@ -44,7 +82,7 @@
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">推送精选</el-button>
|
||||
<el-button type="text" @click="push(row.id)" v-if="row.status === '1'">推送精选</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -54,6 +92,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MessageBox } from 'element-ui'
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'List',
|
||||
@@ -68,19 +107,26 @@
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
createUserName: '',
|
||||
areaId: ''
|
||||
areaId: '',
|
||||
ids: '',
|
||||
gridId: ''
|
||||
},
|
||||
rulesProps: {
|
||||
label: 'ruleName',
|
||||
value: 'id',
|
||||
checkStrictly: true
|
||||
},
|
||||
rulesOps: [],
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{ prop: 'content', label: '事件类型', align: 'left' },
|
||||
{ prop: 'commentCount', label: '申请人', align: 'center' },
|
||||
{ prop: 'appreciateCount', label: '所属地区', align: 'center' },
|
||||
{ prop: 'sharedCount', label: '所属网格', align: 'center' },
|
||||
{ prop: 'createUserName', label: '申请时间', align: 'center' },
|
||||
{ prop: 'createUserAreaName', label: '状态', align: 'center' },
|
||||
{ prop: 'createTime', label: '审批人', align: 'center' },
|
||||
{ prop: 'createTime', label: '推送精选', align: 'center' }
|
||||
{ prop: 'applyItemName', label: '事件类型', align: 'left' },
|
||||
{ prop: 'createUserName', label: '申请人', align: 'center' },
|
||||
{ prop: 'areaName', label: '所属地区', align: 'center' },
|
||||
{ prop: 'girdName', label: '所属网格', align: 'center' },
|
||||
{ prop: 'createTime', label: '申请时间', align: 'center' },
|
||||
{ prop: 'status', label: '状态', align: 'center', format: v => this.dict.getLabel('appIntegralApplyEventStatus', v) },
|
||||
{ prop: 'auditUserName', label: '审批人', align: 'center' },
|
||||
{ prop: 'pushStatus', label: '推送精选', align: 'center', format: v => this.dict.getLabel('appIntegralApplyEventPushStatus', v) }
|
||||
],
|
||||
tableData: [],
|
||||
dateList: []
|
||||
@@ -88,24 +134,57 @@
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
hideLevel() {
|
||||
hideLevel () {
|
||||
return this.user.info.areaList?.length || 0
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.search.areaId = this.user.info.areaId
|
||||
this.getList()
|
||||
created () {
|
||||
// this.search.areaId = this.user.info.areaId
|
||||
this.$dict.load('appIntegralApplyEventStatus', 'appIntegralApplyEventPushStatus').then(() => {
|
||||
this.getList()
|
||||
this.getRulesList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
getRulesList () {
|
||||
this.instance.post(`/app/appintegralsystemrule/listByAppletFD?current=1&size=3000`).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.rulesOps = this.toTree(res.data.records)
|
||||
this.rulesOps.push({
|
||||
ruleName: '积分申请',
|
||||
id: '积分申请'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toTree (data) {
|
||||
let result = []
|
||||
if (!Array.isArray(data)) {
|
||||
return result
|
||||
}
|
||||
let map = {}
|
||||
data.forEach((item) => {
|
||||
map[item.id] = item
|
||||
})
|
||||
data.forEach((item) => {
|
||||
let parent = map[item.parentRuleId]
|
||||
if (parent) {
|
||||
(parent.children || (parent.children = [])).push(item)
|
||||
} else {
|
||||
result.push(item)
|
||||
}
|
||||
})
|
||||
return result
|
||||
},
|
||||
|
||||
getList () {
|
||||
this.instance.post(`/app/appintegraluserapply/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
createUserAreaId: this.search.areaId,
|
||||
beginDate: this.dateList[0] || '',
|
||||
endDate: this.dateList[1] || '',
|
||||
// areaId: this.search.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -123,8 +202,34 @@
|
||||
})
|
||||
},
|
||||
|
||||
push (id) {
|
||||
MessageBox.confirm('是否将精选内容对全体居民公开,选则否将只对本村/社区居民公开。', '推送精选', {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: '是',
|
||||
type: 'warning',
|
||||
closeOnClickModal: false,
|
||||
center: true,
|
||||
customClass: 'AiConfirm',
|
||||
cancelButtonText: '否'
|
||||
}).then(() => {
|
||||
this.instance.post(`/app/appintegraluserapply/pushById?id=${id}&status=1`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.getList()
|
||||
this.$message.success('推送成功')
|
||||
}
|
||||
})
|
||||
}).catch((e) => {
|
||||
e === 'cancel' && this.instance.post(`/app/appintegraluserapply/pushById?id=${id}&status=0`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.getList()
|
||||
this.$message.success('推送成功')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该帖子?').then(() => {
|
||||
this.$confirm('确定删除该帖子?').then((e) => {
|
||||
this.instance.post(`/app/appintegraluserapply/delete?id=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
@@ -156,4 +261,48 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppIntegratingAudit {
|
||||
.userSelcet {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 215px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #d0d4dc;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
|
||||
&:hover {
|
||||
border-color: $placeholderColor;
|
||||
}
|
||||
|
||||
i {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 100%;
|
||||
line-height: 32px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #d0d4dc;
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
|
||||
.el-icon-circle-close:hover {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
span {
|
||||
flex: 1;
|
||||
padding: 0 15px;
|
||||
font-size: 12px;
|
||||
color: $placeholderColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user