123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <template>
- <div>
- <el-drawer
- title="我是标题"
- :visible.sync="drawer"
- :with-header="false"
- direction="rtl"
- size="600px"
- append-to-body
- @close="closeDrawer">
- <div>
- <router-view/>
- </div>
- </el-drawer>
- <normalLayout class="normal-card" @onRefresh="getSubmitEditAction">
- <div slot="content" class="container">
- <time-select @timeChange="timeChange" @clearSelect="clearSelect" v-if="tool.checkAuth($route.name,'read')"></time-select>
- <list :list="oneData" type="more" v-if="tool.checkAuth($route.name,'read')"></list>
- <!--分页-->
- <pagination :total="total" :pageSize="param.content.pageSize" :currentPage="param.content.pageNumber" @pageChange="pageChange">
- </pagination>
- </div>
- </normalLayout>
- </div>
- </template>
- <script>
- import {mapGetters} from 'vuex'
- import Pagination from '@/components/pagination/Pagination'
- import SelectPanl from '@/SManagement/submitedit_one/components/SelectPanl'
- import TimeSelect from '@/SManagement/submitedit_one/components/TimeSelect'
- import list from '@/SManagement/submitedit_one/components/list'
- export default {
- name: 'index',
- data () {
- return {
- param: {
- "id":20221102094702,
- "content": {
- "nocache":true,
- "onceonly":0,
- "pageNumber": 1,
- "pageSize": 4,
- "where":{
- "begdate":"",
- "enddate":""
- }
- }
- },
- oneData:[],
- total: 0,
- drawer:false
- }
- },
- components: {
- Pagination,
- SelectPanl,
- list,
- TimeSelect
- },
- computed: {
- ...mapGetters({
- DrawerShow:'DrawerShow'
- })
- },
- watch: {
- $route (val) {
- if (val.path == '/submitedit_more') {
- this.getSubmitEditAction()
- }
- },
- DrawerShow (val) {
- val ? this.drawer = true : this.drawer = false
- }
- },
- created () {
- this.getSubmitEditAction()
- },
- methods: {
- closeDrawer () {
- this.$store.dispatch('DrawerShowChange',false)
- this.$router.back()
- },
- //获取所有一事一报
- async getSubmitEditAction () {
- let res = await this.$api.requested(this.param)
- this.oneData = res.data
- this.total = res.total
- },
- pageChange (n) {
- this.param.content.pageNumber = n
- this.getSubmitEditAction()
- },
- timeChange(time) {
- this.param.content.where.begdate = time[0]
- this.param.content.where.enddate = time[1]
- this.param.content.pageNumber = 1
- this.getSubmitEditAction()
- },
- clearSelect() {
- this.param.content.where.begdate = ''
- this.param.content.where.enddate = ''
- this.param.content.pageNumber = 1
- this.getSubmitEditAction()
- }
- },
- };
- </script>
- <style scoped>
- * {
- box-sizing: border-box;
- }
- .container {
- min-height: calc(100vh - 200px);
- }
- .normal-card {
- min-height: calc(100vh - 136px);
- padding: 0 20px 30px 10px;
- position: relative;
- }
- .el-pagination {
- position: absolute;
- right: 16px;
- bottom: 0;
- }
- /deep/.el-empty {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%,-50%);
- }
- </style>
|