风继续吹 1 год назад
Родитель
Сommit
52c339f627
2 измененных файлов: 79 добавлений и 13 удалений
  1. +76
    -12
      src/page/bi/bi.vue
  2. +3
    -1
      src/views/admin/user/index.vue

+ 76
- 12
src/page/bi/bi.vue Просмотреть файл

@@ -763,14 +763,10 @@
}}</span>
</div>
<div class="text-line">
完整录音:<span>{{
fullRecordAnalyse.fullCount || 0
}}</span>
完整录音:<span>{{ fullRecordAnalyse.fullCount || 0 }}</span>
</div>
<div class="text-line">
录音完整率:<span
>{{ fullRecordAnalyse.fullRate || 0 }}%</span
>
录音完整率:<span>{{ fullRecordAnalyse.fullRate || 0 }}%</span>
</div>
</div>
</div>
@@ -806,7 +802,7 @@

<!-- 违禁预警 -->
<section v-if="headIndex == '违禁预警'" class="warningreminder">
<div class="warningreminderbox">
<div class="warningreminderbox" v-if="biWarningMessageIndex.length > 0">
<div
class="warningreminderboxitem"
v-for="(data, index) in biWarningMessageIndex"
@@ -864,6 +860,8 @@
</div>
</div>
</div>

<div v-if="biWarningMessageIndex.length == 0" class="empty">暂无数据</div>
<div style="padding: 0 30px">
<el-pagination
style="background: transparent !important"
@@ -874,6 +872,7 @@
:page-size="sizes"
layout="total, sizes, prev, pager, next, jumper"
:total="totals"
hide-on-single-page
>
</el-pagination>
</div>
@@ -924,6 +923,7 @@
:page-size="size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
hide-on-single-page
>
</el-pagination>
</el-dialog>
@@ -1061,6 +1061,7 @@
新增
</div>
</div>

<!-- 指标对比预警设置项 -->
<div
style="margin: 5px 0"
@@ -1278,11 +1279,15 @@ export default {
activeProjectAnalyse: {}, // 设备监控中心左侧数据
projectAnalyse: {}, // 设备监控中心左侧数据
overdueProject: [], // 设备监控中心左侧数据
allOverdueProject: [], // 全部数据

fullRecordAnalyse: {}, // 设备监控中心右侧数据
fullRecordTendency: [], // 设备监控中心右侧数据
notFullRecordDistribute: [], // 设备监控中心右侧数据
offLineReasonDistribute: [], // 设备监控中心右侧数据

timer: null, // 定时器
timerIndex: 1, // 分页下标 从1开始
};
},

@@ -1308,12 +1313,23 @@ export default {
methods: {
// 修改项目预警配置
biWarningUpdate() {
try {
this.earlyarningObj.dayWarningList.forEach((item) => {
if (!item.thresholdValue) {
throw new Error(item.dataStatus);
}
});
} catch (e) {
let obj = this.targetArray.find((item) => item.value == e.message);
this.$message.error(`指标日预警的${obj.label}不能为空`);
return;
}

const params = {
...this.earlyarningObj,
warningSendUser: this.earlyarningObj.warningSendUser.join(",") || "",
warningSetting: this.earlyarningObj.warningSettings ? 0 : 1,
};

this.$api.http.biWarningUpdate(params).then((res) => {
if (res.code == 10000) {
this.$message.success(res.message);
@@ -1493,10 +1509,12 @@ export default {
this.$api.http.biEquipmentMonitoringLeft(params).then((res) => {
if (res.code == 10000) {
this.equipmentOnlineAnalyse = res.data.equipmentOnlineAnalyse;
this.overdueProject = res.data.overdueProject.splice(0, 7) || [];
this.allOverdueProject = res.data.overdueProject;
this.overdueProject = res.data.overdueProject.slice(0, 7) || [];
this.projectAnalyse = res.data.projectAnalyse;
this.activeProjectAnalyse = res.data.activeProjectAnalyse;

this.timerEvent();
this.$nextTick(() => {
this.buildingPie();
});
@@ -1504,6 +1522,37 @@ export default {
});
},

// 定时器定时轮播数据
timerEvent() {
// 固定截取7个
const index = 7;
let total = this.allOverdueProject.length;

this.timer = setInterval(() => {
if (this.timerIndex < total) {
this.timerIndex += index;
this.overdueProject = this.allOverdueProject.slice(
this.timerIndex,
this.timerIndex + index
);
if (this.overdueProject.length == 0) {
this.timerIndex = 1;
this.overdueProject = this.allOverdueProject.slice(
this.timerIndex,
this.timerIndex + index
);
}
} else {
this.timerIndex = 1;
this.overdueProject = this.allOverdueProject.slice(
this.timerIndex,
this.timerIndex + index
);
}
console.log(total, this.timerIndex, "这里", this.allOverdueProject);
}, 5000);
},

// 设备监控中心右
biEquipmentMonitoringRight() {
const params = {
@@ -2257,9 +2306,6 @@ export default {
.then((res) => {
console.log(res);
if (res.code == 10000) {
data.list.forEach((item) => {
item.showStatus = 0;
});
this.$message.success(res.message);
} else {
this.$message.error(res.message);
@@ -3933,6 +3979,7 @@ export default {
this.projectValue = "";
this.companyValue = "";
this.initPage();
this.timer && clearInterval(this.timer);
},

// 时间类型选项被点击
@@ -3987,6 +4034,10 @@ export default {
}
},
},

beforeDestroy() {
clearInterval(this.timer);
},
};
</script>

@@ -4843,6 +4894,7 @@ export default {
padding: 20px;
width: 100%;
height: 270px;
overflow: auto;

/deep/ .box-grow {
display: flex;
@@ -5362,6 +5414,18 @@ export default {
/deep/.warningreminderboxitem .box .is-checked .el-checkbox__inner {
background-color: #2ed1ee;
}

.empty {
width: 100%;
height: 700px;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #34dbfc;
}
</style>

<style>


+ 3
- 1
src/views/admin/user/index.vue Просмотреть файл

@@ -1868,8 +1868,10 @@ export default {
this.houseUserRoleType = row.userRoleType;
this.accountId = row.accountId;
this.houseVisible = true;
if (row.houseIds) {
this.originalList = row.houseIds.split(",");
}
// 获取原始数据
this.originalList = row.houseIds.split(",");
// console.log(this.originalList,'原始数据')
// 判断是否有绑定以及绑定方式
// console.log(row.selectHouseType)


Загрузка…
Отмена
Сохранить