New file |
| | |
| | | <template> |
| | | <el-dialog |
| | | title="站点电源监测异常原因" |
| | | width="auto" |
| | | :visible.sync="isShow" |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :show-close="false" |
| | | :modal-append-to-body="false"> |
| | | <div class="alarm-details"> |
| | | <div class="details-header"> |
| | | <span class="label">站点电源监测异常原因</span> |
| | | <span class="close" @click="close"> |
| | | <i class="el-icon-error"></i> |
| | | </span> |
| | | </div> |
| | | <div class="details-body"> |
| | | <div class="tab-item-content"> |
| | | <div class="content-item">站点名称:{{ params.stationName }}</div> |
| | | <div class="content-item">电源品牌:{{ params.powerProducer }}</div> |
| | | <div class="content-item">监控异常原因:{{ params.exceptionCause }}</div> |
| | | <div class="content-item">异常原因分析:<span v-if="params.exceptionCauseAnalysises.length===0">无</span></div> |
| | | <div class="content-item" |
| | | v-for="(item, key) in params.exceptionCauseAnalysises" :key="'key'+key">{{ item }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import {searchExceptionCause} from "@/views/dataMager/js/power"; |
| | | export default { |
| | | name: "powerRemarks", |
| | | props: { |
| | | visible: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | num: { |
| | | type: [Number, String], |
| | | default: 1, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | remarksDialog: false, |
| | | params: { |
| | | stationName: "未知", |
| | | powerProducer: "未知", |
| | | exceptionCause: "未知", |
| | | exceptionCauseAnalysises: [] |
| | | }, |
| | | }; |
| | | }, |
| | | methods: { |
| | | search() { |
| | | searchExceptionCause(this.num).then(res=>{ |
| | | let rs = res.data; |
| | | if(rs.code === 1) { |
| | | let {stationName, powerProducer, exceptionCause, exceptionCauseAnalysis} = {...rs.data}; |
| | | let exceptionCauseAnalysises = exceptionCauseAnalysis?exceptionCauseAnalysis.split('\n'):[]; |
| | | this.params = { |
| | | stationName, |
| | | powerProducer, |
| | | exceptionCause, |
| | | exceptionCauseAnalysises |
| | | }; |
| | | }else { |
| | | this.params = { |
| | | stationName: "未知", |
| | | powerProducer: "未知", |
| | | exceptionCause: "未知", |
| | | exceptionCauseAnalysises: [] |
| | | }; |
| | | } |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | this.params = { |
| | | stationName: "未知", |
| | | powerProducer: "未知", |
| | | exceptionCause: "未知", |
| | | exceptionCauseAnalysises: [] |
| | | }; |
| | | }); |
| | | }, |
| | | close() { |
| | | this.$emit('update:visible', false); |
| | | } |
| | | }, |
| | | computed: { |
| | | isShow() { |
| | | return this.visible; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.search(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | /deep/ .el-dialog__header { |
| | | display: none; |
| | | } |
| | | .alarm-details { |
| | | background-color: #00ffef; |
| | | } |
| | | .details-header { |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | position: relative; |
| | | color: #0f2da5; |
| | | .label { |
| | | font-size: 22px; |
| | | font-weight: bold; |
| | | } |
| | | .close { |
| | | position: absolute; |
| | | font-size: 30px; |
| | | right: 16px; |
| | | top: 2px; |
| | | cursor: pointer; |
| | | } |
| | | .close:hover { |
| | | color: #0a56f7; |
| | | } |
| | | .close:active { |
| | | color: #ff0000; |
| | | } |
| | | } |
| | | .details-body { |
| | | width: 560px; |
| | | padding-bottom: 8px; |
| | | } |
| | | .tab-item-content { |
| | | background-color: #0B388B; |
| | | min-height: 100px; |
| | | margin-left: 8px; |
| | | margin-right: 8px; |
| | | padding: 12px; |
| | | color: #FFFFFF; |
| | | font-size: 16px; |
| | | .content-item { |
| | | padding: 6px 0; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | ]; |
| | | } |
| | | |
| | | /** |
| | | * 更新电源备注 |
| | | * @param num |
| | | * @param exceptionCause |
| | | * @param exceptionCauseAnalysis |
| | | * @return {AxiosPromise} |
| | | */ |
| | | export const updateExceptionCause = (num, exceptionCause, exceptionCauseAnalysis)=>{ |
| | | return axios({ |
| | | method: 'PUT', |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | export const searchExceptionCause = (num)=> { |
| | | return axios({ |
| | | method: 'GET', |
| | | url: 'powerInf/exceptionCause', |
| | | params: { |
| | | num |
| | | } |
| | | }); |
| | | } |
| | |
| | | @success="editSuccess" |
| | | ></edit-power-mager> |
| | | </el-dialog> |
| | | <!-- 编辑站点 --> |
| | | <!-- 异常备注 --> |
| | | <el-dialog |
| | | title="异常备注" |
| | | width="auto" |
| | |
| | | :modal-append-to-body="false"> |
| | | <error-remarks v-if="remarksDialog" :info="batt" :visible.sync="remarksDialog" @success="searchData"></error-remarks> |
| | | </el-dialog> |
| | | <power-remarks :visible.sync="powerRemarksDialog" v-if="powerRemarksDialog" :num="batt.num"></power-remarks> |
| | | </flex-layout> |
| | | </template> |
| | | |
| | |
| | | deletePower |
| | | } from "./js/power"; |
| | | import ErrorRemarks from "@/views/dataMager/components/errorRemarks.vue"; |
| | | import PowerRemarks from "@/views/dataMager/components/powerRemarks.vue"; |
| | | |
| | | export default { |
| | | name: 'powerMager', |
| | | components: { |
| | | PowerRemarks, |
| | | ErrorRemarks, |
| | | AddPowerMager, |
| | | EditPowerMager, |
| | |
| | | let isCanEdit = isHasPermit("batttest_data_edit_permit", permits); |
| | | return { |
| | | remarksDialog: false, |
| | | powerRemarksDialog: false, |
| | | isCanEdit: isCanEdit, |
| | | batt: {}, |
| | | loading: "", |
| | |
| | | remarksShow(batt) { |
| | | this.batt = batt; |
| | | this.remarksDialog = true; |
| | | //this.powerRemarksDialog = true; |
| | | }, |
| | | }, |
| | | computed: { |