BUG 26247
This commit is contained in:
		
							
								
								
									
										281
									
								
								packages/2.0.5/AppCodeGeneration/app/visit/Visit.vue
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										281
									
								
								packages/2.0.5/AppCodeGeneration/app/visit/Visit.vue
									
									
									
									
										vendored
									
									
								
							| @@ -23,37 +23,42 @@ | ||||
|         <ai-empty v-if="!list.length"></ai-empty> | ||||
|       </div> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShow" | ||||
|         width="1000px" | ||||
|         height="500px" | ||||
|         title="添加走访记录" | ||||
|         @close="onClose" | ||||
|         @onConfirm="onConfirm"> | ||||
|         <el-form ref="form" :model="form" label-width="110px" label-position="right"> | ||||
|           :visible.sync="isShow" | ||||
|           width="1000px" | ||||
|           height="500px" | ||||
|           title="添加走访记录" | ||||
|           @close="onClose" | ||||
|           @onConfirm="onConfirm"> | ||||
|         <el-form ref="form" :model="form" label-width="110px" label-position="right" size="small"> | ||||
|           <ai-bar title="走访记录"></ai-bar> | ||||
|           <div class="ai-form" :model="form" label-width="110px" label-position="right"> | ||||
|             <el-form-item label="走访时间" prop="visitTime" :rules="[{ required: true, message: '请选择走访时间', trigger: 'change' }]"> | ||||
|             <el-form-item label="走访时间" prop="visitTime" | ||||
|                           :rules="[{ required: true, message: '请选择走访时间', trigger: 'change' }]"> | ||||
|               <el-date-picker | ||||
|                 v-model="form.visitTime" | ||||
|                 type="date" | ||||
|                 style="width: 100%;" | ||||
|                 size="small" | ||||
|                 value-format="yyyy-MM-dd" | ||||
|                 placeholder="请选择走访时间"> | ||||
|                   v-model="form.visitTime" | ||||
|                   type="date" | ||||
|                   style="width: 100%;" | ||||
|                   value-format="yyyy-MM-dd" | ||||
|                   placeholder="请选择走访时间"> | ||||
|               </el-date-picker> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="现实状态" prop="reality" :rules="[{ required: true, message: '请选择现实状态', trigger: 'change' }]"> | ||||
|             <el-form-item label="现实状态" prop="reality" | ||||
|                           :rules="[{ required: true, message: '请选择现实状态', trigger: 'change' }]"> | ||||
|               <ai-select | ||||
|                 v-model="form.reality" | ||||
|                 :selectList="dict.getDict('visitCondolenceReality')" | ||||
|                 laceholder="请选择现实状态"> | ||||
|                   v-model="form.reality" | ||||
|                   :selectList="dict.getDict('visitCondolenceReality')" | ||||
|                   laceholder="请选择现实状态"> | ||||
|               </ai-select> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="描述" prop="description" style="width: 100%;"> | ||||
|               <el-input type="textarea" placeholder="请输入描述" v-model="form.description" :rows="4"></el-input> | ||||
|             <el-form-item label="入户走访事项" prop="description" style="width: 100%;"> | ||||
|               <el-input placeholder="请输入 入户走访事项" v-model="form.title" maxlength="30" show-word-limit/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="入户走访内容" prop="description" style="width: 100%;"> | ||||
|               <el-input type="textarea" placeholder="请输入 入户走访内容" v-model="form.description" :rows="4" maxlength="500" | ||||
|                         show-word-limit/> | ||||
|             </el-form-item> | ||||
|             <el-form-item label="图片" prop="images" style="width: 100%;"> | ||||
|               <ai-uploader v-model="form.images" :instance="instance" :limit="9"></ai-uploader> | ||||
|               <ai-uploader v-model="form.images" :instance="instance" :limit="9" isShowTip/> | ||||
|             </el-form-item> | ||||
|           </div> | ||||
|         </el-form> | ||||
| @@ -63,156 +68,156 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import { mapState } from 'vuex' | ||||
| import {mapState} from 'vuex' | ||||
|  | ||||
|   export default { | ||||
|     name: 'visit', | ||||
| export default { | ||||
|   name: 'visit', | ||||
|  | ||||
|     props: ['id', 'dict', 'instance', 'appId', 'name'], | ||||
|   props: ['id', 'dict', 'instance', 'appId', 'name'], | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         appList: [], | ||||
|         list: [], | ||||
|         loading: false, | ||||
|         isShow: false, | ||||
|         form: { | ||||
|           visitTime: '', | ||||
|           reality: '', | ||||
|           images: [], | ||||
|           description: '' | ||||
|         } | ||||
|   data() { | ||||
|     return { | ||||
|       appList: [], | ||||
|       list: [], | ||||
|       loading: false, | ||||
|       isShow: false, | ||||
|       form: { | ||||
|         visitTime: '', | ||||
|         reality: '', | ||||
|         images: [], | ||||
|         description: '' | ||||
|       } | ||||
|     }, | ||||
|      | ||||
|     computed: { | ||||
|       ...mapState(['user']) | ||||
|     }, | ||||
|     } | ||||
|   }, | ||||
|  | ||||
|     mounted () { | ||||
|       this.dict.load('visitCondolenceReality').then(() => { | ||||
|         this.getList() | ||||
|   computed: { | ||||
|     ...mapState(['user']) | ||||
|   }, | ||||
|  | ||||
|   mounted() { | ||||
|     this.dict.load('visitCondolenceReality').then(() => { | ||||
|       this.getList() | ||||
|     }) | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.loading = true | ||||
|       this.instance.post(`/app/appvisitvondolence/list?optionId=${this.id}&size=10000`).then(res => { | ||||
|         if (res.code === 0) { | ||||
|           this.list = res.data.records.map(item => { | ||||
|             return { | ||||
|               ...item, | ||||
|               images: item.images ? JSON.parse(item.images) : [] | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|  | ||||
|         this.loading = false | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getList () { | ||||
|         this.loading = true | ||||
|         this.instance.post(`/app/appvisitvondolence/list?optionId=${this.id}&size=10000`).then(res => { | ||||
|           if (res.code === 0) { | ||||
|             this.list = res.data.records.map(item => { | ||||
|               return { | ||||
|                 ...item, | ||||
|                 images: item.images ? JSON.parse(item.images) : [] | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|     onConfirm() { | ||||
|       this.$refs.form.validate((valid) => { | ||||
|         if (valid) { | ||||
|           this.instance.post(`/app/appvisitvondolence/addOrUpdate`, { | ||||
|             ...this.form, | ||||
|             optionId: this.id, | ||||
|             images: JSON.stringify(this.form.images), | ||||
|             applicationId: this.appId, | ||||
|             name: this.name, | ||||
|             visitTime: this.form.visitTime + ' 23:59:59' | ||||
|           }).then(res => { | ||||
|             if (res.code === 0) { | ||||
|               this.$message.success('添加成功') | ||||
|               this.isShow = false | ||||
|  | ||||
|           this.loading = false | ||||
|         }) | ||||
|       }, | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|       onConfirm () { | ||||
|         this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
|             this.instance.post(`/app/appvisitvondolence/addOrUpdate`, { | ||||
|               ...this.form, | ||||
|               optionId: this.id, | ||||
|               images: JSON.stringify(this.form.images), | ||||
|               applicationId: this.appId, | ||||
|               name: this.name, | ||||
|               visitTime: this.form.visitTime + ' 23:59:59' | ||||
|             }).then(res => { | ||||
|               if (res.code === 0) { | ||||
|                 this.$message.success('添加成功') | ||||
|                 this.isShow = false | ||||
|     onClose() { | ||||
|  | ||||
|                 this.getList() | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onClose () { | ||||
|  | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
|   .visit { | ||||
|     .visit-list { | ||||
|       .visit-item { | ||||
|         padding: 10px 0; | ||||
|         border-bottom: 1px solid #eee; | ||||
| .visit { | ||||
|   .visit-list { | ||||
|     .visit-item { | ||||
|       padding: 10px 0; | ||||
|       border-bottom: 1px solid #eee; | ||||
|  | ||||
|         &:first-child { | ||||
|           padding-top: 0; | ||||
|       &:first-child { | ||||
|         padding-top: 0; | ||||
|       } | ||||
|  | ||||
|       &:last-child { | ||||
|         border-bottom: none; | ||||
|       } | ||||
|  | ||||
|       .visit-status { | ||||
|         display: flex; | ||||
|         align-items: center; | ||||
|         font-size: 14px; | ||||
|  | ||||
|         span { | ||||
|           color: #333; | ||||
|         } | ||||
|  | ||||
|         &:last-child { | ||||
|           border-bottom: none; | ||||
|         i { | ||||
|           color: #999; | ||||
|           font-style: normal; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|         .visit-status { | ||||
|           display: flex; | ||||
|           align-items: center; | ||||
|       & > p { | ||||
|         line-height: 1.4; | ||||
|         margin-bottom: 4px; | ||||
|         text-align: justify; | ||||
|         color: #666; | ||||
|         font-size: 16px; | ||||
|       } | ||||
|  | ||||
|       .visit-item__top { | ||||
|         display: flex; | ||||
|         align-items: center; | ||||
|         justify-content: space-between; | ||||
|         margin-bottom: 10px; | ||||
|  | ||||
|         span { | ||||
|           font-size: 14px; | ||||
|  | ||||
|           span { | ||||
|             color: #333; | ||||
|           } | ||||
|  | ||||
|           i { | ||||
|             color: #999; | ||||
|             font-style: normal; | ||||
|           } | ||||
|           color: #999; | ||||
|         } | ||||
|  | ||||
|         & > p { | ||||
|           line-height: 1.4; | ||||
|           margin-bottom: 4px; | ||||
|           text-align: justify; | ||||
|           color: #666; | ||||
|           font-size: 16px; | ||||
|         } | ||||
|  | ||||
|         .visit-item__top { | ||||
|         .left { | ||||
|           display: flex; | ||||
|           align-items: center; | ||||
|           justify-content: space-between; | ||||
|           margin-bottom: 10px; | ||||
|  | ||||
|           span { | ||||
|           img, .avatar { | ||||
|             width: 40px; | ||||
|             height: 40px; | ||||
|             line-height: 40px; | ||||
|             text-align: center; | ||||
|             margin-right: 10px; | ||||
|             border-radius: 50%; | ||||
|             font-size: 14px; | ||||
|             color: #999; | ||||
|             color: #fff; | ||||
|             background: #26f; | ||||
|           } | ||||
|  | ||||
|           .left { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|  | ||||
|             img, .avatar { | ||||
|               width: 40px; | ||||
|               height: 40px; | ||||
|               line-height: 40px; | ||||
|               text-align: center; | ||||
|               margin-right: 10px; | ||||
|               border-radius: 50%; | ||||
|               font-size: 14px; | ||||
|               color: #fff; | ||||
|               background: #26f; | ||||
|             } | ||||
|  | ||||
|             h2 { | ||||
|               font-size: 16px; | ||||
|               font-weight: 500; | ||||
|             } | ||||
|           h2 { | ||||
|             font-size: 16px; | ||||
|             font-weight: 500; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user