This commit is contained in:
JayJiaJun 2025-03-27 14:26:47 +08:00
parent d0fbb67812
commit feb5a9c1f5
2 changed files with 48 additions and 97 deletions

View File

@ -5,9 +5,9 @@
"author": "kerwincui",
"license": "AGPL3.0",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build:prod": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"build:stage": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"genrate:lang": "node build/lang.js"

View File

@ -72,15 +72,17 @@
</div>
</div>
<div v-if="item.datatype.type == 'integer'">
<el-input v-model="item.shadow"
:placeholder="item.datatype.unit ? $t('device.running-status.866086-5', [item.datatype.unit]) : $t('device.running-status.866086-4')"
:disabled="shadowUnEnable || item.isReadonly == 1">
<el-button slot="append" icon="el-icon-s-promotion" @click="mqttPublish(deviceInfo, item)"
style="font-size: 20px" :title="$t('device.running-status.866086-6')"
v-if="!shadowUnEnable && item.isReadonly == 0">
</el-button>
</el-input>
<div style="width: 80%; float: left">
<el-slider v-model="item.shadow" :min="item.datatype.min" :max="item.datatype.max"
:step="item.datatype.step" :format-tooltip="(x) => x + ' ' + item.datatype.unit"
:disabled="shadowUnEnable || item.isReadonly == 1"></el-slider>
</div>
<div style="width: 20%; float: left">
<el-button icon="el-icon-s-promotion" type="info" @click="mqttPublish(deviceInfo, item)"
style="font-size: 16px; padding: 1px 8px; margin: 4px 0 0 10px; border-radius: 3px"
:title="$t('device.running-status.866086-6')"
v-if="!shadowUnEnable && item.isReadonly == 0"></el-button>
</div>
</div>
<div v-if="item.datatype.type == 'object'">
<el-descriptions :column="1" size="mini" border>
@ -356,12 +358,15 @@
</div>
</el-descriptions-item>
</el-descriptions>
<!-- 监测图表 -->
<el-form ref="elForm" :model="elForm" label-width="120px">
</el-col>
<!-- 检测图表部分 -->
<el-col :xs="24" :sm="24" :md="24" :lg="10" :xl="14">
<!-- 设备监测图表-->
<template v-if="deviceInfo.productName === '机械压力表' && deviceInfo.chartList && deviceInfo.chartList.length >= 2">
<!-- 机械压力表的监测图表 -->
<el-row style="background-color: #f5f7fa; padding: 20px 10px; border-radius: 15px;">
<div>
<el-form>
<!-- 第一项 -->
<el-col :xs="24" :sm="24" :md="24" :lg="14" :xl="10">
<div>
@ -387,24 +392,18 @@
<img src="../../../assets/press/电池.svg" style="width: 20px; height: 20px; margin-right: 5px;">
<span style="font-size: 24px;">{{ deviceInfo.chartList[1].name }}</span>
</template>
<!-- 设置输入框的宽度 -->
<el-input v-model="deviceInfo.chartList[1].value" readonly style="width: 150px;">
<template slot="suffix">MV</template>
</el-input>
</el-form-item>
</div>
</el-col>
</el-form>
</div>
</el-row>
</el-form>
</el-col>
<!-- <el-col :xs="24" :sm="24" :md="24" :lg="10" :xl="14">
</template>
<template v-else>
<!-- 原来的图表 -->
<el-row :gutter="20"
style="background-color: #f5f7fa; padding: 20px 10px 20px 10px; border-radius: 15px; margin-right: 5px"
v-if="deviceInfo.chartList.length > 0">
@ -415,56 +414,8 @@
</el-card>
</el-col>
</el-row>
</el-col> -->
<!-- 监测图表 -->
<!-- <el-col :xs="24" :sm="24" :md="24" :lg="10" :xl="14">
<el-form ref="elForm" :model="elForm" label-width="120px">
<el-row :gutter="20" style="background-color: #f5f7fa; padding: 20px 10px; border-radius: 15px;">
<div>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
<div
style="display: flex; font-size: 30px; flex-direction: column; margin-top: 15px; text-align: left; margin-right: 20px;">
<el-form-item style="flex: 1;">
<template slot="label">
<img src="../../../assets/press/压力.svg" style="width: 20px; height: 20px; margin-right: 5px;">
<span style="font-size: 24px;">{{ deviceInfo.chartList[0].name }}</span>
</template>
<el-input v-model="deviceInfo.chartList[0].value" readonly style="width: 150px;">
<template slot="suffix">MP</template>
</el-input>
</el-form-item>
</div>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
<div
style="display: flex; font-size: 30px; flex-direction: column; margin-top: 15px; text-align: left; margin-right: 20px;">
<el-form-item style="flex: 1;">
<template slot="label">
<img src="../../../assets/press/电池.svg" style="width: 20px; height: 20px; margin-right: 5px;">
<span style="font-size: 24px;">{{ deviceInfo.chartList[1].name }}</span>
</template>
<el-input v-model="deviceInfo.chartList[1].value" readonly style="width: 150px;">
<template slot="suffix">MV</template>
</el-input>
</el-form-item>
</div>
</el-col>
</div>
</el-row>
</el-form>
</el-col> -->
</el-row>
<!-- 添加或修改产品固件对话框 -->
@ -751,7 +702,7 @@ export default {
remoteCommand: command,
identifier: model.id,
modelName: model.name,
isShadow: device.status = true,
isShadow: device.status != 3,
type: model.type,
};
serviceInvoke(data).then((response) => {