|  |  | 
 |  |  |     <!-- 搜索表单 --> | 
 |  |  |     <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> | 
 |  |  |       <el-form-item label="权限编码" prop="code"> | 
 |  |  |         <el-input v-model="searchForm.code" v-trim placeholder="请输入权限编码" @keypress.enter.native="search"/> | 
 |  |  |         <el-input v-model="searchForm.code" v-trim placeholder="请输入权限编码" @keypress.enter.native="refresh"/> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="权限名称" prop="name"> | 
 |  |  |         <el-input v-model="searchForm.name" v-trim placeholder="请输入权限名称" @keypress.enter.native="search"/> | 
 |  |  |         <el-input v-model="searchForm.name" v-trim placeholder="请输入权限名称" @keypress.enter.native="refresh"/> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="平台类型" prop="type"> | 
 |  |  |         <el-select v-model="searchForm.type" placeholder="请选择" @change="search"> | 
 |  |  |           <el-option label="通用" value="0"></el-option> | 
 |  |  |         <el-select v-model="type" placeholder="请选择" @change="refresh" clearable> | 
 |  |  |           <el-option label="平台端" value="1"></el-option> | 
 |  |  |           <el-option label="企业端" value="2"></el-option> | 
 |  |  |           <el-option label="商户端" value="3"></el-option> | 
 |  |  |           <el-option label="商户端" value="2"></el-option> | 
 |  |  |           <el-option label="企业端" value="3"></el-option> | 
 |  |  |         </el-select> | 
 |  |  |       </el-form-item> | 
 |  |  |  | 
 |  |  |       <section> | 
 |  |  |         <el-button type="primary" @click="search">搜索</el-button> | 
 |  |  |         <el-button @click="reset">重置</el-button> | 
 |  |  | 
 |  |  |       <ul class="toolbar" v-permissions="['system:permission:create', 'system:permission:delete']"> | 
 |  |  |         <li><el-button type="primary" @click="$refs.operaPermissionWindow.open('新建系统权限')" icon="el-icon-plus" v-permissions="['system:permission:create']">新建</el-button></li> | 
 |  |  |         <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['system:permission:delete']">删除</el-button></li> | 
 |  |  |       </ul> | 
 |  |  |  | 
 |  |  |      </ul> | 
 |  |  |       <el-table | 
 |  |  |         v-loading="isWorking.search" | 
 |  |  |         :data="tableData.list" | 
 |  |  | 
 |  |  |         @sort-change="handleSortChange" | 
 |  |  |       > | 
 |  |  |         <el-table-column type="selection" fixed="left" width="55"></el-table-column> | 
 |  |  |         <el-table-column prop="code" label="权限编码" fixed="left" min-width="200px"></el-table-column> | 
 |  |  |         <el-table-column prop="code" label="权限编码" fixed="left" min-width="250px"></el-table-column> | 
 |  |  |         <el-table-column prop="name" label="权限名称" fixed="left" min-width="120px"></el-table-column> | 
 |  |  |         <el-table-column prop="name" label="平台类型" fixed="left" min-width="120px"> | 
 |  |  |         <el-table-column prop="type" label="平台类型" fixed="left" min-width="180px"> | 
 |  |  |           <template slot-scope="{row}"> | 
 |  |  |             <span  v-if="row.type == null || row.type ===0">通用</span> | 
 |  |  |             <span  v-if="row.type === 1">平台端</span> | 
 |  |  |             <span   v-if="row.type === 2">企业端</span> | 
 |  |  |             <span   v-if="row.type === 3">商户端</span> | 
 |  |  |             <span  v-if="row.isadmin === 1">【平台】</span> | 
 |  |  |             <span  v-if="row.isshop === 1">【商户】</span> | 
 |  |  |             <span  v-if="row.iscom === 1">【企业】</span> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column prop="remark" label="权限备注" min-width="120px"></el-table-column> | 
 |  |  | 
 |  |  |   data () { | 
 |  |  |     return { | 
 |  |  |       // 搜索 | 
 |  |  |       type: '', | 
 |  |  |       searchForm: { | 
 |  |  |         code: '', | 
 |  |  |         name: '', | 
 |  |  |         type: '', | 
 |  |  |         remark: '' | 
 |  |  |         remark: '', | 
 |  |  |         iscom:null, | 
 |  |  |         isshop:null, | 
 |  |  |         isadmin:null | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  | 
 |  |  |       }] | 
 |  |  |     }) | 
 |  |  |     this.search() | 
 |  |  |   }, | 
 |  |  |   methods:{ | 
 |  |  |     refresh(){ | 
 |  |  |       this.searchForm.iscom = null | 
 |  |  |       this.searchForm.isshop = null | 
 |  |  |       this.searchForm.isadmin = null | 
 |  |  |       if(this.type == 1){ | 
 |  |  |         this.searchForm.iscom = null | 
 |  |  |         this.searchForm.isshop = null | 
 |  |  |         this.searchForm.isadmin = 1 | 
 |  |  |       }else if(this.type == 2){ | 
 |  |  |         this.searchForm.iscom = null | 
 |  |  |         this.searchForm.isshop = 1 | 
 |  |  |         this.searchForm.isadmin = null | 
 |  |  |       }else if(this.type == 2){ | 
 |  |  |         this.searchForm.iscom = 1 | 
 |  |  |         this.searchForm.isshop = null | 
 |  |  |         this.searchForm.isadmin = null | 
 |  |  |       } | 
 |  |  |       this.search() | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  |  | 
 |  |  | } | 
 |  |  | </script> |