Mr.Zhang
2023-10-18 0046d701fb2878895359b0ffe7a5354c4ccab7e4
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
<template>
  <TableLayout :permissions="['business:bikerepair:query']">
    <!-- 搜索表单 -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-form-item label="用户" prop="creator">
        <el-input v-model="searchForm.creator" placeholder="请输入" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="车辆编号" prop="binkeId">
        <el-input v-model="searchForm.binkeId" placeholder="请输入车辆编号" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="状态" prop="status">
        <el-select v-model="searchForm.status" placeholder="请选择">
          <el-option
            label="待处理"
            :value="0">
          </el-option>
          <el-option
            label="已处理"
            :value="1">
          </el-option>
        </el-select>
        <!-- <el-input v-model="searchForm.status" placeholder="请输入状态 0待处理 1已处理 2其他" @keypress.enter.native="search"></el-input> -->
      </el-form-item>
      <el-form-item label="创建时间" prop="createDate">
        <!-- <el-date-picker v-model="searchForm.editDate" value-format="yyyy-MM-dd" placeholder="请输入编辑时间" @change="search"/> -->
        <el-date-picker
          v-model="value1"
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期">
        </el-date-picker>
      </el-form-item>
      
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
        <el-button @click="reset">重置</el-button>
      </section>
    </el-form>
    <!-- 表格和分页 -->
    <template v-slot:table-wrap>
      <el-table
        v-loading="isWorking.search"
        :data="tableData.list"
        stripe
        border
      >
        <el-table-column prop="openid" label="创建人" min-width="180px" align="center"></el-table-column>
        <el-table-column prop="linkname" label="联系人" min-width="100px" align="center">
          <template slot-scope="{row}">
            {{ `${row.linkname} ${row.linkphone}`  }}
          </template>
        </el-table-column>
        <el-table-column prop="bikeCode" label="车辆编码" min-width="100px" align="center"></el-table-column>
        <el-table-column prop="bikeTypeName" label="车类型" min-width="100px" align="center"></el-table-column>
        <el-table-column prop="param" label="问题类型" min-width="100px" show-overflow-tooltip align="center">
          <template slot-scope="{row}">
            <div class="long-title-style">{{ row.param }}</div>
          </template>
        </el-table-column>
        <!-- <el-table-column prop="param" label="车辆问题" min-width="100px"></el-table-column> -->
        <el-table-column prop="content" label="问题说明" min-width="100px" show-overflow-tooltip align="center">
          <template slot-scope="{row}">
            <div class="long-title-style">{{ row.content }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="createDate" label="创建时间" min-width="100px" align="center"></el-table-column>
        <el-table-column prop="status" label="状态" min-width="80px" align="center">
          <template slot-scope="{row}">
            <div v-if="row.status==0" style="color: red;">待处理</div>
            <div v-else-if="row.status==1">已处理</div>
            <div v-else>其他</div>
          </template>
        </el-table-column>
        <el-table-column label="操作" min-width="80px" fixed="right" align="center">
          <template slot-scope="{row}">
            <el-button v-if="row.status==0" type="text" @click="dealAction(row)">处理</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination
        @size-change="handleSizeChange"
        @current-change="handlePageChange"
        :pagination="tableData.pagination"
      >
      </pagination>
    </template>
    <OperaRepairDealWindow ref="operaRepairDealWindow" @success="handlePageChange"/>
  </TableLayout>
</template>
 
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaRepairDealWindow from '@/components/business/OperaRepairDealWindow'
export default {
  name: 'BikeRepair',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaRepairDealWindow },
  data () {
    return {
      value1: [],
      // 搜索
      searchForm: {
        id: '',
        createDate: '',
        creator: '',
        editDate: '',
        editor: '',
        isdeleted: '',
        binkeId: '',
        longitude: '',
        latitude: '',
        addr: '',
        paramId: '',
        param: '',
        status: '',
        info: '',
        linkname: '',
        linkphone: '',
        dealUser: '',
        dealDate: '',
        dealInfo: '',
        content: ''
      }
    }
  },
  created () {
    this.config({
      module: '车辆问题上报信息表',
      api: '/business/bikeRepair',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
  },
  methods: {
    dealAction(row) {
      this.$refs.operaRepairDealWindow.open('处理', row)
    }
  },
}
</script>