alarmInformation.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div class="modelBlock">
  3. <template v-if="permissionFiltering">
  4. <div class="model-title">
  5. <div class="model-title-text">设备告警信息</div>
  6. <div class="buttons" @click="$router.push({ path: '/alarmManagement/details' })">
  7. <span class="text">查看更多</span> <span class="triangle"></span>
  8. </div>
  9. </div>
  10. <div class="model-content">
  11. <div class="listInformation" v-for="(item, index) in datas" :key="index">
  12. <div class="listInformation_text">
  13. <span class="mainTextColor">【{{ item.deviceName }}告警】</span>{{ item.address }}
  14. </div>
  15. <div class="listInformation_operation">{{ item.alarmStartTime }}</div>
  16. </div>
  17. <div v-if="datas.length <= 0" class="noData">暂无数据</div>
  18. </div>
  19. </template>
  20. <no-permission v-else tipsText="设备告警信息"></no-permission>
  21. </div>
  22. </template>
  23. <script>
  24. import permissionComponent from '../permissionComponent';
  25. export default {
  26. mixins: [permissionComponent],
  27. data() {
  28. return {
  29. defaultModel: {
  30. permissUrl: '16',
  31. titleName: '告警管理'
  32. },
  33. datas: [],
  34. // 详情显示数据
  35. mixins_query: {
  36. communityId: '',
  37. alarmCategory: 1,
  38. sceneType: '5',
  39. state: '1'
  40. },
  41. peopleData: [],
  42. houseData: []
  43. };
  44. },
  45. created() {
  46. this.getData();
  47. },
  48. methods: {
  49. getData() {
  50. this.$http
  51. .post('/sc-community/alarm/details/selectPage', this.mixins_query)
  52. .then(({ status, data, msg }) => {
  53. if (status == 0) {
  54. this.datas = data.list;
  55. }
  56. })
  57. .catch((err) => {});
  58. }
  59. }
  60. };
  61. </script>
  62. <style scoped lang="scss">
  63. @import '../style.scss';
  64. .noData {
  65. text-align: center;
  66. line-height: rem(100);
  67. }
  68. .modelBlock {
  69. .model-content {
  70. display: block;
  71. font-size: 14px;
  72. .flex {
  73. display: flex;
  74. }
  75. .listInformation {
  76. cursor: pointer;
  77. display: flex;
  78. justify-content: space-between;
  79. margin-top: rem(10);
  80. .listInformation_img {
  81. width: rem(46);
  82. height: rem(46);
  83. margin-right: rem(20);
  84. }
  85. .listInformation_text {
  86. display: flex;
  87. opacity: 0.7;
  88. width: calc(100% - 250px);
  89. max-width: 500px;
  90. overflow: hidden;
  91. text-overflow: ellipsis;
  92. white-space: nowrap;
  93. }
  94. .listInformation_operation {
  95. width: 150px;
  96. opacity: 0.5;
  97. text-align: end;
  98. }
  99. }
  100. }
  101. }
  102. </style>