随手拍
This commit is contained in:
		
							
								
								
									
										72
									
								
								packages/3.0.0/AppReportAiWill/AppReportAtWill.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								packages/3.0.0/AppReportAiWill/AppReportAtWill.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,72 @@ | ||||
| <template> | ||||
|   <div class="doc-circulation ailist-wrapper"> | ||||
|     <keep-alive :include="['List']"> | ||||
|       <component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component> | ||||
|     </keep-alive> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import List from './components/List' | ||||
|   import Detail from './components/Detail' | ||||
|   import Setting from './components/Setting' | ||||
|  | ||||
|   export default { | ||||
|     name: 'AppReportAtWill', | ||||
|     label: '随手拍', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         component: 'List', | ||||
|         params: {} | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     components: { | ||||
|       List, | ||||
|       Detail, | ||||
|       Setting | ||||
|     }, | ||||
|  | ||||
|     mounted () { | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       onChange (data) { | ||||
|         if (data.type === 'Detail') { | ||||
|           this.component = 'Detail' | ||||
|           this.params = data.params | ||||
|         } | ||||
|  | ||||
|         if (data.type === 'Setting') { | ||||
|           this.component = 'Setting' | ||||
|           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> | ||||
|  | ||||
| <style lang="scss"> | ||||
|   .doc-circulation { | ||||
|     height: 100%; | ||||
|     background: #F3F6F9; | ||||
|     overflow: auto; | ||||
|   } | ||||
| </style> | ||||
							
								
								
									
										590
									
								
								packages/3.0.0/AppReportAiWill/components/Detail.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										590
									
								
								packages/3.0.0/AppReportAiWill/components/Detail.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,590 @@ | ||||
| <template> | ||||
|   <ai-detail class="reportAtWillDetail"> | ||||
|     <template #title> | ||||
|       <ai-title title="事件详情" isShowBack isShowBottomBorder  @onBackClick="cancel(false)"> | ||||
|         <template #rightBtn> | ||||
|           <div class="title-btns"> | ||||
|             <el-button type="primary" icon="iconfont iconPerson_Transfered" @click="isShowForward = true" v-if="detail.eventStatus < 2">指派事件</el-button> | ||||
|             <el-button type="primary" icon="iconfont iconRegister" @click="isShowAdd = true" v-if="detail.eventStatus < 2">处理事件</el-button> | ||||
|           </div> | ||||
|         </template> | ||||
|       </ai-title> | ||||
|     </template> | ||||
|     <template #content> | ||||
|       <div class="detail-content__wrapper"> | ||||
|         <ai-card class="detail-content__wrapper--left" title="基础信息"> | ||||
|           <template #content> | ||||
|             <ai-wrapper> | ||||
|               <ai-info-item label="上报人员" :value="detail.name"></ai-info-item> | ||||
|               <ai-info-item label="当前状态" :value="dict.getLabel('clapEventStatus', detail.eventStatus)"></ai-info-item> | ||||
|               <ai-info-item label="联系方式">{{ detail.phone }}</ai-info-item> | ||||
|               <ai-info-item label="上报时间">{{ detail.createTime }}</ai-info-item> | ||||
|               <ai-info-item label="事件类型">{{ detail.groupName }}</ai-info-item> | ||||
|               <ai-info-item label="事件描述" isLine>{{ detail.content }}</ai-info-item> | ||||
|               <ai-info-item label="现场照片" isLine> | ||||
|                 <ai-uploader :instance="instance" disabled v-model="detail.files"></ai-uploader> | ||||
|               </ai-info-item> | ||||
|               <ai-info-item label="所属网格">{{ detail.girdName }}</ai-info-item> | ||||
|               <ai-info-item label="事件位置" isLine> | ||||
|                 <div id="map" style="width: 500px; height: 280px;"></div> | ||||
|               </ai-info-item> | ||||
|             </ai-wrapper> | ||||
|           </template> | ||||
|         </ai-card> | ||||
|         <div class="rightZone"> | ||||
|           <ai-card title="办理进度"> | ||||
|             <template #content> | ||||
|               <el-steps direction="vertical" :active="1"> | ||||
|                 <el-step | ||||
|                   v-for="(item, i) in processList" | ||||
|                   :key="i" | ||||
|                   :title="item.systemExplain" | ||||
|                   :description="item.doTime"> | ||||
|                   <template #title> | ||||
|                     <h2 class="step-title" style="font-weight: 500; font-size: 14px;"> | ||||
|                       {{ item.systemExplain }} | ||||
|                     </h2> | ||||
|                   </template> | ||||
|                   <template #description> | ||||
|                     <p style="color: #888; margin: 0 4px 10px 0; font-size: 14px;">{{ item.doTime }}</p> | ||||
|                     <div style="color: #444;margin-bottom: 10px;" v-if="item.doExplain">{{ item.doExplain }}</div> | ||||
|                     <ai-uploader :instance="instance" disabled v-model="item.files"></ai-uploader> | ||||
|                   </template> | ||||
|                 </el-step> | ||||
|               </el-steps> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|         </div> | ||||
|       </div> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShowAdd" | ||||
|         width="800px" | ||||
|         title="事件处理" | ||||
|         @closed="onClose" | ||||
|         @onConfirm="handleEvent"> | ||||
|         <el-form class="ai-form" label-width="120px" :model="form" ref="form"> | ||||
|           <el-form-item label="事件分类" prop="groupId" style="width: 100%;" :rules="[{ required: true, message: '请选择事件分类' }]"> | ||||
|             <ai-select | ||||
|               v-model="form.groupId" | ||||
|               placeholder="请选择事件分类" | ||||
|               :selectList="dictList"> | ||||
|             </ai-select> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="处理结果" prop="eventStatus" style="width: 100%;" :rules="[{ required: true, message: '请选择处理结果' }]"> | ||||
|             <el-radio-group v-model="form.eventStatus"> | ||||
|               <el-radio label="2">已办结</el-radio> | ||||
|               <el-radio label="3">已拒绝</el-radio> | ||||
|             </el-radio-group> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="处理方式" prop="content" style="width: 100%;" :rules="[{ required: true, message: '请输入处理方式' }]"> | ||||
|             <el-input type="textarea" :rows="5" :maxlength="500" v-model="form.content" clearable placeholder="请输入处理方式" show-word-limit></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="图片" prop="files" style="width: 100%;"> | ||||
|             <ai-uploader | ||||
|               :instance="instance" | ||||
|               v-model="form.files" | ||||
|               :limit="9"> | ||||
|             </ai-uploader> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShowForward" | ||||
|         width="800px" | ||||
|         @close="onClose" | ||||
|         title="事件指派" | ||||
|         @onConfirm="onForwardConfirm"> | ||||
|         <el-form class="ai-form" label-width="120px" :model="forwardForm" ref="forwardForm"> | ||||
|           <el-form-item label="转发" prop="name" style="width: 100%;" :rules="[{ required: true, message: '请选择网格员或网格' }]"> | ||||
|             <el-input disabled size="small" v-model="forwardForm.name" clearable placeholder="请选择网格员或网格"> | ||||
|               <template slot="append"> | ||||
|                 <el-button @click="isShowUser = true">选择</el-button> | ||||
|               </template> | ||||
|             </el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="办理意见" prop="content" style="width: 100%;"> | ||||
|             <el-input type="textarea" :rows="5" :maxlength="500" v-model="forwardForm.content" clearable placeholder="请输入办理意见" show-word-limit></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="图片" prop="files" style="width: 100%;"> | ||||
|             <ai-uploader | ||||
|               :instance="instance" | ||||
|               v-model="forwardForm.files" | ||||
|               :limit="9"> | ||||
|             </ai-uploader> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShowUser" | ||||
|         width="800px" | ||||
|         title="选择网格或网格员" | ||||
|         @onConfirm="onConfirm"> | ||||
|         <div class="grid-wrapper"> | ||||
|           <el-input | ||||
|             style="margin-bottom: 10px;" | ||||
|             size="small" | ||||
|             placeholder="请输入网格名称或网格员姓名" | ||||
|             v-model="name" | ||||
|             suffix-icon="iconfont iconSearch"> | ||||
|           </el-input> | ||||
|           <el-tree | ||||
|             :filter-node-method="filterNode" | ||||
|             ref="tree" | ||||
|             :props="defaultProps" | ||||
|             node-key="id" | ||||
|             :data="tree" | ||||
|             highlight-current | ||||
|             @current-change="onTreeChange"> | ||||
|             <div class="tree-container" slot-scope="{ data }"> | ||||
|               <div class="tree-container__user"> | ||||
|                 <div class="tree-user__item"> | ||||
|                   <!-- <img :src="data.avatar" v-if="data.avatar"> --> | ||||
|                   <span>{{ data.isUser ? data.name : data.girdName }}</span> | ||||
|                 </div> | ||||
|               </div> | ||||
|             </div> | ||||
|           </el-tree> | ||||
|         </div> | ||||
|       </ai-dialog> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import AMapLoader from '@amap/amap-jsapi-loader' | ||||
|   import { mapState } from 'vuex' | ||||
|  | ||||
|   export default { | ||||
|     name: 'Detail', | ||||
|     props: ['dict', 'instance', 'params'], | ||||
|  | ||||
|     data() { | ||||
|       return { | ||||
|         forwardForm: { | ||||
|           content: '', | ||||
|           girdId: '', | ||||
|           girdName: '', | ||||
|           girdMemberId: '', | ||||
|           girdMemberName: '', | ||||
|           name: '' | ||||
|         }, | ||||
|         name: '', | ||||
|         detail: {}, | ||||
|         isShowUser: false, | ||||
|         eventList: [], | ||||
|         isShowAdd: false, | ||||
|         userList: [], | ||||
|         processList: [], | ||||
|         dictList: [], | ||||
|         defaultProps: { | ||||
|           children: 'girdList', | ||||
|           label: 'girdName' | ||||
|         }, | ||||
|         isShowForward: false, | ||||
|         tree: [], | ||||
|         gridInfo: {}, | ||||
|         form: { | ||||
|           files: [], | ||||
|           groupId: '', | ||||
|           groupName: '', | ||||
|           content: [], | ||||
|           eventStatus: '' | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']) | ||||
|     }, | ||||
|  | ||||
|     watch: { | ||||
|       name (val) { | ||||
|         this.$refs.tree.filter(val) | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created() { | ||||
|       this.getDict() | ||||
|       this.getGirdList() | ||||
|       this.dict.load('clapEventStatus').then(() => { | ||||
|         this.getDetail() | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getDetail() { | ||||
|         this.instance.post('/app/appclapeventinfo/queryDetailById', null, { | ||||
|           params: { id: this.params.id } | ||||
|         }).then(res => { | ||||
|           if (res?.data) { | ||||
|             this.detail = res.data | ||||
|             this.processList = res.data.processList | ||||
|             this.form.groupId = res.data.groupId | ||||
|  | ||||
|             this.$nextTick(() => { | ||||
|               this.initMap() | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       getGirdList () { | ||||
|         this.instance.post(`/app/appgirdinfo/listAllByTop`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.tree = this.formatList(res.data) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onClose () { | ||||
|         this.form.files = [] | ||||
|         this.form.groupId = '' | ||||
|         this.form.groupName = '' | ||||
|         this.form.content = '' | ||||
|         this.form.eventStatus = '' | ||||
|         this.forwardForm.content = '' | ||||
|         this.forwardForm.girdId = '' | ||||
|         this.forwardForm.girdName = '' | ||||
|         this.forwardForm.girdMemberId = '' | ||||
|         this.forwardForm.girdMemberName = '' | ||||
|         this.forwardForm.name = '' | ||||
|       }, | ||||
|  | ||||
|       formatList (list) { | ||||
|         var arr = [] | ||||
|         for (let item of list) { | ||||
|           if (item.girdMemberList && item.girdMemberList.length) { | ||||
|             let userList = JSON.parse(JSON.stringify(item.girdMemberList)).map(v => { | ||||
|               return { | ||||
|                   ...v, | ||||
|                 isUser: true, | ||||
|                 girdName: item.girdName, | ||||
|                 girdId: item.girdId | ||||
|               } | ||||
|             }) | ||||
|  | ||||
|             item.girdList = [ | ||||
|               ...userList | ||||
|             ] | ||||
|             delete item.girdMemberList | ||||
|           } | ||||
|  | ||||
|           if (item.girdList && item.girdList.length) { | ||||
|             this.formatList(item.girdList) | ||||
|           } | ||||
|  | ||||
|           arr.push(item) | ||||
|         } | ||||
|  | ||||
|         return arr | ||||
|       }, | ||||
|  | ||||
|       filterNode (value, data) { | ||||
|         if (!value) return true | ||||
|         return data.girdName.indexOf(value) !== -1 | ||||
|       }, | ||||
|  | ||||
|       onTreeChange (e) { | ||||
|         this.gridInfo = e | ||||
|       }, | ||||
|  | ||||
|       onForwardConfirm () { | ||||
|         this.$refs.forwardForm.validate(v => { | ||||
|           if (v) { | ||||
|             this.instance.post('/app/appclapeventinfo/transferByManager', { | ||||
|               ...this.forwardForm, | ||||
|               id: this.params.id | ||||
|             }).then(res => { | ||||
|               if (res?.code == 0) { | ||||
|                 this.isShowForward = false | ||||
|                 this.getDetail() | ||||
|                 this.$message.success('转交成功!') | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onConfirm () { | ||||
|         if (this.gridInfo.userId || this.gridInfo.isLastLevel === '1') { | ||||
|           this.forwardForm.girdId = this.gridInfo.girdId | ||||
|           this.forwardForm.girdName = this.gridInfo.girdName | ||||
|           this.forwardForm.girdMemberId = this.gridInfo.userId | ||||
|           this.forwardForm.girdMemberName = this.gridInfo.name | ||||
|           this.forwardForm.name = `${this.gridInfo.girdName}${this.gridInfo.name ? '-' + this.gridInfo.name : ''}` | ||||
|  | ||||
|           this.isShowUser = false | ||||
|         } else { | ||||
|           return this.$message.error('请选择网格员或者最后层网格') | ||||
|         } | ||||
|       }, | ||||
|  | ||||
|       getDict () { | ||||
|         this.instance.post(`/app/appclapeventgroup/list?current=1&size=100000`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.dictList = res.data.records.map(v => { | ||||
|               return { | ||||
|                 dictValue: v.id, | ||||
|                 dictName: v.groupName | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       close () { | ||||
|         this.$confirm('确定关闭该事件?').then(() => { | ||||
|           this.instance.post(`/app/appmininotice/delete?ids=${this.params.id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel (isRefresh) { | ||||
|         this.$emit('change', { | ||||
|           type: 'list', | ||||
|           isRefresh: !!isRefresh | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onChange(e) { | ||||
|         this.instance.post(`/app/appvillagerintegralrule/list?size=1000&classification=${e}&ruleStatus=1`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.form.ruleId = '' | ||||
|             this.eventList = res.data.records | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       initMap() { | ||||
|         let { lng, lat } = this.detail | ||||
|         let center = [lng, lat] | ||||
|         AMapLoader.load({ | ||||
|           key: '54a02a43d9828a8f9cd4f26fe281e74e', | ||||
|           version: '2.0' | ||||
|         }).then(AMap => { | ||||
|           let map = new AMap.Map('map', { | ||||
|             center, | ||||
|             zoom: 14 | ||||
|           }) | ||||
|           let marker = new AMap.Marker({ | ||||
|             position: new AMap.LngLat(lng, lat), | ||||
|             title: this.detail.address | ||||
|           }) | ||||
|           map.add(marker) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       handleEvent() { | ||||
|         this.$refs.form.validate(v => { | ||||
|           if (v) { | ||||
|             this.instance.post('/app/appclapeventinfo/finishByManager', { | ||||
|               ...this.form, | ||||
|               groupName: this.dictList.filter(v => v.id === this.form.value)[0].label, | ||||
|               id: this.params.id | ||||
|             }).then(res => { | ||||
|               if (res?.code == 0) { | ||||
|                 this.isShowAdd = false | ||||
|                 this.getDetail() | ||||
|                 this.$message.success('处理成功!') | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
|   .reportAtWillDetail { | ||||
|     height: 100%; | ||||
|  | ||||
|     .grid-wrapper { | ||||
|       min-height: 360px; | ||||
|     } | ||||
|  | ||||
|     .title-btns { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|     } | ||||
|       ::v-deep .el-tree { | ||||
|         background: transparent; | ||||
|  | ||||
|         .el-tree-node__expand-icon.is-leaf { | ||||
|           color: transparent !important; | ||||
|         } | ||||
|  | ||||
|         .el-tree-node__content > .el-tree-node__expand-icon { | ||||
|           padding: 4px; | ||||
|         } | ||||
|  | ||||
|         .el-tree-node__content { | ||||
|           height: 32px; | ||||
|         } | ||||
|  | ||||
|         .el-tree__empty-text { | ||||
|           color: #222; | ||||
|           font-size: 14px; | ||||
|         } | ||||
|  | ||||
|         .el-tree-node__children .el-tree-node__content { | ||||
|           height: 32px; | ||||
|         } | ||||
|  | ||||
|         .el-tree-node__content:hover { | ||||
|           background: #E8EFFF; | ||||
|           color: #222222; | ||||
|           border-radius: 2px; | ||||
|         } | ||||
|  | ||||
|         .is-current > .el-tree-node__content { | ||||
|           &:hover { | ||||
|             background: #2266FF; | ||||
|             color: #fff; | ||||
|           } | ||||
|  | ||||
|           background: #2266FF; | ||||
|  | ||||
|           span { | ||||
|             color: #fff; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|  | ||||
|     .el-steps { | ||||
|       ::v-deep .el-step__icon { | ||||
|         font-size: 12px; | ||||
|         color: #555555; | ||||
|         border-color: #d0d4dc; | ||||
|       } | ||||
|  | ||||
|       ::v-deep .el-step__head.is-finish { | ||||
|         .el-step__icon.is-text { | ||||
|           border: none; | ||||
|           color: #fff; | ||||
|           font-size: 12px; | ||||
|           background: #2266ff; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       ::v-deep .el-step__line { | ||||
|         background-color: #d0d4dc; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .imgs { | ||||
|       font-size: 0; | ||||
|  | ||||
|       img { | ||||
|         width: 108px; | ||||
|         height: 108px; | ||||
|         margin-right: 4px; | ||||
|         margin-bottom: 4px; | ||||
|         cursor: pointer; | ||||
|         user-select: none; | ||||
|  | ||||
|         &:hover { | ||||
|           opacity: 0.8; | ||||
|         } | ||||
|  | ||||
|         &:nth-of-type(2n) { | ||||
|           margin-right: 0; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     ::v-deep .report-dialog { | ||||
|       .el-select { | ||||
|         width: 100%; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     ::v-deep .el-step__head.is-process { | ||||
|       color: #555; | ||||
|       border-color: #555; | ||||
|     } | ||||
|  | ||||
|     ::v-deep .is-finish h2 { | ||||
|       color: #2266ff; | ||||
|     } | ||||
|  | ||||
|     .step-title { | ||||
|       color: #555; | ||||
|     } | ||||
|  | ||||
|     .detail-content__wrapper { | ||||
|       display: flex; | ||||
|       width: 100%; | ||||
|  | ||||
|       .detail-content__wrapper--left { | ||||
|         flex: 1; | ||||
|         margin-right: 20px; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     ::v-deep .ai-detail__content { | ||||
|       background: #f3f6f9; | ||||
|  | ||||
|       .ai-detail__content--wrapper { | ||||
|         display: flex; | ||||
|         gap: 16px; | ||||
|         width: 100%; | ||||
|         max-width: 100%; | ||||
|         padding: 16px; | ||||
|         box-sizing: border-box; | ||||
|  | ||||
|         & > .el-card { | ||||
|           flex: 1; | ||||
|           min-width: 0; | ||||
|         } | ||||
|  | ||||
|         .rightZone { | ||||
|           width: 400px; | ||||
|           flex-shrink: 0; | ||||
|           display: flex; | ||||
|           flex-direction: column; | ||||
|           gap: 16px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     ::v-deep .el-card { | ||||
|       .el-card__header { | ||||
|         padding: 12px 16px; | ||||
|         font-weight: bold; | ||||
|       } | ||||
|  | ||||
|       .el-card__body { | ||||
|         padding: 8px; | ||||
|       } | ||||
|  | ||||
|       #amap { | ||||
|         width: 466px; | ||||
|         height: 232px; | ||||
|       } | ||||
|  | ||||
|       .el-steps { | ||||
|         margin-left: 8px; | ||||
|       } | ||||
|  | ||||
|       .imgFormItem > .el-form-item__content { | ||||
|         display: flex; | ||||
|         gap: 16px; | ||||
|         flex-wrap: wrap; | ||||
|  | ||||
|         &:before { | ||||
|           content: none; | ||||
|         } | ||||
|  | ||||
|         .el-image__inner { | ||||
|           width: 82px; | ||||
|           height: 82px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </style> | ||||
							
								
								
									
										136
									
								
								packages/3.0.0/AppReportAiWill/components/List.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										136
									
								
								packages/3.0.0/AppReportAiWill/components/List.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,136 @@ | ||||
| <template> | ||||
|   <ai-list> | ||||
|     <template #title> | ||||
|       <ai-title title="随手拍" isShowBottomBorder> | ||||
|         <el-button type="primary" slot="rightBtn" @click="toSetting">设置</el-button> | ||||
|       </ai-title> | ||||
|     </template> | ||||
|     <template #content> | ||||
|       <ai-search-bar> | ||||
|         <template #left> | ||||
|           <ai-select | ||||
|             v-model="search.eventStatus" | ||||
|             clearable | ||||
|             placeholder="处理状态" | ||||
|             :selectList="dict.getDict('clapEventStatus')" | ||||
|             @change="search.current = 1, getList()"> | ||||
|           </ai-select> | ||||
|         </template> | ||||
|         <template #right> | ||||
|           <el-input | ||||
|             v-model="search.title" | ||||
|             class="search-input" | ||||
|             size="small" | ||||
|             @keyup.enter.native="search.current = 1, getList()" | ||||
|             placeholder="请输入内容描述/上报居民/联系方式" | ||||
|             clearable | ||||
|             @change="getList" | ||||
|             @clear="search.current = 1, search.title = '', getList()" | ||||
|             suffix-icon="iconfont iconSearch"> | ||||
|           </el-input> | ||||
|         </template> | ||||
|       </ai-search-bar> | ||||
|       <ai-table :tableData="tableData" :colConfigs="colConfigs" :total="total" :current.sync="search.current" :size.sync="search.size" @getList="getList"> | ||||
|         <el-table-column slot="options" label="操作" fixed="right" width="120" align="center"> | ||||
|           <div class="table-options" slot-scope="{row}"> | ||||
|             <el-button type="text" title="详情" @click="toDetail(row.id)">详情</el-button> | ||||
|           </div> | ||||
|         </el-table-column> | ||||
|       </ai-table> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import { mapState } from 'vuex' | ||||
|  | ||||
|   export default { | ||||
|     name: 'List', | ||||
|     label: "随手拍", | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|     data() { | ||||
|       return { | ||||
|         userList: [], | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           eventStatus: '', | ||||
|           title: '' | ||||
|         }, | ||||
|         total: 0, | ||||
|         tableData: [], | ||||
|         content: '', | ||||
|         id: '' | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']), | ||||
|  | ||||
|       colConfigs() { | ||||
|         return [ | ||||
|           {prop: 'createTime', label: '上报时间'}, | ||||
|           {prop: 'content', label: '内容描述', align: 'center', width: '300px' }, | ||||
|           {prop: 'groupName', label: '事件类型', align: 'center'}, | ||||
|           {prop: 'girdName', label: '所属网格', align: 'center'}, | ||||
|           {prop: 'name', label: '上报居民', align: 'center'}, | ||||
|           {prop: 'phone', label: '联系方式', align: 'center'}, | ||||
|           {prop: 'handleUserName', label: '处理时长', align: 'center'}, | ||||
|           {prop: 'handleTime', label: '处理时间', align: 'center'}, | ||||
|           {slot: 'options'} | ||||
|         ] | ||||
|       }, | ||||
|  | ||||
|       handleStatusOps() { | ||||
|         return this.dict.getDict("reportAtWillHandleStatus").map(e => ({label: e.dictName, value: e.dictValue})) | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       this.dict.load('clapEventStatus').then(() => { | ||||
|         this.getList() | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appclapeventinfo/list`, null, { | ||||
|           params: { | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records | ||||
|             this.total = res.data.total | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toDetail (id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Detail', | ||||
|           params: { | ||||
|             id: id || '' | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toSetting () { | ||||
|         this.$emit('change', { | ||||
|           type: 'Setting', | ||||
|           params: { | ||||
|             id: '' | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| </style> | ||||
							
								
								
									
										177
									
								
								packages/3.0.0/AppReportAiWill/components/Setting.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										177
									
								
								packages/3.0.0/AppReportAiWill/components/Setting.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,177 @@ | ||||
| <template> | ||||
|   <ai-list class="notice"> | ||||
|     <template slot="title"> | ||||
|       <ai-title  isShowBack isShowBottomBorder title="事件类别" @onBackClick="cancel(false)"></ai-title> | ||||
|     </template> | ||||
|     <template slot="content"> | ||||
|       <ai-search-bar class="search-bar"> | ||||
|         <template #left> | ||||
|           <el-button size="small" type="primary" icon="iconfont iconAdd" @click="isShowAdd = true">添加事件分组</el-button> | ||||
|         </template> | ||||
|         <template slot="right"> | ||||
|           <el-input | ||||
|             v-model="search.title" | ||||
|             class="search-input" | ||||
|             size="small" | ||||
|             @keyup.enter.native="search.current = 1, getList()" | ||||
|             placeholder="请输入事件分类" | ||||
|             clearable | ||||
|             @change="getList" | ||||
|             @clear="search.current = 1, search.title = '', getList()" | ||||
|             suffix-icon="iconfont iconSearch"> | ||||
|           </el-input> | ||||
|         </template> | ||||
|       </ai-search-bar> | ||||
|       <ai-table | ||||
|         :tableData="tableData" | ||||
|         :col-configs="colConfigs" | ||||
|         :total="total" | ||||
|         style="margin-top: 6px;" | ||||
|         :current.sync="search.current" | ||||
|         :size.sync="search.size" | ||||
|         @getList="getList"> | ||||
|         <el-table-column slot="tags" label="标签"> | ||||
|           <template slot-scope="{ row }"> | ||||
|             <div class="table-tags"> | ||||
|               <el-tag type="info" v-for="(item, index) in row.tags" size="small" :key="index">{{ item }}</el-tag> | ||||
|             </div> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|         <el-table-column slot="options" width="180px" fixed="right" label="操作" align="center"> | ||||
|           <div class="table-options" slot-scope="{ row }"> | ||||
|             <el-button type="text" @click="edit(row)">编辑</el-button> | ||||
|             <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||
|           </div> | ||||
|         </el-table-column> | ||||
|       </ai-table> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShowAdd" | ||||
|         width="780px" | ||||
|         height="580px" | ||||
|         :title="id ? '添加事件分组' : '编辑事件分组'" | ||||
|         @close="onClose" | ||||
|         @onConfirm="onConfirm"> | ||||
|         <el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right"> | ||||
|           <el-form-item label="应用名称" prop="groupName" style="width: 100%;" :rules="[{ required: true, message: '请输入事件分组名称', trigger: 'blur' }]"> | ||||
|             <el-input size="small" :maxlength="100" placeholder="请输入事件分组名称" v-model="form.groupName"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="排序" prop="showIndex" style="width: 100%;" :rules="[{ required: true, message: '请输入排序', trigger: 'blur' }]"> | ||||
|             <el-input-number size="small" v-model="form.showIndex" :min="1" :max="100" label="请输入排序"></el-input-number> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import { mapState } from 'vuex' | ||||
|   export default { | ||||
|     name: 'List', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|     data() { | ||||
|       return { | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           title: '' | ||||
|         }, | ||||
|         form: { | ||||
|           groupName: '', | ||||
|           showIndex: '' | ||||
|         }, | ||||
|         id: '', | ||||
|         isShowAdd: false, | ||||
|         total: 0, | ||||
|         colConfigs: [ | ||||
|           {prop: 'groupName', label: '事件分组', align: 'left'}, | ||||
|           {prop: 'showIndex', label: '排序', align: 'center'}, | ||||
|           {slot: 'options', label: '操作'} | ||||
|         ], | ||||
|         tableData: [] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']) | ||||
|     }, | ||||
|  | ||||
|     mounted() { | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getList() { | ||||
|         this.instance.post(`/app/appclapeventgroup/list`, null, { | ||||
|           params: { | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records | ||||
|             this.total = res.data.total | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       edit (e) { | ||||
|         this.id = e.id | ||||
|         this.form.groupName = e.groupName | ||||
|         this.form.showIndex = '' | ||||
|  | ||||
|         this.$nextTick(() => { | ||||
|           this.isShowAdd = true | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onClose () { | ||||
|         this.id = '' | ||||
|         this.form.groupName = '' | ||||
|       }, | ||||
|  | ||||
|       onConfirm () { | ||||
|         this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
|             this.instance.post(`/app/appclapeventgroup/addOrUpdate`, { | ||||
|               ...this.form, | ||||
|               id: this.id || null | ||||
|             }).then(res => { | ||||
|               if (res.code === 0) { | ||||
|                 this.$message.success('添加成功') | ||||
|                 this.isShowAdd = false | ||||
|  | ||||
|                 this.getList() | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel (isRefresh) { | ||||
|         this.$emit('change', { | ||||
|           type: 'list', | ||||
|           isRefresh: !!isRefresh | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       remove(id) { | ||||
|         this.$confirm('确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/appclapeventgroup/delete?ids=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| </style> | ||||
							
								
								
									
										606
									
								
								packages/3.0.0/AppReportAiWill/reportAtWillDetail.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										606
									
								
								packages/3.0.0/AppReportAiWill/reportAtWillDetail.vue
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,606 @@ | ||||
| <template> | ||||
|   <section class="reportAtWillDetail"> | ||||
|     <ai-detail> | ||||
|       <template #title> | ||||
|         <ai-title | ||||
|           title="事件详情" | ||||
|           isShowBack | ||||
|           isShowBottomBorder | ||||
|           @onBackClick="$emit('back')"> | ||||
|           <template #rightBtn> | ||||
|             <template v-if="hasHandled"> | ||||
|               <el-button | ||||
|                 icon="iconfont iconRepulsebeifen" | ||||
|                 v-if=" | ||||
|                   report.permissions('app_appreportatwillinfo_edit') && | ||||
|                     detail.publicityStatus == 0 | ||||
|                 " | ||||
|                 @click="handlePublic(detail)" | ||||
|                 >公示事件 | ||||
|               </el-button> | ||||
|               <el-button | ||||
|                 icon="iconfont iconRepulse" | ||||
|                 v-if=" | ||||
|                   report.permissions('app_appreportatwillinfo_edit') && | ||||
|                     detail.publicityStatus == 1 | ||||
|                 " | ||||
|                 @click="handlePublic(detail)" | ||||
|               > | ||||
|                 取消公示 | ||||
|               </el-button> | ||||
|             </template> | ||||
|             <template v-else> | ||||
|               <ai-wechat-selecter :isMultiple="false" :instance="report.instance" v-model="userList" @change="v => handleAppoint(v, detail)"> | ||||
|                 <el-button | ||||
|                   icon="iconfont iconPerson_Transfered" | ||||
|                   v-if="report.permissions('app_appreportatwillinfo_edit')" | ||||
|                   >指派人员 | ||||
|                 </el-button> | ||||
|               </ai-wechat-selecter> | ||||
|               <el-button | ||||
|                 type="primary" | ||||
|                 icon="iconfont iconRegister" | ||||
|                 @click="dialogShow" | ||||
|                 v-if="report.permissions('app_appreportatwillinfo_edit')" | ||||
|                 >处理事件 | ||||
|               </el-button> | ||||
|               <el-button | ||||
|                 type="primary" | ||||
|                 icon="iconfont iconClock" | ||||
|                 @click.once="handleUrge" | ||||
|                 v-if=" | ||||
|                   report.permissions('app_appreportatwillinfo_edit') && | ||||
|                     !!detail.assignUserId && | ||||
|                     detail.handleFlow.some(e => e.assignUserId == user.info.id) | ||||
|                 " | ||||
|               > | ||||
|                 短信催办 | ||||
|               </el-button> | ||||
|             </template> | ||||
|           </template> | ||||
|         </ai-title> | ||||
|       </template> | ||||
|  | ||||
|       <!-- 详情 --> | ||||
|       <template #content> | ||||
|         <div class="detail-content__wrapper"> | ||||
|           <ai-card class="detail-content__wrapper--left" title="基础信息"> | ||||
|             <template #content> | ||||
|               <ai-wrapper :columnsNumber="1"> | ||||
|                 <ai-info-item label="处理状态"> | ||||
|                   <span | ||||
|                     :style="{ | ||||
|                       color: detail.status === '0' ? '#F79300' : '#222' | ||||
|                     }" | ||||
|                     >{{ | ||||
|                       report.dict.getLabel( | ||||
|                         'reportAtWillHandleStatus', | ||||
|                         detail.status | ||||
|                       ) | ||||
|                     }}</span | ||||
|                   > | ||||
|                 </ai-info-item> | ||||
|                 <ai-info-item label="上报时间">{{ | ||||
|                   detail.createTime | ||||
|                 }}</ai-info-item> | ||||
|                 <ai-info-item label="区域">{{ detail.areaName }}</ai-info-item> | ||||
|                 <ai-info-item label="地点">{{ detail.address }}</ai-info-item> | ||||
|                 <ai-info-item label="事件位置"> | ||||
|                   <div id="map" style="width: 400px; height: 240px;"></div> | ||||
|                 </ai-info-item> | ||||
|                 <ai-info-item label="事件描述">{{ | ||||
|                   detail.explain | ||||
|                 }}</ai-info-item> | ||||
|                 <ai-info-item label="现场照片"> | ||||
|                   <ai-uploader | ||||
|                     :instance="instance" | ||||
|                     disabled | ||||
|                     v-model="detail.files" | ||||
|                   ></ai-uploader> | ||||
|                 </ai-info-item> | ||||
|               </ai-wrapper> | ||||
|             </template> | ||||
|           </ai-card> | ||||
|  | ||||
|           <div class="rightZone"> | ||||
|             <ai-card title="处理结果"> | ||||
|               <template #content> | ||||
|                 <ai-wrapper :columnsNumber="1" label-width="60px"> | ||||
|                   <!-- <ai-info-item label="处理人员">{{ detail.handleUserName }}</ai-info-item> | ||||
|                   <ai-info-item label="处理结果">{{ detail.handleResult || '-' }}</ai-info-item> --> | ||||
|                   <ai-info-item label="上报类型">{{ | ||||
|                     dict.getLabel('atWillReportType', detail.reportType) | ||||
|                   }}</ai-info-item> | ||||
|                   <ai-info-item label="事件类型">{{ | ||||
|                     detail.ruleName || '-' | ||||
|                   }}</ai-info-item> | ||||
|                   <ai-info-item label="信用积分" | ||||
|                     ><span style="color: #2266FF;">{{ | ||||
|                       detail.integral > 0 | ||||
|                         ? '+' + detail.integral | ||||
|                         : detail.integral | ||||
|                     }}</span></ai-info-item | ||||
|                   > | ||||
|                   <ai-info-item label="处理结果">{{ | ||||
|                     detail.handleResult || '-' | ||||
|                   }}</ai-info-item> | ||||
|                   <ai-info-item label="现场照片"> | ||||
|                     <div class="imgs" v-viewer="{ movable: true }"> | ||||
|                       <img | ||||
|                         :src="item.url" | ||||
|                         v-for="(item, index) in detail.handleFiles" | ||||
|                         :key="index" | ||||
|                       /> | ||||
|                     </div> | ||||
|                   </ai-info-item> | ||||
|                 </ai-wrapper> | ||||
|               </template> | ||||
|             </ai-card> | ||||
|             <ai-card title="处理记录"> | ||||
|               <template #content> | ||||
|                 <el-steps direction="vertical" :active="1"> | ||||
|                   <el-step | ||||
|                     v-for="(step, i) in handleLogs" | ||||
|                     :key="i" | ||||
|                     :title="step.title" | ||||
|                     :description="step.description" | ||||
|                   > | ||||
|                     <template #title> | ||||
|                       <h2 | ||||
|                         class="step-title" | ||||
|                         style="font-weight: 500; font-size: 14px;" | ||||
|                       > | ||||
|                         {{ step.title }} | ||||
|                       </h2> | ||||
|                     </template> | ||||
|                     <template #description> | ||||
|                       <p | ||||
|                         style="color: #888; margin: 0 4px 10px 0; font-size: 14px;" | ||||
|                       > | ||||
|                         {{ step.description }} | ||||
|                       </p> | ||||
|                     </template> | ||||
|                   </el-step> | ||||
|                 </el-steps> | ||||
|               </template> | ||||
|             </ai-card> | ||||
|           </div> | ||||
|         </div> | ||||
|       </template> | ||||
|     </ai-detail> | ||||
|      | ||||
|     <ai-dialog | ||||
|       class="report-dialog" | ||||
|       :visible.sync="dialog" | ||||
|       width="800px" | ||||
|       title="处理事件" | ||||
|       @closed="form = {}" | ||||
|       @onConfirm="handleEvent" | ||||
|     > | ||||
|       <el-form | ||||
|         size="small" | ||||
|         label-width="100px" | ||||
|         label-suffix=":" | ||||
|         :rules="rules" | ||||
|         :model="form" | ||||
|         ref="handleForm" | ||||
|       > | ||||
|         <el-form-item label="上报类型" prop="reportType"> | ||||
|           <ai-select | ||||
|             style="width: 100%" | ||||
|             v-model="form.reportType" | ||||
|             @change="onChange" | ||||
|             placeholder="请选择上报类型" | ||||
|             :selectList="dict.getDict('atWillReportType')" | ||||
|           > | ||||
|           </ai-select> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="事件类型" prop="ruleId"> | ||||
|           <el-select | ||||
|             v-model="form.ruleId" | ||||
|             placeholder="请选择事件类型" | ||||
|             size="small" | ||||
|           > | ||||
|             <el-option | ||||
|               v-for="(item, index) in eventList" | ||||
|               :key="index" | ||||
|               :label="item.ruleName" | ||||
|               :value="item.id" | ||||
|             > | ||||
|               <span style="float: left">{{ item.ruleName }}</span> | ||||
|               <span style="float: right; color: #8492a6; font-size: 13px" | ||||
|                 >积分{{ item.integral }}</span | ||||
|               > | ||||
|             </el-option> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="处理结果" prop="handleResult"> | ||||
|           <el-input | ||||
|             type="textarea" | ||||
|             :rows="5" | ||||
|             maxlength="200" | ||||
|             v-model="form.handleResult" | ||||
|             clearable | ||||
|             placeholder="请输入处理结果" | ||||
|             show-word-limit | ||||
|           /> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="图片" prop="handleFiles"> | ||||
|           <ai-uploader | ||||
|             :instance="instance" | ||||
|             v-model="form.handleFiles" | ||||
|             :limit="9" | ||||
|             isShowTip | ||||
|           ></ai-uploader> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AMapLoader from '@amap/amap-jsapi-loader' | ||||
| import { mapState } from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   name: 'reportAtWillDetail', | ||||
|  | ||||
|   props: ['dict', 'instance', 'permissions', 'id'], | ||||
|  | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     hasHandled() { | ||||
|       return this.detail.status == 1 | ||||
|     }, | ||||
|     handleLogs() { | ||||
|       let starter = { | ||||
|           title: `收到用户(${this.detail.nickName})上报的事件信息,等待处理。`, | ||||
|           description: this.detail.createTime | ||||
|         }, | ||||
|         handleUser = [], | ||||
|         process = | ||||
|           this.detail.handleFlow?.map(e => ({ | ||||
|             title: `${e.assignUserName} 查看了信息,并分配了${e.handleUserName}处理任务。`, | ||||
|             description: e.assignTime | ||||
|           })) || [] | ||||
|       this.detail.status == 1 && | ||||
|         this.detail.handleUserName && | ||||
|         handleUser.push({ | ||||
|           title: `${this.detail.handleUserName}反馈了处理结果。`, | ||||
|           description: this.detail.handleTime | ||||
|         }) | ||||
|       return [starter, ...process, ...handleUser] | ||||
|     }, | ||||
|     rules() { | ||||
|       return { | ||||
|         handleResult: [{ required: true, message: '请填写处理结果' }], | ||||
|         ruleId: [{ required: true, message: '请选择事件类型' }], | ||||
|         reportType: [{ required: true, message: '请选择上报类型' }] | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       detail: {}, | ||||
|       eventList: [], | ||||
|       dialog: false, | ||||
|       userList: [], | ||||
|       form: { | ||||
|         ruleId: '', | ||||
|         handleFiles: [], | ||||
|         reportType: '' | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict | ||||
|       .load( | ||||
|         'reportAtWillPublicityStatus', | ||||
|         'reportAtWillHandleStatus', | ||||
|         'atWillReportType' | ||||
|       ) | ||||
|       .then(() => { | ||||
|         this.getDetail() | ||||
|       }) | ||||
|   }, | ||||
|   methods: { | ||||
|     getDetail() { | ||||
|       this.id && | ||||
|         this.report.instance | ||||
|           .post('/app/appreportatwillinfo/queryDetailById', null, { | ||||
|             params: { id: this.id } | ||||
|           }) | ||||
|           .then(res => { | ||||
|             if (res?.data) { | ||||
|               this.detail = res.data | ||||
|  | ||||
|               this.$nextTick(() => { | ||||
|                 this.initMap() | ||||
|               }) | ||||
|             } | ||||
|           }) | ||||
|     }, | ||||
|  | ||||
|     onChange(e) { | ||||
|       this.instance | ||||
|         .post( | ||||
|           `/app/appvillagerintegralrule/list?size=1000&classification=${e}&ruleStatus=1` | ||||
|         ) | ||||
|         .then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.form.ruleId = '' | ||||
|             this.eventList = res.data.records | ||||
|           } | ||||
|         }) | ||||
|     }, | ||||
|  | ||||
|     initMap() { | ||||
|       let { lng, lat } = this.detail, | ||||
|         center = [lng, lat] | ||||
|       lng && | ||||
|         lat && | ||||
|         AMapLoader.load({ | ||||
|           key: '54a02a43d9828a8f9cd4f26fe281e74e', | ||||
|           version: '2.0' // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 | ||||
|         }) | ||||
|           .then(AMap => { | ||||
|             let map = new AMap.Map('map', { | ||||
|               center, | ||||
|               zoom: 14 | ||||
|             }) | ||||
|             let marker = new AMap.Marker({ | ||||
|               position: new AMap.LngLat(lng, lat), | ||||
|               title: this.detail.address | ||||
|             }) | ||||
|             map.add(marker) | ||||
|           }) | ||||
|           .catch(e => { | ||||
|           }) | ||||
|     }, | ||||
|     handlePublic(ev) { | ||||
|       this.$confirm( | ||||
|         `是否对该事件${ev.publicityStatus == 0 ? '进行公示' : '取消公示'}` | ||||
|       ) | ||||
|         .then(() => { | ||||
|           this.report.instance | ||||
|             .post('/app/appreportatwillinfo/publicity', null, { | ||||
|               params: { id: ev.id } | ||||
|             }) | ||||
|             .then(res => { | ||||
|               if (res?.code == 0) { | ||||
|                 this.$message.success('操作成功!') | ||||
|                 this.$emit('back') | ||||
|               } | ||||
|             }) | ||||
|         }) | ||||
|         .catch(() => 0) | ||||
|     }, | ||||
|     handleAppoint(person, row) { | ||||
|       this.report.instance | ||||
|         .post('/app/appreportatwillinfo/assign', { | ||||
|           handleUserId: person?.[0].id, | ||||
|           handleUserName: person?.[0].name + ' ' + person?.[0].phone, | ||||
|           infoId: row.id | ||||
|         }) | ||||
|         .then(res => { | ||||
|           this.userList = [] | ||||
|           if (res?.code == 0) { | ||||
|             this.$message.success('指派成功!') | ||||
|             this.$emit('back') | ||||
|           } | ||||
|         }).catch(() => { | ||||
|         this.userList = [] | ||||
|       }) | ||||
|     }, | ||||
|     handleUrge() { | ||||
|       this.$confirm('是否要进行短信催办?') | ||||
|         .then(() => { | ||||
|           this.report.instance | ||||
|             .post('/app/appreportatwillinfo/urging') | ||||
|             .then(res => { | ||||
|               if (res?.code == 0) { | ||||
|                 this.$message.success('催办成功!') | ||||
|                 this.$emit('back') | ||||
|               } | ||||
|             }) | ||||
|         }) | ||||
|         .catch(() => 0) | ||||
|     }, | ||||
|     handleEvent() { | ||||
|       this.$refs.handleForm.validate(v => { | ||||
|         if (v) { | ||||
|           this.report.instance | ||||
|             .post('/app/appreportatwillinfo/handle', { | ||||
|               ...this.detail, | ||||
|               ...this.form | ||||
|             }) | ||||
|             .then(res => { | ||||
|               if (res?.code == 0) { | ||||
|                 this.$message.success('处理成功!') | ||||
|                 this.$emit('back') | ||||
|               } | ||||
|             }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleUpload({ file }) { | ||||
|       if (file) { | ||||
|         let formData = new FormData() | ||||
|         formData.append('file', file) | ||||
|         this.report.instance.post('/admin/file/add', formData).then(res => { | ||||
|           if (res?.data) { | ||||
|             let fileInfos = res.data?.[0]?.split(';') | ||||
|             this.form.handleFiles?.push({ | ||||
|               id: fileInfos[1], | ||||
|               accessUrl: fileInfos[0], | ||||
|               filename: file.name, | ||||
|               size: file.size | ||||
|             }) || | ||||
|               (this.form.handleFiles = [ | ||||
|                 { | ||||
|                   id: fileInfos[1], | ||||
|                   accessUrl: fileInfos[0], | ||||
|                   filename: file.name, | ||||
|                   size: file.size | ||||
|                 } | ||||
|               ]) | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     }, | ||||
|     handleUploadRemove(file) { | ||||
|       let index = this.form.handleFiles.findIndex(e => e.id == file.id) | ||||
|       index > -1 && this.form.handleFiles.splice(index, 1) | ||||
|     }, | ||||
|     dialogShow() { | ||||
|       this.dialog = true | ||||
|       this.form.reportType = this.detail.reportType | ||||
|       this.onChange(this.detail.reportType) | ||||
|     } | ||||
|   }, | ||||
|   inject: ['report'] | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .reportAtWillDetail { | ||||
|   height: 100%; | ||||
|  | ||||
|   .el-steps { | ||||
|     ::v-deep .el-step__icon { | ||||
|       font-size: 12px; | ||||
|       color: #555555; | ||||
|       border-color: #d0d4dc; | ||||
|     } | ||||
|  | ||||
|     ::v-deep .el-step__head.is-finish { | ||||
|       .el-step__icon.is-text { | ||||
|         border: none; | ||||
|         color: #fff; | ||||
|         font-size: 12px; | ||||
|         background: #2266ff; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     ::v-deep .el-step__line { | ||||
|       background-color: #d0d4dc; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .imgs { | ||||
|     font-size: 0; | ||||
|  | ||||
|     img { | ||||
|       width: 108px; | ||||
|       height: 108px; | ||||
|       margin-right: 4px; | ||||
|       margin-bottom: 4px; | ||||
|       cursor: pointer; | ||||
|       user-select: none; | ||||
|  | ||||
|       &:hover { | ||||
|         opacity: 0.8; | ||||
|       } | ||||
|  | ||||
|       &:nth-of-type(2n) { | ||||
|         margin-right: 0; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .report-dialog { | ||||
|     .el-select { | ||||
|       width: 100%; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .ailist-title { | ||||
|     .el-button { | ||||
|       margin-left: 0 !important; | ||||
|     } | ||||
|   } | ||||
|   ::v-deep .el-step__head.is-process { | ||||
|     color: #555; | ||||
|     border-color: #555; | ||||
|   } | ||||
|  | ||||
|   ::v-deep .is-finish h2 { | ||||
|     color: #2266ff; | ||||
|   } | ||||
|  | ||||
|   .step-title { | ||||
|     color: #555; | ||||
|   } | ||||
|  | ||||
|   .detail-content__wrapper { | ||||
|     display: flex; | ||||
|     width: 100%; | ||||
|  | ||||
|     .detail-content__wrapper--left { | ||||
|       flex: 1; | ||||
|       margin-right: 20px; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .ai-detail__content { | ||||
|     background: #f3f6f9; | ||||
|  | ||||
|     .ai-detail__content--wrapper { | ||||
|       display: flex; | ||||
|       gap: 16px; | ||||
|       width: 100%; | ||||
|       max-width: 100%; | ||||
|       padding: 16px; | ||||
|       box-sizing: border-box; | ||||
|  | ||||
|       & > .el-card { | ||||
|         flex: 1; | ||||
|         min-width: 0; | ||||
|       } | ||||
|  | ||||
|       .rightZone { | ||||
|         width: 400px; | ||||
|         flex-shrink: 0; | ||||
|         display: flex; | ||||
|         flex-direction: column; | ||||
|         gap: 16px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .el-card { | ||||
|     .el-card__header { | ||||
|       padding: 12px 16px; | ||||
|       font-weight: bold; | ||||
|     } | ||||
|  | ||||
|     .el-card__body { | ||||
|       padding: 8px; | ||||
|     } | ||||
|  | ||||
|     #amap { | ||||
|       width: 466px; | ||||
|       height: 232px; | ||||
|     } | ||||
|  | ||||
|     .el-steps { | ||||
|       margin-left: 8px; | ||||
|     } | ||||
|  | ||||
|     .imgFormItem > .el-form-item__content { | ||||
|       display: flex; | ||||
|       gap: 16px; | ||||
|       flex-wrap: wrap; | ||||
|  | ||||
|       &:before { | ||||
|         content: none; | ||||
|       } | ||||
|  | ||||
|       .el-image__inner { | ||||
|         width: 82px; | ||||
|         height: 82px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user