网格员积分
This commit is contained in:
		| @@ -0,0 +1,84 @@ | ||||
| <template> | ||||
|   <ai-list class="AppGridMemberScore"> | ||||
|     <template slot="title"> | ||||
|       <ai-title title="网格员积分" :isShowBottomBorder="false" :instance="instance" > | ||||
|          | ||||
|       </ai-title> | ||||
|     </template> | ||||
|     <template slot="tabs"> | ||||
|       <el-tabs v-model="currIndex"> | ||||
|         <el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label"> | ||||
|           <component :is="tab.comp" v-if="currIndex === String(i)" :ref="tab.name" | ||||
|                      :areaId="areaId" :instance="instance" :dict="dict" :permissions="permissions"/> | ||||
|         </el-tab-pane> | ||||
|       </el-tabs> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import girdScoreManage from "./components/girdScoreManage" | ||||
| import gridScoreRules from "./components/gridScoreRules" | ||||
| import gridScoreStatistics from './components/gridScoreStatistics' | ||||
| import {mapState} from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   name: 'AppGridMemberScore', | ||||
|   label: "网格员积分", | ||||
|   components: {girdScoreManage, gridScoreRules, gridScoreStatistics}, | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       activeName: "girdScoreManage", | ||||
|       currIndex: "0", | ||||
|       areaId: '', | ||||
|       oldActiveName: '', | ||||
|     } | ||||
|   }, | ||||
|  | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     tabs() { | ||||
|       return [ | ||||
|         { | ||||
|           label: "积分管理", | ||||
|           name: "girdScoreManage", | ||||
|           comp: girdScoreManage, | ||||
|           permission: "", | ||||
|         }, | ||||
|         { | ||||
|           label: "积分规则", | ||||
|           name: "gridScoreRules", | ||||
|           comp: gridScoreRules, | ||||
|           permission: "", | ||||
|         }, | ||||
|         { | ||||
|           label: "积分统计", | ||||
|           name: "gridScoreStatistics", | ||||
|           comp: gridScoreStatistics, | ||||
|           permission: "", | ||||
|         }, | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.areaId = this.user.info.areaId | ||||
|     // this.$dict.load("") | ||||
|   }, | ||||
|   methods: { | ||||
|      | ||||
|   }, | ||||
|    | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppGridMemberScore { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| @@ -0,0 +1,91 @@ | ||||
| <template> | ||||
|   <section class="girdScoreManage"> | ||||
|     <ai-list> | ||||
|       <template #content> | ||||
|         <ai-search-bar> | ||||
|           <template #left> | ||||
|             <el-button type="primary" size="small" icon="iconfont iconAdd">批量调整积分</el-button> | ||||
|             <el-select size="small" style="width: 200px;" v-model="search.girdId" placeholder="所属网格" clearable | ||||
|                      @change="getListInit()"> | ||||
|             <el-option | ||||
|                 v-for="(item,i) in girdList" | ||||
|                 :key="i" | ||||
|                 :label="item.girdName" | ||||
|                 :value="item.id" | ||||
|             > | ||||
|             </el-option> | ||||
|           </el-select> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input size="small" placeholder="请输入居民名称或真实姓名" v-model="search.name" clearable | ||||
|             @clear="page.current = 1, search.name = '', getTableData()" suffix-icon="iconfont iconSearch" | ||||
|             v-throttle="() => {(page.current = 1), getTableData();}"/> | ||||
|             <ai-download :instance="instance" url="" :params="search" fileName="网格员积分" | ||||
|                          :disabled="tableData.length == 0"> | ||||
|               <el-button size="small">导出</el-button> | ||||
|             </ai-download> | ||||
|           </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="操作"  align="center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <el-button type="text" @click="toAdd(row.id)">详情</el-button> | ||||
|               <el-button type="text" @click="handleDelete(row.id)">删除</el-button> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
|     </ai-list> | ||||
|   </section> | ||||
|    | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "girdScoreManage", | ||||
|   label: "积分管理", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       search: { | ||||
|         current: 1, | ||||
|         name: '', | ||||
|         girdId: '', | ||||
|       }, | ||||
|       tableData: [], | ||||
|       page: {current: 1, size: 10, total: 0}, | ||||
|       girdList: [], | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         { prop: "", label: '姓名', align: "center", width: "180px", }, | ||||
|         { prop: "", label: '所属网格', align: "center", width: "180px", }, | ||||
|         { prop: "", label: '积分余额', align: "center", width: "180px", }, | ||||
|         { prop: "", label: '累计积分', align: "center", width: "180px", }, | ||||
|         { slot: "options" }, | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getTableData() {}, | ||||
|     getListInit() { | ||||
|       this.search.current = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|   }, | ||||
|  | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .girdScoreManage { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| @@ -0,0 +1,25 @@ | ||||
| <template> | ||||
|   <div>积分规则</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "gridScoreRules", | ||||
|   label: "积分规则", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       name: "积分规则" | ||||
|     } | ||||
|   }, | ||||
|   methods: {}, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .gridScoreRules {} | ||||
| </style> | ||||
| @@ -0,0 +1,25 @@ | ||||
| <template> | ||||
|   <div>积分统计</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "gridScoreStatistics", | ||||
|   label: "积分统计", | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object, | ||||
|     permissions: Function | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       name: "积分统计" | ||||
|     } | ||||
|   }, | ||||
|   methods: {}, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .gridScoreStatistics {} | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user