| | |
| | | return getRequest('/tssw/api/getHost', params); |
| | | } |
| | | |
| | | //主机 |
| | | export const getHostInfo = params => { |
| | | return getRequest('/tssw/api/getHostInfo', params); |
| | | } |
| | | |
| | | //数通设备 |
| | | export const getSnmp = params => { |
| | | return getRequest('/tssw/api/getSnmp', params); |
| | | } |
| | | |
| | | //数通设备 |
| | | export const getSnmpInfo = params => { |
| | | return getRequest('/tssw/api/getSnmpInfo', params); |
| | | } |
| | | |
| | | //巡检任务 |
| | |
| | | return getRequest('/tssw/api/getUps', params); |
| | | } |
| | | |
| | | //UPS |
| | | export const getUpsInfo = params => { |
| | | return getRequest('/tssw/api/getUpsInfo', params); |
| | | } |
| | | |
| | | //空调 |
| | | export const getKongtiao = params => { |
| | | return getRequest('/tssw/api/getKongtiao', params); |
| | | } |
| | | |
| | | //空调 |
| | | export const getKongtiaoInfo = params => { |
| | | return getRequest('/tssw/api/getKongtiaoInfo', params); |
| | | } |
| | | |
| | | //右边异常日志 |
| | | export const getWarn = params => { |
| | | return getRequest('/tssw/api/getWarn', params); |
| | |
| | | </div> |
| | | </div> |
| | | <div |
| | | @click="handleClickTk" |
| | | @click="handleClickTk1" |
| | | class="IndexMoudle-block" |
| | | > |
| | | <svg |
| | |
| | | </div> |
| | | </div> |
| | | <div |
| | | @click="handleClickTk" |
| | | class="IndexMoudle-block"> |
| | | <svg |
| | | class="IndexMoudleSvg" |
| | |
| | | </div> |
| | | </div> |
| | | <div |
| | | @click="handleClickTk" |
| | | @click="handleClickTk2" |
| | | class="IndexMoudle-block"> |
| | | <svg |
| | | class="IndexMoudleSvg" |
| | |
| | | </div> |
| | | </div> |
| | | <div |
| | | @click="handleClickTk" |
| | | @click="handleClickTk3" |
| | | class="IndexMoudle-block"> |
| | | <svg |
| | | class="IndexMoudleSvg" |
| | |
| | | </div> |
| | | </div> |
| | | <indexMoudleForm ref="indexMoudleForm" v-if="indexMoudleVisiable"></indexMoudleForm> |
| | | <indexMoudleForm1 ref="indexMoudleForm1" v-if="indexMoudleVisiable"></indexMoudleForm1> |
| | | <indexMoudleForm2 ref="indexMoudleForm2" v-if="indexMoudleVisiable"></indexMoudleForm2> |
| | | <indexMoudleForm3 ref="indexMoudleForm3" v-if="indexMoudleVisiable"></indexMoudleForm3> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {getHost,getSnmp,getTask,getTaskInfoById,getUps,getKongtiao} from '@/api/daping' |
| | | import countTo from "vue-count-to" |
| | | import indexMoudleForm from "./IndexMoudleBlock/IndexMoudleForm"; |
| | | import indexMoudleForm1 from "./IndexMoudleBlock/IndexMoudleForm1"; |
| | | import indexMoudleForm2 from "./IndexMoudleBlock/IndexMoudleForm2"; |
| | | import indexMoudleForm3 from "./IndexMoudleBlock/IndexMoudleForm3"; |
| | | export default { |
| | | name: "IndexMoudleBlock", |
| | | components: { |
| | | countTo, |
| | | indexMoudleForm |
| | | indexMoudleForm, |
| | | indexMoudleForm1, |
| | | indexMoudleForm2, |
| | | indexMoudleForm3, |
| | | }, |
| | | data() { |
| | | return { |
| | | indexMoudleVisiable:false, //弹框 |
| | | indexMoudleVisiable1:false, //弹框 |
| | | indexMoudleVisiable2:false, //弹框 |
| | | indexMoudleVisiable3:false, //弹框 |
| | | fuwuqiconfig1: { |
| | | number: [0], |
| | | }, |
| | |
| | | this.$refs.indexMoudleForm.init() |
| | | }) |
| | | }, |
| | | handleClickTk1() { |
| | | this.indexMoudleVisiable1 = true |
| | | this.$nextTick(() => { |
| | | this.$refs.indexMoudleForm1.init() |
| | | }) |
| | | }, |
| | | handleClickTk2() { |
| | | this.indexMoudleVisiable2 = true |
| | | this.$nextTick(() => { |
| | | this.$refs.indexMoudleForm2.init() |
| | | }) |
| | | }, |
| | | handleClickTk3() { |
| | | this.indexMoudleVisiable3 = true |
| | | this.$nextTick(() => { |
| | | this.$refs.indexMoudleForm3.init() |
| | | }) |
| | | }, |
| | | getHost(){ //主机 |
| | | getHost().then(res =>{ |
| | | console.log(res,'res====') |
| | |
| | | <div class="YunweiBlockForm-wrap"> |
| | | <el-dialog |
| | | custom-class="YunweiBlockForm-dialog" |
| | | title="运维详情" |
| | | title="主机详情" |
| | | :visible.sync="dialogVisible" |
| | | width="600px" |
| | | :close-on-click-modal="false" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getTaskInfoById} from '@/api/daping' |
| | | import {getHostInfo} from '@/api/daping' |
| | | export default { |
| | | name: "YunweiBlockForm", |
| | | data() { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | init(id) { |
| | | init() { |
| | | this.dialogVisible = true |
| | | //this.getTaskInfoById(id) |
| | | }, |
| | | getTaskInfoById(id) { |
| | | getTaskInfoById({id:id}).then(res => { |
| | | getTaskInfoById() { |
| | | getHostInfo().then(res => { |
| | | if(res.code == 0) { |
| | | this.tableData = res.data |
| | | } |
| | | }) |
| | | }, |
| | | isRunformat(row) { |
| | | if(row.isRun == 0 || row.isRun == null) { |
| | | if(row.isRun == 1 || row.isRun == null) { |
| | | return '正常' |
| | | }else if(row.isRun == 1){ |
| | | }else if(row.isRun == 2){ |
| | | return '异常' |
| | | } |
| | | }, |
| | | handleClickRowName({row, column, rowIndex, columnIndex}) { |
| | | if(row.isRun == 1 && column.label == '是否正常运行') { |
| | | if(row.isRun == 2 && column.label == '是否正常运行') { |
| | | return 'yichangStyle' |
| | | }else { |
| | | return '' |
New file |
| | |
| | | <template> |
| | | <div class="YunweiBlockForm-wrap"> |
| | | <el-dialog |
| | | custom-class="YunweiBlockForm-dialog" |
| | | title="设备详情" |
| | | :visible.sync="dialogVisible" |
| | | width="600px" |
| | | :close-on-click-modal="false" |
| | | append-to-body |
| | | v-dialogDrag> |
| | | <el-table |
| | | :cell-class-name="handleClickRowName" |
| | | style="width: 100%" |
| | | :data="tableData"> |
| | | <el-table-column |
| | | prop="name" |
| | | label="名称" |
| | | show-overflow-tooltip |
| | | align="left" |
| | | header-align="left" |
| | | min-width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="bytes" |
| | | label="流量(byte)" |
| | | show-overflow-tooltip |
| | | align="left" |
| | | header-align="left" |
| | | min-width="70"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :formatter="isRunformat" |
| | | prop="isRun" |
| | | label="是否正常运行" |
| | | align="left" |
| | | header-align="left" |
| | | min-width="30"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="remark" |
| | | label="备注" |
| | | show-overflow-tooltip |
| | | align="left" |
| | | header-align="center" |
| | | min-width="70"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getSnmpInfo} from '@/api/daping' |
| | | export default { |
| | | name: "YunweiBlockForm", |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | tableData:[{ |
| | | name:'我是名称', |
| | | bytes:'1000', |
| | | isRun:'1', |
| | | remark:'我是备注信息' |
| | | },{ |
| | | name:'我是名称2', |
| | | bytes:'1000', |
| | | isRun:'0', |
| | | remark:'我是备注信息' |
| | | }], |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.dialogVisible = true |
| | | }, |
| | | getTaskInfoById() { |
| | | getSnmpInfo().then(res => { |
| | | if(res.code == 0) { |
| | | this.tableData = res.data |
| | | } |
| | | }) |
| | | }, |
| | | isRunformat(row) { |
| | | if(row.isRun == 1 || row.isRun == null) { |
| | | return '正常' |
| | | }else if(row.isRun == 2){ |
| | | return '异常' |
| | | } |
| | | }, |
| | | handleClickRowName({row, column, rowIndex, columnIndex}) { |
| | | if(row.isRun == 2 && column.label == '是否正常运行') { |
| | | return 'yichangStyle' |
| | | }else { |
| | | return '' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .yichangStyle{ |
| | | .cell{ |
| | | color: red; |
| | | } |
| | | } |
| | | .YunweiBlockForm-dialog{ |
| | | height: 2.9271rem /* 562/192 */!important; |
| | | width: 4.1771rem /* 802/192 */!important;; |
| | | background: url("../../../../assets/img/kehuxinxi-detail-bj.png") no-repeat center!important; |
| | | background-size: 100% 100% !important; |
| | | } |
| | | .YunweiBlockForm-dialog{ |
| | | .el-dialog__title{ |
| | | color: #fff; |
| | | } |
| | | .el-dialog__header{ |
| | | display: flex; |
| | | justify-content: center; |
| | | padding:20px 25px; |
| | | } |
| | | .el-dialog__body{ |
| | | padding: 30px 25px; |
| | | height: calc(100% - 0.3125rem /* 60/192 */); |
| | | } |
| | | |
| | | .el-icon-close:before{ |
| | | content: url('../../../../assets/img/closeBtnIcon.png'); |
| | | width: 0.125rem /* 24/192 */; |
| | | height: 0.125rem /* 24/192 */; |
| | | } |
| | | |
| | | .el-table{ |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | .el-table, .el-table__expanded-cell,.el-table tr,.el-table th.el-table__cell{ |
| | | background: transparent; |
| | | } |
| | | .el-table thead,.el-table{ |
| | | color: #fff; |
| | | } |
| | | .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{ |
| | | border:none; |
| | | } |
| | | .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{ |
| | | background:rgba(0,213,255,0.08); |
| | | } |
| | | .el-table__row{ |
| | | &:nth-child(odd) { |
| | | background:rgba(0,213,255,0.08); |
| | | } |
| | | } |
| | | .el-table::before{ |
| | | height: 0; |
| | | } |
| | | .el-table th.el-table__cell>.cell{ |
| | | font-size: 0.0729rem /* 14/192 */; |
| | | } |
| | | .el-table td.el-table__cell div{ |
| | | font-size: 0.0729rem /* 14/192 */; |
| | | } |
| | | .el-table .cell,.el-table th > .cell { |
| | | display: inline-block; |
| | | white-space: nowrap; |
| | | width: auto; |
| | | } |
| | | .el-table .el-table__cell{ |
| | | padding: 0.026rem /* 5/192 */ 0; |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="YunweiBlockForm-wrap"> |
| | | <el-dialog |
| | | custom-class="YunweiBlockForm-dialog" |
| | | title="UPS详情" |
| | | :visible.sync="dialogVisible" |
| | | width="600px" |
| | | :close-on-click-modal="false" |
| | | append-to-body |
| | | v-dialogDrag> |
| | | <el-table |
| | | |
| | | style="width: 100%" |
| | | :data="tableData"> |
| | | <el-table-column |
| | | prop="name" |
| | | label="名称" |
| | | show-overflow-tooltip |
| | | align="left" |
| | | header-align="left" |
| | | min-width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="bianliang" |
| | | label="变量名称" |
| | | show-overflow-tooltip |
| | | align="left" |
| | | header-align="left" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="isRun" |
| | | label="状态" |
| | | align="left" |
| | | header-align="left" |
| | | min-width="90"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getUpsInfo} from '@/api/daping' |
| | | export default { |
| | | name: "YunweiBlockForm", |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | tableData:[], |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.dialogVisible = true |
| | | }, |
| | | getTaskInfoById() { |
| | | getUpsInfo().then(res => { |
| | | if(res.code == 0) { |
| | | this.tableData = res.data |
| | | } |
| | | }) |
| | | }, |
| | | isRunformat(row) { |
| | | if(row.isRun == 1 || row.isRun == null) { |
| | | return '正常' |
| | | }else if(row.isRun == 2){ |
| | | return '异常' |
| | | } |
| | | }, |
| | | handleClickRowName({row, column, rowIndex, columnIndex}) { |
| | | if(row.isRun == 2 && column.label == '是否正常运行') { |
| | | return 'yichangStyle' |
| | | }else { |
| | | return '' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .yichangStyle{ |
| | | .cell{ |
| | | color: red; |
| | | } |
| | | } |
| | | .YunweiBlockForm-dialog{ |
| | | height: 2.9271rem /* 562/192 */!important; |
| | | width: 4.1771rem /* 802/192 */!important;; |
| | | background: url("../../../../assets/img/kehuxinxi-detail-bj.png") no-repeat center!important; |
| | | background-size: 100% 100% !important; |
| | | } |
| | | .YunweiBlockForm-dialog{ |
| | | .el-dialog__title{ |
| | | color: #fff; |
| | | } |
| | | .el-dialog__header{ |
| | | display: flex; |
| | | justify-content: center; |
| | | padding:20px 25px; |
| | | } |
| | | .el-dialog__body{ |
| | | padding: 30px 25px; |
| | | height: calc(100% - 0.3125rem /* 60/192 */); |
| | | } |
| | | |
| | | .el-icon-close:before{ |
| | | content: url('../../../../assets/img/closeBtnIcon.png'); |
| | | width: 0.125rem /* 24/192 */; |
| | | height: 0.125rem /* 24/192 */; |
| | | } |
| | | |
| | | .el-table{ |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | .el-table, .el-table__expanded-cell,.el-table tr,.el-table th.el-table__cell{ |
| | | background: transparent; |
| | | } |
| | | .el-table thead,.el-table{ |
| | | color: #fff; |
| | | } |
| | | .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{ |
| | | border:none; |
| | | } |
| | | .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{ |
| | | background:rgba(0,213,255,0.08); |
| | | } |
| | | .el-table__row{ |
| | | &:nth-child(odd) { |
| | | background:rgba(0,213,255,0.08); |
| | | } |
| | | } |
| | | .el-table::before{ |
| | | height: 0; |
| | | } |
| | | .el-table th.el-table__cell>.cell{ |
| | | font-size: 0.0729rem /* 14/192 */; |
| | | } |
| | | .el-table td.el-table__cell div{ |
| | | font-size: 0.0729rem /* 14/192 */; |
| | | } |
| | | .el-table .cell,.el-table th > .cell { |
| | | display: inline-block; |
| | | white-space: nowrap; |
| | | width: auto; |
| | | } |
| | | .el-table .el-table__cell{ |
| | | padding: 0.026rem /* 5/192 */ 0; |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="YunweiBlockForm-wrap"> |
| | | <el-dialog |
| | | custom-class="YunweiBlockForm-dialog" |
| | | title="空调详情" |
| | | :visible.sync="dialogVisible" |
| | | width="600px" |
| | | :close-on-click-modal="false" |
| | | append-to-body |
| | | v-dialogDrag> |
| | | <el-table |
| | | |
| | | style="width: 100%" |
| | | :data="tableData"> |
| | | <el-table-column |
| | | prop="name" |
| | | label="名称" |
| | | show-overflow-tooltip |
| | | align="left" |
| | | header-align="left" |
| | | min-width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="bianliang" |
| | | label="变量名称" |
| | | show-overflow-tooltip |
| | | align="left" |
| | | header-align="left" |
| | | min-width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="isRun" |
| | | label="状态" |
| | | align="left" |
| | | header-align="left" |
| | | min-width="90"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getKongtiaoInfo} from '@/api/daping' |
| | | export default { |
| | | name: "YunweiBlockForm", |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | tableData:[], |
| | | } |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.dialogVisible = true |
| | | }, |
| | | getTaskInfoById() { |
| | | getKongtiaoInfo().then(res => { |
| | | if(res.code == 0) { |
| | | this.tableData = res.data |
| | | } |
| | | }) |
| | | }, |
| | | isRunformat(row) { |
| | | if(row.isRun == 1 || row.isRun == null) { |
| | | return '正常' |
| | | }else if(row.isRun == 2){ |
| | | return '异常' |
| | | } |
| | | }, |
| | | handleClickRowName({row, column, rowIndex, columnIndex}) { |
| | | if(row.isRun == 2 && column.label == '是否正常运行') { |
| | | return 'yichangStyle' |
| | | }else { |
| | | return '' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .yichangStyle{ |
| | | .cell{ |
| | | color: red; |
| | | } |
| | | } |
| | | .YunweiBlockForm-dialog{ |
| | | height: 2.9271rem /* 562/192 */!important; |
| | | width: 4.1771rem /* 802/192 */!important;; |
| | | background: url("../../../../assets/img/kehuxinxi-detail-bj.png") no-repeat center!important; |
| | | background-size: 100% 100% !important; |
| | | } |
| | | .YunweiBlockForm-dialog{ |
| | | .el-dialog__title{ |
| | | color: #fff; |
| | | } |
| | | .el-dialog__header{ |
| | | display: flex; |
| | | justify-content: center; |
| | | padding:20px 25px; |
| | | } |
| | | .el-dialog__body{ |
| | | padding: 30px 25px; |
| | | height: calc(100% - 0.3125rem /* 60/192 */); |
| | | } |
| | | |
| | | .el-icon-close:before{ |
| | | content: url('../../../../assets/img/closeBtnIcon.png'); |
| | | width: 0.125rem /* 24/192 */; |
| | | height: 0.125rem /* 24/192 */; |
| | | } |
| | | |
| | | .el-table{ |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | .el-table, .el-table__expanded-cell,.el-table tr,.el-table th.el-table__cell{ |
| | | background: transparent; |
| | | } |
| | | .el-table thead,.el-table{ |
| | | color: #fff; |
| | | } |
| | | .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{ |
| | | border:none; |
| | | } |
| | | .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{ |
| | | background:rgba(0,213,255,0.08); |
| | | } |
| | | .el-table__row{ |
| | | &:nth-child(odd) { |
| | | background:rgba(0,213,255,0.08); |
| | | } |
| | | } |
| | | .el-table::before{ |
| | | height: 0; |
| | | } |
| | | .el-table th.el-table__cell>.cell{ |
| | | font-size: 0.0729rem /* 14/192 */; |
| | | } |
| | | .el-table td.el-table__cell div{ |
| | | font-size: 0.0729rem /* 14/192 */; |
| | | } |
| | | .el-table .cell,.el-table th > .cell { |
| | | display: inline-block; |
| | | white-space: nowrap; |
| | | width: auto; |
| | | } |
| | | .el-table .el-table__cell{ |
| | | padding: 0.026rem /* 5/192 */ 0; |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
| | |
| | | if(row.isOk == 0 || row.isOk == null) { |
| | | return '未完成' |
| | | }else if(row.isOk == 1){ |
| | | return '完成' |
| | | return '已完成' |
| | | } |
| | | } |
| | | } |