| | |
| | | childrens: [ |
| | | { |
| | | txt: '故障诊断', |
| | | url: '#', |
| | | url: '/testing/fault', |
| | | active: false |
| | | }, |
| | | { |
| | |
| | | .bg-error { |
| | | background-color: #ed4014; |
| | | } |
| | | /* text-color */ |
| | | .text-warning { |
| | | color: #ff9900; |
| | | } |
| | | .text-error { |
| | | color: #ed4014; |
| | | } |
| | | /* margin */ |
| | | .mrt8 { |
| | | margin-top: 8px; |
| | |
| | | component: (resolve) => require(['./views/monitor/info-display.vue'], resolve) |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/testing', |
| | | meta: { |
| | | title: '', |
| | | }, |
| | | component: (resolve) => require(['./views/testing/index.vue'], resolve), |
| | | children: [ |
| | | { |
| | | path: 'fault', |
| | | meta: { |
| | | title: '故障诊断' |
| | | }, |
| | | component: (resolve) => require(['./views/testing/fault.vue'], resolve) |
| | | }, |
| | | ] |
| | | } |
| | | ]; |
| | | export default routers; |
New file |
| | |
| | | <template> |
| | | <div class="view-layout"> |
| | | <Table stripe border :columns="tbl.columns" :data="tbl.data" :height="tblHt" size="small"></Table> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import $ from 'jquery' |
| | | export default { |
| | | data() { |
| | | return { |
| | | win: 0, |
| | | tbl: { |
| | | height: 'full-171', |
| | | columns:[ |
| | | { |
| | | title: '序号', |
| | | key: 'order' |
| | | }, |
| | | { |
| | | title: '故障日期', |
| | | key: 'fault_date' |
| | | }, |
| | | { |
| | | title: '故障时间', |
| | | key: 'fault_time' |
| | | }, |
| | | { |
| | | title: '故障说明', |
| | | key: 'fault_explain' |
| | | }, |
| | | { |
| | | title: '故障设备名称', |
| | | key: 'fault_dev_name' |
| | | }, |
| | | { |
| | | title: '故障部件名称', |
| | | key: 'fault_parts_name' |
| | | }, |
| | | { |
| | | title: '故障板卡名称', |
| | | key: 'fault_card_name' |
| | | }, |
| | | { |
| | | title: '故障板卡型号', |
| | | key: 'fault_card_model' |
| | | }, |
| | | { |
| | | title: '备注', |
| | | key: 'remarks' |
| | | } |
| | | ], |
| | | data:[ |
| | | { |
| | | order:1, |
| | | fault_date: '2019-06-01', |
| | | fault_time: '08:20', |
| | | fault_explain: '', |
| | | fault_dev_name: '电气综合监控台', |
| | | fault_parts_name: '电源箱', |
| | | fault_card_name: '5V电源模块', |
| | | fault_card_model: 'DY-5', |
| | | remarks: '' |
| | | }, |
| | | { |
| | | order:2, |
| | | fault_date: '2019-06-01', |
| | | fault_time: '08:20', |
| | | fault_explain: '', |
| | | fault_dev_name: '电气综合监控台', |
| | | fault_parts_name: '电源箱', |
| | | fault_card_name: '15V电源模块', |
| | | fault_card_model: 'DY-15', |
| | | remarks: '' |
| | | }, |
| | | { |
| | | order:3, |
| | | fault_date: '2019-06-01', |
| | | fault_time: '08:20', |
| | | fault_explain: '', |
| | | fault_dev_name: '电气综合监控台', |
| | | fault_parts_name: '电源箱', |
| | | fault_card_name: '24V电源模块', |
| | | fault_card_model: 'DY-24', |
| | | remarks: '' |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | tblHt: function() { |
| | | var result = 200; |
| | | if(typeof(this.tbl.height) == 'string') { |
| | | var pattern = /^full-(\d*)$/; |
| | | if(pattern.test(this.tbl.height)) { |
| | | var diff = RegExp.$1; |
| | | result = this.win-diff; |
| | | } |
| | | |
| | | }else { |
| | | result = this.tbl.height; |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | }, |
| | | mounted: function() { |
| | | var _self = this; |
| | | |
| | | // 根据屏幕可视区域的高度设置表格的高度 |
| | | this.win = $(window).height(); |
| | | $(window).resize(function() { |
| | | _self.win = $(window).height(); |
| | | }); |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .card-title { |
| | | font-size: 18px; |
| | | } |
| | | .card-title .ivu-icon { |
| | | font-size: 24px; |
| | | } |
| | | .card-title-text { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="layout"> |
| | | <router-view></router-view> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | |
| | | </style> |