152
This commit is contained in:
		| @@ -7,7 +7,6 @@ | ||||
|     <template slot="content"> | ||||
|       <ai-search-bar class="search-bar"> | ||||
|         <template #left> | ||||
|           <el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">我要发帖</el-button> | ||||
|           <el-date-picker | ||||
|             v-model="dateList" | ||||
|             @change="search.current = 1,getList()" | ||||
| @@ -25,7 +24,7 @@ | ||||
|             class="search-input" | ||||
|             size="small" | ||||
|             v-throttle="() => {search.current = 1, getList()}" | ||||
|             placeholder="请输入发帖人" | ||||
|             placeholder="请输入申请人、审批人" | ||||
|             clearable | ||||
|             @clear="search.current = 1, search.createUserName = '', getList()" | ||||
|             suffix-icon="iconfont iconSearch"> | ||||
| @@ -45,6 +44,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> | ||||
|             </div> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
| @@ -73,17 +73,17 @@ | ||||
|         }, | ||||
|         total: 10, | ||||
|         colConfigs: [ | ||||
|           { prop: 'content',  label: '内容', align: 'left', 'show-overflow-tooltip': true }, | ||||
|           { prop: 'commentCount',  label: '评论数', align: 'center', width: '120' }, | ||||
|           { prop: 'appreciateCount',  label: '点赞数', align: 'center', width: '120' }, | ||||
|           { prop: 'sharedCount',  label: '分享数', align: 'center', width: '120' }, | ||||
|           { prop: 'createUserName',  label: '发帖人', align: 'center', width: '120' }, | ||||
|           { prop: 'createUserAreaName',  label: '所在地区', align: 'center', width: '120' }, | ||||
|           { prop: 'createTime',  label: '创建时间', align: 'center', width: '180' }, | ||||
|           { slot: 'options'}, | ||||
|           { 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' } | ||||
|         ], | ||||
|         tableData: [], | ||||
|         dateList: [], | ||||
|         dateList: [] | ||||
|       } | ||||
|     }, | ||||
|     computed: { | ||||
| @@ -100,7 +100,7 @@ | ||||
|  | ||||
|     methods: { | ||||
|       getList() { | ||||
|         this.instance.post(`/app/appneighborhoodassistance/list`, null, { | ||||
|         this.instance.post(`/app/appintegraluserapply/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             createUserAreaId: this.search.areaId, | ||||
| @@ -125,7 +125,7 @@ | ||||
|  | ||||
|       remove (id) { | ||||
|         this.$confirm('确定删除该帖子?').then(() => { | ||||
|           this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => { | ||||
|           this.instance.post(`/app/appintegraluserapply/delete?id=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|   | ||||
| @@ -7,10 +7,7 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import Detail from './components/Detail' | ||||
|   import List from './components/List' | ||||
|   import Add from './components/Add' | ||||
|  | ||||
|   export default { | ||||
|     name: 'AppIntegratingRules', | ||||
|     label: '积分规则', | ||||
| @@ -29,34 +26,10 @@ | ||||
|     }, | ||||
|  | ||||
|     components: { | ||||
|       Add, | ||||
|       List, | ||||
|       Detail | ||||
|       List | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       onChange (data) { | ||||
|         if (data.type === 'Add') { | ||||
|           this.component = 'Add' | ||||
|           this.params = data.params | ||||
|         } | ||||
|  | ||||
|         if (data.type === 'Detail') { | ||||
|           this.component = 'Detail' | ||||
|           this.params = data.params | ||||
|         } | ||||
|  | ||||
|         if (data.type === 'List') { | ||||
|           this.component = 'List' | ||||
|           this.params = data.params | ||||
|  | ||||
|           this.$nextTick(() => { | ||||
|             if (data.isRefresh) { | ||||
|               this.$refs.component.getList() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|   | ||||
| @@ -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,294 +0,0 @@ | ||||
| <template> | ||||
|   <ai-detail class="detail"> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="帖子详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"> | ||||
|       </ai-title> | ||||
|     </template> | ||||
|     <template slot="content"> | ||||
|       <ai-card title="帖子信息"> | ||||
|         <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> | ||||
|         </template> | ||||
|       </ai-card> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   export default { | ||||
|     name: 'Detail', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       params: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         commontList: [], | ||||
|         info: {}, | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       getAvatar(row){ | ||||
|         return row.avatar||row.photo||'https://cdn.cunwuyun.cn/dvcp/h5/defaultAvatar.png' | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     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 => { | ||||
|           if (res.code == 0) { | ||||
|             if (res.data) { | ||||
|               this.info = res.data | ||||
|             } | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       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> | ||||
| @@ -38,7 +38,7 @@ | ||||
|               </el-input> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="积分类型" prop="type" style="width: 100%"> | ||||
|               <el-radio-group v-model="form.type"> | ||||
|               <el-radio-group v-model="form.type" @change="$refs.form.clearValidate()"> | ||||
|                 <el-radio label="0">打卡得积分</el-radio> | ||||
|                 <el-radio label="1">报名得积分</el-radio> | ||||
|               </el-radio-group> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user