kongdeqiang
2023-06-06 6f1282471e5fd213443ac1f6dabfd3ef8b08c5c3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<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-input v-model="searchForm.payCode" 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 label="选择出场时间">
          <div class="date-box">
            <el-date-picker type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
                            v-model="searchForm.date" placeholder="">
            </el-date-picker>
          </div>
        </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 label="出场图" width="200" header-align="center" align="center">
            <template slot-scope="scope">
              <!-- trigger(触发方式)、placement(出现位置) -->
              <el-popover trigger="hover" placement="right" v-if="scope.row.imgPath != null">
                <img :src="scope.row.imgPath"  style="height: 800px;width: 800px"/>
                <img slot="reference" :src="scope.row.imgPath" :alt="scope.row.imgPath" style="height: 50px;width: 150px">
              </el-popover>
            </template>
          </el-table-column>
            <el-table-column
                    prop="carNo"
                    header-align="center"
                    align="center"
                    label="车牌号">
            </el-table-column>
            <el-table-column
                    prop="enterTime"
                    header-align="center"
                    align="center"
                    label="入场时间">
            </el-table-column>
          <el-table-column
            prop="createTime"
            header-align="center"
            align="center"
            label="出场时间">
          </el-table-column>
          <el-table-column
            prop="timeStr"
            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="payCode"
                    header-align="center"
                    align="center"
                    label="支付码">
            </el-table-column>
            <el-table-column
                    prop="price"
                    width="100px"
                    header-align="center"
                    align="center"
                    label="停车金额(元)">
            </el-table-column>
            <el-table-column
                    prop="status"
                    width="120px"
                    header-align="center"
                    align="center"
                    label="缴费状态">
              <template slot-scope="scope">
                <p v-if="scope.row.status==0">未缴费</p>
                <p v-if="scope.row.status==1">已缴费</p>
              </template>
            </el-table-column>
            <el-table-column
                    prop="status3"
                    width="120px"
                    header-align="center"
                    align="center"
                    label="违章状态">
              <template slot-scope="scope">
                <p v-if="scope.row.status3==0">未违章</p>
                <p v-if="scope.row.status3==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>
 
      </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:'',
          payCode:'',
          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/outpark/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>