| | |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']"> |
| | | <!-- <li><el-button type="primary" @click="$refs.operaCarsWindow.open('新建车辆信息表')" icon="el-icon-plus" v-permissions="['business:member:create']">新建</el-button></li>--> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:member:delete']">删除</el-button></li> |
| | | <li><el-button type="primary" @click="syncCars" v-permissions="['business:cars:sync']">同步</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="code" label="车牌号" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parksName" label="停车场" min-width="100px"></el-table-column> |
| | | <el-table-column label="用户类型" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.memberType === 0">劳务访客</span> |
| | |
| | | <el-table-column prop="memberName" label="姓名" min-width="100px"></el-table-column> |
| | | <el-table-column prop="memberPhone" label="手机号" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="部门/公司" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" label="有效期" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{validity(row.startTime, row.endTime)}}</span> |
| | | <!-- <span v-if="!row.startTime || !row.endTime">长期</span>--> |
| | | <!-- <span v-else>{{row.startTime}} 至 {{row.endTime}}</span>--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createDate" label="创建时间" min-width="100px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete'])" |
| | | label="操作" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-button type="text" @click="$refs.operaCarsWindow.open('编辑车辆信息表', row)" icon="el-icon-edit" v-permissions="['business:member:update']">编辑</el-button>--> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaCarsWindow from '@/components/business/OperaCarsWindow' |
| | | import { validity } from '@/utils/util' |
| | | import { sync } from '@/api/business/cars' |
| | | export default { |
| | | name: 'Cars', |
| | | extends: BaseTable, |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | // 同步信息 |
| | | async syncCars () { |
| | | const message = await sync({}) |
| | | this.$message.success(message) |
| | | this.search() |
| | | } |
| | | } |
| | | } |
| | | </script> |