党员积分明细完成
This commit is contained in:
		
							
								
								
									
										35
									
								
								packages/party/AppPartyScoreFlow/AppPartyScoreFlow.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								packages/party/AppPartyScoreFlow/AppPartyScoreFlow.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| <template> | ||||
|   <section class="AppPartyScoreFlow"> | ||||
|     <component :is="currentPage" v-bind="$props"/> | ||||
|     <psf-list | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import PsfList from "./psfList"; | ||||
|  | ||||
| export default { | ||||
|   name: "AppPartyScoreFlow", | ||||
|   components: {PsfList}, | ||||
|   label: "党员积分明细", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   computed: { | ||||
|     currentPage() { | ||||
|       return PsfList | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict.load("partyIntegralType") | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppPartyScoreFlow { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										129
									
								
								packages/party/AppPartyScoreFlow/psfList.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										129
									
								
								packages/party/AppPartyScoreFlow/psfList.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,129 @@ | ||||
| <template> | ||||
|   <section class="psfList"> | ||||
|     <ai-list> | ||||
|       <ai-title slot="title" title="党员积分明细" isShowBottomBorder/> | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <template #left> | ||||
|             <el-button type="primary" icon="iconfont iconAdd" @click="dialog=true">添加</el-button> | ||||
|             <el-date-picker v-model="search.createTime" type="daterange" placeholder="日期" size="small" clearable | ||||
|                             @change="handleSearchTime" start-placeholder="开始时间" end-placeholder="结束时间"/> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input size="small" placeholder="搜索党员" v-model="search.partyName" 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="showDetail(row)">详情</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|     <ai-dialog :visible.sync="dialog" title="积分对象" width="600px" @close="form={}" @onConfirm="submit" | ||||
|                :customFooter="!isAdd"> | ||||
|       <el-form v-if="isAdd" :model="form" size="small" ref="DialogForm" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="选择人员" prop="partyId"> | ||||
|           <ai-select v-model="form.partyId" action="/app/appparty/list" :instance="instance" | ||||
|                      :prop="{label:'name'}"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="调整说明" prop="remark"> | ||||
|           <el-input type="textarea" placeholder="请输入" v-model="form.remark" maxlength="100" show-word-limit rows="3" | ||||
|                     clearable/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="类型" prop="integralType"> | ||||
|           <ai-select v-model="form.integralType" :selectList="dict.getDict('partyIntegralType')"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="积分" prop="integral"> | ||||
|           <el-input v-model.number="form.integral" placeholder="请输入正整数" clearable/> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|       <ai-wrapper v-else> | ||||
|         <ai-info-item label="对象" :value="form.partyName"/> | ||||
|         <ai-info-item label="调整说明" :value="form.remark" isLine/> | ||||
|         <ai-info-item label="类型" :value="dict.getLabel('partyIntegralType',form.integralType)"/> | ||||
|         <ai-info-item label="积分" :value="form.integral"/> | ||||
|       </ai-wrapper> | ||||
|     </ai-dialog> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: "psfList", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         {label: "对象", prop: "partyName"}, | ||||
|         {label: "调整说明", prop: "remark", align: "center"}, | ||||
|         {label: "事件", prop: "createTime"}, | ||||
|         {label: "类型", prop: "integralType", align: "center", dict: "partyIntegralType"}, | ||||
|         {label: "积分", prop: "integral", align: "center"}, | ||||
|         {slot: "options"} | ||||
|       ] | ||||
|     }, | ||||
|     isAdd() { | ||||
|       return !this.form.id | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       search: {}, | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       tableData: [], | ||||
|       dialog: false, | ||||
|       form: {}, | ||||
|       rules: {} | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() { | ||||
|       this.instance.post("/app/apppartyintegralinfo/list", null, { | ||||
|         params: {...this.page, ...this.search} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.tableData = res.data?.records | ||||
|           this.page.total = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     showDetail(row) { | ||||
|       this.form = JSON.parse(JSON.stringify(row)) | ||||
|       this.dialog = true | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$refs.DialogForm.validate(v => { | ||||
|         if (v) { | ||||
|           this.instance.post("/app/apppartyintegralinfo/addOrUpdate", this.form).then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success("提交成功!") | ||||
|               this.dialog = false | ||||
|               this.getTableData() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|   }, | ||||
|   created() { | ||||
|     this.getTableData() | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .psfList { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| @@ -34,5 +34,7 @@ | ||||
|   "AppResident": "居民档案", | ||||
|   "AppISMap": "监控地图", | ||||
|   "AppISManage": "智能安防", | ||||
|   "AppISDevice": "安防设备" | ||||
|   "AppISDevice": "安防设备", | ||||
|   "AppPartyScore": "党员积分", | ||||
|   "AppPartyScoreFlow": "党员积分明细" | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user