Commit cf9c18db by cwq0219

导出

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