| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- table区域-begin --> |
| | | <div class="table_alarmLogist"> |
| | | <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns" |
| | | :dataSource="dataList" :pagination="false" :loading="loadingwarnStatus"> |
| | | :dataSource="dataList" :pagination="false" :loading="loading"> |
| | | <template slot="status" slot-scope="status"> |
| | | <div v-if="status == '3' || status == '23'" style="color: #00ee00;width: 100%; height: 100%;">运行</div> |
| | | <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">待机</div> |
| | |
| | | </template> |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | |
| | | import JInput from '@/components/jeecg/JInput' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | export default { |
| | | name: 'AlarmLogList', |
| | | components: { |
| | | Tooltip, |
| | | JDictSelectTag, |
| | | JInput, |
| | | JEllipsis |
| | | }, |
| | | props: { |
| | | dataList: { |
| | | type: Array, |
| | | required: true, |
| | | default: [] |
| | | }, |
| | | loadingwarnStatus:{ |
| | | loading:{ |
| | | type:Boolean, |
| | | default: false |
| | | } |
| | |
| | | title: '报警时间', |
| | | align: 'center', |
| | | dataIndex: 'startTime', |
| | | // defaultSortOrder:'descend', |
| | | // sorter: (a, b) => {return a.startTime>b.startTime?1:-1} |
| | | }, |
| | | { |
| | | title: '结束时间', |
| | | align: 'center', |
| | | dataIndex: 'endTime', |
| | | // defaultSortOrder:'descend', |
| | | // sorter: (a, b) => {return a.endTime>b.endTime?1:-1} |
| | | }, |
| | | { |
| | | title: '持续时间', |
| | | align: 'center', |
| | | dataIndex: 'duration', |
| | | customRender:(t,r,index) =>{ |
| | | // console.log(t) |
| | | var ss = parseInt(t) |
| | | if(ss>=3600){ |
| | | // 根据秒数转换成对应的时分秒 |
| | |
| | | return hour + '小时' + min + '分' + sec + '秒' |
| | | } |
| | | } |
| | | // if(sec == '00'){ |
| | | // return hour + '小时' + min + '分' |
| | | // } |
| | | // if(min == '00' && sec == '00'){ |
| | | // return hour + '小时' |
| | | // } |
| | | // return hour + '小时' + min + '分' + sec + '秒' |
| | | |
| | | }else if(60<ss && ss<3600){ |
| | | const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60) |
| | |
| | | return sec2 + '秒' |
| | | } |
| | | } |
| | | // defaultSortOrder:'descend', |
| | | // sorter: (a, b) => {return a.duration>b.duration?1:-1} |
| | | }, |
| | | { |
| | | title: '报警号', |
| | |
| | | @media screen and (min-width: 1920px){ |
| | | .table_alarmLogist{ |
| | | height: 417px!important; |
| | | overflow: scroll; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px){ |
| | | .table_alarmLogist{ |
| | | height: 417px!important; |
| | | overflow: scroll; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px){ |
| | | .table_alarmLogist{ |
| | | height: 266px!important; |
| | | overflow: scroll; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px){ |
| | | .table_alarmLogist{ |
| | | height: 360px!important; |
| | | overflow: scroll; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | @media screen and (max-width: 1280px){ |
| | | .table_alarmLogist{ |
| | | height: 170px!important; |
| | | overflow: scroll; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | </style> |