开发
This commit is contained in:
parent
d25b3ab954
commit
8904046329
14
pages.json
14
pages.json
@ -8,6 +8,13 @@
|
||||
"enableShareAppMessage": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/deviceManage/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设备管理",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/index",
|
||||
"style": {
|
||||
@ -44,13 +51,6 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/deviceManage/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设备管理",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/privacy/index",
|
||||
"style": {
|
||||
|
@ -32,26 +32,11 @@
|
||||
</view>
|
||||
|
||||
<!-- 媒体内容 -->
|
||||
<video
|
||||
class="img_video_warp"
|
||||
:src="socketData.videoUrl"
|
||||
v-if="socketData.videoUrl"
|
||||
@loadedmetadata="handleMediaLoaded"
|
||||
@error="handleMediaError"
|
||||
></video>
|
||||
<image
|
||||
class="img_video_warp"
|
||||
:src="socketData.imageUrl"
|
||||
v-else-if="socketData.imageUrl"
|
||||
@load="handleMediaLoaded"
|
||||
@error="handleMediaError"
|
||||
></image>
|
||||
<image
|
||||
class="img_video_warp"
|
||||
:src="TOPBG"
|
||||
v-else
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<video class="img_video_warp" :src="socketData.videoUrl" v-if="socketData.videoUrl"
|
||||
@loadedmetadata="handleMediaLoaded" @error="handleMediaError"></video>
|
||||
<image class="img_video_warp" :src="socketData.imageUrl" v-else-if="socketData.imageUrl"
|
||||
@load="handleMediaLoaded" @error="handleMediaError"></image>
|
||||
<image class="img_video_warp" :src="TOPBG" v-else mode="aspectFill" />
|
||||
</view>
|
||||
|
||||
<!-- 设备状态选择 -->
|
||||
@ -60,9 +45,9 @@
|
||||
<view class="select_device_item device_model" :class="{ device_active: deviceType == 1 }"
|
||||
@click="deviceType = 1">设备状态
|
||||
</view>
|
||||
<view class="select_device_item device_model" :class="{ device_active: deviceType == 2 }"
|
||||
<!-- <view class="select_device_item device_model" :class="{ device_active: deviceType == 2 }"
|
||||
@click="deviceType = 2">设备日志
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="select_device_item device_model" :class="{ device_active: deviceType == 3 }"
|
||||
@click="deviceType = 3">设备控制
|
||||
</view>
|
||||
@ -188,7 +173,7 @@
|
||||
<!--继续打印-->
|
||||
<view class="device_operation_btn" @click="operationData('CONTINUE')"
|
||||
:style="{ backgroundColor: deviceDetail.status === 0 || printInfo.status !== 6 ? '#cccccc' : '#ffffff' }">
|
||||
<image class="operation_btn_icon" src="https://online.totustec.com/upload/deviceManage/print_status1.png">
|
||||
<image class="operation_btn_icon" src="https://online.totustec.com/upload/deviceManage/print_status3.png">
|
||||
</image>
|
||||
<view class="operation_btn_txt"
|
||||
:style="{ color: deviceDetail.status === 0 || printInfo.status !== 6 ? '#ece8e8' : '#333333' }">继续打印
|
||||
@ -202,7 +187,7 @@
|
||||
? '#ffffff'
|
||||
: '#cccccc',
|
||||
}">
|
||||
<image class="operation_btn_icon" src="https://online.totustec.com/upload/deviceManage/print_status1.png">
|
||||
<image class="operation_btn_icon" src="https://online.totustec.com/upload/deviceManage/print_status4.png">
|
||||
</image>
|
||||
<view class="operation_btn_txt" :style="{
|
||||
color:
|
||||
@ -215,7 +200,7 @@
|
||||
backgroundColor:
|
||||
deviceDetail.status != 0 && deviceDetail.status != -1 ? '#ffffff' : '#cccccc',
|
||||
}">
|
||||
<image class="operation_btn_icon" src="https://online.totustec.com/upload/deviceManage/print_status1.png">
|
||||
<image class="operation_btn_icon" src="https://online.totustec.com/upload/deviceManage/print_status5.png">
|
||||
</image>
|
||||
<view class="operation_btn_txt" :style="{
|
||||
color: deviceDetail.status != 0 && deviceDetail.status != -1 ? '#333333' : '#ece8e8',
|
||||
@ -231,7 +216,7 @@
|
||||
<view class="operation_btn_txt">报警继续</view>
|
||||
</view>
|
||||
<view class="device_operation_btn" @click="sendWsCommand('ALARM_EXIT')">
|
||||
<image class="operation_btn_icon" src="https://online.totustec.com/upload/deviceManage/print_status2.png">
|
||||
<image class="operation_btn_icon" src="https://online.totustec.com/upload/deviceManage/print_status6.png">
|
||||
</image>
|
||||
<view class="operation_btn_txt">报警退出</view>
|
||||
</view>
|
||||
@ -1102,7 +1087,8 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
.device_model {
|
||||
width: 33%;
|
||||
/* width: 33%; */
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.img_video_warp {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<view class="middle_area_warp">
|
||||
<!-- 设备状态 -->
|
||||
<view class="device_area_warp">
|
||||
<!-- <view class="device_area_warp">
|
||||
<view class="device_top">
|
||||
<view class="device_top_left">
|
||||
<image class="top_left_img1" src="https://online.totustec.com/upload/indexPage/top_left_img1.png"></image>
|
||||
@ -66,53 +66,7 @@
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 以下是演示数据,对接数据时删除 -->
|
||||
<!-- <view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="width: 301rpx">调试二号机</view>
|
||||
<view class="data_item_line" style="width: 200rpx">
|
||||
<view class="label_warp">
|
||||
<view class="label_icon" style="background: #00abff"></view>
|
||||
<view class="label_text" style="color: #00abff">准备中</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data_dline_warp">
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="width: 301rpx">调试三号机</view>
|
||||
<view class="data_item_line" style="width: 200rpx">
|
||||
<view class="label_warp">
|
||||
<view class="label_icon" style="background: #00d195"></view>
|
||||
<view class="label_text" style="color: #00d195">打印中</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data_dline_warp">
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="width: 301rpx">调试四号机</view>
|
||||
<view class="data_item_line" style="width: 200rpx">
|
||||
<view class="label_warp">
|
||||
<view class="label_icon" style="background: #fdcb3b"></view>
|
||||
<view class="label_text" style="color: #fdcb3b">铲件中</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 暂无数据 -->
|
||||
<view class="table_nodata_area" v-else>
|
||||
<image class="table_nodata_img" src="https://online.totustec.com/upload/indexPage/table_nodata_img1.png">
|
||||
</image>
|
||||
@ -120,10 +74,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 设备预警 -->
|
||||
<view class="device_area_warp" style="margin-top: 56rpx">
|
||||
<!-- <view class="device_area_warp" style="margin-top: 56rpx">
|
||||
<view class="device_top">
|
||||
<view class="device_top_left">
|
||||
<image class="top_left_img1" src="https://online.totustec.com/upload/indexPage/top_left_img2.png"></image>
|
||||
@ -142,14 +96,8 @@
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">{{ item.deviceCode }}</view>
|
||||
<view class="data_item_line" style="flex: 1">
|
||||
<!-- <view class="label_warp2">
|
||||
<view class="label_icon" style="background: #00d195"></view>
|
||||
<view class="label_text label_text2" style="color: #00d195">空闲</view>
|
||||
</view> -->
|
||||
<view class="label_warp2">
|
||||
<!-- 状态图标颜色映射 -->
|
||||
<view class="label_icon" :style="{ background: getStatusColor(item.errorStatus) }"></view>
|
||||
<!-- 状态文字条件渲染 -->
|
||||
<view class="label_text label_text2" :style="{ color: getStatusColor(item.errorStatus) }">
|
||||
{{ getStatusText(item.errorStatus) }}
|
||||
</view>
|
||||
@ -161,108 +109,6 @@
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 以下是演示数据,对接数据时删除 -->
|
||||
<!-- <view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="flex: 1">
|
||||
<view class="label_warp2">
|
||||
<view class="label_icon" style="background: #ff0000"></view>
|
||||
<view class="label_text label_text2">文件校验失败</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data_dline_warp">
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="flex: 1">
|
||||
<view class="label_warp2">
|
||||
<view class="label_icon" style="background: #ff0000"></view>
|
||||
<view class="label_text label_text2">设备出错</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data_dline_warp">
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="flex: 1">
|
||||
<view class="label_warp2">
|
||||
<view class="label_icon" style="background: #ff0000"></view>
|
||||
<view class="label_text label_text2">准备过程出错</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data_dline_warp">
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="flex: 1">
|
||||
<view class="label_warp2">
|
||||
<view class="label_icon" style="background: #ff0000"></view>
|
||||
<view class="label_text label_text2">打印出错</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data_dline_warp">
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="flex: 1">
|
||||
<view class="label_warp2">
|
||||
<view class="label_icon" style="background: #ff0000"></view>
|
||||
<view class="label_text label_text2">加液失败</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data_dline_warp">
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="flex: 1">
|
||||
<view class="label_warp2">
|
||||
<view class="label_icon" style="background: #ff0000"></view>
|
||||
<view class="label_text label_text2">铲件失败</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="data_dline_warp">
|
||||
<view class="data_dline_css"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_data_item">
|
||||
<view class="data_display_warp">
|
||||
<view class="data_item_line" style="padding-left: 27rpx">16628096</view>
|
||||
<view class="data_item_line" style="flex: 1">
|
||||
<view class="label_warp2">
|
||||
<view class="label_icon" style="background: #ff0000"></view>
|
||||
<view class="label_text label_text2">图片异物</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="table_nodata_area" v-else>
|
||||
<image class="table_nodata_img" src="https://online.totustec.com/upload/indexPage/table_nodata_img2.png">
|
||||
@ -271,9 +117,25 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
<!-- 轮播图 -->
|
||||
<view class="carousel_image_warp">
|
||||
<!-- 轮播图组件 -->
|
||||
<swiper class="carousel_swiper" indicator-dots indicator-active-color="#0095de" autoplay interval="3000"
|
||||
duration="500" circular>
|
||||
|
||||
<swiper-item class="carousel_item" v-for="(item, index) in carouselimageList" :key="index">
|
||||
<image class="carousel_img" :src="'https://online.totustec.com/upload' + item" mode="widthFix"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<view style="height: 100rpx"></view>
|
||||
<view class="use_wizard_warp">
|
||||
<image class="use_wizard_img" src="https://online.totustec.com/upload/indexPage/use_wizard_img.png"></image>
|
||||
</view>
|
||||
<!-- <view style="height: 100rpx"></view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -303,6 +165,7 @@ export default {
|
||||
6: { text: '铲件失败', color: '#ff9800' },
|
||||
7: { text: '图片异物', color: '#ff0000' }
|
||||
},
|
||||
carouselimageList: [],
|
||||
|
||||
// WebSocket 相关状态
|
||||
socketTask: null, // uni-app 的 WebSocket 任务实例
|
||||
@ -325,6 +188,7 @@ export default {
|
||||
} = systemInfo;
|
||||
this.statusBarHeight = statusBarHeight;
|
||||
this.connectWebSocket(); // 初始化 WebSocket 连接
|
||||
this.getCarouselimageList();
|
||||
},
|
||||
onShow () {
|
||||
this.getDeviceList(); // 每次显示页面时调用
|
||||
@ -429,11 +293,71 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
async getCarouselimageList () {
|
||||
try {
|
||||
// 从本地缓存获取用户信息
|
||||
const userInfo = uni.getStorageSync("userInfo") || {};
|
||||
const res = await uni.request({
|
||||
url: BASE_API_URL + "/api/front/carousel",
|
||||
method: "GET",
|
||||
data: this.searchList,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded", // 关键配置
|
||||
"Authorization": userInfo.token || ""
|
||||
},
|
||||
});
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
this.carouselimageList = res.data
|
||||
console.log('1111', this.carouselimageList);
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('请求接口失败', error);
|
||||
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<!-- 临时样式 -->
|
||||
<style scoped>
|
||||
.use_wizard_img {
|
||||
width: 100%;
|
||||
height: 172rpx;
|
||||
}
|
||||
|
||||
.use_wizard_warp {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.carousel_swiper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.carousel_item {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.carousel_img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
/* 图片自适应填充,保持比例不拉伸 */
|
||||
border-radius: 16rpx;
|
||||
/* 轻微圆角,提升美观度 */
|
||||
}
|
||||
|
||||
.carousel_image_warp {
|
||||
width: 100%;
|
||||
height: 820rpx;
|
||||
}
|
||||
|
||||
.label_icon {
|
||||
width: 18rpx;
|
||||
height: 18rpx;
|
||||
@ -633,7 +557,7 @@ export default {
|
||||
.middle_area_warp {
|
||||
width: 100%;
|
||||
background: #f1f6fc;
|
||||
border-radius: 30rpx 30rpx 0rpx 0rpx;
|
||||
/* border-radius: 30rpx 30rpx 0rpx 0rpx; */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: -28rpx;
|
||||
|
Loading…
Reference in New Issue
Block a user