|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <TableLayout :permissions="['business:member:query']"> | 
|---|
|  |  |  | <!-- 搜索表单 --> | 
|---|
|  |  |  | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> | 
|---|
|  |  |  | <el-form-item label="" prop="code" title="车牌号"> | 
|---|
|  |  |  | <el-input v-model="searchForm.code" clearable placeholder="车牌号" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="memberName" title="车主信息"> | 
|---|
|  |  |  | <el-input v-model="searchForm.memberName" clearable placeholder="车主信息" | 
|---|
|  |  |  | @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="catePName" title="分类名称"> | 
|---|
|  |  |  | <el-cascader v-model="searchForm.cateIds" @change="changeSel" placeholder="请选择分类" clearable :options="cateList" :props="{ | 
|---|
|  |  |  | label: 'name', | 
|---|
|  |  |  | value: 'id', | 
|---|
|  |  |  | children: 'childCategoryList', | 
|---|
|  |  |  | checkStrictly: true | 
|---|
|  |  |  | }"></el-cascader> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="companyName" title="车主组织名称"> | 
|---|
|  |  |  | <el-input v-model="searchForm.companyName" clearable placeholder="车主组织名称" | 
|---|
|  |  |  | @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="authStatus" title="是否授权"> | 
|---|
|  |  |  | <el-select v-model="searchForm.authStatus" @change="search" clearable placeholder="是否授权"> | 
|---|
|  |  |  | <el-option label="已授权" value="1"></el-option> | 
|---|
|  |  |  | <el-option label="未授权" value="0"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="type" title="业务类型"> | 
|---|
|  |  |  | <el-select v-model="searchForm.type" @change="search" clearable placeholder="备注"> | 
|---|
|  |  |  | <el-option label="安泰公务车" value="0"></el-option> | 
|---|
|  |  |  | <el-option label="安泰自有物流车" value="1"></el-option> | 
|---|
|  |  |  | <el-option label="其他" value="2"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | <el-button @click="reset">重置</el-button> | 
|---|
|  |  |  | </section> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | <div ref="QueryFormRef" slot="search-form"> | 
|---|
|  |  |  | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> | 
|---|
|  |  |  | <el-form-item label="" prop="code" title="车牌号"> | 
|---|
|  |  |  | <el-input v-model="searchForm.code" clearable placeholder="车牌号" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="memberName" title="车主信息"> | 
|---|
|  |  |  | <el-input v-model="searchForm.memberName" clearable placeholder="车主信息" | 
|---|
|  |  |  | @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="catePName" title="分类名称"> | 
|---|
|  |  |  | <el-cascader v-model="searchForm.cateIds" @change="changeSel" placeholder="请选择分类" clearable | 
|---|
|  |  |  | :options="cateList" :props="{ | 
|---|
|  |  |  | label: 'name', | 
|---|
|  |  |  | value: 'id', | 
|---|
|  |  |  | children: 'childCategoryList', | 
|---|
|  |  |  | checkStrictly: true | 
|---|
|  |  |  | }"></el-cascader> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="companyName" title="车主组织名称"> | 
|---|
|  |  |  | <el-input v-model="searchForm.companyName" clearable placeholder="车主组织名称" | 
|---|
|  |  |  | @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="authStatus" title="是否授权"> | 
|---|
|  |  |  | <el-select v-model="searchForm.authStatus" @change="search" clearable placeholder="是否授权"> | 
|---|
|  |  |  | <el-option label="已授权" value="1"></el-option> | 
|---|
|  |  |  | <el-option label="未授权" value="0"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="type" title="业务类型"> | 
|---|
|  |  |  | <el-select v-model="searchForm.type" @change="search" clearable placeholder="备注"> | 
|---|
|  |  |  | <el-option label="安泰公务车" value="0"></el-option> | 
|---|
|  |  |  | <el-option label="安泰自有物流车" value="1"></el-option> | 
|---|
|  |  |  | <el-option label="其他" value="2"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | <el-button @click="reset">重置</el-button> | 
|---|
|  |  |  | </section> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 表格和分页 --> | 
|---|
|  |  |  | <template v-slot:table-wrap> | 
|---|
|  |  |  | <ul class="toolbar" | 
|---|
|  |  |  | v-permissions="['business:cars:create', 'business:cars:exportExcel', 'business:parkBook:create']"> | 
|---|
|  |  |  | <li><el-button type="primary" @click="handleEdit" icon="el-icon-plus" | 
|---|
|  |  |  | v-permissions="['business:cars:create']">新建</el-button></li> | 
|---|
|  |  |  | <li><el-button type="primary" @click="$refs.OperaCarsImportWindowRef.open('人员导入', searchForm.companyType)" v-permissions="['business:cars:create']">车辆导入</el-button> | 
|---|
|  |  |  | <li><el-button type="primary" @click="$refs.OperaCarsImportWindowRef.open('车辆导入', searchForm.companyType)" | 
|---|
|  |  |  | v-permissions="['business:cars:create']">车辆导入</el-button> | 
|---|
|  |  |  | </li> | 
|---|
|  |  |  | <li><el-button type="primary" @click="exportExcel" v-permissions="['business:cars:exportExcel']">导出</el-button> | 
|---|
|  |  |  | </li> | 
|---|
|  |  |  | <li><el-button type="primary" @click="startEmpowerBatch" icon="el-icon-plus" | 
|---|
|  |  |  | v-permissions="['business:parkbook:create']">下发授权</el-button></li> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> | 
|---|
|  |  |  | <el-table :height="tableHeightNew" v-loading="isWorking.search" :data="tableData.list" stripe | 
|---|
|  |  |  | @selection-change="handleSelectionChange"> | 
|---|
|  |  |  | <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="code" label="车牌号" fixed="left" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <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="catePName" label="一级分类" min-width="120px"></el-table-column> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-table-column prop="editDate" label="操作时间" min-width="140px"></el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | v-if="containPermissions(['business:member:update', 'business:member:delete', 'business:empower:create'])" | 
|---|
|  |  |  | label="操作" min-width="200" align="center" fixed="right"> | 
|---|
|  |  |  | label="操作" min-width="200" align="center"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-button type="text" icon="el-icon-edit" @click="handleEdit(row)" | 
|---|
|  |  |  | v-permissions="['business:cars:update']">编辑</el-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'Cars', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaCarsWindow, OperaCarAuthWindow,OperaCarsImportWindow }, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaCarsWindow, OperaCarAuthWindow, OperaCarsImportWindow }, | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | this.getCate() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | mounted() { | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | this.tableHeight = document.body.scrollHeight - this.$refs.QueryFormRef.offsetHeight - 300 | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | handleSelectionChange(e) { | 
|---|
|  |  |  | this.searchForm.ids = e.map(i => i.id).join(',') | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // handleSelectionChange(e) { | 
|---|
|  |  |  | //   this.searchForm.ids = e.map(i => i.id).join(',') | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | changeSel(e) { | 
|---|
|  |  |  | console.log(e) | 
|---|
|  |  |  | if (e && e.length == 1) { | 
|---|