|
|
@@ -37,6 +37,9 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="gva-table-box">
|
|
|
+ <div class="gva-btn-list">
|
|
|
+ <el-button class="excel-btn" size="small" type="primary" icon="download" @click="handleExcelExport">导出</el-button>
|
|
|
+ </div>
|
|
|
<el-table :data="tableData" @sort-change="sortChange" @selection-change="handleSelectionChange"
|
|
|
border
|
|
|
>
|
|
|
@@ -47,6 +50,13 @@
|
|
|
<el-table-column align="left" label="电脑编号" min-width="100" prop="pc_code" sortable="custom"/>
|
|
|
<el-table-column align="left" label="使用者" min-width="150" prop="operator" sortable="custom"/>
|
|
|
<el-table-column align="left" label="日期" min-width="150" prop="create_date" />
|
|
|
+ <el-table-column align="left" label="拉取账号" min-width="150" prop="pull_account_total" />
|
|
|
+ <el-table-column align="left" label="进入主线" min-width="150" prop="enter_main_total" />
|
|
|
+ <el-table-column label="主线成功率" align="center" min-width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ scope.row.enter_main_total == 0 || scope.row.pull_account_total == 0 ? 0 + '%' : Math.round(scope.row.enter_main_total/scope.row.pull_account_total * 10000) / 100 + '%'}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="left" label="状态" min-width="150" prop="status" >
|
|
|
<template #default="scope">
|
|
|
<div>
|
|
|
@@ -97,7 +107,7 @@
|
|
|
<script setup>
|
|
|
import {
|
|
|
computerUseLog,
|
|
|
- logComputerNum,
|
|
|
+ exportExcel,
|
|
|
} from '@/api/log'
|
|
|
import { toSQLLine } from '@/utils/stringFun'
|
|
|
import { ref } from 'vue'
|
|
|
@@ -252,8 +262,25 @@ const searchStatusOptions = ref([
|
|
|
searchInfo.value.orderKey = toSQLLine(prop)
|
|
|
searchInfo.value.desc = order === 'descending'
|
|
|
}
|
|
|
+ console.log(searchInfo.value.create_date)
|
|
|
+
|
|
|
getTableData()
|
|
|
}
|
|
|
+
|
|
|
+ const handleExcelExport = async() => {
|
|
|
+ var fileName = Date.parse(new Date()) + "-pc.xlsx"
|
|
|
+ if(searchInfo.value.create_date == null){
|
|
|
+ let dt = new Date()
|
|
|
+ var y = dt.getFullYear()
|
|
|
+ var mt = (dt.getMonth() + 1).toString().padStart(2,'0')
|
|
|
+ var day = dt.getDate().toString().padStart(2,'0')
|
|
|
+ var timeStr = y + "-" + mt + "-" + day
|
|
|
+ fileName = timeStr + "-pc.xlsx"
|
|
|
+ }else{
|
|
|
+ fileName = searchInfo.value.create_date + "-pc.xlsx"
|
|
|
+ }
|
|
|
+ exportExcel({ page: page.value, pageSize: pageSize.value, ...searchInfo.value },fileName)
|
|
|
+}
|
|
|
|
|
|
// 查询
|
|
|
const getTableData = async() => {
|