四邻联动页面完成
This commit is contained in:
		| @@ -0,0 +1,51 @@ | ||||
| <template> | ||||
|   <section class="AppHelpByNeighbours"> | ||||
|     <ai-list isTabs> | ||||
|       <ai-title slot="title" title="四邻联动"/> | ||||
|       <template #tabs> | ||||
|         <el-tabs> | ||||
|           <el-tab-pane label="四联联动记录"> | ||||
|             <hbn-list v-bind="$props"/> | ||||
|           </el-tab-pane> | ||||
|           <el-tab-pane label="联动记录审批" lazy> | ||||
|             <hbn-audit-list v-bind="$props"/> | ||||
|           </el-tab-pane> | ||||
|         </el-tabs> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|  | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import HbnList from "./hbnList"; | ||||
| import HbnAuditList from "./hbnAuditList"; | ||||
|  | ||||
| export default { | ||||
|   name: "AppHelpByNeighbours", | ||||
|   components: {HbnAuditList, HbnList}, | ||||
|   label: "四邻联动", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict.load('yesOrNo') | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppHelpByNeighbours { | ||||
|   height: 100%; | ||||
|  | ||||
|   ::v-deep.mar-t16 { | ||||
|     margin-top: 16px; | ||||
|   } | ||||
|  | ||||
|   ::v-deep.mar-t8 { | ||||
|     margin-top: 8px; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										111
									
								
								project/sanjianxi/apps/AppHelpByNeighbours/hbnAuditList.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								project/sanjianxi/apps/AppHelpByNeighbours/hbnAuditList.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,111 @@ | ||||
| <template> | ||||
|   <section class="hbnAuditList mar-t16"> | ||||
|     <ai-card hideTitle> | ||||
|       <template #content> | ||||
|         <ai-search-bar class="mar-t8"> | ||||
|           <template #left> | ||||
|             <el-date-picker v-model="search.createTime" type="date" placeholder="日期" size="small" clearable | ||||
|                             @change="page.current=1,getTableData()"/> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input size="small" placeholder="搜索党员/四邻信息" v-model="search.name" clearable | ||||
|                       @change="page.current=1,getTableData()"/> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" | ||||
|                   @getList="getTableData" :col-configs="colConfigs" :dict="dict"> | ||||
|           <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||
|             <template slot-scope="{row}"> | ||||
|               <el-button type="text" @click="handleAudit(row.id)">审批</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-card> | ||||
|     <ai-dialog title="联动记录审核" :visible.sync="dialog" @closed="form={}" @onConfirm="submit" width="600px"> | ||||
|       <el-form :model="form" size="small" ref="DialogForm" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="是否通过审核" prop="auditStatus"> | ||||
|           <ai-select v-model="form.auditStatus" placeholder="请选择党员" :selectList="dict.getDict('yesOrNo')"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="审批意见" prop="remark" v-if="form.auditStatus==0"> | ||||
|           <el-input type="textarea" v-model="form.remark" placeholder="请输入审批意见" maxlength="200" show-word-limit | ||||
|                     rows="5"/> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: "hbnAuditList", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {label: "党员", prop: "productName"}, | ||||
|         {label: "四邻信息", prop: "productName"}, | ||||
|         {label: "描述", prop: "productName"}, | ||||
|         {label: "日期", prop: "productName"}, | ||||
|         {label: "状态", prop: "status"}, | ||||
|         {slot: "options"} | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       search: {name: ""}, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       form: {}, | ||||
|       rules: {} | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/app/appfinancialloanapply/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data?.records | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$refs.DialogForm.validate(v => { | ||||
|         if (v) { | ||||
|           this.instance.post("/app/appfinancialloanapply/addOrUpdate", this.form).then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.dialog = false | ||||
|               this.getTableData() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleAudit(row) { | ||||
|       this.form = JSON.parse(JSON.stringify(row)) | ||||
|       this.dialog = true | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getTableData() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .hbnAuditList { | ||||
|   height: fit-content; | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										137
									
								
								project/sanjianxi/apps/AppHelpByNeighbours/hbnList.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										137
									
								
								project/sanjianxi/apps/AppHelpByNeighbours/hbnList.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,137 @@ | ||||
| <template> | ||||
|   <section class="hbnList mar-t16"> | ||||
|     <ai-card hideTitle> | ||||
|       <template #content> | ||||
|         <ai-search-bar class="mar-t8"> | ||||
|           <template #left> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="dialog=true">添加</el-button> | ||||
|             <el-button icon="iconfont iconDelete" :disabled="!search.ids" @click="handleDelete(search.ids)">删除 | ||||
|             </el-button> | ||||
|             <el-date-picker v-model="search.createTime" type="date" placeholder="日期" size="small" clearable | ||||
|                             @change="page.current=1,getTableData()"/> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input size="small" placeholder="搜索党员/四邻信息" v-model="search.name" clearable | ||||
|                       @change="page.current=1,getTableData()"/> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" | ||||
|                   @getList="getTableData" :col-configs="colConfigs" :dict="dict" | ||||
|                   @selection-change="v=>search.ids=v.map(e=>e.id).toString()"> | ||||
|           <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||
|             <template slot-scope="{row}"> | ||||
|               <el-button type="text" @click="handleEdit(row)">编辑</el-button> | ||||
|               <el-button type="text" @click="handleDelete(row.id)">删除</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-card> | ||||
|     <ai-dialog title="四邻联动信息" :visible.sync="dialog" @closed="form={}" @onConfirm="submit" width="600px"> | ||||
|       <el-form :model="form" size="small" ref="DialogForm" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="党员" prop="partyId"> | ||||
|           <ai-select v-model="form.partyId" placeholder="请选择党员"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="四邻信息" prop="partyId"> | ||||
|           <ai-select v-model="form.partyId" placeholder="请选择四邻信息"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="日期" prop="time"> | ||||
|           <el-date-picker v-model="form.time" clearable placeholder="日期"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="描述" prop="description"> | ||||
|           <el-input type="textarea" v-model="form.description" rows="5" maxlength="200" show-word-limit/> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: "hbnList", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {type: 'selection'}, | ||||
|         {label: "党员", prop: "productName"}, | ||||
|         {label: "四邻信息", prop: "productName"}, | ||||
|         {label: "描述", prop: "productName"}, | ||||
|         {label: "日期", prop: "productName"}, | ||||
|         {slot: "options"} | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       search: {name: ""}, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       form: {}, | ||||
|       rules: {} | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/app/appfinancialloanapply/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data?.records | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleDelete(ids) { | ||||
|       this.$confirm("是否要删除联动记录?").then(() => { | ||||
|         this.instance.post("/app/appfinancialloanapply/delete", null, { | ||||
|           params: {ids} | ||||
|         }).then(res => { | ||||
|           if (res?.code == 0) { | ||||
|             this.$message.success("删除成功!") | ||||
|             this.getTableData() | ||||
|           } | ||||
|         }) | ||||
|       }).catch(() => 0) | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$refs.DialogForm.validate(v => { | ||||
|         if (v) { | ||||
|           this.instance.post("/app/appfinancialloanapply/addOrUpdate", this.form).then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.dialog = false | ||||
|               this.getTableData() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     handleEdit(row) { | ||||
|       this.form = JSON.parse(JSON.stringify(row)) | ||||
|       this.dialog = true | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.getTableData() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .hbnList { | ||||
|   height: fit-content; | ||||
|  | ||||
|   .el-date-editor { | ||||
|     width: 100%; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user