kongdeqiang
2024-04-09 6c3df49d09ddf7125914b18778dc0c249995b1f5
fix: 新增手动抬杆查询页面
3个文件已修改
1个文件已添加
156 ■■■■■ 已修改文件
src/components/page/barrieropenlog/index.vue 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/enterpark/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/state.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/barrieropenlog/index.vue
New file
@@ -0,0 +1,135 @@
<template>
  <div class="mod-config" style="padding: 10px 10px 0px 10px;">
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" >
        <el-form-item label="车牌号">
          <el-input v-model="searchForm.carNo" clearable></el-input>
        </el-form-item>
        <el-form-item label="停车场">
          <el-select v-model="searchForm.parkId" clearable>
            <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id" ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" size="small" @click="getDataList" icon="el-icon-search">查询</el-button>
        </el-form-item>
      </el-form>
      <div class="avue-crud">
        <el-table
              :height="tableHeight"
               :data="pageData.rows"
                border
               v-loading="pageData.isLoading">
          <el-table-column
            type="index"
            width="50"
            label="序号"
            align="center">
          </el-table-column>
            <el-table-column
                    prop="carNo"
                    header-align="center"
                    align="center"
                    label="车牌号">
            </el-table-column>
            <el-table-column
                    prop="parkName"
                    header-align="center"
                    align="center"
                    label="停车场">
            </el-table-column>
          <el-table-column
              prop="type"
              header-align="center"
              align="center"
              label="类型">
            <template slot-scope="scope">
              <p v-if="scope.row.type==0">出场杆</p>
              <p v-if="scope.row.type==1">入场杆</p>
            </template>
          </el-table-column>
            <el-table-column
              prop="createTime"
              header-align="center"
              align="center"
              label="手动抬杆时间">
            </el-table-column>
          <el-table-column
              prop="remark"
              header-align="center"
              align="center"
              label="备注">
          </el-table-column>
        </el-table>
        <el-pagination background @size-change="onPageSizeChange" @current-change="onCurrentPageChange" :current-page="pageData.currentPage" :page-size="pageData.pageSize" :total="pageData.total" style="float: right"></el-pagination>
      </div>
  </div>
</template>
<script>
  export default {
    data () {
      return {
        tableHeight:500,
        dataForm: {
          key: ''
        },
        table1:[],
        pageData: this.$byutil.defaultPageData(),
        searchForm: {
          current: this.pageIndex,
          size: this.pageSize,
          carNo:'',
          parkId:'',
          date: new Date,
        },
        dataList: [],
        pageIndex: 1,
        pageSize: 100,
        totalPage: 0,
        dataListLoading: false,
        addOrUpdateVisible: false
      }
    },
    components: {
    },
    created () {
      this.getAllPark()
      this.getDataList()
      this.tableHeight = window.innerHeight - 260
    },
    computed: {
    },
    methods: {
      // 获取数据列表
      getDataList () {
        this.dataListLoading = true
        this.searchForm.current = this.pageIndex
        this.searchForm.size = this.pageSize
        this.$byutil.loadPageData(this, this.$systemconfig.basePath+'/ffzf/barrierOpenLog/findPage', this.searchForm);
        this.dataListLoading = false
      },
      getAllPark(){
        this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => {
          this.table1 = res.data;
        })
      },
      onPageSizeChange(val) {
        this.pageData.pageSize = val;
        this.getDataList();
      },
      onCurrentPageChange(val) {
        this.pageData.page = val;
        this.getDataList();
      },
    }
  }
</script>
<style lang="scss" scoped>
.fenye-box{
  width: calc(70% - 20px);
}
</style>
src/components/page/enterpark/index.vue
@@ -70,6 +70,16 @@
                <p v-if="scope.row.status==1" style="color: red">有违章</p>
              </template>
            </el-table-column>
            <el-table-column
              prop="isAdd"
              header-align="center"
              align="center"
              label="手动添加">
            <template slot-scope="scope">
              <p v-if="scope.row.isAdd==0 || scope.row.isAdd==null">否</p>
              <p v-if="scope.row.isAdd==1" style="color: red">是</p>
            </template>
          </el-table-column>
        </el-table>
        <el-pagination background @size-change="onPageSizeChange" @current-change="onCurrentPageChange" :current-page="pageData.currentPage" :page-size="pageData.pageSize" :total="pageData.total" style="float: right"></el-pagination>
src/router/index.js
@@ -35,6 +35,11 @@
                    meta: { title: '车辆出场管理' }
                },
                {
                    path: '/barrierOpenLog',
                    component: resolve => require(['../components/page/barrieropenlog/index.vue'], resolve),
                    meta: { title: '手动抬杆记录' }
                },
                {
                    path: '/ticketBlack',
                    component: resolve => require(['../components/page/ticketBlack/index.vue'], resolve),
                    meta: { title: '黑名单管理' }
src/store/state.js
@@ -51,6 +51,12 @@
                },
                {
                  icon: 'el-icon-document',
                    name: '车辆出场管理',
                    parentId: 2,
                    indexUrl: "barrierOpenLog"
                },
                {
                  icon: 'el-icon-document',
                  name: '白名单管理',
                  parentId: 2,
                  indexUrl: "whiteList"