Commit fc87c5a6 authored by dupengyu's avatar dupengyu

漏缆任务轮询corn弹窗 及打印

parent 39022485
......@@ -16,130 +16,145 @@
<el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="isQuery = !isQuery">查询</el-button>
<el-button type="primary" @click="exportList">导出</el-button>
<el-button
type="primary"
icon="el-icon-refresh-right"
v-print="printoption"
>打印</el-button
>
</div>
</div>
<div v-show="isQuery">
<search ref="reset" @search="search" />
</div>
<el-table
:data="tableData"
style="width: 100%"
:cell-class-name="cellClassFn"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
>
<el-table-column type="index" label="序列号" width="100" align="center" />
<el-table-column
prop="siteName"
label="基站名称"
width="180"
align="center"
/>
<el-table-column
prop="alarmTarget"
label="告警对象"
width="180"
align="center"
/>
<el-table-column
prop="alarmType"
label="告警类型"
width="150"
align="center"
>
<template slot-scope="scope">
<div>{{ alarmType[scope.row.alarmType] }}</div>
</template>
</el-table-column>
<el-table-column
prop="alarmLevelName"
label="告警级别"
width="150"
align="center"
/>
<el-table-column prop="alarmInfo" label="告警内容" align="center">
<template slot-scope="scope">
<div
v-for="(item, index) in scope.row.alarmInfo"
:key="index"
:class="levelStyle[item.level]"
<div id="print">
<div class="table">
<el-table
:data="tableData"
style="width: 100%"
:cell-class-name="cellClassFn"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
>
<el-table-column
type="index"
label="序列号"
width="100"
align="center"
/>
<el-table-column
prop="siteName"
label="基站名称"
width="180"
align="center"
/>
<el-table-column
prop="alarmTarget"
label="告警对象"
width="180"
align="center"
/>
<el-table-column
prop="alarmType"
label="告警类型"
width="150"
align="center"
>
<span>距离:{{ item.distance }}</span
>&nbsp;&nbsp;
<span>驻波比:{{ item.value }}</span>
</div>
</template>
</el-table-column>
<el-table-column
prop="alarmThreshold"
label="告警触发值"
width="150"
align="center"
>
<!-- <template slot-scope="scope">
<template slot-scope="scope">
<div>{{ alarmType[scope.row.alarmType] }}</div>
</template>
</el-table-column>
<el-table-column
prop="alarmLevelName"
label="告警级别"
width="150"
align="center"
/>
<el-table-column prop="alarmInfo" label="告警内容" align="center">
<template slot-scope="scope">
<div
v-for="(item, index) in scope.row.alarmInfo"
:key="index"
:class="levelStyle[item.level]"
>
<span>距离:{{ item.distance }}</span
>&nbsp;&nbsp;
<span>驻波比:{{ item.value }}</span>
</div>
</template>
</el-table-column>
<el-table-column
prop="alarmThreshold"
label="告警触发值"
width="150"
align="center"
>
<!-- <template slot-scope="scope">
<div>
{{ getAlarmLevelMenu(scope.row) }}
</div>
</template> -->
</el-table-column>
<el-table-column
prop="lateUploadTime"
label="告警发生时间"
align="center"
width="200"
/>
<!-- <el-table-column
</el-table-column>
<el-table-column
prop="lateUploadTime"
label="告警发生时间"
align="center"
width="200"
/>
<!-- <el-table-column
prop="statusTimeChange"
label="状态变化时间"
align="center"
width="200"
/> -->
<el-table-column
v-if="confirmStatus == 1"
prop="confirmPerson"
label="确认人"
width="100"
align="center"
/>
<el-table-column
v-if="confirmStatus == 1"
prop="confirmTime"
label="确认时间"
width="180"
align="center"
/>
<el-table-column
v-if="confirmStatus == 2"
prop="statusTimeChange"
label="告警消除时间"
align="center"
width="200"
/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button
v-if="
scope.row.confirmStatus === 1 &&
scope.row.alarmLevelName == '正常'
"
type="text"
@click="cancelAlarm(scope.row)"
>取消</el-button
>
<el-button
v-else-if="scope.row.confirmStatus === 0"
type="text"
@click="confirmAlarm(scope.row)"
>确认</el-button
>
<el-button
v-if="scope.row.confirmStatus == 1"
type="text"
@click="eliminate(scope.row)"
>消除</el-button
>
</template>
</el-table-column>
</el-table>
<el-table-column
v-if="confirmStatus == 1"
prop="confirmPerson"
label="确认人"
width="100"
align="center"
/>
<el-table-column
v-if="confirmStatus == 1"
prop="confirmTime"
label="确认时间"
width="180"
align="center"
/>
<el-table-column
v-if="confirmStatus == 2"
prop="statusTimeChange"
label="告警消除时间"
align="center"
width="200"
/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button
v-if="
scope.row.confirmStatus === 1 &&
scope.row.alarmLevelName == '正常'
"
type="text"
@click="cancelAlarm(scope.row)"
>取消</el-button
>
<el-button
v-else-if="scope.row.confirmStatus === 0"
type="text"
@click="confirmAlarm(scope.row)"
>确认</el-button
>
<el-button
v-if="scope.row.confirmStatus == 1"
type="text"
@click="eliminate(scope.row)"
>消除</el-button
>
</template>
</el-table-column>
</el-table>
</div>
</div>
<el-dialog
title="告警详情"
:visible.sync="centerDialogVisible"
......@@ -220,6 +235,17 @@ export default {
components: { search },
data() {
return {
printoption: {
id: "print",
popTitle: "&nbsp;", // 打印配置页上方的标题
extraHead: "", // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
preview: false, // 是否启动预览模式,默认是false
//previewTitle: '预览的标题', // 打印预览的标题
//previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印
zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高
standard: "",
extraCss: "./index.css",
},
alarmType,
confirmStatus: 0,
dialogInfo: [],
......@@ -260,7 +286,7 @@ export default {
// let num = "";
// if (e.alarmInfo && e.alarmInfo.length > 0) {
// num = e.alarmInfo.find((item) => item.level == e.alarmLevel).value;
// } else {
// num = e.alarmLevel == 0 ? "1.5" : e.alarmLevel == 1 ? "1.8" : "2.0";
// }
......@@ -474,4 +500,22 @@ export default {
}
}
}
#print {
.table {
// width: 100%;
::v-deep .el-table {
height: 100%;
}
::v-deep table {
table-layout: auto;
}
::v-deep .el-table__header-wrapper .el-table__header {
width: 100% !important;
background: #f89850 !important;
}
::v-deep .el-table__body-wrapper .el-table__body {
width: 100% !important;
}
}
}
</style>
......@@ -208,7 +208,7 @@ export default {
//previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印
zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高
standard: "",
extraCss: "./index.css",
// extraCss: "./index.css",
},
form: {},
params: {
......
This diff is collapsed.
......@@ -9,8 +9,8 @@ function resolve(dir) {
const name = defaultSettings.title || '漏缆故障定位监测系统' // page title
const port = process.env.port || process.env.npm_config_port || 8890 // dev port
// const href = 'http://101.126.159.207'
// const href = 'http://127.0.0.1'
const href = 'http://192.168.0.114'
const href = 'http://127.0.0.1'
// const href = 'http://192.168.0.165'
const rewriteDefaultConfig = {
changeOrigin: true,
......
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