|
@@ -74,51 +74,52 @@
|
|
|
<span class="txt1 o-mt-10">{{ $t("device.machineUniqueCode") }}:{{ item.clientId }}</span>
|
|
|
<!-- 锁机状态 -->
|
|
|
<span v-if="user.type < 1" class="txt1 o-mt-10">
|
|
|
- {{ $t("device.lockCondition") }}:{{ item.isBlocked ? $t("device.lockState") : $t("device.unLockState") }}
|
|
|
+ {{ $t("device.lockCondition") }}:{{ item.isBlocked ? $t("device.lockState") : $t("device.unLockState")
|
|
|
+ }}
|
|
|
</span>
|
|
|
<!-- 温湿度 -->
|
|
|
- <!-- <span v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'"
|
|
|
- class="txt1 o-mt-10">
|
|
|
- <van-col class="word5" style="">{{ $t("device.furnaceHeadTemperature") + ':' +
|
|
|
- item.furnaceTm
|
|
|
- + $t("device.degree") }}</van-col>
|
|
|
- <van-col class="word5" style="">{{ ' ' + $t("device.temperatureInCabinet") + ':' + item.cabinetTm
|
|
|
- + $t("device.degree") }}</van-col>
|
|
|
- <van-col class="word5" style="">{{ ' ' + $t("device.humidityInCabinet") + ':' + item.cabinetHd
|
|
|
- + $t("device.humidity") }}</van-col>
|
|
|
- </span> -->
|
|
|
<span v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'"
|
|
|
class="txt1 o-mt-10">
|
|
|
{{ $t("device.temperatureInCabinet") + ':' + item.cabinetTm
|
|
|
- + $t("device.degree") }}
|
|
|
+ + $t("device.degree") }}
|
|
|
</span>
|
|
|
<span v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'"
|
|
|
class="txt1 o-mt-10">
|
|
|
{{ $t("device.humidityInCabinet") + ':' + item.cabinetHd
|
|
|
- + $t("device.humidity") }}
|
|
|
+ + $t("device.humidity") }}
|
|
|
</span>
|
|
|
<span v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'"
|
|
|
class="txt1 o-mt-10">
|
|
|
{{ $t("device.furnaceHeadTemperature") + ':' +
|
|
|
- item.furnaceTm
|
|
|
- + $t("device.degree") }}
|
|
|
+ item.furnaceTm
|
|
|
+ + $t("device.degree") }}
|
|
|
+ </span>
|
|
|
+ <span v-if="item.machineType == '1' && item.equimentType == 'P30'" class="txt1 o-mt-10">
|
|
|
+ {{ $t("device.cornGeneratorTemperature") + ':' + item.cabinetTm + $t("device.degree") }}
|
|
|
+ </span>
|
|
|
+ <span v-if="item.machineType == '1' && item.equimentType == 'P30'" class="txt1 o-mt-10">
|
|
|
+ {{ $t("device.stirringTemperature") + ':' + item.cabinetHd + $t("device.degree") }}
|
|
|
+ </span>
|
|
|
+ <span v-if="item.machineType == '1' && item.equimentType == 'P30'" class="txt1 o-mt-10">
|
|
|
+ {{ $t("device.cupQuantity") + ':' + item.furnaceTm }}
|
|
|
</span>
|
|
|
<img v-if="item.checkType" class="pic1" referrerpolicy="no-referrer" src="../../assets/home/line.png" />
|
|
|
<div class="contentBottomCon" v-if="item.checkType">
|
|
|
|
|
|
<!-- 所属商家 -->
|
|
|
<!-- <span class="txt1 o-mt-10">{{ $t("device.affiliatedMerchants") }}:{{ item.adminUserName }}</span> -->
|
|
|
- <div class="contentWord kBordBott">{{ $t("device.affiliatedMerchants") }}:{{ item.adminUserName }}
|
|
|
+ <div v-if="user.type < 2" class="contentWord kBordBott">{{ $t("device.affiliatedMerchants") }}:{{
|
|
|
+ item.adminUserName }}
|
|
|
</div>
|
|
|
<!-- 睡眠状态 -->
|
|
|
<div class="contentWord kBordBott">
|
|
|
- <span class="o-mr-10">{{ $t("device.sleepState") }}:{{ item.isSleep ? $t("device.sleeping") :
|
|
|
- $t("device.notSleeping") }}</span>
|
|
|
- <van-switch :model-value="item.isSleep" size="23px" @click="changeSleep(item)" />
|
|
|
+ <span class="word o-mr-10">{{ $t("device.sleepState") }}:{{ item.isSleep ? $t("device.sleeping") :
|
|
|
+ $t("device.notSleeping") }}</span>
|
|
|
+ <van-switch :model-value="item.isSleep" size="18px" @click="changeSleep(item)" />
|
|
|
</div>
|
|
|
<!-- 睡眠描述 -->
|
|
|
<div v-if="item.isSleep" class="contentWord kBordBott">
|
|
|
- <span class="">{{ $t("device.sleepDesc") }}:</span>
|
|
|
+ <span class="word">{{ $t("device.sleepDesc") }}:</span>
|
|
|
<van-field colon center class="word2" v-model="item.sleepDesc" v-if="!sleepDescBoxShow"
|
|
|
:placeholder="$t('device.sleepDescPlace')" label-width="auto">
|
|
|
<template #button class="button_1">
|
|
@@ -129,21 +130,22 @@
|
|
|
</template>
|
|
|
</van-field>
|
|
|
<div class="l-flex-RC" v-else>
|
|
|
- <span class="o-mr-10">{{ item.sleepDesc == null ? $t("device.SuspendBusiness") : item.sleepDesc
|
|
|
+ <span class="word o-mr-10">{{ item.sleepDesc == null ? $t("device.SuspendBusiness") :
|
|
|
+ item.sleepDesc
|
|
|
}}</span>
|
|
|
<van-button type="primary" @click="editSleepDesc()">{{ $t("device.modify") }}</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span v-if="item.machineType == null || item.machineType == '0'"
|
|
|
class="contentWord kBordBott l-flex-RC">
|
|
|
- <span>{{ $t("device.clickRestart") }}:</span>
|
|
|
+ <span class="word">{{ $t("device.clickRestart") }}:</span>
|
|
|
<van-button @click="restartHead(item.id)" type="primary">{{ $t("device.restartHead") }}</van-button>
|
|
|
</span>
|
|
|
<!-- 炉头状态 -->
|
|
|
<div class="contentWord kBordBott" v-if="item.machineType == null || item.machineType == '0'">
|
|
|
- <span>
|
|
|
+ <span class="word">
|
|
|
{{ (item.machineType == '0' || item.machineType == null) ? $t("device.furnHeadStatus") :
|
|
|
- $t("device.deviceStatus") }}:
|
|
|
+ $t("device.deviceStatus") }}:
|
|
|
{{ item.eqeStatus === 1 ? $t("device.opened") : $t("device.closed") }}
|
|
|
</span>
|
|
|
<div class="o-ml-10">
|
|
@@ -155,54 +157,40 @@
|
|
|
<!-- <span class="txt5 o-ptb-10 kBordBott l-flex-RC"><span>远程开门:</span>
|
|
|
<van-button type="primary">开门</van-button>
|
|
|
</span> -->
|
|
|
-
|
|
|
- <!-- 设备地址 -->
|
|
|
- <!-- <span class="txt1 o-ptb-7">{{ item.fullName }}</span> -->
|
|
|
- <!-- 定位: -->
|
|
|
- <!-- <div>
|
|
|
- <span v-if="item.latitude" class="txt5 o-ptb-7 kBordBott l-flex-RC">
|
|
|
- <span class="info1">{{
|
|
|
- $t("device.position") }}:</span>
|
|
|
- <van-button @click="viewPosiClk(item)" type="primary">{{
|
|
|
- $t("device.view")
|
|
|
- }}</van-button>
|
|
|
- </span>
|
|
|
- </div> -->
|
|
|
-
|
|
|
<!-- 定位: -->
|
|
|
<span v-if="item.latitude" class="contentWord kBordBott l-flex-LC justify-space-between">
|
|
|
- <span>{{ $t("device.position") }}:</span>
|
|
|
+ <span class="word">{{ $t("device.position") }}:</span>
|
|
|
<a class="clickable-link" @click="viewPosiClk(item)">{{ item.fullName }}</a>
|
|
|
</span>
|
|
|
|
|
|
<!-- 机器参数 -->
|
|
|
<!-- <van-row class="layer5 kBordBott" justify="space-between"
|
|
|
v-if="(item.machineType == '0' || item.machineType == null) && item.equimentType != 'P30'">
|
|
|
- <van-col class="word5" style="">{{ $t("device.furnaceHeadTemperature") }}:{{
|
|
|
+ <van-col class="word5">{{ $t("device.furnaceHeadTemperature") }}:{{
|
|
|
item.furnaceTm
|
|
|
}}{{ $t("device.degree") }}</van-col>
|
|
|
- <van-col class="word5" style="">{{ $t("device.temperatureInCabinet") }}:{{
|
|
|
+ <van-col class="word5">{{ $t("device.temperatureInCabinet") }}:{{
|
|
|
item.cabinetTm
|
|
|
}}{{ $t("device.degree") }}</van-col>
|
|
|
- <van-col class="word5" style="">{{ $t("device.humidityInCabinet") }}:{{
|
|
|
+ <van-col class="word5">{{ $t("device.humidityInCabinet") }}:{{
|
|
|
item.cabinetHd
|
|
|
}}{{ $t("device.humidity") }}</van-col>
|
|
|
</van-row> -->
|
|
|
|
|
|
|
|
|
- <van-row class="layer5 kBordBott" justify="space-between" v-if="item.machineType == '1'">
|
|
|
- <van-col class="word5" style="">{{ $t("device.cornGeneratorTemperature") }}:{{
|
|
|
- item.cabinetTm
|
|
|
- }}{{ $t("device.degree") }}</van-col>
|
|
|
- <van-col class="word5" style="">{{ $t("device.stirringTemperature") }}:{{
|
|
|
- item.cabinetHd
|
|
|
- }}{{ $t("device.degree") }}</van-col>
|
|
|
- <van-col class="word5" style="">{{ $t("device.cupQuantity") }}:{{ item.furnaceTm
|
|
|
+ <!-- <van-row class="layer5 kBordBott" justify="space-between" v-if="item.machineType == '1'">
|
|
|
+ <van-col class="word5">{{ $t("device.cornGeneratorTemperature") }}:{{
|
|
|
+ item.cabinetTm
|
|
|
+ }}{{ $t("device.degree") }}</van-col>
|
|
|
+ <van-col class="word5">{{ $t("device.stirringTemperature") }}:{{
|
|
|
+ item.cabinetHd
|
|
|
+ }}{{ $t("device.degree") }}</van-col>
|
|
|
+ <van-col class="word5">{{ $t("device.cupQuantity") }}:{{ item.furnaceTm
|
|
|
}}</van-col>
|
|
|
- </van-row>
|
|
|
+ </van-row> -->
|
|
|
<template v-if="item.isMaterialUse === '1' && (item.machineType == '0' || item.machineType == null)">
|
|
|
<van-row justify="space-between" class="sugarTxt kBordBott">
|
|
|
- <van-col style="">
|
|
|
+ <van-col>
|
|
|
{{ $t("device.whiteSugar") }}:{{ Format_calcuDecial(item.whiteSugar) }}%
|
|
|
</van-col>
|
|
|
<van-col>
|
|
@@ -211,14 +199,14 @@
|
|
|
<van-col>
|
|
|
{{ $t("device.yellowSugar") }}:{{ Format_calcuDecial(item.yellowSugar) }}%
|
|
|
</van-col>
|
|
|
- <van-col style="">
|
|
|
+ <van-col>
|
|
|
{{ $t("device.blueSugar") }}:{{ Format_calcuDecial(item.blueSugar) }}%
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
<div class="sugarTxt kBordBott">
|
|
|
<span>{{ $t("device.stick") }}:{{
|
|
|
- Format_calcuDecial(item.stick)
|
|
|
- }}%</span>
|
|
|
+ Format_calcuDecial(item.stick)
|
|
|
+ }}%</span>
|
|
|
</div>
|
|
|
<van-row gutter="20" class="sugarTxt kBordBott">
|
|
|
<van-col>
|
|
@@ -232,49 +220,59 @@
|
|
|
<span class="contentWord kBordBott">
|
|
|
<span class="l-flex-RC">{{ $t("device.oneKeyFeed") }}:
|
|
|
<van-button class="replenishment" @click="replenishmentClk(item)" type="primary">{{
|
|
|
- $t("device.replenishment") }}
|
|
|
+ $t("device.replenishment") }}
|
|
|
</van-button>
|
|
|
</span>
|
|
|
- <!-- <a class="replenishment" @click="replenishmentClk(item)">{{ $t("device.replenishment")
|
|
|
- }}</a> -->
|
|
|
</span>
|
|
|
</template>
|
|
|
<!-- 最近刷新时间 -->
|
|
|
<span class="contentWord kBordBott">{{ $t("device.lastRefreshTime") }}:{{
|
|
|
- showDateTime(item.lastUpdateTime)
|
|
|
- }}</span>
|
|
|
+ showDateTime(item.lastUpdateTime)
|
|
|
+ }}</span>
|
|
|
<!-- 音量 -->
|
|
|
<span v-if="item.machineType != '2'" class="contentWord kBordBott">{{ $t("device.volume") }}:{{
|
|
|
- item.volume }}</span>
|
|
|
+ item.volume }}</span>
|
|
|
<!-- 报警内容 -->
|
|
|
- <div class="contentWord kBordBott l-flex-LC justify-space-between">
|
|
|
+ <!-- <div class="contentWord kBordBott l-flex-LC justify-space-between">
|
|
|
<span>{{ $t("device.alarmContent") }}:</span>
|
|
|
- <!-- <div class="l-flex-RC"> -->
|
|
|
<span class="word3">{{
|
|
|
- item.alarmList && item.alarmList[0] && item.alarmList[0].alarmContent
|
|
|
- ? showDateTime(item.alarmList[0].occurrenceTime) + " " + item.alarmList[0].alarmContent
|
|
|
- : $t("device.alarmContentNoData")
|
|
|
- }}
|
|
|
+ item.alarmList && item.alarmList[0] && item.alarmList[0].alarmContent
|
|
|
+ ? showDateTime(item.alarmList[0].occurrenceTime) + " " + item.alarmList[0].alarmContent
|
|
|
+ : $t("device.alarmContentNoData")
|
|
|
+ }}
|
|
|
</span>
|
|
|
<van-button v-if="item.alarmList && item.alarmList[0] && item.alarmList[0].alarmContent"
|
|
|
style="flex-shrink: 0; margin: 0;" type="primary" color="#07c160"
|
|
|
:text="$t('device.eliminateAlarm')" @click="clearAlarm(item.alarmList[0], item)"></van-button>
|
|
|
- <!-- </div> -->
|
|
|
+ </div> -->
|
|
|
+ <div class="alert-item kBordBott" v-for="itemAlarm in item.alarmList" :key="itemAlarm">
|
|
|
+ <div class="alert-info o-pr-5">
|
|
|
+ <span style="display: block;">{{ $t("device.time") }} : {{ showDateTime(itemAlarm.occurrenceTime)
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ <span>{{ $t("device.alarmContent") }} : {{ itemAlarm.alarmContent }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="lineCon"></div>
|
|
|
+ <div class="alert-actions">
|
|
|
+ <van-button type="primary" color="#07c160" style="margin: 0 10px;"
|
|
|
+ :text="$t('device.eliminateAlarm')"
|
|
|
+ @click="clearAlarm(itemAlarm, item, item.alarmList)"></van-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="editDeviceBtnCon l-flex-center o-mt-10">
|
|
|
<!-- 详细信息 -->
|
|
|
<div class="l-flex-RC" @click="deviceSet(item)">
|
|
|
<span class="c-text-14">{{
|
|
|
- $t("device.editDevice")
|
|
|
- }}</span>
|
|
|
+ $t("device.editDevice")
|
|
|
+ }}</span>
|
|
|
<div class="box2 flex-col"></div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 远程操作 -->
|
|
|
<div class="l-flex-RC" @click="deviceOprShow(item)">
|
|
|
<span class="c-text-14">{{
|
|
|
- $t("device.commonOperations")
|
|
|
- }}</span>
|
|
|
+ $t("device.commonOperations")
|
|
|
+ }}</span>
|
|
|
<div class="box2 flex-col"></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -282,9 +280,9 @@
|
|
|
</div>
|
|
|
<div class="bd6 l-flex-center o-ptb-7" @click="item.checkType = !item.checkType">
|
|
|
<div class="l-flex-RC">
|
|
|
- <span class="info2 o-mr-2">{{
|
|
|
+ <span class="info2 o-mr-5">{{
|
|
|
item.checkType ? $t("device.stow") : $t("device.seeMore")
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
<div class="group2 flex-col" :class="{ checkType: item.checkType }"></div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -299,7 +297,6 @@
|
|
|
<!-- 搜索弹出框 -->
|
|
|
<deviceSearch ref="searchRef" @search="search($event)"></deviceSearch>
|
|
|
<div style="height: 50px;"></div>
|
|
|
- <!-- <nav-bar></nav-bar> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -310,7 +307,6 @@ import {
|
|
|
} from "../../service/home";
|
|
|
import { onMounted, reactive, toRefs, ref, onActivated } from "vue";
|
|
|
import { showFailToast, showSuccessToast, showToast, showConfirmDialog } from "vant";
|
|
|
-// import navBar from "../../components/NavBar";
|
|
|
import sHeader from "../../components/SimpleHeader";
|
|
|
import { getLoginUser, Format_calcuDecial, styleUrl } from "../../common/js/utils";
|
|
|
import {
|
|
@@ -355,7 +351,7 @@ export default {
|
|
|
onActivated(() => {
|
|
|
// 当组件被激活时,可能是从 keep-alive 缓存中激活的
|
|
|
// 这时重新添加滚动事件监听器
|
|
|
- console.log("进入时的位置", verticalScrollPosition.value);
|
|
|
+ // console.log("进入时的位置", verticalScrollPosition.value);
|
|
|
document.documentElement.scrollTop = verticalScrollPosition.value;
|
|
|
document.body.scrollTop = verticalScrollPosition.value;
|
|
|
window.scrollY = verticalScrollPosition.value;
|
|
@@ -365,7 +361,7 @@ export default {
|
|
|
|
|
|
onBeforeRouteLeave(() => {
|
|
|
verticalScrollPosition.value = document.documentElement.scrollTop || document.body.scrollTop || window.scrollY;
|
|
|
- console.log("离开时的位置", verticalScrollPosition.value);
|
|
|
+ // console.log("离开时的位置", verticalScrollPosition.value);
|
|
|
})
|
|
|
|
|
|
// 在组件卸载前清除定时器
|
|
@@ -498,7 +494,7 @@ export default {
|
|
|
oprRef.value.showOper(e);
|
|
|
};
|
|
|
// 消除报警
|
|
|
- const clearAlarm = async (e, e1) => {
|
|
|
+ const clearAlarm = async (e, e1, e2) => {
|
|
|
const params = {
|
|
|
id: e.id,
|
|
|
name: e.name,
|
|
@@ -516,8 +512,11 @@ export default {
|
|
|
if (data.code) {
|
|
|
showSuccessToast(t("device.successfullyEliminatedTheAlarm"));
|
|
|
setTimeout(() => {
|
|
|
- e.alarmContent = "";
|
|
|
- e1.hasTodayAlarm = false;
|
|
|
+ e2 = e2.filter((item) => item.id !== e.id);
|
|
|
+ list.value[list.value.findIndex((item) => item.id === e1.id)].alarmList = e2;
|
|
|
+ if (e2.length === 0) {
|
|
|
+ e1.hasTodayAlarm = false;
|
|
|
+ }
|
|
|
}, 1000);
|
|
|
} else {
|
|
|
showFailToast(data.message);
|
|
@@ -533,7 +532,7 @@ export default {
|
|
|
|
|
|
// 点击查看定位
|
|
|
const viewPosiClk = (row) => {
|
|
|
- console.log("row 是 >>>", row);
|
|
|
+ // console.log("row 是 >>>", row);
|
|
|
if (row.latitude) {
|
|
|
router.push({
|
|
|
path: "viewPosition",
|
|
@@ -613,7 +612,6 @@ export default {
|
|
|
}
|
|
|
// 点击睡眠描述的确定按钮
|
|
|
const sleepDescChg = async (sleepDesc, id) => {
|
|
|
- console.log(sleepDesc);
|
|
|
if (!sleepDesc) {
|
|
|
showToast(t("device.sleepDescPlace"));
|
|
|
} else {
|
|
@@ -634,7 +632,7 @@ export default {
|
|
|
// 点击标签
|
|
|
const active = ref("");
|
|
|
const clickLabel = (item) => {
|
|
|
- console.log(item);
|
|
|
+ // console.log(item);
|
|
|
list.value = [];
|
|
|
searchParams.current = 1;
|
|
|
searchParams.labelId = item.name;
|
|
@@ -708,8 +706,8 @@ export default {
|
|
|
};
|
|
|
// 开启/关闭炉头
|
|
|
const openCloseHead = (id, status) => {
|
|
|
- console.log("id", id);
|
|
|
- console.log("status", status);
|
|
|
+ // console.log("id", id);
|
|
|
+ // console.log("status", status);
|
|
|
showConfirmDialog({
|
|
|
title: t('user.tips'),
|
|
|
message: (status == 1 ? t("device.openFurnaceHeadTips") : t("device.closeFurnaceHeadTips")),
|