Commit 0a06d8f2 authored by neogcg's avatar neogcg

配置管理导出

parent afa22ecf
import request from '@/utils/request'
const path = {
// 告警管理
exportLeakyCable: 'sysMonitorAlarm/export',
exportConnet: 'sysConnectAlarm/export',
// 告警管理
exportLeakyCable: 'sysMonitorAlarm/export',
exportConnet: 'sysConnectAlarm/export',
// 配置管理
// 配置管理
exportRailWay: "railWay/export",
exportSite: "site/export",
exportFsu: "fsu/export",
exportMonitorEquip: "monitorEquip/export",
exportLeaky: "leakyCable/export",
// 实时状态
exportLeakyCableTime: 'sysLeakyCableStatus/export',
exportConnetTime: 'sysDeviceStatus/export',
// 实时状态
exportLeakyCableTime: 'sysLeakyCableStatus/export',
exportConnetTime: 'sysDeviceStatus/export',
// 历史数据
exportLeakyStatusHistory: 'sysHistoryMonitorStatus/export',
exportLeakyMaintainHistory: 'sysHistoryMonitorMaintain/export',
exportConnectStatusHistory: 'sysHistoryConnectStatus/export',
exportConnectMaintainHistory: 'sysHistoryConnectMaintain/export',
// 历史数据
exportLeakyStatusHistory: 'sysHistoryMonitorStatus/export',
exportLeakyMaintainHistory: 'sysHistoryMonitorMaintain/export',
exportConnectStatusHistory: 'sysHistoryConnectStatus/export',
exportConnectMaintainHistory: 'sysHistoryConnectMaintain/export',
// 用户管理
exportLog: 'sysLog/exportLog',
// 用户管理
exportLog: 'sysLog/exportLog',
}
const blobConf = { responseType: 'blob' }
......@@ -36,6 +41,23 @@ export function exportConnet() {
return requestBlob(path.exportConnet, ...arguments)
}
export function exportRailWay() {
return requestBlob(path.exportRailWay, ...arguments)
}
export function exportSite() {
return requestBlob(path.exportSite, ...arguments)
}
export function exportFsu() {
return requestBlob(path.exportFsu, ...arguments)
}
export function exportMonitorEquip() {
return requestBlob(path.exportMonitorEquip, ...arguments)
}
export function exportLeaky() {
return requestBlob(path.exportLeaky, ...arguments)
}
export function exportLeakyCableTime() {
return requestBlob(path.exportLeakyCableTime, ...arguments)
}
......
......@@ -84,6 +84,7 @@
import { cableTimeList } from '../api'
import { exportLeakyCable } from '@/api/export'
import search from '@/views/monitor/leakageCable/components/search.vue'
import download from '@/utils/download'
export default {
data() {
return {
......
......@@ -142,6 +142,8 @@ import {
selectForSite,
} from "../../api";
import { successAlert, warningAlert } from "@/utils/alert";
import download from "@/utils/download";
import { exportFsu } from "@/api/export";
export default {
props: [],
components: {},
......@@ -163,6 +165,7 @@ export default {
ids: [],
block: 0,
istrue: 0,
exids: [],
};
},
computed: {},
......@@ -202,7 +205,16 @@ export default {
this.FSUForm = formInit();
},
exportData() {},
exportData() {
fsulist({size:this.total}).then((res) => {
let list = res.records || [];
this.exids = list.map((i) => i.id);
});
exportFsu({ ids: this.exids }).then((res) => {
download(res, "vnd.ms-excel", `FSU表.xls`);
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
......
......@@ -193,6 +193,8 @@ import {
} from "../../api";
import { cableTypeEnum } from "../../../maintain/api";
import { successAlert, warningAlert } from "@/utils/alert";
import download from "@/utils/download";
import { exportLeaky } from "@/api/export";
export default {
props: [],
components: {},
......@@ -214,6 +216,7 @@ export default {
ids: [],
block: 0,
istrue: 0,
exids: [],
};
},
computed: {},
......@@ -263,7 +266,16 @@ export default {
this.leakyCableForm = formInit();
},
exportData() {},
exportData() {
leakyCablelist({size:this.total}).then((res) => {
let list = res.records || [];
this.exids = list.map((i) => i.id);
});
exportLeaky({ ids: this.exids }).then((res) => {
download(res, "vnd.ms-excel", `漏缆表.xls`);
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
......
......@@ -149,7 +149,8 @@ import {
selectForFsu,
} from "../../api";
import { successAlert, warningAlert } from "@/utils/alert";
import download from "@/utils/download";
import { exportMonitorEquip } from "@/api/export";
export default {
props: [],
components: {},
......@@ -169,6 +170,7 @@ export default {
ids: [],
block: 0,
istrue: 0,
exids: [],
};
},
computed: {},
......@@ -214,7 +216,16 @@ export default {
this.monitorForm = formInit();
},
exportData() {},
exportData() {
monitorEquiplist({size:this.total}).then((res) => {
let list = res.records || [];
this.exids = list.map((i) => i.id);
});
exportMonitorEquip({ ids: this.exids }).then((res) => {
download(res, "vnd.ms-excel", `监测设备表.xls`);
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
......
......@@ -9,7 +9,7 @@
>
<el-button type="primary" @click="refresh()">刷新</el-button>
<el-button type="primary" @click="block = !block">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button>
<el-button type="primary" @click="exportData()">导出</el-button>
</div>
</div>
<el-form
......@@ -114,7 +114,9 @@
</template>
<script>
import { railWaylist, railWaydetail, railWaybatchDelete } from "../../api";
import { exportRailWay } from "@/api/export";
import { successAlert, warningAlert } from "@/utils/alert";
import download from "@/utils/download";
export default {
props: [],
components: {},
......@@ -132,6 +134,7 @@ export default {
ids: [],
block: 0,
istrue: 0,
exids: [],
};
},
computed: {},
......@@ -147,7 +150,7 @@ export default {
railWaybatchDelete({ ids }).then((res) => {
if (res.code == 200) {
successAlert("删除成功");
this.getTableData();
} else {
warningAlert("删除失败");
......@@ -166,7 +169,16 @@ export default {
this.railData = formInit();
},
exportData() {},
exportData() {
railWaylist({size:this.total}).then((res) => {
let list = res.records || [];
this.exids = list.map((i) => i.id);
});
exportRailWay({ ids: this.exids }).then((res) => {
download(res, "vnd.ms-excel", `铁路线表.xls`);
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
// console.log(val);
......@@ -192,6 +204,7 @@ export default {
let list = res.records || [];
this.tableData = list;
this.total = res.total;
if (this.istrue == 1) {
if (this.tableData.length) {
successAlert("查询成功");
......
......@@ -122,7 +122,8 @@
<script>
import { sitelist, sitebatchDelete, sitedetail, railWaylist } from "../../api";
import { successAlert, warningAlert } from "@/utils/alert";
import download from "@/utils/download";
import { exportSite } from "@/api/export";
export default {
props: [],
components: {},
......@@ -142,6 +143,7 @@ export default {
ids: [],
block: 0,
istrue: 0,
exids: [],
};
},
computed: {},
......@@ -175,7 +177,16 @@ export default {
reset() {
this.siteForm = formInit();
},
exportData() {},
exportData() {
sitelist({size:this.total}).then((res) => {
let list = res.records || [];
this.exids = list.map((i) => i.id);
});
exportSite({ ids: this.exids }).then((res) => {
download(res, "vnd.ms-excel", `站点表.xls`);
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.ids = this.multipleSelection.map((i) => i.id);
......
......@@ -43,10 +43,10 @@
</template>
<script>
import { exportLog, logList } from '../api'
import search from './components/search.vue'
import { exportLog } from '@/api/export'
import download from '@/utils/download'
import { logList } from '../api';
import search from './components/search.vue';
import { exportLog } from '@/api/export';
import download from '@/utils/download';
export default {
data() {
return {
......
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