|  |  | 
 |  |  |       <el-form-item label="登录用户名" prop="loginUsername"> | 
 |  |  |         <el-input v-model="searchForm.loginUsername" placeholder="请输入登录用户名" @keypress.enter.native="search"></el-input> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="登录IP" prop="ip"> | 
 |  |  |       <!-- <el-form-item label="登录IP" prop="ip"> | 
 |  |  |         <el-input v-model="searchForm.ip" placeholder="请输入登录IP" @keypress.enter.native="search"></el-input> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="服务器IP" prop="serverIp"> | 
 |  |  | 
 |  |  |           <el-option value="true" label="登录成功"/> | 
 |  |  |           <el-option value="false" label="登录失败"/> | 
 |  |  |         </el-select> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="来源" prop="success"> | 
 |  |  |       </el-form-item> --> | 
 |  |  |       <el-form-item label="来源" prop="orgin"> | 
 |  |  |         <el-select v-model="searchForm.orgin" placeholder="请选择登录来源" clearable @change="search"> | 
 |  |  |           <el-option value="0" label="PC登陆"/> | 
 |  |  |           <el-option value="1" label="钉钉平台"/> | 
 |  |  | 
 |  |  |           <el-option value="4" label="微信小程序"/> | 
 |  |  |         </el-select> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="登录时间" prop="loginTime"> | 
 |  |  |       <!-- <el-form-item label="登录时间" prop="loginTime"> | 
 |  |  |         <el-date-picker | 
 |  |  |           v-model="searchDateRange" | 
 |  |  |           type="datetimerange" | 
 |  |  | 
 |  |  |           end-placeholder="结束时间" | 
 |  |  |           @change="handleSearchTimeChange" | 
 |  |  |         ></el-date-picker> | 
 |  |  |       </el-form-item> | 
 |  |  |       </el-form-item> --> | 
 |  |  |       <section> | 
 |  |  |         <el-button type="primary" @click="search">搜索</el-button> | 
 |  |  |         <el-button :loading="isWorking.export" @click="exportExcel">导出</el-button> | 
 |  |  |         <!-- <el-button :loading="isWorking.export" @click="exportExcel">导出</el-button> --> | 
 |  |  |         <el-button @click="reset">重置</el-button> | 
 |  |  |       </section> | 
 |  |  |     </el-form> | 
 |  |  | 
 |  |  |         :data="tableData.list" | 
 |  |  |         stripe | 
 |  |  |         border | 
 |  |  |         :default-sort="{prop: 'loginTime', order: 'descending'}" | 
 |  |  |         @sort-change="handleSortChange" | 
 |  |  |       > | 
 |  |  |       <!-- :default-sort="{prop: 'loginTime', order: 'descending'}" --> | 
 |  |  |  | 
 |  |  |         <el-table-column prop="orgin" label="来源" align="center" min-width="100px"> | 
 |  |  |            <template slot-scope="{row}"> | 
 |  |  |             {{row.orgin | orginText}} | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column prop="companyUserId" label="用户id" align="center" min-width="100px"></el-table-column> | 
 |  |  |         <el-table-column prop="companyName" label="企业名称" align="center" min-width="100px"></el-table-column> | 
 |  |  |         <el-table-column prop="loginUsername" label="登录用户名" align="center" min-width="100px"></el-table-column> | 
 |  |  |         <el-table-column prop="companyUserName" label="登录用户名" align="center" min-width="100px"> | 
 |  |  |           <template slot-scope="{row}"> | 
 |  |  |             {{ row.companyUserName || row.loginUsername }} | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column prop="ip" label="登录IP" align="center" min-width="120px"></el-table-column> | 
 |  |  |         <el-table-column prop="location" label="登录地址" align="center" min-width="160px"></el-table-column> | 
 |  |  |         <el-table-column prop="clientInfo" label="客户端" align="center" min-width="160px"></el-table-column> | 
 |  |  | 
 |  |  |             {{row.success | statusText}} | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column prop="reason" label="失败原因" min-width="160px"></el-table-column> | 
 |  |  |         <el-table-column prop="reason" label="失败原因" min-width="160px" show-overflow-tooltip> | 
 |  |  |           <template slot-scope="{row}"> | 
 |  |  |             <span class="lang-title-style">{{ row.reason }}</span> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |       </el-table> | 
 |  |  |       <pagination | 
 |  |  |           @size-change="handleSizeChange" | 
 |  |  | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     // 时间搜索范围变化 | 
 |  |  |     handleSearchTimeChange (value) { | 
 |  |  |       this.searchForm.startTime = null | 
 |  |  |       this.searchForm.endTime = null | 
 |  |  |       if (value != null) { | 
 |  |  |         this.searchForm.startTime = value[0] | 
 |  |  |         this.searchForm.endTime = value[1] | 
 |  |  |       } | 
 |  |  |       this.search() | 
 |  |  |     } | 
 |  |  |      | 
 |  |  |   }, | 
 |  |  |   created () { | 
 |  |  |     this.config({ | 
 |  |  | 
 |  |  |       }] | 
 |  |  |     }) | 
 |  |  |     this.search() | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     handleSearchTimeChange (value) { | 
 |  |  |       this.searchForm.startTime = null | 
 |  |  |       this.searchForm.endTime = null | 
 |  |  |       if (value != null) { | 
 |  |  |         this.searchForm.startTime = value[0] | 
 |  |  |         this.searchForm.endTime = value[1] | 
 |  |  |       } | 
 |  |  |       this.search() | 
 |  |  |     }, | 
 |  |  |     reset() { | 
 |  |  |       this.$refs.searchForm.resetFields() | 
 |  |  |       this.searchDateRange = [] | 
 |  |  |       this.searchForm.startTime = '' | 
 |  |  |       this.searchForm.endTime = '' | 
 |  |  |       this.search() | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | </script> |