|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div class="main_app"> | 
|---|
|  |  |  | <QueryForm | 
|---|
|  |  |  | v-model="filters" | 
|---|
|  |  |  | :query-form-config="queryFormConfig" | 
|---|
|  |  |  | @handleQuery="getList(1)" | 
|---|
|  |  |  | @clear="clear" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <div class="ml20 mt20"> | 
|---|
|  |  |  | <el-button type="primary" @click="handleEdit()">添加</el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <el-table v-loading="loading" :data="list" stripe> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="name" | 
|---|
|  |  |  | label="姓名" | 
|---|
|  |  |  | min-width="100" | 
|---|
|  |  |  | show-overflow-tooltip | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="name" | 
|---|
|  |  |  | label="性别" | 
|---|
|  |  |  | min-width="100" | 
|---|
|  |  |  | show-overflow-tooltip | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="name" | 
|---|
|  |  |  | label="组织" | 
|---|
|  |  |  | min-width="100" | 
|---|
|  |  |  | show-overflow-tooltip | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="name" | 
|---|
|  |  |  | label="手机号" | 
|---|
|  |  |  | min-width="80" | 
|---|
|  |  |  | show-overflow-tooltip | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="name" | 
|---|
|  |  |  | label="操作" | 
|---|
|  |  |  | min-width="80" | 
|---|
|  |  |  | show-overflow-tooltip | 
|---|
|  |  |  | <TableLayout :permissions="['business:member:query']"> | 
|---|
|  |  |  | <!-- 搜索表单 --> | 
|---|
|  |  |  | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="120px" inline> | 
|---|
|  |  |  | <el-form-item label="司机姓名/手机号" prop="memberName"> | 
|---|
|  |  |  | <el-input v-model="searchForm.memberName" clearable placeholder="请输入司机姓名/手机号" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </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> | 
|---|
|  |  |  | <ul class="toolbar" v-permissions="['business:cardriver:create','business:cardriver:delete']"> | 
|---|
|  |  |  | <li><el-button type="primary" @click="$refs.OperaCarDriverWindow.open('新建司机',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:cardriver:create']">新建</el-button></li> | 
|---|
|  |  |  | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:cardriver:delete']">批量删除</el-button></li> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | <el-table | 
|---|
|  |  |  | v-loading="isWorking.search" | 
|---|
|  |  |  | :data="tableData.list" | 
|---|
|  |  |  | stripe | 
|---|
|  |  |  | @selection-change="handleSelectionChange" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template v-slot="scope"> | 
|---|
|  |  |  | <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button> | 
|---|
|  |  |  | <el-button type="text" class="red" @click="handleDel(scope.row)">删除</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | <pagination | 
|---|
|  |  |  | @size-change="handleSizeChange" | 
|---|
|  |  |  | @current-change="getList" | 
|---|
|  |  |  | :pagination="pagination" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-dialog title="选择人员" :visible.sync="isShowEdit" width="480px"> | 
|---|
|  |  |  | <el-form | 
|---|
|  |  |  | :model="param" | 
|---|
|  |  |  | :rules="rules" | 
|---|
|  |  |  | ref="ruleForm" | 
|---|
|  |  |  | label-width="100px" | 
|---|
|  |  |  | <el-table-column type="selection" width="55"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="memberName" label="姓名" min-width="150px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="memberPhone" label="手机号" min-width="200px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="memberSex" label="性别"  min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span  v-if="row.memberSex == 1">男</span> | 
|---|
|  |  |  | <span  v-if="row.memberSex == 2">女</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="companyName" label="组织"  min-width="260px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="carCode" label="车牌号"  min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="editDate" label="操作时间" min-width="150px"></el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | v-if="containPermissions(['business:cardriver:update', 'business:cardriver:delete' ])" | 
|---|
|  |  |  | label="操作" | 
|---|
|  |  |  | min-width="250" | 
|---|
|  |  |  | fixed="right" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaCarDriverWindow.open('编辑司机',row,searchForm.type)" v-permissions="['business:cardriver:update']">编辑</el-button> | 
|---|
|  |  |  | <el-button  type="text"  icon="el-icon-delete" @click="deleteById(row)" style="color: red" v-permissions="['business:cardriver:delete']">删除</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | <pagination | 
|---|
|  |  |  | @size-change="handleSizeChange" | 
|---|
|  |  |  | @current-change="handlePageChange" | 
|---|
|  |  |  | :pagination="tableData.pagination" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-form-item label="选择组织" prop="name"> | 
|---|
|  |  |  | <el-select placeholder="请选择,单选" class="w300" filterable> | 
|---|
|  |  |  | <el-option></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="选择人员" prop="name"> | 
|---|
|  |  |  | <el-select placeholder="请选择,单选"  class="w300" filterable> | 
|---|
|  |  |  | <el-option></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | <span slot="footer" class="dialog-footer"> | 
|---|
|  |  |  | <el-button @click="isShowEdit = false">取消</el-button> | 
|---|
|  |  |  | <el-button type="primary" @click="isShowEdit = false">确定</el-button> | 
|---|
|  |  |  | </span> | 
|---|
|  |  |  | </el-dialog> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </pagination> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <!-- 新建/修改 --> | 
|---|
|  |  |  | <OperaCarDriverWindow ref="OperaCarDriverWindow" @success="handlePageChange"/> | 
|---|
|  |  |  | </TableLayout> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import BaseTable from '@/components/base/BaseTable' | 
|---|
|  |  |  | import TableLayout from '@/layouts/TableLayout' | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import QueryForm from '@/components/common/QueryForm' | 
|---|
|  |  |  | import OperaCarDriverWindow from '@/components/business/OperaCarDriverWindow' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | components: { | 
|---|
|  |  |  | Pagination, | 
|---|
|  |  |  | QueryForm | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | name: 'areaSet', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaCarDriverWindow }, | 
|---|
|  |  |  | data () { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | filters: {}, | 
|---|
|  |  |  | loading: false, | 
|---|
|  |  |  | queryFormConfig: { | 
|---|
|  |  |  | formItems: [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | filed: 'name', | 
|---|
|  |  |  | type: 'input', | 
|---|
|  |  |  | label: '驾驶员姓名' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | online: true | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | pagination: { | 
|---|
|  |  |  | capacity: 10, | 
|---|
|  |  |  | page: 1 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | list: [{}], | 
|---|
|  |  |  | total: 0, | 
|---|
|  |  |  | isShowEdit: false, | 
|---|
|  |  |  | param: {}, | 
|---|
|  |  |  | rules: {} | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | searchForm: { | 
|---|
|  |  |  | title: '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created () { | 
|---|
|  |  |  | this.config({ | 
|---|
|  |  |  | module: '司机配置', | 
|---|
|  |  |  | api: '/business/carDriver', | 
|---|
|  |  |  | 'field.id': 'id', | 
|---|
|  |  |  | 'field.main': 'id' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | getList (page) { }, | 
|---|
|  |  |  | clear () { }, | 
|---|
|  |  |  | handleEdit (row) { | 
|---|
|  |  |  | this.isShowEdit = true | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleDel () {}, | 
|---|
|  |  |  | handleSizeChange (capacity) { | 
|---|
|  |  |  | this.pagination.capacity = capacity | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | </style> | 
|---|