风险预警
This commit is contained in:
		
							
								
								
									
										73
									
								
								packages/jianping/AppRiskWarning/AppRiskWarning.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								packages/jianping/AppRiskWarning/AppRiskWarning.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,73 @@ | ||||
| <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 Add from './components/Add' | ||||
|   import Detail from './components/Detail' | ||||
|  | ||||
|   export default { | ||||
|     name: 'AppRiskWarning', | ||||
|     label: '风险预警', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         component: 'List', | ||||
|         params: {}, | ||||
|         include: [] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     components: { | ||||
|       Add, | ||||
|       List, | ||||
|       Detail | ||||
|     }, | ||||
|  | ||||
|     mounted () { | ||||
|     }, | ||||
|  | ||||
|     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> | ||||
|  | ||||
| <style lang="scss"> | ||||
|   .doc-circulation { | ||||
|     height: 100%; | ||||
|     background: #F3F6F9; | ||||
|     overflow: auto; | ||||
|   } | ||||
| </style> | ||||
							
								
								
									
										155
									
								
								packages/jianping/AppRiskWarning/components/Add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										155
									
								
								packages/jianping/AppRiskWarning/components/Add.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,155 @@ | ||||
| <template> | ||||
|   <ai-detail> | ||||
|     <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 ref="form" class="ai-form" :model="form" label-width="110px" label-position="right"> | ||||
|             <el-form-item label="姓名" prop="name" :rules="[{ required: true, message: '请输入姓名', trigger: 'blur' }]"> | ||||
|               <el-input v-model="form.name" size="small" placeholder="请输入姓名"></el-input> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="联系方式" prop="phone" :rules="[{ required: true, validator: validatorPhone, trigger: 'blur' }]"> | ||||
|               <el-input v-model="form.phone" :maxlength="11" size="small" placeholder="请输入..."></el-input> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="风险类型" prop="idNumber" :rules="[{ required: true, message: '请选择风险类型', trigger: 'blur' }]"> | ||||
|               <ai-select | ||||
|                 v-model="form.checkResult" | ||||
|                 clearable | ||||
|                 placeholder="请选择风险类型" | ||||
|                 :selectList="dict.getDict('epidemicRecentTestResult')"> | ||||
|               </ai-select> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="身份证号" prop="idNumber" :rules="[{ required: true, validator: validatorId, trigger: 'blur' }]"> | ||||
|               <el-input v-model="form.idNumber" :maxlength="20" size="small" placeholder="请输入..."></el-input> | ||||
|             </el-form-item> | ||||
|             <el-form-item style="width: 100%!important;" label="所在地区" prop="areaId" :rules="[{ required: true, message: '请选择所在地区', trigger: 'change' }]"> | ||||
|               <ai-area-select | ||||
|                 v-model="form.areaId" | ||||
|                 always-show | ||||
|                 :disabled="form.applyType === '1'" | ||||
|                 :instance="$http" | ||||
|                 clearable | ||||
|                 @fullname="v=>form.areaName = v" | ||||
|                 :disabledLevel="3"/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="联系地址" prop="idNumber" style="width: 100%;"> | ||||
|               <el-input v-model="form.idNumber" :maxlength="30" size="small" placeholder="请输入联系地址"></el-input> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="备注说明" prop="idNumber" style="width: 100%;"> | ||||
|               <el-input v-model="form.idNumber" :rows="5" style="width: 100%;" type="textarea" :maxlength="500" size="small" placeholder="请输入..."></el-input> | ||||
|             </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> | ||||
|   export default { | ||||
|     name: 'Add', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       params: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       const validatorId = (rule, value, callback) => { | ||||
|         if (value === '') { | ||||
|           callback(new Error('请输入身份证号')) | ||||
|         } else if (!this.idCardNoUtil.checkIdCardNo(value)) { | ||||
|           callback(new Error('身份证号格式错误')) | ||||
|         } else { | ||||
|           callback() | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       const validatorPhone = function (rule, value, callback) { | ||||
|         if (value === '') { | ||||
|           callback(new Error('请输入联系方式')) | ||||
|         } else if (!/^1\d{10}$/.test(value)) { | ||||
|           callback(new Error('手机号格式错误')) | ||||
|         } else { | ||||
|           callback() | ||||
|         } | ||||
|       } | ||||
|       return { | ||||
|         info: {}, | ||||
|         validatorId, | ||||
|         validatorPhone, | ||||
|         form: { | ||||
|           title: '', | ||||
|           content: '', | ||||
|           publishUnitName: '', | ||||
|           images: [] | ||||
|         }, | ||||
|         id: '' | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       if (this.params && this.params.id) { | ||||
|         this.id = this.params.id | ||||
|         this.getInfo(this.params.id) | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getInfo (id) { | ||||
|         this.instance.post(`/app/appmininotice/queryDetailById?id=${id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.form = { | ||||
|               ...res.data, | ||||
|               images: res.data.images ? JSON.parse(res.data.images) : [] | ||||
|             } | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onClose () { | ||||
|         this.form.explain = '' | ||||
|       }, | ||||
|  | ||||
|       confirm () { | ||||
|         this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
|             if (!this.form.content && !this.form.images.length) { | ||||
|               return this.$message.error('请输入正文或上传图片') | ||||
|             } | ||||
|  | ||||
|             this.instance.post(`/app/appmininotice/addOrUpdate`, { | ||||
|               ...this.form, | ||||
|               images: this.form.images ? JSON.stringify(this.form.images) : [] | ||||
|             }).then(res => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success('提交成功') | ||||
|                 setTimeout(() => { | ||||
|                   this.cancel(true) | ||||
|                 }, 600) | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel (isRefresh) { | ||||
|         this.$emit('change', { | ||||
|           type: 'List', | ||||
|           isRefresh: !!isRefresh | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| </style> | ||||
							
								
								
									
										71
									
								
								packages/jianping/AppRiskWarning/components/Detail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								packages/jianping/AppRiskWarning/components/Detail.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,71 @@ | ||||
| <template> | ||||
|   <ai-detail> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"> | ||||
|       </ai-title> | ||||
|     </template> | ||||
|     <template slot="content"> | ||||
|       <ai-card title="基本信息"> | ||||
|         <template #content> | ||||
|           <ai-wrapper> | ||||
|             <ai-info-item label="标题" isLine :value="info.title"></ai-info-item> | ||||
|             <ai-info-item label="发布组织" isLine :value="info.publishUnitName"></ai-info-item> | ||||
|             <ai-info-item label="正文" isLine> | ||||
|               <AiArticle :value="info.content"></AiArticle> | ||||
|             </ai-info-item> | ||||
|             <ai-info-item label="图片" isLine> | ||||
|               <ai-uploader v-model="info.images" disabled :instance="instance" :limit="9"></ai-uploader> | ||||
|             </ai-info-item> | ||||
|           </ai-wrapper> | ||||
|         </template> | ||||
|       </ai-card> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   export default { | ||||
|     name: 'Detail', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       params: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         info: {}, | ||||
|         id: '' | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       if (this.params && this.params.id) { | ||||
|         this.id = this.params.id | ||||
|         this.getInfo(this.params.id) | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getInfo (id) { | ||||
|         this.instance.post(`/app/appmininotice/queryDetailById?id=${id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.info = res.data | ||||
|             this.info.images = res.data.images ? JSON.parse(res.data.images) : [] | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel (isRefresh) { | ||||
|         this.$emit('change', { | ||||
|           type: 'List', | ||||
|           isRefresh: !!isRefresh | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| </style> | ||||
							
								
								
									
										167
									
								
								packages/jianping/AppRiskWarning/components/List.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										167
									
								
								packages/jianping/AppRiskWarning/components/List.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,167 @@ | ||||
| <template> | ||||
|   <ai-list class="notice"> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="风险预警" isShowBottomBorder></ai-title> | ||||
|     </template> | ||||
|     <template slot="content"> | ||||
|       <ai-search-bar bottomBorder> | ||||
|         <template #left> | ||||
|           <ai-select | ||||
|             v-model="search.checkResult" | ||||
|             clearable | ||||
|             placeholder="请选择风险类型" | ||||
|             :selectList="dict.getDict('epidemicRecentTestResult')" | ||||
|             @change="search.current = 1, getList()"> | ||||
|           </ai-select> | ||||
|           <el-button icon="iconfont iconAdd" type="primary" size="small" @click="toAdd">添加 </el-button> | ||||
|         </template> | ||||
|         <template #right> | ||||
|           <el-input | ||||
|             v-model="search.name" | ||||
|             size="small" | ||||
|             placeholder="姓名/风险说明/操作人" | ||||
|             clearable | ||||
|             v-throttle="() => {search.current = 1, getList()}" | ||||
|             @clear="search.current = 1, search.name = '', getList()" | ||||
|             suffix-icon="iconfont iconSearch"> | ||||
|           </el-input> | ||||
|         </template> | ||||
|       </ai-search-bar> | ||||
|       <ai-search-bar bottomBorder style="margin-top: 12px;"> | ||||
|         <template #left> | ||||
|           <el-button icon="iconfont iconDelete" size="small" @click="removeAll" :disabled="ids.length == 0">删除 </el-button> | ||||
|         </template> | ||||
|         <template #right> | ||||
|           <ai-download :instance="instance" url="/app/appepidemicreportmember/export" :params="search" fileName="健康上报" :disabled="tableData.length == 0"> | ||||
|             <el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button> | ||||
|           </ai-download> | ||||
|           <ai-import :instance="instance" :dict="dict" type="appcommunitybuildinginfo" :importParams="search" name="风险预警" @success="getList()"> | ||||
|             <el-button icon="iconfont iconImport">导入</el-button> | ||||
|           </ai-import> | ||||
|         </template> | ||||
|       </ai-search-bar> | ||||
|       <ai-table | ||||
|         :tableData="tableData" | ||||
|         :col-configs="colConfigs" | ||||
|         :total="total" | ||||
|         style="margin-top: 12px;" | ||||
|         :current.sync="search.current" | ||||
|         :size.sync="search.size" | ||||
|         @selection-change="(v) => (ids = v.map((e) => e.id))" | ||||
|         @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="120px" fixed="right" label="操作" align="center"> | ||||
|           <div class="table-options" slot-scope="{ row }"> | ||||
|             <el-button type="text" @click="toDetail(row.id)">详情</el-button> | ||||
|             <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||
|           </div> | ||||
|         </el-table-column> | ||||
|       </ai-table> | ||||
|     </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: '' | ||||
|         }, | ||||
|         ids: [], | ||||
|         total: 10, | ||||
|         colConfigs: [ | ||||
|           { type: 'selection' }, | ||||
|           {prop: 'title', label: '姓名', align: 'left'}, | ||||
|           {prop: 'createUserName', label: '联系方式', align: 'center' }, | ||||
|           {prop: 'publishUnitName', label: '风险类型', align: 'center'}, | ||||
|           {prop: 'createTime', label: '所属区域', align: 'center' }, | ||||
|           {prop: 'createUserName', label: '备注说明', align: 'center' }, | ||||
|           {prop: 'publishUnitName', label: '操作时间', align: 'center'}, | ||||
|           {prop: 'createTime', label: '操作人', align: 'center' }, | ||||
|           {prop: 'createTime', label: '归口部门', align: 'center' }, | ||||
|           {slot: 'options', label: '操作'} | ||||
|         ], | ||||
|         tableData: [] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']) | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       this.dict.load('epidemicRecentTestResult').then(() => { | ||||
|         this.getList() | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getList() { | ||||
|         this.instance.post(`/app/appmininotice/list`, null, { | ||||
|           params: { | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records | ||||
|             this.total = res.data.total | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       removeAll () { | ||||
|         var id = this.ids.join(',') | ||||
|         this.remove(id) | ||||
|       }, | ||||
|  | ||||
|       remove(id) { | ||||
|         this.$confirm('确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/appmininotice/delete?ids=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toDetail (id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Detail', | ||||
|           params: { | ||||
|             id: id || '' | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toAdd(id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Add', | ||||
|           params: { | ||||
|             id: id || '' | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| </style> | ||||
							
								
								
									
										66
									
								
								packages/jianping/AppVisitToVerify/AppVisitToVerify.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								packages/jianping/AppVisitToVerify/AppVisitToVerify.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,66 @@ | ||||
| <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' | ||||
|  | ||||
|   export default { | ||||
|     name: 'AppVisitToVerify', | ||||
|     label: '走访核实', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         component: 'List', | ||||
|         params: {}, | ||||
|         include: [] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     components: { | ||||
|       List, | ||||
|       Detail | ||||
|     }, | ||||
|  | ||||
|     mounted () { | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       onChange (data) { | ||||
|         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> | ||||
|  | ||||
| <style lang="scss"> | ||||
|   .doc-circulation { | ||||
|     height: 100%; | ||||
|     background: #F3F6F9; | ||||
|     overflow: auto; | ||||
|   } | ||||
| </style> | ||||
							
								
								
									
										139
									
								
								packages/jianping/AppVisitToVerify/components/Detail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										139
									
								
								packages/jianping/AppVisitToVerify/components/Detail.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,139 @@ | ||||
| <template> | ||||
|   <ai-detail> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"> | ||||
|         <template #rightBtn> | ||||
|           <el-button size="small" type="primary" @click="isShow = true">处理结果</el-button> | ||||
|         </template> | ||||
|       </ai-title> | ||||
|     </template> | ||||
|     <template slot="content"> | ||||
|       <ai-card title="基本信息"> | ||||
|         <template #content> | ||||
|           <ai-wrapper> | ||||
|             <ai-info-item label="姓名" :value="info.title"></ai-info-item> | ||||
|             <ai-info-item label="联系方式" :value="info.publishUnitName"></ai-info-item> | ||||
|             <ai-info-item label="风险类型" :value="info.publishUnitName"></ai-info-item> | ||||
|             <ai-info-item label="身份证号" :value="info.publishUnitName"></ai-info-item> | ||||
|             <ai-info-item label="所属区域" isLine :value="info.publishUnitName"></ai-info-item> | ||||
|             <ai-info-item label="联系地址" isLine :value="info.publishUnitName"></ai-info-item> | ||||
|             <ai-info-item label="备注说明" isLine :value="info.publishUnitName"></ai-info-item> | ||||
|             <ai-info-item label="处理时间" :value="info.publishUnitName"></ai-info-item> | ||||
|             <ai-info-item label="处理人" :value="info.publishUnitName"></ai-info-item> | ||||
|             <ai-info-item label="状态" isLine :value="info.publishUnitName"></ai-info-item> | ||||
|           </ai-wrapper> | ||||
|         </template> | ||||
|       </ai-card> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShow" | ||||
|         width="800px" | ||||
|         @close="onClose" | ||||
|         title="审核" | ||||
|         @onConfirm="onConfirm"> | ||||
|         <el-form class="ai-form" label-width="110px" :model="form" ref="form"> | ||||
|           <el-form-item label="处理意见" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择处理意见' }]"> | ||||
|             <el-radio-group v-model="form.pass" @change="onStatusChange"> | ||||
|               <el-radio label="0">否</el-radio> | ||||
|               <el-radio label="1">是</el-radio> | ||||
|             </el-radio-group> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="备注说明" prop="opinion" style="width: 100%;" :rules="[{ required: true, message: '请输入备注说明' }]"> | ||||
|             <el-input type="textarea" :rows="5" :maxlength="200" v-model="form.opinion" 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"> | ||||
|               <template slot="tips"> | ||||
|                 <p>最多上传9张图片,单个文件最大10MB,支持jpg、jpeg、png格式</p> | ||||
|               </template> | ||||
|             </ai-uploader> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   export default { | ||||
|     name: 'Detail', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       params: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         info: {}, | ||||
|         id: '', | ||||
|         form: { | ||||
|           opinion: '', | ||||
|           pass: '', | ||||
|           files: [] | ||||
|         }, | ||||
|         isShow: false | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       if (this.params && this.params.id) { | ||||
|         this.id = this.params.id | ||||
|         this.getInfo(this.params.id) | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getInfo (id) { | ||||
|         this.instance.post(`/app/appmininotice/queryDetailById?id=${id}`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.info = res.data | ||||
|             this.info.images = res.data.images ? JSON.parse(res.data.images) : [] | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onStatusChange () { | ||||
|         this.form.opinion = '' | ||||
|         this.$refs.form.clearValidate() | ||||
|       }, | ||||
|  | ||||
|       onClose () { | ||||
|         this.form.opinion = '' | ||||
|         this.form.pass = '' | ||||
|       }, | ||||
|  | ||||
|       onConfirm () { | ||||
|         this.$refs.form.validate(v => { | ||||
|           if (v) { | ||||
|             this.instance.post('/app/appcontentinfo/examine', null, { | ||||
|               params: { | ||||
|                 ...this.form, | ||||
|                 id: this.id | ||||
|               } | ||||
|             }).then(res => { | ||||
|               if (res?.code == 0) { | ||||
|                 this.isShow = false | ||||
|                 this.getList() | ||||
|                 this.$message.success('审核成功!') | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       cancel (isRefresh) { | ||||
|         this.$emit('change', { | ||||
|           type: 'List', | ||||
|           isRefresh: !!isRefresh | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| </style> | ||||
							
								
								
									
										179
									
								
								packages/jianping/AppVisitToVerify/components/List.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										179
									
								
								packages/jianping/AppVisitToVerify/components/List.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,179 @@ | ||||
| <template> | ||||
|   <ai-list class="notice"> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="走访核实" isShowBottomBorder></ai-title> | ||||
|     </template> | ||||
|     <template slot="content"> | ||||
|       <ai-search-bar> | ||||
|         <template #left> | ||||
|           <ai-select | ||||
|             v-model="search.checkResult" | ||||
|             clearable | ||||
|             placeholder="请选择风险类型" | ||||
|             :selectList="dict.getDict('epidemicRecentTestResult')" | ||||
|             @change="search.current = 1, getList()"> | ||||
|           </ai-select> | ||||
|           <ai-select | ||||
|             v-model="search.checkResult" | ||||
|             clearable | ||||
|             placeholder="请选择状态" | ||||
|             :selectList="dict.getDict('epidemicRecentTestResult')" | ||||
|             @change="search.current = 1, getList()"> | ||||
|           </ai-select> | ||||
|           <el-button size="small" :disabled="ids.length == 0" type="primary">纳入监测</el-button> | ||||
|           <el-button size="small" :disabled="ids.length == 0">解除风险</el-button> | ||||
|         </template> | ||||
|         <template #right> | ||||
|           <el-input | ||||
|             v-model="search.name" | ||||
|             size="small" | ||||
|             placeholder="姓名/风险说明/操作人" | ||||
|             clearable | ||||
|             v-throttle="() => {search.current = 1, getList()}" | ||||
|             @clear="search.current = 1, search.name = '', getList()" | ||||
|             suffix-icon="iconfont iconSearch"> | ||||
|           </el-input> | ||||
|         </template> | ||||
|       </ai-search-bar> | ||||
|       <ai-table | ||||
|         :tableData="tableData" | ||||
|         :col-configs="colConfigs" | ||||
|         :total="total" | ||||
|         style="margin-top: 12px;" | ||||
|         :current.sync="search.current" | ||||
|         :size.sync="search.size" | ||||
|         @selection-change="(v) => (ids = v.map((e) => e.id))" | ||||
|         @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="90px" fixed="right" label="操作" align="center"> | ||||
|           <div class="table-options" slot-scope="{ row }"> | ||||
|             <el-button type="text" @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', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|     data() { | ||||
|       return { | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           title: '' | ||||
|         }, | ||||
|         ids: [], | ||||
|         total: 10, | ||||
|         tableData: [] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     computed: { | ||||
|       ...mapState(['user']), | ||||
|  | ||||
|       colConfigs () { | ||||
|         return [ | ||||
|           { type: 'selection' }, | ||||
|           { prop: 'title', label: '姓名', align: 'left' }, | ||||
|           { prop: 'createUserName', label: '联系方式', align: 'center' }, | ||||
|           { prop: 'publishUnitName', label: '风险类型', align: 'center'}, | ||||
|           { prop: 'createTime', label: '所属区域', align: 'center' }, | ||||
|           { prop: 'createUserName', label: '备注说明', align: 'center' }, | ||||
|           { | ||||
|             prop: 'status', | ||||
|             label: '状态', | ||||
|             align: 'center', | ||||
|             render: (h, { row }) => { | ||||
|               return h( | ||||
|                 "span", | ||||
|                 { | ||||
|                   style: { | ||||
|                     color: this.dict.getColor('epidemicRecentTestResult', row.status) | ||||
|                   } | ||||
|                 }, | ||||
|                 this.dict.getLabel('epidemicRecentTestResult', row.status) | ||||
|               ) | ||||
|             } | ||||
|           }, | ||||
|           {prop: 'createTime', label: '处理时间', align: 'center' }, | ||||
|           {prop: 'createTime', label: '处理人', align: 'center' }, | ||||
|           {slot: 'options', label: '操作'} | ||||
|         ] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       this.dict.load('epidemicRecentTestResult').then(() => { | ||||
|         this.getList() | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getList() { | ||||
|         this.instance.post(`/app/appmininotice/list`, null, { | ||||
|           params: { | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records | ||||
|             this.total = res.data.total | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       removeAll () { | ||||
|         var id = this.ids.join(',') | ||||
|         this.remove(id) | ||||
|       }, | ||||
|  | ||||
|       remove(id) { | ||||
|         this.$confirm('确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/appmininotice/delete?ids=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toDetail (id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Detail', | ||||
|           params: { | ||||
|             id: id || '' | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toAdd(id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Add', | ||||
|           params: { | ||||
|             id: id || '' | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user