123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <template>
- <div class="modelBlock">
- <template v-if="permissionFiltering">
- <div class="model-title">
- <div class="model-title-text">设备告警信息</div>
- <div class="buttons" @click="$router.push({ path: '/alarmManagement/details' })">
- <span class="text">查看更多</span> <span class="triangle"></span>
- </div>
- </div>
- <div class="model-content">
- <div class="listInformation" v-for="(item, index) in datas" :key="index">
- <div class="listInformation_text">
- <span class="mainTextColor">【{{ item.deviceName }}告警】</span>{{ item.address }}
- </div>
- <div class="listInformation_operation">{{ item.alarmStartTime }}</div>
- </div>
- <div v-if="datas.length <= 0" class="noData">暂无数据</div>
- </div>
- </template>
- <no-permission v-else tipsText="设备告警信息"></no-permission>
- </div>
- </template>
- <script>
- import permissionComponent from '../permissionComponent';
- export default {
- mixins: [permissionComponent],
- data() {
- return {
- defaultModel: {
- permissUrl: '16',
- titleName: '告警管理'
- },
- datas: [],
- // 详情显示数据
- mixins_query: {
- communityId: '',
- alarmCategory: 1,
- sceneType: '5',
- state: '1'
- },
- peopleData: [],
- houseData: []
- };
- },
- created() {
- this.getData();
- },
- methods: {
- getData() {
- this.$http
- .post('/sc-community/alarm/details/selectPage', this.mixins_query)
- .then(({ status, data, msg }) => {
- if (status == 0) {
- this.datas = data.list;
- }
- })
- .catch((err) => {});
- }
- }
- };
- </script>
- <style scoped lang="scss">
- @import '../style.scss';
- .noData {
- text-align: center;
- line-height: rem(100);
- }
- .modelBlock {
- .model-content {
- display: block;
- font-size: 14px;
- .flex {
- display: flex;
- }
- .listInformation {
- cursor: pointer;
- display: flex;
- justify-content: space-between;
- margin-top: rem(10);
- .listInformation_img {
- width: rem(46);
- height: rem(46);
- margin-right: rem(20);
- }
- .listInformation_text {
- display: flex;
- opacity: 0.7;
- width: calc(100% - 250px);
- max-width: 500px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .listInformation_operation {
- width: 150px;
- opacity: 0.5;
- text-align: end;
- }
- }
- }
- }
- </style>
|