Commit 02281375 authored by yanzhongrong's avatar yanzhongrong

export

parent f80e7e2e
import request from '@/utils/request'
const path = {
// 告警管理
exportLeakyCable: 'sysMonitorAlarm/export',
exportConnet: 'sysConnectAlarm/export',
// 配置管理
// 实时状态
exportLeakyCableTime: 'sysLeakyCableStatus/export',
exportConnetTime: 'sysDeviceStatus/export',
// 历史数据
exportLeakyStatusHistory: 'sysHistoryMonitorStatus/export',
exportLeakyMaintainHistory: 'sysHistoryMonitorMaintain/export',
exportConnectStatusHistory: 'sysHistoryConnectStatus/export',
exportConnectMaintainHistory: 'sysHistoryConnectMaintain/export',
// 用户管理
exportLog: 'sysLog/exportLog',
}
const blobConf = { responseType: 'blob' }
function requestBlob(url, params, config = {}) {
return request.post(url, params, {
...config,
...blobConf
})
}
export function exportLeakyCable() {
return requestBlob(path.exportLeakyCable, ...arguments)
}
export function exportConnet() {
return requestBlob(path.exportConnet, ...arguments)
}
export function exportLeakyCableTime() {
return requestBlob(path.exportLeakyCableTime, ...arguments)
}
export function exportConnetTime() {
return requestBlob(path.exportConnetTime, ...arguments)
}
export function exportLeakyStatusHistory() {
return requestBlob(path.exportLeakyStatusHistory, ...arguments)
}
export function exportLeakyMaintainHistory() {
return requestBlob(path.exportLeakyMaintainHistory, ...arguments)
}
export function exportConnectStatusHistory() {
return requestBlob(path.exportConnectStatusHistory, ...arguments)
}
export function exportConnectMaintainHistory() {
return requestBlob(path.exportConnectMaintainHistory, ...arguments)
}
export function exportLog() {
return requestBlob(path.exportLog, ...arguments)
}
\ No newline at end of file
export default function (res, type, fileName = '') {
let blob = new Blob([res], { type: `application/${type}` })
let a = document.createElement('a')
let url = window.URL.createObjectURL(blob)
a.href = url
a.download = fileName
a.click()
}
\ No newline at end of file
......@@ -2,21 +2,15 @@ import request from '@/utils/request'
const path = {
cableTimeList: 'sysMonitorAlarm/selectPage',
cableExport: 'sysMonitorAlarm/export',
cableConfirm: 'sysMonitorAlarm/confirm',
deviceList: 'sysConnectAlarm/selectPage',
deviceExport: 'sysConnectAlarm/export'
}
export function cableTimeList() {
return request.post(path.cableTimeList, ...arguments)
}
export function cableExport() {
return request.post(path.cableExport, ...arguments)
}
export function cableConfirm() {
return request.post(path.cableConfirm, ...arguments)
}
......@@ -24,7 +18,3 @@ export function cableConfirm() {
export function deviceList() {
return request.post(path.deviceList, ...arguments)
}
export function deviceExport() {
return request.post(path.deviceExport, ...arguments)
}
import { alarmLeval } from '@/const/index'
export const tableData = [
{
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '紧急',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12',
updateDate: '2022/12/18 11:51:12',
confirmUser: '--',
confirmTime: '--',
},
{
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '紧急',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12',
updateDate: '2022/12/18 11:51:12',
confirmUser: '--',
confirmTime: '--',
},
{
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '重要',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12',
updateDate: '2022/12/18 11:51:12',
confirmUser: 'admin',
confirmTime: '2022/12/18 17:51:12',
},
{
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '紧急',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12',
updateDate: '2022/12/18 11:51:12',
confirmUser: 'admin',
confirmTime: '2022/12/18 17:51:12',
},
{
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '重要',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12',
updateDate: '2022/12/18 11:51:12',
confirmUser: '--',
confirmTime: '--'
},
]
\ No newline at end of file
......@@ -81,7 +81,8 @@
</template>
<script>
import { cableTimeList, cableExport } from '../api'
import { cableTimeList } from '../api'
import { exportLeakyCable } from '@/api/export'
import search from '@/views/monitor/leakageCable/components/search.vue'
export default {
data() {
......@@ -107,7 +108,8 @@ export default {
key: 0
}
],
isQuery: false
isQuery: false,
searchOption: {}
};
},
components: { search },
......@@ -129,12 +131,8 @@ export default {
this.getTableData()
},
getTableData(option) {
let type = ''
if(this.confirmStatus == 2) {
type = ''
} else {
type = this.confirmStatus
}
this.searchOption = option
let type = this.confirmStatus == 2 ? '' : this.confirmStatus
let param = {
confirmStatus: type,
...this.params,
......@@ -151,15 +149,21 @@ export default {
this.getTableData()
},
exportList() {
cableExport({confirmStatus: this.confirmStatus}).then(res => {
let type = this.confirmStatus == 2 ? '' : this.confirmStatus
let param = {
confirmStatus: type,
...this.params,
...this.searchOption
}
exportLeakyCable(param).then(res => {
download(res, 'vnd.ms-excel', `漏缆监测告警.xls`)
})
},
},
mounted() {
this.getTableData()
},
};
}
</script>
<style lang="scss" scoped>
......
export const tableData = [
{
equipment1: '监控中心LSC',
state1: '连接正常',
equipment2: '现场管理单元 K65+308',
uploadDate: '2022/12/18 11:51:12',
confirmUser: '--',
confirmTime: '--',
},
{
equipment1: '监控中心LSC',
state1: '连接正常',
equipment2: '现场管理单元 K65+308',
uploadDate: '2022/12/18 11:51:12',
confirmUser: 'admin',
confirmTime: '2022/12/18 11:51:12',
},
{
equipment1: '监控中心LSC',
state1: '连接正常',
equipment2: '现场管理单元 K65+308',
uploadDate: '2022/12/18 11:51:12',
confirmUser: '--',
confirmTime: '--',
},
{
equipment1: '监控中心LSC',
state1: '连接正常',
equipment2: '现场管理单元 K65+308',
uploadDate: '2022/12/18 11:51:12',
confirmUser: '--',
confirmTime: '--',
},
{
equipment1: '监控中心LSC',
state1: '连接异常',
equipment2: '现场管理单元 K65+308',
uploadDate: '2022/12/18 11:51:12',
confirmUser: '--',
confirmTime: '--',
},
{
equipment1: '监控中心LSC',
state1: '连接异常',
equipment2: '现场管理单元 K65+308',
uploadDate: '2022/12/18 11:51:12',
confirmUser: '--',
confirmTime: '--',
},
]
\ No newline at end of file
......@@ -51,8 +51,10 @@
</template>
<script>
import { deviceList, deviceExport } from '../api'
import { deviceList } from '../api'
import { exportConnet } from '@/api/export'
import search from '@/views/monitor/equipment/components/search.vue'
import download from '@/utils/download'
export default {
data() {
return {
......@@ -77,8 +79,9 @@ export default {
key: 0
}
],
isQuery: false
};
isQuery: false,
searchOption: {}
}
},
components: { search },
methods: {
......@@ -100,12 +103,7 @@ export default {
this.getTableData()
},
getTableData(option) {
let type = ''
if(this.confirmStatus == 2) {
type = ''
} else {
type = this.confirmStatus
}
let type = this.confirmStatus == 2 ? '' : this.confirmStatus
let param = {
confirmStatus: type,
...this.params,
......@@ -122,7 +120,14 @@ export default {
this.getTableData()
},
exportList() {
deviceExport({confirmStatus: this.confirmStatus}).then(res => {
let type = this.confirmStatus == 2 ? '' : this.confirmStatus
let param = {
confirmStatus: type,
...this.params,
...this.searchOption
}
exportConnet(param).then(res => {
download(res, 'vnd.ms-excel', `设备连接告警.xls`)
})
},
},
......
......@@ -8,7 +8,7 @@
>删除</delids>
<el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary" @click="isQuery = !isQuery">查询</el-button>
<el-button type="primary">导出</el-button>
<el-button type="primary" @click="toExport">导出</el-button>
<el-button type="primary">清空数据</el-button>
</div>
</div>
......@@ -54,7 +54,8 @@
import { ConnectMaintainList, ConnectMaintainDelete } from '../api'
import { ConnectStatusEnum } from '@/const/index'
import search from './components/search.vue'
import download from '@/utils/download'
import { exportConnectMaintainHistory } from '@/api/export'
export default {
data() {
return {
......@@ -66,7 +67,8 @@ export default {
},
total: 14,
tableData: [],
isQuery: false
isQuery: false,
searchOption: {}
};
},
components: {
......@@ -83,6 +85,7 @@ export default {
this.getTableData()
},
getTableData(option) {
this.searchOption = option
let params = {
...this.params,
...option
......@@ -112,11 +115,20 @@ export default {
return "stripe";
}
},
toExport() {
let params = {
...this.params,
...this.searchOption
}
exportConnectMaintainHistory(params).then(res => {
download(res, 'vnd.ms-excel', `设备连接维修历史.xls`)
})
},
},
mounted() {
this.getTableData()
},
};
}
</script>
<style lang="scss" scoped>
.leakage-cable {
......
......@@ -11,7 +11,7 @@
>
<el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary" @click="isQuery = !isQuery">查询</el-button>
<el-button type="primary">导出</el-button>
<el-button type="primary" @click="toExport">导出</el-button>
<el-button type="primary">清空数据</el-button>
</div>
</div>
......@@ -57,7 +57,8 @@
import { ConnectStatusList, ConnectStatusDelete } from '../api'
import { ConnectStatusEnum } from '@/const/index'
import search from './components/search.vue'
import { exportConnectStatusHistory } from '@/api/export'
import download from '@/utils/download'
export default {
props: [],
data() {
......@@ -70,7 +71,8 @@ export default {
},
total: 10,
tableData: [],
isQuery: false
isQuery: false,
searchOption: {}
}
},
components: {
......@@ -87,6 +89,7 @@ export default {
this.getTableData()
},
getTableData(option) {
this.searchOption = option
let params = {
...this.params,
...option
......@@ -116,6 +119,15 @@ export default {
return "stripe";
}
},
toExport() {
let params = {
...this.params,
...this.searchOption
}
exportConnectStatusHistory(params).then(res => {
download(res, 'vnd.ms-excel', `设备连接历史状态.xls`)
})
}
},
mounted() {
this.getTableData()
......
......@@ -11,7 +11,7 @@
>
<el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary" @click="isQuery = !isQuery">查询</el-button>
<el-button type="primary">导出</el-button>
<el-button type="primary" @click="toExport">导出</el-button>
</div>
</div>
<div v-if="isQuery">
......@@ -56,7 +56,8 @@
<script>
import { MonitorMaintainList, MonitorMaintainDelete } from '../api'
import search from './components/search.vue'
import download from '@/utils/download'
import { exportLeakyMaintainHistory } from '@/api/export'
export default {
props: [],
data() {
......@@ -68,8 +69,9 @@ export default {
},
total: 10,
tableData: [],
isQuery: false
};
isQuery: false,
searchOption: {}
}
},
components: {
search
......@@ -85,6 +87,7 @@ export default {
this.getTableData()
},
getTableData(option) {
this.searchOption = option
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
......@@ -112,6 +115,15 @@ export default {
return 'stripe'
}
},
toExport() {
let params = {
...this.params,
...this.searchOption
}
exportLeakyMaintainHistory(params).then(res => {
download(res, 'vnd.ms-excel', `漏缆监测维修历史.xls`)
})
}
},
mounted() { this.getTableData() },
};
......
......@@ -11,7 +11,7 @@
>
<el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary" @click="isQuery = !isQuery">查询</el-button>
<el-button type="primary">导出</el-button>
<el-button type="primary" @click="toExport">导出</el-button>
<el-button type="primary">图形报表</el-button>
</div>
</div>
......@@ -46,7 +46,8 @@
<script>
import { MonitorStatusList, MonitorStatusDelete } from '../api'
import search from './components/search.vue'
import download from '@/utils/download'
import { exportLeakyStatusHistory } from '@/api/export'
export default {
data() {
return {
......@@ -57,7 +58,8 @@ export default {
total: 10,
tableData: [],
multipleSelection: [],
isQuery: false
isQuery: false,
searchOption: {}
}
},
components: {
......@@ -81,6 +83,7 @@ export default {
this.getTableData()
},
getTableData(option) {
this.searchOption = option
let params = {
...this.params,
...option
......@@ -100,6 +103,15 @@ export default {
this.$message.success('删除成功!')
this.getTableData()
})
},
toExport() {
let params = {
...this.params,
...this.searchOption
}
exportLeakyStatusHistory(params).then(res => {
download(res, 'vnd.ms-excel', `漏缆监测历史状态.xls`)
})
}
},
mounted() {
......
......@@ -2,23 +2,14 @@ import request from '@/utils/request'
const path = {
CableStatusList: 'sysLeakyCableStatus/selectPage',
CableStatusExport: 'sysLeakyCableStatus/export',
DeviceStatusList: 'sysDeviceStatus/selectPage',
DeviceStatusExport: 'sysDeviceStatus/export',
}
export function CableStatusList() {
return request.post(path.CableStatusList, ...arguments)
}
export function CableStatusExport() {
return request.post(path.CableStatusExport, ...arguments)
}
export function DeviceStatusList() {
return request.post(path.DeviceStatusList, ...arguments)
}
export function DeviceStatusExport() {
return request.post(path.DeviceStatusExport, ...arguments)
}
......@@ -36,9 +36,11 @@
</template>
<script>
import { DeviceStatusList, DeviceStatusExport } from '../api'
import { DeviceStatusList } from '../api'
import { ConnectStatusEnum } from '@/const/index'
import search from './components/search.vue'
import download from '@/utils/download'
import { exportConnetTime } from '@/api/export'
export default {
data() {
return {
......@@ -49,7 +51,8 @@ export default {
},
total: 10,
tableData: [],
isQuery: false
isQuery: false,
searchOption: {}
};
},
components: { search },
......@@ -77,6 +80,7 @@ export default {
this.getTableData()
},
getTableData(option) {
this.searchOption = option
let params = {
...this.params,
...option
......@@ -92,7 +96,11 @@ export default {
})
},
toExport() {
DeviceStatusExport().then(res => {})
let params = {
...this.params,
...this.searchOption
}
exportConnetTime(params).then(res => { download(res, 'vnd.ms-excel', `设备实时.xls`) })
}
},
mounted() {
......
......@@ -51,6 +51,8 @@
import { CableStatusList, CableStatusExport } from '../api'
import { ConnectStatusEnum } from '@/const/index'
import search from './components/search.vue'
import { exportLeakyCableTime } from '@/api/export'
import download from '@/utils/download'
export default {
data() {
return {
......@@ -61,7 +63,8 @@ export default {
},
total: 10,
tableData: [],
isQuery: false
isQuery: false,
searchOption: {}
};
},
components: { search },
......@@ -83,6 +86,7 @@ export default {
this.getTableData()
},
getTableData(option) {
this.searchOption = option
let params = {
...this.params,
...option
......@@ -94,7 +98,13 @@ export default {
})
},
toExport() {
CableStatusExport().then(res => {})
let params = {
...this.params,
...this.searchOption
}
exportLeakyCableTime(params).then(res => {
download(res, 'vnd.ms-excel', `漏缆实时.xls`)
})
}
},
mounted() {
......
......@@ -6,7 +6,6 @@ const path = {
updatePwd: 'user/updatePwd',
updateInfo: 'user/updateUserBaseInfo',
exportLog: 'sysLog/exportLog',
logList: 'sysLog/selectLogPage',
}
......@@ -26,10 +25,6 @@ export function updateInfo() {
return request.post(path.updateInfo, ...arguments)
}
export function exportLog() {
return request.post(path.exportLog, ...arguments)
}
export function logList() {
return request.post(path.logList, ...arguments)
}
......
......@@ -33,8 +33,8 @@
<el-table-column prop="creationTime" label="操作时间" align="center" />
</el-table>
<Pagination
:limit="params.pageSize"
:page="params.pageNum"
:limit="params.size"
:page="params.current"
:total="total"
class="pagination"
@pagination="handlePageChange"
......@@ -45,32 +45,34 @@
<script>
import { exportLog, logList } from '../api'
import search from './components/search.vue'
import { exportLog } from '@/api/export'
import download from '@/utils/download'
export default {
data() {
return {
params: {
pageNum: 1,
pageSize: 10,
current: 1,
size: 10,
},
total: 10,
tableData: [],
isQuery: false
isQuery: false,
searchOption: {}
};
},
components: {
search
},
computed: {},
methods: {
handlePageChange(pageData) {
this.params.pageSize = pageData.size;
this.params.pageNum = pageData.page;
this.params.size = pageData.size;
this.params.current = pageData.page;
this.getTableData()
},
getTableData(option) {
this.searchOption = option
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
...this.params,
...option
}
logList(params).then(res => {
......@@ -84,10 +86,12 @@ export default {
},
exportLog() {
let params = {
current: this.params.pageNum,
size: this.params.pageSize
...this.params,
...this.searchOption
}
exportLog(params).then(res => {})
exportLog(params).then(res => {
download(res, 'vnd.ms-excel', `用户日志.xls`)
})
}
},
mounted() { this.getTableData() },
......@@ -109,7 +113,7 @@ export default {
align-items: center;
justify-content: center;
margin: 20px 0;
.pageNum {
.current {
margin: 0 20px;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment