Commit cf9c18db by cwq0219

导出

1 parent 283f9383
......@@ -11,7 +11,13 @@ function reportApi (data) {
return request(data)
}
function exportApi (data) {
data.method = `${path}export`
return request(data)
}
export {
getListApi,
reportApi
reportApi,
exportApi
}
......@@ -39,7 +39,7 @@
accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)" />
</auth-button>
<auth-button label="导出" type=""></auth-button>
<auth-button label="导出" type="Button" @e-auth-click="exportFile"></auth-button>
</el-col>
</el-row>
<el-table
......@@ -229,6 +229,15 @@ export default {
notice.errorTips()
})
},
exportFile () {
const params = this.getParams()
exportApi(params).then(res => {
notice.okTips()
}).catch(err => {
notice.errorTips()
})
},
/* 接口请求-end */
// 搜索
handleSearch () {
......
......@@ -29,7 +29,7 @@
<el-col :span="12">子系统列表</el-col>
<el-col :span="12" style="text-align: right">
<!-- <el-button @click="handleEdit(editFormReset)">添加子系统</el-button> -->
<auth-button label="添加子系统" type="" @e-auth-click="handleEdit(editFormReset)">添加子系统</auth-button>
<auth-button label="添加子系统" type="" @e-auth-click="handleEdit(editFormReset)"></auth-button>
</el-col>
</el-row>
<el-table
......
......@@ -61,7 +61,7 @@
<el-col :span="12">车辆状态列表</el-col>
<el-col :span="12" style="text-align: right">
<!-- <el-button>导出</el-button> -->
<auth-button label="导出" type="Button"></auth-button>
<auth-button label="导出" type="Button" @e-auth-click="exportFile"></auth-button>
</el-col>
</el-row>
<el-table
......@@ -111,7 +111,7 @@
</template>
<script>
import { getListApi, reportApi } from '@api/systemMonitor'
import { getListApi, reportApi, exportApi } from '@api/systemMonitor'
import notice from '@/common/notice'
require('echarts/lib/chart/pie')
require("echarts/lib/component/tooltip");
......@@ -281,6 +281,14 @@ export default {
notice.errorTips(err)
})
},
exportFile () {
const params = this.getParams()
exportApi(params).then(res => {
notice.okTips()
}).catch(err => {
notice.errorTips()
})
},
/* 接口请求-end */
/* onlineNum Int 在网数量
offlineNum int 离网数量
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!