Commit 6d94a118 authored by neogcg's avatar neogcg

export

parent ef4b9e38
File deleted
...@@ -72,11 +72,11 @@ ...@@ -72,11 +72,11 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
v-if="scope.row.confirmStatus === 1" v-if="scope.row.confirmStatus === 1 && scope.row.alarmLevelName == '正常'"
@click="cancel2(scope.row)" @click="cancel2(scope.row)"
>取消</el-button >取消</el-button
> >
<el-button type="text" v-else @click="confirm2(scope.row)" <el-button type="text" v-else-if="scope.row.confirmStatus === 0" @click="confirm2(scope.row)"
>确认</el-button >确认</el-button
> >
</template> </template>
...@@ -258,6 +258,7 @@ export default { ...@@ -258,6 +258,7 @@ export default {
this.centerDialogVisible = false; this.centerDialogVisible = false;
}, },
cancel2(row) { cancel2(row) {
console.log(row);
this.centerDialogVisible = true; this.centerDialogVisible = true;
this.dialogInfo = row; this.dialogInfo = row;
}, },
......
...@@ -50,11 +50,11 @@ ...@@ -50,11 +50,11 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
v-if="scope.row.confirmStatus === 1" v-if="scope.row.confirmStatus === 1 && scope.row.connectStatusName == '连接正常'"
@click="cancel2(scope.row)" @click="cancel2(scope.row)"
>取消</el-button >取消</el-button
> >
<el-button type="text" v-else @click="confirm2(scope.row)" <el-button type="text" v-else-if="scope.row.confirmStatus === 0" @click="confirm2(scope.row)"
>确认</el-button >确认</el-button
> >
</template> </template>
...@@ -228,6 +228,7 @@ export default { ...@@ -228,6 +228,7 @@ export default {
id: dialogInfo.id, id: dialogInfo.id,
}; };
deviceCancel(query).then((res) => { deviceCancel(query).then((res) => {
console.log(query);
console.log(res); console.log(res);
this.getTableData(); this.getTableData();
}); });
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
<div class="leakage-top"> <div class="leakage-top">
<div style="color: #666666"></div> <div style="color: #666666"></div>
<div class="operate-btn"> <div class="operate-btn">
<delids :multipleSelection2="multipleSelection" @del="toDelete" <delids :multipleSelection2="multipleSelection" @del="toDelete"
>删除</delids> >删除</delids
>
<el-button type="primary" @click="getTableData">刷新</el-button> <el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary" @click="isQuery = !isQuery">查询</el-button> <el-button type="primary" @click="isQuery = !isQuery">查询</el-button>
<el-button type="primary" @click="toExport">导出</el-button> <el-button type="primary" @click="toExport">导出</el-button>
...@@ -23,7 +24,11 @@ ...@@ -23,7 +24,11 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="startPointDeviceName" label="网元设备" align="center" /> <el-table-column
prop="startPointDeviceName"
label="网元设备"
align="center"
/>
<el-table-column <el-table-column
prop="pointConnectStatus_text" prop="pointConnectStatus_text"
label="连接状态" label="连接状态"
...@@ -31,7 +36,11 @@ ...@@ -31,7 +36,11 @@
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column prop="endPointDeviceName" label="网元设备" align="center"> <el-table-column
prop="endPointDeviceName"
label="网元设备"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column prop="userName" label="维修人员信息" align="center"> <el-table-column prop="userName" label="维修人员信息" align="center">
</el-table-column> </el-table-column>
...@@ -51,11 +60,11 @@ ...@@ -51,11 +60,11 @@
</div> </div>
</template> </template>
<script> <script>
import { ConnectMaintainList, ConnectMaintainDelete } from '../api' import { ConnectMaintainList, ConnectMaintainDelete } from "../api";
import { ConnectStatusEnum } from '@/const/index' import { ConnectStatusEnum } from "@/const/index";
import search from './components/search.vue' import search from "./components/search.vue";
import download from '@/utils/download' import download from "@/utils/download";
import { exportConnectMaintainHistory } from '@/api/export' import { exportConnectMaintainHistory } from "@/api/export";
export default { export default {
data() { data() {
return { return {
...@@ -68,47 +77,56 @@ export default { ...@@ -68,47 +77,56 @@ export default {
total: 14, total: 14,
tableData: [], tableData: [],
isQuery: false, isQuery: false,
searchOption: {} searchOption: {},
exids: [],
}; };
}, },
components: { components: {
search search,
}, },
methods: { methods: {
handleSelectionChange(val) { handleSelectionChange(val) {
let deleteIds = val.map(item => item.id) let deleteIds = val.map((item) => item.id);
this.multipleSelection = deleteIds this.multipleSelection = deleteIds;
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.params.size = pageData.size; this.params.size = pageData.size;
this.params.current = pageData.page; this.params.current = pageData.page;
this.getTableData() this.getTableData();
}, },
getTableData(option) { getTableData(option) {
this.searchOption = option this.searchOption = option;
let params = { let params = {
...this.params, ...this.params,
...option ...option,
} };
ConnectMaintainList(params).then(res => { ConnectMaintainList(params).then((res) => {
let list = res.records || [] let list = res.records || [];
list.forEach(item => { list.forEach((item) => {
item.pointConnectStatus_text = this.ConnectStatusEnum[item.pointConnectStatus] item.pointConnectStatus_text =
this.ConnectStatusEnum[item.pointConnectStatus];
}); });
this.tableData = list this.tableData = list;
this.total = res.total this.total = res.total;
}) this.exids = list.map((i) => i.id);
});
}, },
toDelete() { toDelete() {
ConnectMaintainDelete({ids: this.multipleSelection}).then(res => { ConnectMaintainDelete({ ids: this.multipleSelection }).then((res) => {
this.$message.success('删除成功!') this.$message.success("删除成功!");
this.getTableData() this.getTableData();
}) });
}, },
cellClassFn({ row, column, rowIndex, columnIndex }) { cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.pointConnectStatus_text == "连接异常" && column.label == "连接状态") { if (
row.pointConnectStatus_text == "连接异常" &&
column.label == "连接状态"
) {
return "emergency"; return "emergency";
} else if (row.pointConnectStatus_text == "连接正常" && column.label == "连接状态") { } else if (
row.pointConnectStatus_text == "连接正常" &&
column.label == "连接状态"
) {
return "normal"; return "normal";
} }
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
...@@ -116,19 +134,15 @@ export default { ...@@ -116,19 +134,15 @@ export default {
} }
}, },
toExport() { toExport() {
let params = { exportConnectMaintainHistory({ ids: this.exids }).then((res) => {
...this.params, download(res, "vnd.ms-excel", `设备连接维修历史.xls`);
...this.searchOption });
}
exportConnectMaintainHistory(params).then(res => {
download(res, 'vnd.ms-excel', `设备连接维修历史.xls`)
})
}, },
}, },
mounted() { mounted() {
this.getTableData() this.getTableData();
}, },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.leakage-cable { .leakage-cable {
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<div class="leakage-top"> <div class="leakage-top">
<div style="color: #666666"></div> <div style="color: #666666"></div>
<div class="operate-btn"> <div class="operate-btn">
<delids <delids :multipleSelection2="multipleSelection" @del="toDelete"
:multipleSelection2="multipleSelection"
@click="toDelete"
>删除</delids >删除</delids
> >
<el-button type="primary" @click="getTableData">刷新</el-button> <el-button type="primary" @click="getTableData">刷新</el-button>
...@@ -26,7 +24,11 @@ ...@@ -26,7 +24,11 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="startPointDeviceName" label="网元设备" align="center" /> <el-table-column
prop="startPointDeviceName"
label="网元设备"
align="center"
/>
<el-table-column <el-table-column
prop="pointConnectStatus_text" prop="pointConnectStatus_text"
label="连接状态" label="连接状态"
...@@ -34,7 +36,11 @@ ...@@ -34,7 +36,11 @@
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column prop="endPointDeviceName" label="网元设备" align="center"> <el-table-column
prop="endPointDeviceName"
label="网元设备"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column prop="uploadTime" label="上传时间" align="center" /> <el-table-column prop="uploadTime" label="上传时间" align="center" />
<el-table-column prop="cancelTime" label="取消时间" align="center" /> <el-table-column prop="cancelTime" label="取消时间" align="center" />
...@@ -54,11 +60,11 @@ ...@@ -54,11 +60,11 @@
</div> </div>
</template> </template>
<script> <script>
import { ConnectStatusList, ConnectStatusDelete } from '../api' import { ConnectStatusList, ConnectStatusDelete } from "../api";
import { ConnectStatusEnum } from '@/const/index' import { ConnectStatusEnum } from "@/const/index";
import search from './components/search.vue' import search from "./components/search.vue";
import { exportConnectStatusHistory } from '@/api/export' import { exportConnectStatusHistory } from "@/api/export";
import download from '@/utils/download' import download from "@/utils/download";
export default { export default {
props: [], props: [],
data() { data() {
...@@ -72,47 +78,56 @@ export default { ...@@ -72,47 +78,56 @@ export default {
total: 10, total: 10,
tableData: [], tableData: [],
isQuery: false, isQuery: false,
searchOption: {} searchOption: {},
} exids: [],
};
}, },
components: { components: {
search search,
}, },
methods: { methods: {
handleSelectionChange(val) { handleSelectionChange(val) {
let deleteIds = val.map(item => item.id) let deleteIds = val.map((item) => item.id);
this.multipleSelection = deleteIds this.multipleSelection = deleteIds;
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.params.size = pageData.size this.params.size = pageData.size;
this.params.current = pageData.page this.params.current = pageData.page;
this.getTableData() this.getTableData();
}, },
getTableData(option) { getTableData(option) {
this.searchOption = option this.searchOption = option;
let params = { let params = {
...this.params, ...this.params,
...option ...option,
} };
ConnectStatusList(params).then(res => { ConnectStatusList(params).then((res) => {
let list = res.records || [] let list = res.records || [];
list.forEach(item => { list.forEach((item) => {
item.pointConnectStatus_text = this.ConnectStatusEnum[item.pointConnectStatus] item.pointConnectStatus_text =
}) this.ConnectStatusEnum[item.pointConnectStatus];
this.tableData = list });
this.total = res.total this.tableData = list;
}) this.total = res.total;
this.exids = list.map((i) => i.id);
});
}, },
toDelete() { toDelete() {
ConnectStatusDelete({ids: this.multipleSelection}).then(res => { ConnectStatusDelete({ ids: this.multipleSelection }).then((res) => {
this.$message.success('删除成功!') this.$message.success("删除成功!");
this.getTableData() this.getTableData();
}) });
}, },
cellClassFn({ row, column, rowIndex, columnIndex }) { cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.pointConnectStatus_text == "连接异常" && column.label == "连接状态") { if (
row.pointConnectStatus_text == "连接异常" &&
column.label == "连接状态"
) {
return "emergency"; return "emergency";
} else if (row.pointConnectStatus_text == "连接正常" && column.label == "连接状态") { } else if (
row.pointConnectStatus_text == "连接正常" &&
column.label == "连接状态"
) {
return "normal"; return "normal";
} }
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
...@@ -120,17 +135,13 @@ export default { ...@@ -120,17 +135,13 @@ export default {
} }
}, },
toExport() { toExport() {
let params = { exportConnectStatusHistory({ ids: this.exids }).then((res) => {
...this.params, download(res, "vnd.ms-excel", `设备连接历史状态.xls`);
...this.searchOption });
} },
exportConnectStatusHistory(params).then(res => {
download(res, 'vnd.ms-excel', `设备连接历史状态.xls`)
})
}
}, },
mounted() { mounted() {
this.getTableData() this.getTableData();
}, },
}; };
</script> </script>
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<div class="leakage-top"> <div class="leakage-top">
<div style="color: #666666"></div> <div style="color: #666666"></div>
<div class="operate-btn"> <div class="operate-btn">
<delids <delids :multipleSelection2="multipleSelection" @del="deleteCable"
:multipleSelection2="multipleSelection"
@del="deleteCable"
>删除</delids >删除</delids
> >
<el-button type="primary" @click="getTableData">刷新</el-button> <el-button type="primary" @click="getTableData">刷新</el-button>
...@@ -38,11 +36,20 @@ ...@@ -38,11 +36,20 @@
width="180" width="180"
align="center" align="center"
/> />
<el-table-column prop="alarmLevelName" label="告警级别" width="150" align="center"> <el-table-column
prop="alarmLevelName"
label="告警级别"
width="150"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column prop="alarmInfo" label="告警信息" align="center"> <el-table-column prop="alarmInfo" label="告警信息" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="alarmMaintainTime" label="告警维修时间" align="center" /> <el-table-column
prop="alarmMaintainTime"
label="告警维修时间"
align="center"
/>
</el-table> </el-table>
<Pagination <Pagination
:limit="params.size" :limit="params.size"
...@@ -54,10 +61,10 @@ ...@@ -54,10 +61,10 @@
</div> </div>
</template> </template>
<script> <script>
import { MonitorMaintainList, MonitorMaintainDelete } from '../api' import { MonitorMaintainList, MonitorMaintainDelete } from "../api";
import search from './components/search.vue' import search from "./components/search.vue";
import download from '@/utils/download' import download from "@/utils/download";
import { exportLeakyMaintainHistory } from '@/api/export' import { exportLeakyMaintainHistory } from "@/api/export";
export default { export default {
props: [], props: [],
data() { data() {
...@@ -70,62 +77,61 @@ export default { ...@@ -70,62 +77,61 @@ export default {
total: 10, total: 10,
tableData: [], tableData: [],
isQuery: false, isQuery: false,
searchOption: {} searchOption: {},
} exids: [],
};
}, },
components: { components: {
search search,
}, },
methods: { methods: {
handleSelectionChange(val) { handleSelectionChange(val) {
let deleteIds = val.map(item => item.id) let deleteIds = val.map((item) => item.id);
this.multipleSelection = deleteIds this.multipleSelection = deleteIds;
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.params.size = pageData.size; this.params.size = pageData.size;
this.params.current = pageData.page; this.params.current = pageData.page;
this.getTableData() this.getTableData();
}, },
getTableData(option) { getTableData(option) {
this.searchOption = option this.searchOption = option;
let params = { let params = {
...this.params, ...this.params,
...option ...option,
} };
MonitorMaintainList(params).then(res => { MonitorMaintainList(params).then((res) => {
let list = res.records || [] let list = res.records || [];
this.tableData = list this.tableData = list;
this.total = res.total this.total = res.total;
}) this.exids = list.map((i) => i.id);
});
}, },
deleteCable() { deleteCable() {
MonitorMaintainDelete({ids: this.multipleSelection}).then(res => { MonitorMaintainDelete({ ids: this.multipleSelection }).then((res) => {
this.$message.success('删除成功!') this.$message.success("删除成功!");
this.getTableData() this.getTableData();
}) });
}, },
cellClassFn({ row, column, rowIndex, columnIndex }) { cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.alarmLevelName == '紧急' && column.label == '告警级别') { if (row.alarmLevelName == "紧急" && column.label == "告警级别") {
return 'emergency' return "emergency";
} else if (row.alarmLevelName == '重要' && column.label == '告警级别') { } else if (row.alarmLevelName == "重要" && column.label == "告警级别") {
return 'important' return "important";
} }
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return 'stripe' return "stripe";
} }
}, },
toExport() { toExport() {
let params = { exportLeakyMaintainHistory({ ids: this.exids }).then((res) => {
...this.params, download(res, "vnd.ms-excel", `漏缆监测维修历史.xls`);
...this.searchOption });
} },
exportLeakyMaintainHistory(params).then(res => { },
download(res, 'vnd.ms-excel', `漏缆监测维修历史.xls`) mounted() {
}) this.getTableData();
}
}, },
mounted() { this.getTableData() },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<div class="leakage-top"> <div class="leakage-top">
<div style="color: #666666"></div> <div style="color: #666666"></div>
<div class="operate-btn"> <div class="operate-btn">
<delids <delids :multipleSelection2="multipleSelection" @del="deleteCable"
:multipleSelection2="multipleSelection"
@click="deleteCable"
>删除</delids >删除</delids
> >
<el-button type="primary" @click="getTableData">刷新</el-button> <el-button type="primary" @click="getTableData">刷新</el-button>
...@@ -44,80 +42,78 @@ ...@@ -44,80 +42,78 @@
</template> </template>
<script> <script>
import { MonitorStatusList, MonitorStatusDelete } from '../api' import { MonitorStatusList, MonitorStatusDelete } from "../api";
import search from './components/search.vue' import search from "./components/search.vue";
import download from '@/utils/download' import download from "@/utils/download";
import { exportLeakyStatusHistory } from '@/api/export' import { exportLeakyStatusHistory } from "@/api/export";
export default { export default {
data() { data() {
return { return {
params: { params: {
current: 1, current: 1,
size: 10 size: 10,
}, },
total: 10, total: 10,
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
isQuery: false, isQuery: false,
searchOption: {} searchOption: {},
} exids: [],
};
}, },
components: { components: {
search search,
}, },
methods: { methods: {
// 表格背景图颜色 // 表格背景图颜色
cellClassFn({ row, column, rowIndex, columnIndex }) { cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.level === '紧急' && column.label === '告警级别') { if (row.level === "紧急" && column.label === "告警级别") {
return 'emergency' return "emergency";
} else if (row.level === '重要' && column.label === '告警级别') { } else if (row.level === "重要" && column.label === "告警级别") {
return 'important' return "important";
} }
if (rowIndex % 2 === 1) { if (rowIndex % 2 === 1) {
return 'stripe' return "stripe";
} }
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.params.size = pageData.size this.params.size = pageData.size;
this.params.current = pageData.page this.params.current = pageData.page;
this.getTableData() this.getTableData();
}, },
getTableData(option) { getTableData(option) {
this.searchOption = option this.searchOption = option;
let params = { let params = {
...this.params, ...this.params,
...option ...option,
} };
MonitorStatusList(params).then(res => { MonitorStatusList(params).then((res) => {
let list = res.records || [] let list = res.records || [];
this.tableData = list this.tableData = list;
this.total = res.total this.total = res.total;
}) this.exids = list.map((i) => i.id);
});
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
let deleteIds = val.map(item => item.id) let deleteIds = val.map((item) => item.id);
this.multipleSelection = deleteIds this.multipleSelection = deleteIds;
}, },
deleteCable() { deleteCable() {
MonitorStatusDelete({ids: this.multipleSelection}).then(res => { MonitorStatusDelete({ ids: this.multipleSelection }).then((res) => {
this.$message.success('删除成功!') this.$message.success("删除成功!");
this.getTableData() this.getTableData();
}) });
}, },
toExport() { toExport() {
let params = { exportLeakyStatusHistory({ ids: this.exids }).then((res) => {
...this.params, download(res, "vnd.ms-excel", `漏缆监测历史状态.xls`);
...this.searchOption });
} },
exportLeakyStatusHistory(params).then(res => {
download(res, 'vnd.ms-excel', `漏缆监测历史状态.xls`)
})
}
}, },
mounted() { mounted() {
this.getTableData() this.getTableData();
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -204,14 +204,11 @@ export default { ...@@ -204,14 +204,11 @@ export default {
reset() { reset() {
this.FSUForm = formInit(); this.FSUForm = formInit();
}, },
exportData() { exportData() {
// fsulist({size:this.total}).then((res) => { // let ids = [];
// let list = res.records || []; // this.ids.length != 0 ? (ids = this.ids) : (ids = this.exids);
// this.exids = list.map((i) => i.id);
// });
exportFsu({ ids: this.exids }).then((res) => { exportFsu({ ids: this.exids }).then((res) => {
console.log(ids);
download(res, "vnd.ms-excel", `FSU表.xls`); download(res, "vnd.ms-excel", `FSU表.xls`);
}); });
}, },
...@@ -220,7 +217,6 @@ export default { ...@@ -220,7 +217,6 @@ export default {
this.ids = this.multipleSelection.map((i) => i.id); this.ids = this.multipleSelection.map((i) => i.id);
}, },
handleView(row) { handleView(row) {
this.$router.push({ this.$router.push({
path: "/detail", path: "/detail",
......
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