微心愿
This commit is contained in:
		| @@ -7,10 +7,10 @@ | ||||
|           <ai-card title="基础信息"> | ||||
|             <template #content> | ||||
|               <div class="ai-form"> | ||||
|                 <el-form-item label="姓名" prop="title"> | ||||
|                 <el-form-item label="姓名" prop="name"> | ||||
|                   <el-input | ||||
|                     size="small" | ||||
|                     v-model="form.title" | ||||
|                     v-model="form.name" | ||||
|                     placeholder="请输入..." | ||||
|                     clearabel | ||||
|                     :maxLength="60" | ||||
| @@ -25,19 +25,18 @@ | ||||
|                       :maxLength="11" | ||||
|                   ></el-input> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="事件类型" prop="email"> | ||||
|                 <el-form-item label="事件类型" prop="groupId"> | ||||
|                   <ai-select | ||||
|                       v-model="form.nation" | ||||
|                       v-model="form.groupId" | ||||
|                       placeholder="请选择" | ||||
|                       :selectList="dict.getDict('nation')" | ||||
|                       @change="(search.current = 1), getList()" | ||||
|                       :selectList="dictList" | ||||
|                   ></ai-select> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="事件描述" prop="title" style="width: 100%"> | ||||
|                 <el-form-item label="事件描述" prop="content" style="width: 100%"> | ||||
|                   <el-input | ||||
|                     type="textarea" | ||||
|                     :rows="4" | ||||
|                     v-model="form.title" | ||||
|                     v-model="form.content" | ||||
|                     placeholder="请输入..." | ||||
|                     clearabel | ||||
|                     :maxLength="60" | ||||
| @@ -57,7 +56,7 @@ | ||||
|                 <el-form-item label="上报位置" prop="lat"> | ||||
|                   <el-button @click="showMap = true">地图标绘</el-button> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="现场照片" prop="files" style="width: 100%;"> | ||||
|                 <el-form-item label="现场照片" style="width: 100%;"> | ||||
|                   <ai-uploader | ||||
|                       :instance="instance" | ||||
|                       isShowTip | ||||
| @@ -114,44 +113,35 @@ export default { | ||||
|   data() { | ||||
|     return { | ||||
|       disabledLevel: 0, | ||||
|       pickerOptions: { | ||||
|         disabledDate(time) { | ||||
|           return time.getTime() < Date.now(); | ||||
|         }, | ||||
|       }, | ||||
|       rules: { | ||||
|         areaId: [{ required: true, message: '请选择发布地区', trigger: 'change' }, | ||||
|         name: [{ required: true, message: '请输入姓名', trigger: 'change' }], | ||||
|         phone: [{ required: true, message: '请输入联系方式', trigger: 'change' }], | ||||
|         groupId: [{ required: true, message: '请选择事件类型', trigger: 'change' }], | ||||
|         content: [{ required: true, message: '请输入事件描述', trigger: 'change' }], | ||||
|         areaId: [{ required: true, message: '请选择所属地区', trigger: 'change' }, | ||||
|           { | ||||
|             validator: (r, v, cb) => { | ||||
|               if (/.+0{3}$/.test(v)) { | ||||
|                 cb("发布地区必须选到村级") | ||||
|                 cb("所属地区必须选到村级") | ||||
|               } else cb() | ||||
|             }, trigger: "blur" | ||||
|           } | ||||
|         ], | ||||
|         title: [{ required: true, message: '请输入标题', trigger: 'change' }], | ||||
|         address: [{ required: true, message: '请选输入活动地点', trigger: 'change' }], | ||||
|         total: [{ required: true, message: '请输入参与人员', trigger: 'change' }], | ||||
|         activeTimeList: [{ required: true, message: '请选择活动时间', trigger: 'change' }], | ||||
|         stopSignupTime: [{ required: true, message: '请选择截止时间', trigger: 'change' }], | ||||
|         contactPerson: [{ required: true, message: '请输入联系人', trigger: 'change' }], | ||||
|         contactPhone: [{ required: true, message: '请输入联系电话', trigger: 'change' }], | ||||
|         content: [{ required: true, message: '请输入活动介绍', trigger: 'blur' }], | ||||
|         lat: [{ required: true, message: '请进行地图标绘', trigger: 'change' }], | ||||
|       }, | ||||
|       form: { | ||||
|         name: '', | ||||
|         phone: '', | ||||
|         groupId: '', | ||||
|         content: '', | ||||
|         areaId: '', | ||||
|         areaName: '', | ||||
|         title: '', | ||||
|         lat: '', | ||||
|         lng: '', | ||||
|         address: '', | ||||
|         total: '', | ||||
|         activeTimeList: [], | ||||
|         stopSignupTime: '', | ||||
|         contactPerson: '', | ||||
|         contactPhone: '', | ||||
|         content: '' | ||||
|         files: [] | ||||
|       }, | ||||
|  | ||||
|  | ||||
|       dictList: [], | ||||
|       showMap: false, | ||||
|       map: null, | ||||
|       placeSearch: null, | ||||
| @@ -164,10 +154,9 @@ export default { | ||||
|     }; | ||||
|   }, | ||||
|   created() { | ||||
|     console.log(this.user) | ||||
|     this.dict.load("education", "sex", "nation", "developStatus") | ||||
|     this.disabledLevel = this.user.info.areaList.length | ||||
|     this.form.areaId = this.user.info.areaId | ||||
|     this.getDict() | ||||
|   }, | ||||
|   methods: { | ||||
|     selectMap() { | ||||
| @@ -186,7 +175,7 @@ export default { | ||||
|           resizeEnable: true, | ||||
|           zooms: [6, 20], | ||||
|           zoom: 11, | ||||
|           center:[104.067923463, 30.6799428454], | ||||
|           center:[107.11059, 31.56618], | ||||
|         }) | ||||
|         this.placeSearch = new AMap.PlaceSearch({ map: this.map }) | ||||
|         new AMap.AutoComplete({ | ||||
| @@ -225,16 +214,27 @@ export default { | ||||
|         this.map.setFitView() | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|  | ||||
|     getDict() { | ||||
|       this.instance.post(`/app/appclapeventgrouppingchang/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 | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     confirm() { | ||||
|       this.$refs.form.validate((valid) => { | ||||
|         if (valid) { | ||||
|           this.form.beginTime = this.form.activeTimeList[0] | ||||
|           this.form.endTime = this.form.activeTimeList[1] | ||||
|           this.instance.post(`/app/apppartyreport/addOrUpdate`, {...this.form}).then((res) => { | ||||
|           this.instance.post(`/app/appclapeventinfopingchang/addOrUpdate`, { | ||||
|             ...this.form,  | ||||
|             groupName: this.dictList.filter(v => v.dictValue === this.form.groupId)[0].dictName, | ||||
|           }).then((res) => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('发起活动成功') | ||||
|               this.$message.success('新增微心愿成功') | ||||
|               setTimeout(() => { | ||||
|                 this.cancel(true) | ||||
|               }, 600); | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
|         <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> | ||||
|             <!-- <el-button type="primary" icon="iconfont iconRegister" @click="isShowAdd = true" v-if="detail.eventStatus < 2">处理事件</el-button> --> | ||||
|           </div> | ||||
|         </template> | ||||
|       </ai-title> | ||||
| @@ -25,14 +25,14 @@ | ||||
|                 <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="所属地区">{{ detail.areaName }}</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> | ||||
|           <ai-card title="办事评价"> | ||||
|           <ai-card title="办事评价" v-if="detail.eventStatus == 2"> | ||||
|             <template #content> | ||||
|               <ai-wrapper> | ||||
|                 <ai-info-item label="评价时间" :value="detail.name"></ai-info-item> | ||||
| @@ -108,10 +108,12 @@ | ||||
|           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="请选择网格员或网格"> | ||||
|           <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="getGirdList().then(()=>isShowUser=true )">选择</el-button> | ||||
|                 <ai-wechat-selecter refs="addTags" :props="{id:'wxUserId',label:'name'}" :isMultiple="false" :instance="instance" v-model="forwardForm.user" @change="onChooseUser"> | ||||
|                   <el-button size="small">选择人员</el-button> | ||||
|                 </ai-wechat-selecter> | ||||
|               </template> | ||||
|             </el-input> | ||||
|           </el-form-item> | ||||
| @@ -128,37 +130,6 @@ | ||||
|           </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" @change="$refs.tree.filter(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"> | ||||
|                   <span>{{ data.isUser ? `${data.name}-${data.phone}` : data.girdName }}</span> | ||||
|                 </div> | ||||
|               </div> | ||||
|             </div> | ||||
|           </el-tree> | ||||
|         </div> | ||||
|       </ai-dialog> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
| @@ -175,11 +146,9 @@ export default { | ||||
|     return { | ||||
|       forwardForm: { | ||||
|         content: '', | ||||
|         girdId: '', | ||||
|         girdName: '', | ||||
|         girdMemberId: '', | ||||
|         girdMemberName: '', | ||||
|         name: '' | ||||
|         user: [], | ||||
|         name: '', | ||||
|         files: [] | ||||
|       }, | ||||
|       isLoading: true, | ||||
|       name: '', | ||||
| @@ -190,9 +159,6 @@ export default { | ||||
|       userList: [], | ||||
|       processList: [], | ||||
|       dictList: [], | ||||
|       defaultProps: { | ||||
|         label: 'girdName' | ||||
|       }, | ||||
|       isShowForward: false, | ||||
|       tree: [], | ||||
|       gridInfo: {}, | ||||
| @@ -203,7 +169,7 @@ export default { | ||||
|         content: [], | ||||
|         eventStatus: '2' | ||||
|       }, | ||||
|       evaluation: {} | ||||
|       evaluation: {}, | ||||
|     } | ||||
|   }, | ||||
|  | ||||
| @@ -225,7 +191,7 @@ export default { | ||||
|  | ||||
|   methods: { | ||||
|     getDetail() { | ||||
|       this.instance.post('/app/appclapeventinfo/queryDetailById', null, { | ||||
|       this.instance.post('/app/appclapeventinfopingchang/queryDetailById', null, { | ||||
|         params: {id: this.$route.query.id} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
| @@ -242,56 +208,27 @@ export default { | ||||
|         this.isLoading = false | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     getGirdList() { | ||||
|       return this.instance.post(`/app/appgirdinfo/listAllByTop`).then(res => { | ||||
|         if (res?.data) { | ||||
|           return this.tree = this.formatList([res.data]) | ||||
|         } | ||||
|       }) | ||||
|     onChooseUser(v) { | ||||
|       console.log(v) | ||||
|       this.forwardForm.user = v | ||||
|       this.forwardForm.name = v[0].name | ||||
|     }, | ||||
|  | ||||
|     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.user = [] | ||||
|       this.forwardForm.files = [] | ||||
|       this.forwardForm.name = '' | ||||
|     }, | ||||
|  | ||||
|     formatList(list) { | ||||
|       for (let item of list) { | ||||
|         item.children = [item.girdList, item.girdMemberList?.map(e => ({ | ||||
|           ...e, isUser: true, girdName: item.girdName, | ||||
|           girdId: item.id | ||||
|         })) || []].flat() | ||||
|         if (item.girdList?.length > 0) { | ||||
|           this.formatList(item.girdList) | ||||
|         } | ||||
|       } | ||||
|       return list | ||||
|     }, | ||||
|  | ||||
|     filterNode(value, data) { | ||||
|       if (!value) return true | ||||
|  | ||||
|       return (data.girdName && data.girdName.indexOf(value) !== -1) || (data.name && data.name.indexOf(value) !== -1) || (data.name && data.phone.indexOf(value) !== -1) | ||||
|     }, | ||||
|  | ||||
|     onTreeChange(e) { | ||||
|       this.gridInfo = e | ||||
|     }, | ||||
|  | ||||
|     onForwardConfirm() { | ||||
|       this.$refs.forwardForm.validate(v => { | ||||
|         if (v) { | ||||
|           this.instance.post('/app/appclapeventinfo/transferByManager', { | ||||
|           this.instance.post('/app/appclapeventinfopingchang/transfer', { | ||||
|             ...this.forwardForm, | ||||
|             id: this.$route.query.id | ||||
|           }).then(res => { | ||||
| @@ -304,22 +241,8 @@ export default { | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     onConfirm() { | ||||
|       if (this.gridInfo.userId) { | ||||
|         this.forwardForm.girdId = this.gridInfo.girdId | ||||
|         this.forwardForm.girdName = this.gridInfo.girdName | ||||
|         this.forwardForm.girdMemberId = this.gridInfo.id | ||||
|         this.forwardForm.girdMemberName = this.gridInfo.name | ||||
|       } else { | ||||
|         this.forwardForm.girdId = this.gridInfo.id | ||||
|       } | ||||
|       this.forwardForm.girdName = this.gridInfo.girdName | ||||
|       this.forwardForm.name = `${this.gridInfo.girdName}${this.gridInfo.name ? '-' + this.gridInfo.name : ''}` | ||||
|       this.isShowUser = false | ||||
|     }, | ||||
|     getDict() { | ||||
|       this.instance.post(`/app/appclapeventgroup/list?current=1&size=100000`).then(res => { | ||||
|       this.instance.post(`/app/appclapeventgrouppingchang/list?current=1&size=100000`).then(res => { | ||||
|         if (res.code == 0) { | ||||
|           this.dictList = res.data.records.map(v => { | ||||
|             return { | ||||
| @@ -330,25 +253,12 @@ export default { | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     close() { | ||||
|       this.$confirm('确定关闭该事件?').then(() => { | ||||
|         this.instance.post(`/app/appmininotice/delete?ids=${this.$route.query.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) { | ||||
| @@ -357,12 +267,11 @@ export default { | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     initMap() { | ||||
|       let {lng, lat} = this.detail | ||||
|       let center = [lng, lat] | ||||
|       AMapLoader.load({ | ||||
|         key: 'b553334ba34f7ac3cd09df9bc8b539dc', | ||||
|         key: '54a02a43d9828a8f9cd4f26fe281e74e', | ||||
|         version: '2.0' | ||||
|       }).then(AMap => { | ||||
|         let map = new AMap.Map('map', { | ||||
| @@ -376,7 +285,6 @@ export default { | ||||
|         map.add(marker) | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     handleEvent() { | ||||
|       this.$refs.form.validate(v => { | ||||
|         if (v) { | ||||
| @@ -587,5 +495,86 @@ export default { | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   .AppAnnounceDetail-select { | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|     min-height: 32px; | ||||
|     line-height: 1; | ||||
|     background: #F5F5F5; | ||||
|     border-radius: 4px; | ||||
|     border: 1px solid #D0D4DC; | ||||
|     cursor: pointer; | ||||
|     overflow: hidden; | ||||
|     transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); | ||||
|  | ||||
|     &:hover { | ||||
|       border-color: #26f; | ||||
|     } | ||||
|  | ||||
|     & > i { | ||||
|       flex: 1; | ||||
|       height: 100%; | ||||
|       line-height: 32px; | ||||
|       padding: 0 12px; | ||||
|       color: #888888; | ||||
|       font-size: 14px; | ||||
|       font-style: normal; | ||||
|       border-right: 1px solid #D0D4DC; | ||||
|       background: #fff; | ||||
|     } | ||||
|  | ||||
|     .AppAnnounceDetail-select__input { | ||||
|       position: absolute; | ||||
|       left: 0; | ||||
|       top: 0; | ||||
|       z-index: -1; | ||||
|       opacity: 0; | ||||
|       height: 100%; | ||||
|     } | ||||
|  | ||||
|     .select-right { | ||||
|       height: 100%; | ||||
|       padding: 0 12px; | ||||
|       color: #222222; | ||||
|       font-size: 12px; | ||||
|       cursor: pointer; | ||||
|       transition: all ease 0.3s; | ||||
|  | ||||
|       &:hover { | ||||
|         opacity: 0.5; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .select-left { | ||||
|       display: flex; | ||||
|       flex-wrap: wrap; | ||||
|       flex: 1; | ||||
|       padding: 5px 0 0px 12px; | ||||
|       border-right: 1px solid #D0D4DC; | ||||
|       border-radius: 4px 0 0 4px; | ||||
|       background: #fff; | ||||
|  | ||||
|       em { | ||||
|         height: 22px; | ||||
|         line-height: 22px; | ||||
|         margin: 0 4px 5px 0; | ||||
|         color: #222222; | ||||
|         font-size: 12px; | ||||
|         font-style: normal; | ||||
|       } | ||||
|  | ||||
|       span { | ||||
|         height: 22px; | ||||
|         line-height: 22px; | ||||
|         margin: 0 4px 5px 0; | ||||
|         padding: 0 8px; | ||||
|         font-size: 12px; | ||||
|         color: #222222; | ||||
|         background: #F3F4F7; | ||||
|         border-radius: 2px; | ||||
|         border: 1px solid #D0D4DC; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
| @@ -11,7 +11,7 @@ | ||||
|           <el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd()"> | ||||
|             添加 | ||||
|           </el-button> | ||||
|           <ai-import :instance="instance" :dict="dict" type="appcommunitybuildinginfo" :importParams="{ areaId: userArea}" name="微心愿" | ||||
|           <ai-import :instance="instance" :dict="dict" type="appcommunitybuildinginfo" name="微心愿" | ||||
|                       @success="getList()"> | ||||
|             <el-button icon="iconfont iconImport">导入</el-button> | ||||
|           </ai-import> | ||||
| @@ -84,7 +84,7 @@ export default { | ||||
|       return [ | ||||
|         {prop: 'content', label: '内容描述', width: '300px'}, | ||||
|         {prop: 'groupName', label: '事件类型', align: 'center'}, | ||||
|         {prop: 'girdName', label: '所属网格', align: 'center'}, | ||||
|         {prop: 'areaName', label: '所属地区', align: 'center'}, | ||||
|         {prop: 'createTime', label: '上报时间', align: 'center'}, | ||||
|         {prop: 'name', label: '上报居民', align: 'center'}, | ||||
|         {prop: 'phone', label: '联系方式', align: 'center'}, | ||||
| @@ -107,7 +107,7 @@ export default { | ||||
|  | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.instance.post(`/app/appclapeventinfo/list`, null, { | ||||
|       this.instance.post(`/app/appclapeventinfopingchang/list`, null, { | ||||
|         params: { | ||||
|           ...this.search | ||||
|         } | ||||
| @@ -144,7 +144,7 @@ export default { | ||||
|     }, | ||||
|     handleDelete(ids) { | ||||
|       this.$confirm("是否要进行删除?").then(() => { | ||||
|         this.instance.post("/app/appclapeventinfo/delete", null, { | ||||
|         this.instance.post("/app/appclapeventinfopingchang/delete", null, { | ||||
|           params: {ids} | ||||
|         }).then(res => { | ||||
|           if (res?.code == 0) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user