| | |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import ButtonClick from '@/sfc/ButtonClick.vue' |
| | | import index from '@/utils/exception_common_function/index.js' |
| | | import DaySelect from '@/sfc/DaySelect.vue'; |
| | | export default { |
| | | components: { |
| | | ExceptionType, |
| | |
| | | TimeShortCuts, |
| | | DustLineChart, |
| | | AreaAndmonitorType, |
| | | ButtonClick |
| | | ButtonClick, |
| | | DaySelect |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | // 选择的异常类型 |
| | | exceptionName: [] |
| | | }, |
| | | // 日期选择 |
| | | day:'', |
| | | // 日期时间选择 |
| | | beginTime: '', |
| | | endTime: '', |
| | | // 返回的数据 |
| | |
| | | // 监听 判断按钮是否可点击 |
| | | watch: { |
| | | selectedRowIndex(newVaue) { |
| | | // 处于表格的最后一条数据 设置‘上一条’按钮不可点 |
| | | if (newVaue === this.displayData.length - 1) { |
| | | this.dialog.isPreCantouch = true |
| | | // // 处于表格的最后一条数据 设置‘上一条’按钮不可点 |
| | | // if (newVaue === this.displayData.length - 1) { |
| | | // this.dialog.isPreCantouch = true |
| | | // //用户先点了第一条,pre为true,然后点击最后一条,next为true。此时两个按钮都被封锁 |
| | | // if (this.dialog.isNextCantouch == true) { |
| | | // this.dialog.isNextCantouch = false |
| | | // } |
| | | // } |
| | | // // 处于表格第一条数据 设置‘下一条’按钮不可点 |
| | | // else if (newVaue === 0) { |
| | | // this.dialog.isNextCantouch = true |
| | | // //用户先点了表格最后一条,next为true,然后点击第一条,pre为true。此时两个按钮都被封锁 |
| | | // if (this.dialog.isPreCantouch == true) { |
| | | // this.dialog.isPreCantouch = false |
| | | // } |
| | | // } |
| | | // // 处于表格的中间行 将按钮设置为可点击状态 |
| | | // else { |
| | | // this.dialog.isPreCantouch = false |
| | | // this.dialog.isNextCantouch = false |
| | | // } |
| | | |
| | | // 处于表格的最后一条数据 设置‘上一条’按钮不可点 |
| | | if (newVaue === 0) { |
| | | this.dialog.isPreCantouch = true |
| | | //用户先点了第一条,pre为true,然后点击最后一条,next为true。此时两个按钮都被封锁 |
| | | if (this.dialog.isNextCantouch == true) { |
| | | this.dialog.isNextCantouch = false |
| | | } |
| | | } |
| | | // 处于表格第一条数据 设置‘下一条’按钮不可点 |
| | | else if (newVaue === 0) { |
| | | // 处于表格第一条数据 设置‘上一条’按钮不可点 |
| | | else if (newVaue === this.displayData.length - 1) { |
| | | this.dialog.isNextCantouch = true |
| | | //用户先点了表格最后一条,next为true,然后点击第一条,pre为true。此时两个按钮都被封锁 |
| | | if (this.dialog.isPreCantouch == true) { |
| | |
| | | this.dialog.isPreCantouch = false |
| | | this.dialog.isNextCantouch = false |
| | | } |
| | | |
| | | }, |
| | | |
| | | dialogTableVisible() { |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | giveDay(val){ |
| | | // 将中国标准时间转为指定格式(该组件返回的标准时间的格式,所以必须的加这个函数) |
| | | |
| | | this.beginTime = dayjs(val).format('YYYY-MM-DD 00:00:00'); |
| | | this.endTime = dayjs(val).format('YYYY-MM-DD 23:59:59'); |
| | | }, |
| | | /** |
| | | * 审计内容保存为草稿 |
| | | * @param: |
| | |
| | | // 断电或断网 时间段 |
| | | case '0': |
| | | this.dialog.option = { |
| | | title: { |
| | | text: this.tableCurrentRowData.exception, |
| | | left: '1%', |
| | | textStyle:{ |
| | | fontSize:14 |
| | | } |
| | | }, |
| | | |
| | | tooltip: {}, |
| | | toolbox: { |
| | | // 工具栏 |
| | |
| | | // 超标 |
| | | case '2': |
| | | this.dialog.option = { |
| | | title: { |
| | | text: this.tableCurrentRowData.exception, |
| | | left: '1%', |
| | | textStyle:{ |
| | | fontSize:14 |
| | | } |
| | | }, |
| | | tooltip: {}, |
| | | toolbox: { |
| | | // 工具栏 |
| | |
| | | // 数据超低 只有时间点 |
| | | case '1': |
| | | this.dialog.option = { |
| | | title: { |
| | | text: this.tableCurrentRowData.exception, |
| | | left: '1%', |
| | | textStyle:{ |
| | | fontSize:14 |
| | | } |
| | | }, |
| | | tooltip: {}, |
| | | toolbox: { |
| | | // 工具栏 |
| | |
| | | break |
| | | case '3': |
| | | this.dialog.option = { |
| | | title: { |
| | | text: this.tableCurrentRowData.exception, |
| | | left: '1%', |
| | | textStyle:{ |
| | | fontSize:14 |
| | | } |
| | | }, |
| | | tooltip: {}, |
| | | toolbox: { |
| | | // 工具栏 |
| | |
| | | } |
| | | break |
| | | case '4': |
| | | case '5': |
| | | case '6': |
| | | case '7': |
| | | this.dialog.option = { |
| | | title: { |
| | | text: this.tableCurrentRowData.exception, |
| | | left: '1%', |
| | | textStyle:{ |
| | | fontSize:14 |
| | | } |
| | | }, |
| | | tooltip: {}, |
| | | toolbox: { |
| | | // 工具栏 |
| | | feature: { |
| | | // dataZoom: { |
| | | // yAxisIndex: 'none' |
| | | // }, |
| | | |
| | | // 保存为图片 |
| | | saveAsImage: {} |
| | | } |
| | |
| | | <el-form :inline="true"> |
| | | <div class="head-container-text"> |
| | | <el-form-item> |
| | | <AreaAndmonitorType></AreaAndmonitorType> |
| | | <AreaAndmonitorType :isHideArea="1"></AreaAndmonitorType> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <InputSearch isNeedDefaultSite="0" isNeedRealTimeAdvice="1" :exceptionType="form.exceptionName" :beginTime="beginTime" :endTime="endTime" @submit-value="(n) => (form.name = n)"> |
| | | </InputSearch> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <DaySelect |
| | | @submit-time="giveDay" |
| | | :day-begin="beginTime" |
| | | ></DaySelect> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <TimeShortCuts |
| | | @submit-time="giveTime" |
| | | timeType="day" |
| | | :begin-and-end-time="[beginTime,endTime]" |
| | | ></TimeShortCuts> |
| | | </el-form-item> |
| | | |
| | |
| | | <el-table-column prop="region" label="区域" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="beginTime" label="开始时间" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="endTime" label="结束时间" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="typename" label="场景" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="typename" label="场景" align="center" width="82" show-overflow-tooltip /> |
| | | <el-table-column prop="address" label="地址" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="dutyCompany" label="运维商" align="center" show-overflow-tooltip /> |
| | | <el-table-column label="操作" align="center" width="200" fixed="right"> |
| | |
| | | <div class="diag-head"> |
| | | <div class="diag-head-text"> |
| | | <div><span class="diag-head-text1">站点名称:</span>{{ tableCurrentRowData.name }}</div> |
| | | |
| | | <div> |
| | | <div><span class="diag-head-text1">设备编号:</span>{{ tableCurrentRowData.mnCode }}</div> |
| | | <div><span class="diag-head-text1">运维商:</span>{{ tableCurrentRowData.dutyCompany }}</div> |
| | | <!-- <div> |
| | | <span class="diag-head-text1">异常类型:</span> |
| | | <span v-if="tableCurrentRowData.exceptionType == '0'">数据缺失异常</span> |
| | | <span v-else-if="tableCurrentRowData.exceptionType == '1'">数据超低</span> |
| | |
| | | <span v-else-if="tableCurrentRowData.exceptionType == '5'">临近超标异常</span> |
| | | <span v-else-if="tableCurrentRowData.exceptionType == '6'">单日超标次数临界异常</span> |
| | | <span v-else-if="tableCurrentRowData.exceptionType == '7'">滑动平均值异常</span> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <div> |
| | | <span class="diag-head-text1">异常时间段:</span>{{ tableCurrentRowData.beginTime }} ~ |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="chart-jump-button"> |
| | | <!-- <div class="chart-jump-button"> |
| | | <el-button |
| | | type="danger" |
| | | :loading="loading.preButton" |
| | |
| | | :loading="loading.afterButton" |
| | | :disabled="dialog.isNextCantouch || flag.banTouch" |
| | | @click="getNextRowData" |
| | | >下条异常</el-button |
| | | > |
| | | </div> --> |
| | | <div class="chart-jump-button"> |
| | | <el-button |
| | | type="danger" |
| | | :loading="loading.preButton" |
| | | :disabled="dialog.isPreCantouch || flag.banTouch" |
| | | @click="getNextRowData" |
| | | >上条异常</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | :loading="loading.afterButton" |
| | | :disabled="dialog.isNextCantouch || flag.banTouch" |
| | | @click="getPreviousRowData" |
| | | >下条异常</el-button |
| | | > |
| | | </div> |
| | |
| | | fixed |
| | | :index="indexMethod2" |
| | | ></el-table-column> |
| | | <el-table-column fixed prop="name" label="站点名称" show-overflow-tooltip /> |
| | | <!-- <el-table-column fixed prop="name" label="站点名称" show-overflow-tooltip /> |
| | | <el-table-column prop="mnCode" label="设备编号" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="dutyCompany" label="运维商" align="center" show-overflow-tooltip /> |
| | | <el-table-column prop="dutyCompany" label="运维商" align="center" show-overflow-tooltip /> --> |
| | | <el-table-column prop="lst" label="采集时间" align="center" show-overflow-tooltip /> |
| | | <el-table-column |
| | | prop="dustValue" |
| | |
| | | .head-container-search { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | // float: right; |
| | | |
| | | } |
| | | .head-describtion-text { |
| | | justify-content: flex-end; |
| | |
| | | /* 条件查询模块结束 */ |
| | | |
| | | /*分析 */ |
| | | |
| | | .checknum { |
| | | // border: 2px solid orange; |
| | | margin: 10px 5px 20px 20px; |
| | | display: flex; |
| | | } |
| | |
| | | :global(.el-table .deep-gray-row) { |
| | | color: #7f9fcf; |
| | | } |
| | | //对话框标题 |
| | | /* 对话框标题 */ |
| | | .el-form-item__labe { |
| | | font-weight: bold; |
| | | } |
| | |
| | | margin-right: 20px; |
| | | } |
| | | .check-button { |
| | | // justify-content: flex-end; |
| | | float: right; |
| | | margin-top: 10px; |
| | | margin-right: 20px; |
| | |
| | | /* 表格模块结束 */ |
| | | |
| | | /* 查看详情对话框模块的样式 */ |
| | | .diag-head { |
| | | // 对话框头部区域 |
| | | // min-height: 200px; |
| | | // border: 1px solid #fdc2db; |
| | | } |
| | | |
| | | |
| | | .diag-head-text1 { |
| | | // 对话框头部的属性字段加粗 |
| | | /* 对话框头部的属性字段加粗 */ |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .diag-head-text > div { |
| | | // 对话框异常时间段 |
| | | /* 对话框异常时间段 */ |
| | | margin-top: 15px; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .chart-jump-button { |
| | | // ‘上一条’,‘下一条’ 按钮 |
| | | // min-height: 30px; |
| | | // width: 200px; |
| | | // float: right; |
| | | |
| | | display: flex; |
| | | justify-content: right; |
| | | } |
| | | |
| | | .line-chart { |
| | | // 异常折线图 |
| | | /* 异常折线图 */ |
| | | width: 920px; |
| | | height: 300px; |
| | | margin-bottom: 20px; |