添加详情信息

This commit is contained in:
18796357645 2025-07-15 17:34:49 +08:00
parent 999489671d
commit 056af4fbb0
2 changed files with 787 additions and 762 deletions

View File

@ -22,7 +22,8 @@
</view>
<view class="select_device_item" :class="{ device_active: getType == 'img' }"
@click="getVideoImg('img')">
获取图片</view>
获取图片
</view>
</view>
</view>
@ -35,11 +36,14 @@
<view class="select_device_warp">
<view class="modal_warp">
<view class="select_device_item device_model" :class="{ device_active: deviceType == 1 }"
@click="deviceType = 1">设备状态</view>
@click="deviceType = 1">设备状态
</view>
<view class="select_device_item device_model" :class="{ device_active: deviceType == 2 }"
@click="deviceType = 2">设备日志</view>
@click="deviceType = 2">设备日志
</view>
<view class="select_device_item device_model" :class="{ device_active: deviceType == 3 }"
@click="deviceType = 3">设备控制</view>
@click="deviceType = 3">设备控制
</view>
</view>
</view>
@ -106,6 +110,25 @@
</view>
</view>
</view>
<view class="device_status_item" v-for="(field, idx) in statusTwoFields" :key="idx">
<view class="statusItem_modal_warp">
<view class="item_content_warp">
<view class="item_content_left">{{ field.label }}</view>
<view class="item_content_middel">
{{ printInfo[field.key] }}
</view>
</view>
<view class="itemContent_line_warp">
<view class="item_content_model">
<view class="item_content_line"></view>
</view>
</view>
</view>
</view>
</view>
<!-- 设备控制 -->
<view class="device_control_warp" v-if="deviceType == 3">
@ -143,7 +166,7 @@
: '#cccccc',
}">
<image class="operation_btn_icon"
src="https://online.totustec.com/upload/print_status1.png"></image>
src="https://online.totustec.com/upload/deviceManage/print_status1.png"></image>
<view class="operation_btn_txt">继续打印</view>
</view>
</view>
@ -168,7 +191,7 @@
: '#cccccc',
}">
<image class="operation_btn_icon"
src="https://online.totustec.com/upload/print_status1.png"></image>
src="https://online.totustec.com/upload/deviceManage/print_status1.png"></image>
<view class="operation_btn_txt">退出打印</view>
</view>
</view>
@ -194,8 +217,9 @@
</template>
<script>
import {
BASE_STOKECT_URL
BASE_STOKECT_URL, BASE_IMG_URL
} from "@/config.js";
export default {
data() {
return {
@ -206,6 +230,7 @@
deviceType: 3,
deviceCode: "", //
deviceDetail: {}, //
printInfo: {},//
statusMap: {
0: {
text: "正常",
@ -240,8 +265,8 @@
color: "#ff0000"
},
},
//
statusFields: [{
statusFields: [
{
label: '设备名称',
key: 'brand'
},
@ -255,6 +280,19 @@
key: 'errorStatus',
isErrorStatus: true
},
{
label: '错误码',
key: 'errorStatus',
isErrorCode: true
},
{
label: '当前时间',
key: 'currentTime',
isCurrentTime: true
}
],
statusTwoFields: [
{
label: '当前打印层数',
key: 'currentLayer'
@ -265,36 +303,25 @@
},
{
label: '已打印时间(s)',
key: 'printedTime'
key: 'currentTicks'
},
{
label: '总打印时间(s)',
key: 'totalTime'
key: 'totalTicks'
},
{
label: '打印文件名称',
key: 'fileName'
},
{
label: '错误码',
key: 'errorStatus',
isErrorCode: true
key: 'filename'
},
{
label: '当前任务数量',
key: 'Task'
key: 'task'
},
{
label: '总共任务数量',
key: 'totalTask'
key: 'total'
},
{
label: '当前时间',
key: 'currentTime',
isCurrentTime: true
}
],
// WebSocket
socketTask: null, // uni-app WebSocket
isSocketConnected: false, //
@ -392,7 +419,7 @@
this.socketData = message.data;
if (this.socketData.imageUrl) {
this.socketData.imageUrl =
"http://online.totustec.com" + message.data.imageUrl;
BASE_IMG_URL + message.data.imageUrl;
}
}
// WRITEIMG
@ -541,7 +568,9 @@
if (res.statusCode === 200) {
this.deviceDetail = res.data;
this.printInfo = res.data.printInfo;
console.log("设备详情:", this.deviceDetail);
}
} catch (error) {
console.error("获取设备详情失败:", error);
@ -789,7 +818,7 @@
.img_video_warp {
width: 100%;
height: 281rpx;
height: 321;
background: rgba(0, 0, 0, 0.3);
border-radius: 20rpx;
margin: 22rpx 0 32rpx 0;

View File

@ -51,13 +51,9 @@
<image class="area2_item_right" src="https://online.totustec.com/upload/minePage/mine_area_right.png"></image>
</view> -->
<view class="function_area2_item" open-type="share" style="
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
">
<view class="function_area2_item" style="border-bottom-left-radius: 20rpx; border-bottom-right-radius: 20rpx;">
<view class="area2_item_left">
<image class="area2_item_icon1" src="https://online.totustec.com/upload/minePage/area2_item_icon2.png">
</image>
<image class="area2_item_icon1" src="https://online.totustec.com/upload/minePage/area2_item_icon2.png"></image>
<view class="area2_item_txt">分享小程序</view>
</view>
<button open-type="share" class="area2_item_right_btn">