|  |  |  | 
|---|
|  |  |  | <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 label="用户" prop="openid"> | 
|---|
|  |  |  | <el-input v-model="searchForm.openid" 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 label="车辆编码" prop="bikeCode"> | 
|---|
|  |  |  | <el-input v-model="searchForm.bikeCode" placeholder="请输入车辆编号" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="状态" prop="status"> | 
|---|
|  |  |  | <el-select v-model="searchForm.status" placeholder="请选择"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-date-picker | 
|---|
|  |  |  | v-model="value1" | 
|---|
|  |  |  | type="daterange" | 
|---|
|  |  |  | @change="selectDate" | 
|---|
|  |  |  | format="yyyy-MM-dd" | 
|---|
|  |  |  | value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | 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> | 
|---|
|  |  |  | 
|---|
|  |  |  | stripe | 
|---|
|  |  |  | border | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-table-column prop="openid" label="创建人" min-width="180px" align="center"></el-table-column> | 
|---|
|  |  |  | <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}`  }} | 
|---|
|  |  |  | 
|---|
|  |  |  | <!-- <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> | 
|---|
|  |  |  | <el-button type="text" @click="showProblem(row)">点击查看</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="createDate" label="创建时间" min-width="100px" align="center"></el-table-column> | 
|---|
|  |  |  | 
|---|
|  |  |  | </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> | 
|---|
|  |  |  | <el-button v-if="row.status == 0" type="text" @click="dealAction(row)">处理</el-button> | 
|---|
|  |  |  | <el-popover | 
|---|
|  |  |  | v-else | 
|---|
|  |  |  | placement="bottom" | 
|---|
|  |  |  | width="200" | 
|---|
|  |  |  | trigger="click" | 
|---|
|  |  |  | :content="row.dealInfo"> | 
|---|
|  |  |  | <el-button slot="reference" type="text">查看备注</el-button> | 
|---|
|  |  |  | </el-popover> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | 
|---|
|  |  |  | </pagination> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <OperaRepairDealWindow ref="operaRepairDealWindow" @success="handlePageChange"/> | 
|---|
|  |  |  | <RepairDetailWindow ref="repairDetailWindow"/> | 
|---|
|  |  |  | </TableLayout> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import TableLayout from '@/layouts/TableLayout' | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import OperaRepairDealWindow from '@/components/business/OperaRepairDealWindow' | 
|---|
|  |  |  | import RepairDetailWindow from '@/components/business/RepairDetailWindow' | 
|---|
|  |  |  | import { formatDateTime } from '@/utils/util' | 
|---|
|  |  |  | import { getFileList } from '@/api/business/bikeRepair' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'BikeRepair', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaRepairDealWindow }, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaRepairDealWindow, RepairDetailWindow }, | 
|---|
|  |  |  | data () { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | value1: [], | 
|---|
|  |  |  | value1: [new Date(), new Date()], | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | searchForm: { | 
|---|
|  |  |  | id: '', | 
|---|
|  |  |  | createDate: '', | 
|---|
|  |  |  | creator: '', | 
|---|
|  |  |  | openid: '', | 
|---|
|  |  |  | editDate: '', | 
|---|
|  |  |  | editor: '', | 
|---|
|  |  |  | isdeleted: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | dealUser: '', | 
|---|
|  |  |  | dealDate: '', | 
|---|
|  |  |  | dealInfo: '', | 
|---|
|  |  |  | startDate: '', | 
|---|
|  |  |  | endDate: '', | 
|---|
|  |  |  | content: '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | 'field.id': 'id', | 
|---|
|  |  |  | 'field.main': 'id' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | reset() { | 
|---|
|  |  |  | this.searchForm.startDate = '' | 
|---|
|  |  |  | this.searchForm.endDate = '' | 
|---|
|  |  |  | this.value1 = [] | 
|---|
|  |  |  | this.$refs.searchForm.resetFields() | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | selectDate(v) { | 
|---|
|  |  |  | this.searchForm.startDate = '' | 
|---|
|  |  |  | this.searchForm.endDate = '' | 
|---|
|  |  |  | if (v) { | 
|---|
|  |  |  | this.searchForm.startDate = v[0] | 
|---|
|  |  |  | this.searchForm.endDate = v[1] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | dealAction(row) { | 
|---|
|  |  |  | this.$refs.operaRepairDealWindow.open('处理', row) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | showProblem(row) { | 
|---|
|  |  |  | getFileList(row.id) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | this.$refs.repairDetailWindow.open('问题说明',{ imgList: res.map(item => item.fileurlfull), ...row }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(e => { | 
|---|
|  |  |  | this.$tip.apiFailed(e) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | } | 
|---|