<template>
  <div class="body-wrapper">
    <el-tabs v-model="activeName">
      <el-tab-pane label="出入管理" name="出入管理">
        <el-form class="form-wrapper" :inline="true" :model="formInline1" style="margin-bottom: 20px;">
          <el-row>
            <el-col :span="8">
              <el-form-item label="车场名称:">
                <el-select clearable v-model="formInline1.parkLotId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in carParkingNameOptions"
                    :key="index"
                    :label="item.parkName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="车牌号:">
                <el-input v-model="formInline1.plateNo" placeholder="请输入"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item>
                <el-button type="primary" class="query-btn" @click="onSubmit1">查询</el-button>
              </el-form-item>
              <el-form-item>
                <el-button type="success" @click="handleAdd">添加</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <el-table :data="tableData1">
          <el-table-column v-for="(item, index) in columns1" :key="index" :label="item.label" :prop="item.key">
          </el-table-column>
          <el-table-column
            label="操作"
            width="200">
            <template slot-scope="scope" style="display: inline-block">
              <el-button type="primary" @click="handleEdit(scope.row)" slot="reference">修改</el-button>
              <el-popconfirm title="确定删除吗？" @confirm="deleteRow(scope.row)">
                <el-button type="danger" slot="reference">删除</el-button>
              </el-popconfirm>
            </template>
          </el-table-column>
        </el-table>
        <div class="table-pagination">
          <el-pagination layout="prev, pager, next" :total="total1" @current-change="handlePageChange1"
                         :current-page.sync="pageNum1" :page-size.sync="pageSize1">
          </el-pagination>
        </div>
        <el-dialog
          :title="title"
          :visible.sync="dialogVisible"
          width="45%"
          custom-class="audit-dialog">
          <div class="form-div">
            <el-form label-position="left" label-width="100px" :model="formLabelAlign">
              <el-form-item label="车场名称">
                <el-select v-model="formLabelAlign.parkLotId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in carParkingNameOptions"
                    :key="index"
                    :label="item.parkName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
              <el-form-item label="车牌号">
                <el-input v-model="formLabelAlign.plateNo"></el-input>
              </el-form-item>
              <el-form-item label="入场时间">
                <el-date-picker
                  v-model="formLabelAlign.inTime"
                  type="datetime"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  placeholder="选择日期时间">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="离场时间">
                <el-date-picker
                  v-model="formLabelAlign.outTime"
                  type="datetime"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  placeholder="选择日期时间">
                </el-date-picker>
              </el-form-item>
            </el-form>
          </div>
          <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="handleConfirm">确 定</el-button>
          </span>
        </el-dialog>
      </el-tab-pane>
      <el-tab-pane label="停车记录" name="停车记录">
        <el-form class="form-wrapper" :inline="true" :model="formInline2" style="margin-bottom: 20px;">
          <el-row>
            <el-col :span="8">
              <el-form-item label="车场名称:">
                <el-select clearable v-model="formInline2.parkLotId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in carParkingNameOptions"
                    :key="index"
                    :label="item.parkName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="车牌号:">
                <el-input v-model="formInline2.plateNo" placeholder="请输入"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item>
                <el-button type="primary" class="query-btn" @click="onSubmit2">查询</el-button>
              </el-form-item>
              <el-form-item>
                <el-button type="success" @click="handleAdd2">添加</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <el-table :data="tableData2">
          <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
          </el-table-column>
          <el-table-column
            label="操作"
            width="200">
            <template slot-scope="scope" style="display: inline-block">
              <el-button type="primary" @click="handleEdit2(scope.row)" slot="reference">修改</el-button>
              <el-popconfirm title="确定删除吗？" @confirm="deleteRow2(scope.row)">
                <el-button type="danger" slot="reference">删除</el-button>
              </el-popconfirm>
            </template>
          </el-table-column>
        </el-table>
        <div class="table-pagination">
          <el-pagination layout="prev, pager, next" :total="total2" @current-change="handlePageChange2"
                         :current-page.sync="pageNum2" :page-size.sync="pageSize2">
          </el-pagination>
        </div>
        <el-dialog
          :title="title2"
          :visible.sync="dialogVisible2"
          width="45%"
          custom-class="audit-dialog">
          <div class="form-div">
            <el-form label-position="left" label-width="110px" :model="formLabelAlign2">
              <el-form-item label="车场名称">
                <el-select v-model="formLabelAlign2.parkLotId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in carParkingNameOptions"
                    :key="index"
                    :label="item.parkName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
              <el-form-item label="车牌号">
                <el-input v-model="formLabelAlign2.plateNo"></el-input>
              </el-form-item>
              <el-form-item label="停车时间">
                <el-input v-model="formLabelAlign2.parkingTime"></el-input>
              </el-form-item>
              <el-form-item label="应收费用">
                <el-input v-model="formLabelAlign2.receivableFee"></el-input>
              </el-form-item>
            </el-form>
          </div>
          <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible2 = false">取 消</el-button>
            <el-button type="primary" @click="handleConfirm2">确 定</el-button>
        </span>
        </el-dialog>
      </el-tab-pane>
      <el-tab-pane label="在场记录" name="在场记录">
        <el-form class="form-wrapper" :inline="true" :model="formInline3" style="margin-bottom: 20px;">
          <el-row>
            <el-col :span="8">
              <el-form-item label="收费员:">
                <el-select clearable v-model="formInline3.tollmanId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in tollmanOptions"
                    :key="index"
                    :label="item.tollmanName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="工作日期:">
                <el-date-picker
                  v-model="formInline3.workDate"
                  type="date"
                  value-format="yyyy-MM-dd"
                  placeholder="选择日期">
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item>
                <el-button type="primary" class="query-btn" @click="onSubmit3">查询</el-button>
              </el-form-item>
              <el-form-item>
                <el-button type="success" @click="handleAdd3">添加</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <el-table :data="tableData3">
          <el-table-column v-for="(item, index) in columns3" :key="index" :label="item.label" :prop="item.key">
          </el-table-column>
          <el-table-column
            label="操作"
            width="200">
            <template slot-scope="scope" style="display: inline-block">
              <el-button type="primary" @click="handleEdit3(scope.row)" slot="reference">修改</el-button>
              <el-popconfirm title="确定删除吗？" @confirm="deleteRow3(scope.row)">
                <el-button type="danger" slot="reference">删除</el-button>
              </el-popconfirm>
            </template>
          </el-table-column>
        </el-table>
        <div class="table-pagination">
          <el-pagination layout="prev, pager, next" :total="total3" @current-change="handlePageChange3"
                         :current-page.sync="pageNum3" :page-size.sync="pageSize3">
          </el-pagination>
        </div>

        <el-dialog
          :title="title3"
          :visible.sync="dialogVisible3"
          width="45%"
          custom-class="audit-dialog">
          <div class="form-div">
            <el-form label-position="left" label-width="100px" :model="formLabelAlign3">
              <el-form-item label="收费员">
                <el-select v-model="formLabelAlign3.tollmanId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in tollmanOptions"
                    :key="index"
                    :label="item.tollmanName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
              <el-form-item label="工作日期">
                <el-date-picker
                  v-model="formLabelAlign3.workDate"
                  type="date"
                  value-format="yyyy-MM-dd"
                  placeholder="选择日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="入场车辆数">
                <el-input v-model="formLabelAlign3.inCount"></el-input>
              </el-form-item>
              <el-form-item label="出场车辆数">
                <el-input v-model="formLabelAlign3.outCount"></el-input>
              </el-form-item>
            </el-form>
          </div>
          <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible3 = false">取 消</el-button>
            <el-button type="primary" @click="handleConfirm3">确 定</el-button>
        </span>
        </el-dialog>
      </el-tab-pane>
      <el-tab-pane label="特殊放行记录" name="特殊放行记录">
        <el-form class="form-wrapper" :inline="true" :model="formInline4" style="margin-bottom: 20px;">
          <el-row>
            <el-col :span="8">
              <el-form-item label="收费员:">
                <el-select clearable v-model="formInline4.tollmanId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in tollmanOptions"
                    :key="index"
                    :label="item.tollmanName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="车牌号:">
                <el-input v-model="formInline4.plateNo" placeholder="请输入"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item>
                <el-button type="primary" class="query-btn" @click="onSubmit4">查询</el-button>
              </el-form-item>
              <el-form-item>
                <el-button type="success" @click="handleAdd4">添加</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <el-table :data="tableData4">
          <el-table-column v-for="(item, index) in columns4" :key="index" :label="item.label" :prop="item.key">
          </el-table-column>
          <el-table-column
            label="操作"
            width="200">
            <template slot-scope="scope" style="display: inline-block">
              <el-button type="primary" @click="handleEdit4(scope.row)" slot="reference">修改</el-button>
              <el-popconfirm title="确定删除吗？" @confirm="deleteRow4(scope.row)">
                <el-button type="danger" slot="reference">删除</el-button>
              </el-popconfirm>
            </template>
          </el-table-column>
        </el-table>
        <div class="table-pagination">
          <el-pagination layout="prev, pager, next" :total="total4" @current-change="handlePageChange4"
                         :current-page.sync="pageNum4" :page-size.sync="pageSize4">
          </el-pagination>
        </div>

        <el-dialog
          :title="title4"
          :visible.sync="dialogVisible4"
          width="45%"
          custom-class="audit-dialog">
          <div class="form-div">
            <el-form label-position="left" label-width="100px" :model="formLabelAlign4">
              <el-form-item label="收费员">
                <el-select v-model="formLabelAlign4.tollmanId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in tollmanOptions"
                    :key="index"
                    :label="item.tollmanName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
              <el-form-item label="车牌号">
                <el-input v-model="formLabelAlign4.plateNo"></el-input>
              </el-form-item>
              <el-form-item label="放行时间">
                <el-date-picker
                  v-model="formLabelAlign4.createTime"
                  type="date"
                  placeholder="选择日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="放行原因">
                <el-input v-model="formLabelAlign4.relaseReason"></el-input>
              </el-form-item>
            </el-form>
          </div>
          <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible4 = false">取 消</el-button>
            <el-button type="primary" @click="handleConfirm4">确 定</el-button>
          </span>
        </el-dialog>
      </el-tab-pane>
      <el-tab-pane label="抬杆记录" name="抬杆记录">
        <el-form class="form-wrapper" :inline="true" :model="formInline5" style="margin-bottom: 20px;">
          <el-row>
            <el-col :span="8">
              <el-form-item label="收费员:">
                <el-select clearable v-model="formInline5.tollmanId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in tollmanOptions"
                    :key="index"
                    :label="item.tollmanName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="车场名称:">
                <el-select clearable v-model="formInline5.parkId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in carParkingNameOptions"
                    :key="index"
                    :label="item.parkName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item>
                <el-button type="primary" class="query-btn" @click="onSubmit5">查询</el-button>
              </el-form-item>
              <el-form-item>
                <el-button type="success" @click="handleAdd5">添加</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <el-table :data="tableData5">
          <el-table-column v-for="(item, index) in columns5" :key="index" :label="item.label" :prop="item.key">
          </el-table-column>
          <el-table-column
            label="操作"
            width="200">
            <template slot-scope="scope" style="display: inline-block">
              <el-button type="primary" @click="handleEdit5(scope.row)" slot="reference">修改</el-button>
              <el-popconfirm title="确定删除吗？" @confirm="deleteRow5(scope.row)">
                <el-button type="danger" slot="reference">删除</el-button>
              </el-popconfirm>
            </template>
          </el-table-column>
        </el-table>
        <div class="table-pagination">
          <el-pagination layout="prev, pager, next" :total="total5" @current-change="handlePageChange5"
                         :current-page.sync="pageNum5" :page-size.sync="pageSize5">
          </el-pagination>
        </div>

        <el-dialog
          :title="title5"
          :visible.sync="dialogVisible5"
          width="55%"
          custom-class="audit-dialog">
          <div class="form-div">
            <el-form label-position="left" label-width="100px" :model="formLabelAlign5">
              <el-form-item label="车场名称">
                <el-select v-model="formLabelAlign5.parkId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in carParkingNameOptions"
                    :key="index"
                    :label="item.parkName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
              <el-form-item label="收费员">
                <el-select v-model="formLabelAlign5.tollmanId" placeholder="请选择">
                  <el-option
                    v-for="(item,index) in tollmanOptions"
                    :key="index"
                    :label="item.tollmanName"
                    :value="item.id" />
                </el-select>
              </el-form-item>
              <el-form-item label="抬杆时间">
                <el-date-picker
                  v-model="formLabelAlign5.createTime"
                  type="date"
                  placeholder="选择日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="抬杆类型">
                <el-input v-model="formLabelAlign5.liftType"></el-input>
              </el-form-item>
              <el-form-item label="抬杆车辆">
                <el-input v-model="formLabelAlign5.plateNo"></el-input>
              </el-form-item>
            </el-form>
          </div>
          <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible5 = false">取 消</el-button>
            <el-button type="primary" @click="handleConfirm5">确 定</el-button>
          </span>
        </el-dialog>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import api from "@/api/audit.js";
import dictionary from "@/util/dictionary";
import api_z from "@/api/article_z.js";

export default {
  components: {},
  data() {
    return {
      activeName: '出入管理',
      columns1: [
        {
          label: '车场名称',
          key: 'parkName'
        },
        {
          label: '车牌号',
          key: 'plateNo'
        },
        {
          label: '入场时间',
          key: 'inTime'
        },
        {
          label: '离场时间',
          key: 'outTime'
        },
      ],
      tableData1: [{parkName: 'sasa'}],
      total1: 0,
      pageSize1: 10,
      pageNum1: 1,
      formInline1: {
        parkLotId: '',
        plateNo:'',
      },
      carParkingNameValue: '',
      carParkingNameOptions: [],
      tollmanValue: '',
      tollmanOptions: [],
      title: '',
      dialogVisible: false,
      formLabelAlign: {
        id: '',
        parkLotId: '',
        plateNo:'',
        inTime: '',
        outTime: '',
      },
      columns2: [
        {
          label: '车场名称',
          key: 'parkName'
        },
        {
          label: '车牌号',
          key: 'plateNo'
        },
        {
          label: '停车时间',
          key: 'parkingTime'
        },
        {
          label: '应收费用',
          key: 'receivableFee'
        },
      ],
      tableData2: [{parkName: 'sasa1'}],
      total2: 0,
      pageSize2: 10,
      pageNum2: 1,
      formInline2: {
        carParkingName: '',
        plateNo:'',
      },
      title2: '',
      dialogVisible2: false,
      formLabelAlign2: {
        id: '',
        carParkingName: '',
        plateNo:'',
        parkingTime: '',
        receivableFee: '',
      },
      columns3: [
        {
          label: '收费员',
          key: 'tollmanName'
        },
        {
          label: '工作日期',
          key: 'workDate'
        },
        {
          label: '入场车辆数',
          key: 'inCount'
        },
        {
          label: '出场车辆数',
          key: 'outCount'
        },
      ],
      tableData3: [{tollmanName: 'sasa111'}],
      total3: 0,
      pageSize3: 10,
      pageNum3: 1,
      formInline3: {
        tollmanId: '',
        workDate: ''
      },
      title3: '',
      dialogVisible3: false,
      formLabelAlign3: {
        id: '',
        tollmanId: '',
        workDate: '',
        inCount: '',
        outCount: '',
      },
      columns4: [
        {
          label: '收费员',
          key: 'tollmanName'
        },
        {
          label: '车牌号',
          key: 'plateNo'
        },
        {
          label: '放行时间',
          key: 'createTime'
        },
        {
          label: '放行原因',
          key: 'relaseReason'
        },
      ],
      tableData4: [{tollmanName: 'sasa1111'}],
      total4: 0,
      pageSize4: 10,
      pageNum4: 1,
      formInline4: {
        tollmanId: '',
        plateNo: '',
      },
      title4: '',
      dialogVisible4: false,
      formLabelAlign4: {
        id: '',
        tollmanId: '',
        plateNo: '',
        createTime: '',
        relaseReason: '',
      },
      columns5: [
        {
          label: '收费员',
          key: 'tollmanName'
        },
        {
          label: '抬杆类型',
          key: 'liftType'
        },
        {
          label: '抬杆时间',
          key: 'createTime'
        },
        {
          label: '抬杆车辆',
          key: 'plateNo'
        },
        {
          label: '车场名称',
          key: 'carParkName'
        },
      ],
      tableData5: [{tollmanName: 'sasa1111'}],
      total5: 0,
      pageSize5: 10,
      pageNum5: 1,
      formInline5: {
        tollmanId: '',
        parkId: '',
      },
      title5: '',
      dialogVisible5: false,
      formLabelAlign5: {
        id: '',
        tollmanId: '',
        liftType: '',
        plateNo: '',
        parkId: '',
      },
    }
  },
  mounted() {
    this.getTableData1()
    this.getCarParkingName()
    this.getTollmanList()
    this.getTableData2()
    this.getTableData3()
    this.getTableData4()
    this.getTableData5()
  },
  watch: {},
  methods: {
    onSubmit1() {
      this.pageNum1 = 1
      this.getTableData1()
    },
    handleAdd() {
      this.title = '添加'
      this.formLabelAlign = {}
      this.dialogVisible = true
    },
    handleEdit(row) {
      this.title = '修改'
      this.formLabelAlign = {...row}
      this.dialogVisible = true
    },
    deleteRow(record) {
      api_z.deleteParkingOutsideOperationInout([{id: record.id}]).then(res => {
        if (res.code === 200) {
          this.$message({type: 'success', message: '删除成功!'})
          this.getTableData1()
        }
      })
    },
    handleConfirm() {
      if (this.title === '修改') {
        api_z.editParkingOutsideOperationInout({...this.formLabelAlign}).then(res => {
          if (res.code === 200) {
            this.dialogVisible = false
            this.$message({
              message: '修改成功!',
              type: 'success'
            })
            this.getTableData1()
          }
        })
      } else {
        api_z.addParkingOutsideOperationInout({...this.formLabelAlign}).then(res => {
          if (res.code === 200) {
            this.dialogVisible = false
            this.$message({
              message: '添加成功!',
              type: 'success'
            })
            this.getTableData1()
          }
        })
      }
    },
    //车场
    getCarParkingName() {
      api_z.querySelectParkListByPage().then(res => {
        this.carParkingNameOptions=res.data
      })
    },
    //收费员
    getTollmanList() {
      api_z.querySelectTollmanListByPage().then(res => {
        this.tollmanOptions=res.data
      })
    },
    onSubmit2() {
      this.pageNum2 = 1
      this.getTableData2()
    },
    handleAdd2() {
      this.title2 = '添加'
      this.formLabelAlign2 = {}
      this.dialogVisible2 = true
    },

    handleEdit2(row) {
      this.title2 = '修改'
      this.formLabelAlign2 = {...row}
      this.dialogVisible2 = true
    },
    deleteRow2(record) {
      api_z.deleteParkingOutsideOperationParkingrecord([{id: record.id}]).then(res => {
        if (res.code === 200) {
          this.$message({type: 'success', message: '删除成功!'})
          this.getTableData2()
        }
      })
    },
    handleConfirm2() {
      if (this.title2 === '修改') {
        api_z.editParkingOutsideOperationParkingrecord({...this.formLabelAlign2}).then(res => {
          if (res.code === 200) {
            this.dialogVisible2 = false
            this.$message({
              message: '修改成功!',
              type: 'success'
            })
            this.getTableData2()
          }
        })
      } else {
        api_z.addParkingOutsideOperationParkingrecord({...this.formLabelAlign2}).then(res => {
          if (res.code === 200) {
            this.dialogVisible2 = false
            this.$message({
              message: '添加成功!',
              type: 'success'
            })
            this.getTableData2()
          }
        })
      }
    },
    onSubmit3() {
      this.pageNum3 = 1
      this.getTableData3()
    },
    handleAdd3() {
      this.title3 = '添加'
      this.formLabelAlign3 = {}
      this.dialogVisible3 = true
    },

    handleEdit3(row) {
      this.title3 = '修改'
      this.formLabelAlign3 = {...row}
      this.dialogVisible3 = true
    },
    deleteRow3(record) {
      api_z.deleteParkingOutsideOperationInrecord([{id: record.id}]).then(res => {
        if (res.code === 200) {
          this.$message({type: 'success', message: '删除成功!'})
          this.getTableData3()
        }
      })
    },
    handleConfirm3() {
      if (this.title3 === '修改') {
        api_z.editParkingOutsideOperationInrecord({...this.formLabelAlign3}).then(res => {
          if (res.code === 200) {
            this.dialogVisible3 = false
            this.$message({
              message: '修改成功!',
              type: 'success'
            })
            this.getTableData3()
          }
        })
      } else {
        api_z.addParkingOutsideOperationInrecord({...this.formLabelAlign3}).then(res => {
          if (res.code === 200) {
            this.dialogVisible3 = false
            this.$message({
              message: '添加成功!',
              type: 'success'
            })
            this.getTableData3()
          }
        })
      }
    },
    onSubmit4() {
      this.pageNum4 = 1
      this.getTableData4()
    },
    handleAdd4() {
      this.title4 = '添加'
      this.formLabelAlign4 = {}
      this.dialogVisible4 = true
    },

    handleEdit4(row) {
      this.title4 = '修改'
      this.formLabelAlign4 = {...row}
      this.dialogVisible4 = true
    },
    deleteRow4(record) {
      api_z.deleteParkingOutsideOperationSpecial([{id: record.id}]).then(res => {
        if (res.code === 200) {
          this.$message({type: 'success', message: '删除成功!'})
          this.getTableData4()
        }
      })
    },
    handleConfirm4() {
      if (this.title4 === '修改') {
        api_z.editParkingOutsideOperationSpecial({...this.formLabelAlign4}).then(res => {
          if (res.code === 200) {
            this.dialogVisible4 = false
            this.$message({
              message: '修改成功!',
              type: 'success'
            })
            this.getTableData4()
          }
        })
      } else {
        api_z.addParkingOutsideOperationSpecial({...this.formLabelAlign4}).then(res => {
          if (res.code === 200) {
            this.dialogVisible4 = false
            this.$message({
              message: '添加成功!',
              type: 'success'
            })
            this.getTableData4()
          }
        })
      }
    },
    onSubmit5() {
      this.pageNum5 = 1
      this.getTableData5()
    },
    handleAdd5() {
      this.title5 = '添加'
      this.formLabelAlign5 = {}
      this.dialogVisible5 = true
    },

    handleEdit5(row) {
      this.title5 = '修改'
      this.formLabelAlign5 = {...row}
      this.dialogVisible5 = true
    },
    deleteRow5(record) {
      api_z.deleteParkingOutsideOperationLift([{id: record.id}]).then(res => {
        if (res.code === 200) {
          this.$message({type: 'success', message: '删除成功!'})
          this.getTableData5()
        }
      })
    },
    handleConfirm5() {
      if (this.title5 === '修改') {
        api_z.editParkingOutsideOperationLift({...this.formLabelAlign5}).then(res => {
          if (res.code === 200) {
            this.dialogVisible5 = false
            this.$message({
              message: '修改成功!',
              type: 'success'
            })
            this.getTableData5()
          }
        })
      } else {
        api_z.addParkingOutsideOperationLift({...this.formLabelAlign5}).then(res => {
          if (res.code === 200) {
            this.dialogVisible5 = false
            this.$message({
              message: '添加成功!',
              type: 'success'
            })
            this.getTableData5()
          }
        })
      }
    },
    handlePageChange1() {
      this.getTableData1()
    },
    getTableData1() {
      const {pageNum1, pageSize1} = this
      api_z.queryParkingOutsideOperationInoutByPage({current: pageNum1, size: pageSize1, ...this.formInline1}).then(res => {
        this.tableData1 = res.data.records || []
        this.total1 = res.data.total
      })
    },
    handlePageChange2() {
      this.getTableData2()
    },
    getTableData2() {
      const {pageNum2, pageSize2} = this
      api_z.queryParkingOutsideOperationParkingrecordByPage({current: pageNum2, size: pageSize2, ...this.formInline2}).then(res => {
        this.tableData2 = res.data.records || []
        this.total2 = res.data.total
      })
    },
    handlePageChange3() {
      this.getTableData3()
    },
    getTableData3() {
      const {pageNum3, pageSize3} = this
      api_z.queryParkingOutsideOperationInrecordByPage({current: pageNum3, size: pageSize3, ...this.formInline3}).then(res => {
        this.tableData3 = res.data.records || []
        this.total3 = res.data.total
      })
    },
    handlePageChange4() {
      this.getTableData4()
    },
    getTableData4() {
      const {pageNum4, pageSize4} = this
      api_z.queryParkingOutsideOperationSpecialByPage({current: pageNum4, size: pageSize4, ...this.formInline4}).then(res => {
        this.tableData4 = res.data.records || []
        this.total4 = res.data.total
      })
    },
    handlePageChange5() {
      this.getTableData5()
    },
    getTableData5() {
      const {pageNum5, pageSize5} = this
      api_z.queryParkingOutsideOperationLiftByPage({current: pageNum5, size: pageSize5, ...this.formInline5}).then(res => {
        this.tableData5 = res.data.records || []
        this.total5 = res.data.total
      })
    },
  }
}
</script>
<style lang="scss" scoped>
.body-wrapper {
  padding: 20px;

  .button-block {
    text-align: right;
    margin-bottom: 20px;
  }

  .table-pagination {
    text-align: right;
  }

  .search-card {
    margin-bottom: 20px;
    text-align: center;

    .input-wrapper {
      width: 36%;
    }
  }

  .audit-dialog {
    .mg-bt {
      margin-bottom: 24px;
    }

    .label {
      text-align: right;
    }

    .form-div {
      /deep/ .el-input__inner {
        height: 35px;
        width: 99%;
        border: 1px solid #a6a5a5;
      }
    }
  }
}
</style>
