邻里互助
This commit is contained in:
		| @@ -9,11 +9,13 @@ | ||||
|         <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' }]"> | ||||
|               <el-input size="small" placeholder="请选择..." disabled v-model="form.publishDepartName"> | ||||
|                 <ai-wechat-selecter slot="append" isStrictly :instance="instance" @change="onChange" v-model="department" isChooseUnit> | ||||
|                   <el-button type="info">选择</el-button> | ||||
|                 </ai-wechat-selecter> | ||||
|               </el-input> | ||||
|               <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"/> --> | ||||
| @@ -124,6 +126,11 @@ | ||||
|         } | ||||
|       }, | ||||
|  | ||||
|       onUserChange (e) { | ||||
|         this.deptList = e | ||||
|        this.onChange(e) | ||||
|       }, | ||||
|  | ||||
|       getTalkList() { | ||||
|         this.instance.post(`/app/appneighborhoodassistancetheme/list?size=100`).then(res => { | ||||
|           if (res.code == 0) { | ||||
| @@ -142,4 +149,17 @@ | ||||
| </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> | ||||
|   | ||||
| @@ -21,12 +21,8 @@ | ||||
|             <div class="content"> | ||||
|               <span v-if="info.themeId">#【{{info.themeInfo.title}}】</span>{{info.content}} | ||||
|             </div> | ||||
|             <!-- <ai-uploader | ||||
|               :instance="instance" | ||||
|               disabled | ||||
|               v-model="row.urlList" | ||||
|               :limit="1"> | ||||
|             </ai-uploader> --> | ||||
|             <ai-uploader :instance="instance" disabled v-model="info.files"> | ||||
|             </ai-uploader> | ||||
|           </div> | ||||
|           <div class="comment-list" v-if="commontList.length"> | ||||
|             <div class="title">评论</div> | ||||
| @@ -40,7 +36,7 @@ | ||||
|               </div> | ||||
|               <div class="content-flex"> | ||||
|                 <p>{{item.content}}</p> | ||||
|                 <div @click="delCommont(item)">删除</div> | ||||
|                 <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"> | ||||
| @@ -53,7 +49,7 @@ | ||||
|                   </div> | ||||
|                   <div class="content-flex"> | ||||
|                     <p>{{reply.content}}</p> | ||||
|                     <div @click="delReply(item, indexs)">删除</div> | ||||
|                     <div @click="delCommontOrReply('回复', reply.id)">删除</div> | ||||
|                   </div> | ||||
|                 </div> | ||||
|               </div> | ||||
| @@ -127,9 +123,9 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       delCommont(row) { | ||||
|         this.$confirm('确定删除该评论?').then(() => { | ||||
|           this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => { | ||||
|       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() | ||||
| @@ -137,17 +133,6 @@ | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       delReply(row, indexs) { | ||||
|         this.$confirm('确定删除该回复?').then(() => { | ||||
|           this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user