| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240 |
- <template>
- <view class="device-data-container">
- <!-- 顶部时间戳和图标区域 -->
- <view class="device-data-wraper">
- <view class="top-bar">
- <view class="timestamp">
- {{formatDate(deviceInfo.uptime)}}
- <u-icon name="reload" color="#0BBC58" style="margin-left: 12rpx" @click="refreshData"></u-icon>
- </view>
- <view class="icon-group">
- <!-- <view class="icon-item refresh-icon">
- <img class="copy-icon" :src="sim"/>
- </view>
- <view class="icon-item settings-icon" @click="openSettings">
- <img class="copy-icon" :src="setting"/>
- </view> -->
- <!-- <view class="icon-item info-icon">
- <img class="copy-icon" :src="edit"/>
- </view> -->
- </view>
- </view>
- <!-- 主要数据面板 -->
- <view class="main-data-panel">
- <view class="data-column-left">
- <view class="data-item">
- <text class="data-value">{{ deviceStatic.vol }}</text>
- <text class="data-label">电量</text>
- </view>
- <view class="data-item">
- <text class="data-value">{{ deviceStatic.gs == 1? '落虫' : '排水' }}</text>
- <text class="data-label">通道状态</text>
- </view>
- <view class="data-item">
- <text class="data-value">{{ deviceStatic.upds == 1? '打开' : '关闭' }}</text>
- <text class="data-label">上仓门</text>
- </view>
- <view class="data-item">
- <text class="data-value">{{ deviceStatic.dver }}</text>
- <text class="data-label">设备版本</text>
- </view>
- </view>
- <view class="data-column-left">
- <view class="data-item">
- <text class="data-value">{{ deviceStatic.tmod == '1' ? '时控' : '光控' }}</text>
- <text class="data-label">定时模式</text>
- </view>
- <view class="data-item">
- <text class="data-value">{{ deviceStatic.hs == '1' ? '加热' : '正常' }}</text>
- <text class="data-label">加热状态</text>
- </view>
- <view class="data-item">
- <text class="data-value">{{ deviceStatic.dpds == '1' ? '打开' : '关闭' }}</text>
- <text class="data-label">下仓门</text>
- </view>
- <view class="data-item">
- <text class="data-value">{{ deviceStatic.tph || '' }}℃</text>
- <text class="data-label">高温限值</text>
- </view>
- </view>
- <view class="data-column-right">
- <view class="device-image-container">
- <image class="device-image" :src="formatDevImg" mode="aspectFit"></image>
- </view>
- </view>
- </view>
- </view>
- <!-- 图表区域 -->
- <view class="chart-section">
- <view class="chart-header">
- <view class="chart-tabs">
- <view
- v-for="(tab, index) in chartTabs"
- :key="index"
- class="chart-tab-item"
- :class="{ active: activeChartTab === index }"
- @click="switchChartTab(index)"
- >
- {{ tab.name }}
- </view>
- </view>
- <!-- <view class="chart-dropdown">
- <text class="iconfont dropdown-icon"></text>
- </view> -->
- </view>
- <view class="chart-content">
- <view class="chart-canvas-container" v-if="!show" :key="chartKey">
- <!-- <div id="tempChart" class="chart-canvas"></div> -->
- <qiun-data-charts type="line" :chartData="chartData" :canvas2d="true" :inScrollView="true" :opts="opts" :ontouch="true" v-show="xData.length"/>
- </view>
- </view>
- </view>
- <!-- 历史数据表格 -->
- <view class="history-section">
- <view class="history-header">
- <text class="history-title">历史数据</text>
- </view>
- <view class="history-table">
- <view class="table-container">
- <!-- 固定列 -->
- <view class="fixed-column">
- <view class="fixed-header">
- <text class="header-cell fixed">上报时间</text>
- </view>
- <view class="fixed-body">
- <view
- v-for="(item, index) in historyData"
- :key="index"
- class="fixed-row"
- :class="{ even: index % 2 === 0 }"
- >
- <text class="body-cell fixed">{{ formatTime(item.addtime) }}</text>
- </view>
- </view>
- </view>
- <!-- 可滑动列 -->
- <view class="scrollable-column">
- <view class="scrollable-header">
- <text class="header-cell">环境温度(°C)</text>
- <text class="header-cell">环境湿度(%)</text>
- <text class="header-cell">加热仓温度(°C)</text>
- <text class="header-cell">雨控状态</text>
- <text class="header-cell">温控状态</text>
- <text class="header-cell">光控状态</text>
- <text class="header-cell">灯管状态</text>
- <text class="header-cell">信号强度</text>
- <text class="header-cell">电流(mA)</text>
- <text class="header-cell">电压(V)</text>
- <text class="header-cell">经度</text>
- <text class="header-cell">纬度</text>
- </view>
- <view class="scrollable-body">
- <view
- v-for="(item, index) in historyData"
- :key="index"
- class="scrollable-row"
- :class="{ even: index % 2 === 0 }"
- >
- <text class="body-cell">{{ item.at }}</text>
- <text class="body-cell">{{ item.ah }}</text>
- <text class="body-cell">{{ item.hrt }}</text>
- <text class="body-cell">{{ getRpsDict(item) }}</text>
- <text class="body-cell">{{ getTpsDict(item) }}</text>
- <text class="body-cell">{{ getLpsDict(item) }}</text>
- <text class="body-cell">{{ getStateDict(item) }}</text>
- <text class="body-cell">{{ item.csq }}</text>
- <text class="body-cell">{{ item.current }}</text>
- <text class="body-cell">{{ item.vbat }}</text>
- <text class="body-cell">{{ item.lng }}</text>
- <text class="body-cell">{{ item.lat }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="pagination">
- <text class="pagination-btn prev-btn" @click="prevPage">上一页</text>
- <text class="pagination-info">{{currentPage}}/{{totalPages}}</text>
- <text class="pagination-btn next-btn" @click="nextPage">下一页</text>
- </view>
- </view>
- <u-popup v-model="show" mode="bottom" border-radius="20">
- <view style="height:70vh">
- <view class="tabs-container">
- <view class="tabs-item" @click="switchTab(0)" :class="{ active: activeTab === 0 }" v-if="data_iccid">数据SIM卡流量</view>
- <view class="tabs-item" @click="switchTab(1)" :class="{ active: activeTab === 1 }">图片SIM卡流量</view>
- </view>
- <view class="sim-container" v-if="activeTab === 0">
- <view class="sim-item">
- <text class="sim-label">ICCID:</text>
- <text class="sim-value">{{ deviceInfoStatic.iccid }}</text>
- </view>
- <view class="sim-item">
- <text class="sim-label">总流量:</text>
- <text class="sim-value">{{ deviceInfoStatic.total }}</text>
- </view>
- <view class="sim-item">
- <text class="sim-label">状态:</text>
- <text class="sim-value">{{ deviceInfoStatic.status }}</text>
- </view>
- <view class="sim-item">
- <text class="sim-label">到期时间:</text>
- <text class="sim-value">{{ deviceInfoStatic.expire }}</text>
- </view>
- <view class="sim-item">
- <text class="sim-label">厂商名称:</text>
- <text class="sim-value">{{ deviceInfoStatic.company }}</text>
- </view>
- <view class="sim-item">
- <text class="sim-label">已使用:</text>
- <text class="sim-value"><text style="color: #0BBC58">{{ deviceInfoStatic.used || ''}}</text>/{{ deviceInfoStatic.total || '' }}</text>
- </view>
- <view class="sim-item">
- <text class="sim-value">
- <u-line-progress active-color="#0BBC58" :percent="deviceInfoStatic.used / deviceInfoStatic.total * 100" :show-percent="false"></u-line-progress>
- </text>
- </view>
- </view>
- <view class="sim-container" v-if="activeTab === 1">
- <view class="sim-item" style="display:flex;align-items: center;height:80rpx;">
- <text class="sim-label">ICCID:</text>
- <text v-if="show1" style="margin-right: 10rpx">{{ photo_iccid }}</text>
- <text class="sim-value" style="color: #0BBC58;" @click="changeSim" v-if="show1">
- 更换SIM卡
- </text>
- <view v-else class="sim-value-change">
- <u-input v-model="data_iccidInput" placeholder="请输入ICCID" class="sim-value"></u-input>
- <view class="sim-value-button" size="small" @click="changeSimHandler">确认</view>
- <view class="sim-value-button" size="small" @click="show1 = true">取消</view>
- </view>
- </view>
- </view>
- </view>
- </u-popup>
- <floatButton>
- <view slot="icon">
- <view class="general-border">
- <image :src="general" class="general-icon"></image>
- </view>
- </view>
- <view slot="expanded">
- <view class="general-images">
- <view class="general-image edit-border" :class="{'edit-border2':isShowPhoto}" @click="editData">
- <image :src="editBorder" class="image-icon"></image>
- </view>
- <view class="general-image sim-border" :class="{'sim-border2':isShowPhoto}" @click="simData">
- <image :src="simBorder" class="image-icon"></image>
- </view>
- <view class="general-image setting-border" :class="{'setting-border2':isShowPhoto}" @click="openSettings">
- <image :src="settingBorder" class="image-icon"></image>
- </view>
- <view class="general-image photo-border" @click="openPhoto" v-if="isShowPhoto">
- <image :src="photoBorder" class="image-icon"></image>
- </view>
- </view>
- </view>
- </floatButton>
- </view>
- </template>
- <script>
- import setting from '../assets/setting.png';
- import edit from '../assets/edit.png';
- import sim from '../assets/sim.png';
- import Circulation from '../../../static/js/equipState_dict.json';
- import floatButton from './floating-button.vue';
- import general from '../assets/general.png';
- import editBorder from '../assets/editBorder.png';
- import settingBorder from '../assets/settingBorder.png';
- import simBorder from '../assets/simBorder.png';
- import photoBorder from '../assets/photoBorder.png';
- let chartInstance = null;
- export default {
- name: 'DeviceData',
- props:{
- deviceInfo:{
- type:Object,
- default:()=>({}),
- },
- deviceStatic:{
- type:Object,
- default:()=>({}),
- },
- polylineList:{
- type:Array,
- default:()=>[],
- },
- deviceHistoryList:{
- type:Array,
- default:()=>[],
- },
- totalPage:{
- type:Number,
- default:0
- },
- currentPage:{
- type:Number,
- default:0
- },
- page_size:{
- type:Number,
- default:10
- },
- },
- components: {
- floatButton,
- },
- computed:{
- totalPages(){
- return Math.ceil(this.totalPage / this.page_size)
- }
- },
- data() {
- return {
- setting,
- general,
- editBorder,
- settingBorder,
- photoBorder,
- simBorder,
- devImage:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/cbd.png',
- baseDevice:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image',
- devImg:'',
- activeTab: 0,
- edit,
- sim,
- show:false,
- isShowPhoto:false,
- show1:true,
- equipStateDict:{},
- chartTabs: [
- { name: '温度', id: 'new_tem' },
- { name: '湿度', id: 'new_hum' },
- { name: '加热仓温度', id: 'others' },
- ],
- opts: {
- type: 'line',
- xAxis: {
- disableGrid: true,
- itemCount: 3,
- scrollShow: true
- },
- yAxis: {
- disableGrid: true,
- gridType: 'dash',
- splitNumber: 5,
- min: 0,
- format: (val) => {
- return Math.round(val)
- }
- },
- extra: {
- line: {
- type: 'curve'
- },
- tooltip: {
- format: {
- name: '',
- value: (val) => Math.round(val)
- }
- }
- },
- legend: {
- },
- enableScroll: true
- },
- xData:[],
- yData:[],
- activeChartTab: 0,
- historyData: [],
- data_iccid:'',
- data_iccidInput:'',
- deviceInfoStatic:{},
- photo_iccid:'',
- chartData: {},
- chartKey: 0
- };
- },
- mounted(){
- this.equipStateDict = Circulation
- },
- computed: {
- formatDevImg() {
- return `https://s3.hnyfwlw.com/webstaticimg/bigdata_app/image/${this.devImg}.png`;
- },
- },
- watch:{
- polylineList:{
- handler(newVal, oldVal){
- this.xData = newVal.map(item => this.formatDate(new Date(item.addtime)));
- this.yData = newVal.map(item => Number(item.new_tem) || 0);
- if(this.xData.length){
- this.initChart();
- }
- },
- deep:true,
- immediate:true,
- },
- deviceInfo:{
- handler(newVal, oldVal){
- console.log(newVal.device_model,'device_modeldevice_modeldevice_model')
- if (newVal.device_model == '11'){
- this.devImg = 'cbd4.1'
- this.isShowPhoto = true
- } else if(newVal.device_model == '12'){
- this.devImg = 'cbd1'
- this.isShowPhoto = false
- } else if(newVal.device_model == '13'){
- this.devImg = 'cbd5'
- this.isShowPhoto = true
- } else if(newVal.device_model == '14'){
- this.devImg = 'cbd6'
- this.isShowPhoto = true
- } else if(newVal.device_model == '15'){
- this.devImg = 'gkcbd1'
- this.isShowPhoto = false
- } else{
- this.devImg = 'cbd'
- this.isShowPhoto = true
- }
- },
- deep:true,
- immediate:true,
- },
- deviceHistoryList:{
- handler(newVal, oldVal){
- this.historyData = []
- if(newVal.length > 0){
- newVal.forEach(item=>{
- this.historyData.push(item.d_h_t)
- })
- }
- },
- deep:true,
- immediate:true,
- },
- },
- methods: {
- async openPhoto(){
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=forecast.send_control.admin_device_control',
- method: 'POST',
- data: {
- device_type_id: this.deviceInfo.type,
- d_id: this.deviceInfo.d_id,
- cmd: 'takephoto',
- },
- });
- if(res){
- this.$u.toast('拍照成功')
- }
- },
- editData(){
- uni.navigateTo({
- url: '/pages/afterSale/addafter?d_id=' + this.deviceInfo.d_id +'&device_id='+this.deviceInfo.id + '&device_type=' + this.deviceInfo.type,
- })
- },
- prevPage(){
- this.$emit('prevPage', this.currentPage)
- },
- nextPage(){
- this.$emit('nextPage', this.currentPage)
- },
- changeSim(){
- this.show1 = false
- },
- changeSimHandler(){
- if(this.data_iccidInput){
- this.changeSimAction(this.data_iccidInput);
- }else{
- this.$u.toast('请输入ICCID')
- }
- },
- switchTab(index){
- this.activeTab = index
- },
- simData(){
- this.show = true
- },
- async changeSimAction(simid){
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=forecast.send_control.device_sim_update',
- method: 'POST',
- data: {
- d_id: this.deviceInfo.d_id,
- simid,
- },
- });
- if(res){
- this.$u.toast('更换成功')
- this.show1 = true
- this.data_iccidInput = ''
- this.getSimNew()
- }
- },
- async getSimNew(){
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=forecast.send_control.device_sim_new',
- method: 'POST',
- data: {
- d_id: this.deviceInfo.d_id,
- },
- });
- if(res){
- const data_iccid = res.data_iccid
- this.data_iccid = data_iccid
- this.photo_iccid = res.photo_iccid
- if(data_iccid){
- this.getQueryNew(data_iccid);
- }else{
- this.activeTab = 1
- }
- }
- },
- async getQueryNew(data_iccid){
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=forecast.send_control.sim_query_new',
- method: 'POST',
- data: {
- iccid: data_iccid,
- },
- });
- this.deviceInfoStatic = res
- },
- async refreshData(){
- const res = await this.$myRequest({
- url: '/api/api_gateway?method=forecast.send_control.get_device_config',
- method: 'POST',
- data: {
- device_type_id: this.deviceInfo.type,
- d_id: this.deviceInfo.d_id,
- control_type:'data',
- device_model: this.deviceInfo.device_model || 0,
- },
- });
- if(res){
- // 弹出提示
- this.$u.toast('刷新成功')
- }
- },
- getStateDict(item){
- return item.ws == 0 ? '待机' : this.equipStateDict.lamp.value[item.lamp]
- },
- getRpsDict(item){
- return this.equipStateDict.rps.value[item.rps]
- },
- getTpsDict(item){
- return this.equipStateDict.tps.value[item.tps]
- },
- getLpsDict(item){
- return this.equipStateDict.lps.value[item.lps]
- },
- openSettings(){
- uni.navigateTo({
- url: '/pages/cbd/deviceControl?deviceId=' + this.deviceInfo.id + '&d_id=' + this.deviceInfo.d_id,
- });
- },
- initChart() {
- this.$nextTick(() => {
- this.updateChartsData();
- });
- },
- // 格式化时间
- formatDate(dateString) {
- const date = new Date(dateString*1000);
- const year = date.getFullYear();
- const month = String(date.getMonth() + 1).padStart(2, '0');
- const day = String(date.getDate()).padStart(2, '0');
- return `${year}-${month}-${day}`;
- },
- formatTime(dateString) {
- const date = new Date(dateString*1000);
- const year = date.getFullYear();
- const month = String(date.getMonth() + 1).padStart(2, '0');
- const day = String(date.getDate()).padStart(2, '0');
- const hour = String(date.getHours()).padStart(2, '0');
- const minute = String(date.getMinutes()).padStart(2, '0');
- const second = String(date.getSeconds()).padStart(2, '0');
- return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
- },
- drawChart() {
- // 销毁已有的图表实例
- if (chartInstance) {
- chartInstance.dispose();
- }
-
- // 初始化图表
- const chartDom = document.getElementById('tempChart');
- if (!chartDom) return;
-
- // chartInstance = echarts.init(chartDom);
-
- if(!chartInstance){
- return
- }
-
- const option = {
- backgroundColor: '#FFFFFF',
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- show: false
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- top: '8%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: this.xData,
- axisLine: {
- lineStyle: {
- color: '#CCCCCC'
- }
- },
- axisLabel: {
- fontSize: 10,
- color: '#999999'
- },
- splitLine: {
- show: false
- }
- },
- yAxis: {
- type: 'value',
- splitNumber: 4,
- axisLine: {
- show: true,
- lineStyle: {
- color: '#CCCCCC'
- }
- },
- axisLabel: {
- fontSize: 10,
- color: '#999999'
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: '#E5E5E5',
- type: 'dashed'
- }
- }
- },
- series: [
- {
- name: this.chartTabs[this.activeChartTab].name,
- type: 'line',
- smooth: true,
- data: this.yData,
- lineStyle: {
- color: '#0BBC58',
- width: 2
- },
- itemStyle: {
- color: '#0BBC58',
- borderColor: '#0BBC58',
- borderWidth: 2
- },
- symbol: 'circle',
- symbolSize: 6,
- // areaStyle: {
- // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- // {
- // offset: 0,
- // color: 'rgba(11, 188, 88, 0.3)'
- // },
- // {
- // offset: 1,
- // color: 'rgba(11, 188, 88, 0)'
- // }
- // ])
- // }
- }
- ]
- };
-
- chartInstance.setOption(option);
-
- // 监听窗口大小变化,调整图表大小
- window.addEventListener('resize', () => {
- chartInstance.resize();
- });
- },
- switchChartTab(index) {
- this.activeChartTab = index;
- // 根据不同标签切换数据
- if (this.chartTabs[index].id === 'new_tem') {
- this.yData = this.polylineList.map(item => Number(item.new_tem) || 0);
- } else if (this.chartTabs[index].id === 'new_hum') {
- this.yData = this.polylineList.map(item => Number(item.new_hum) || 0);
- } else if (this.chartTabs[index].id === 'others') {
- this.yData = this.polylineList.map(item => Number(item.others) || 0);
- }
- this.$nextTick(() => {
- // this.drawChart();
- this.updateChartsData();
- });
- },
- updateChartsData(){
- const categories = this.xData.length ? this.xData : [];
- const lineData = {
- categories,
- series: [
- {
- name: this.chartTabs[this.activeChartTab].name,
- data: this.yData
- }
- ]
- };
-
- this.chartData = lineData;
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .device-data-container {
- width: 100%;
- }
- .device-data-wraper{
- padding: 16rpx;
- background: #ffffff;
- border-radius: 16rpx;
- }
- /* 顶部时间戳和图标区域 */
- .top-bar {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16rpx 0;
- .timestamp {
- font-size: 28rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #999999;
- }
- .icon-group {
- display: flex;
- gap: 10rpx;
- .icon-item {
- width: 56rpx;
- height: 56rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 50%;
- .iconfont {
- font-size: 36rpx;
- }
- &.refresh-icon .iconfont {
- color: #0BBC58;
- }
- &.settings-icon .iconfont {
- color: #999999;
- }
- &.info-icon .iconfont {
- color: #999999;
- }
- }
- }
- }
- .sim-container{
- padding: 0 20rpx;
- .sim-item{
- margin-bottom: 20rpx;
- .sim-value-change{
- display: flex;
- align-items: center;
- .sim-value-button{
- padding: 8rpx 16rpx;
- border-radius: 8rpx;
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #042118;
- background: #0BBC58;
- color: #ffffff;
- margin-left: 20rpx;
- }
- }
- }
- }
- .general-border{
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.3s ease;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
- .general-icon{
- width: 50rpx;
- height: 50rpx;
- border-radius: 50%;
- }
- }
- .general-images{
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- .general-image{
- position: absolute;
- width: 80rpx;
- height: 80rpx;
- border-radius: 50%;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
- display:flex;
- align-items: center;
- justify-content: center;
- .image-icon{
- width: 45rpx;
- height: 45rpx;
- }
- }
- .edit-border{
- top: 45rpx;
- left: -110rpx;
- }
- .sim-border{
- top: -125rpx;
- left: -110rpx;
- }
- .setting-border{
- top: -40rpx;
- left: -180rpx;
- }
- .edit-border2{
- top: 60rpx;
- left: -70rpx;
- }
- .sim-border2{
- top: -75rpx;
- left: -150rpx;
- }
- .setting-border2{
- top: 20rpx;
- left: -150rpx;
- }
- .photo-border{
- top: -135rpx;
- left: -70rpx;
- }
- }
- /* 主要数据面板 */
- .main-data-panel {
- display: flex;
- background: #FFFFFF;
- border-radius: 16rpx;
- margin-bottom: 16rpx;
- .data-column-left {
- flex: 1;
- display: flex;
- flex-direction: column;
- gap: 24rpx;
- .data-item {
- display: flex;
- flex-direction: column;
- gap: 8rpx;
- .data-label {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #999999;
- }
- .data-value {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 700;
- color: #042118;
- &.temp-value {
- color: #FF6B6B;
- }
- }
- .data-unit {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #999999;
- }
- }
- }
- .data-column-right {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 16rpx;
- .device-image-container {
- position: relative;
- width: 200rpx;
- height: 200rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- .device-glow {
- position: absolute;
- width: 180rpx;
- height: 180rpx;
- background: radial-gradient(circle, rgba(11, 188, 88, 0.3) 0%, rgba(11, 188, 88, 0) 70%);
- border-radius: 50%;
- }
- .device-image {
- position: relative;
- width: 260rpx;
- height: 360rpx;
- z-index: 1;
- top: 60rpx;
- }
- }
- .device-info {
- display: flex;
- flex-direction: column;
- gap: 12rpx;
- width: 100%;
- .info-row {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .info-label {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #999999;
- }
- .info-value {
- font-size: 36rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 700;
- color: #042118;
- }
- .info-version {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #999999;
- }
- .info-label-small {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #999999;
- }
- }
- }
- }
- }
- .tabs-container{
- display:flex;
- align-items: center;
- gap: 24rpx;
- padding: 24rpx;
- .tabs-item{
- font-size: 28rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 500;
- color: #999999;
- }
- .tabs-item.active{
- color: #0BBC58;
- }
- }
- /* 图表区域 */
- .chart-section {
- background: #FFFFFF;
- border-radius: 16rpx;
- padding: 24rpx 32rpx 32rpx;
- margin: 24rpx 0;
- .chart-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 24rpx;
- .chart-tabs {
- display: flex;
- gap: 48rpx;
- overflow-x: auto;
- white-space: nowrap;
- .chart-tab-item {
- font-size: 28rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 500;
- color: #999999;
- position: relative;
- padding-bottom: 8rpx;
- transition: all 0.3s;
- &.active {
- color: #0BBC58;
- font-weight: 700;
- &::after {
- content: '';
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- height: 4rpx;
- background: #0BBC58;
- border-radius: 2rpx;
- }
- }
- }
- }
- .chart-dropdown {
- .dropdown-icon {
- font-size: 28rpx;
- color: #999999;
- }
- }
- }
- .chart-content {
- .chart-legend {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 16rpx;
- .legend-item {
- display: flex;
- align-items: center;
- gap: 8rpx;
- .legend-dot {
- width: 16rpx;
- height: 16rpx;
- background: #0BBC58;
- border-radius: 50%;
- }
- .legend-text {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #042118;
- }
- }
- .legend-average {
- .average-text {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #999999;
- }
- }
- }
- .chart-canvas-container {
- width: 100%;
- height: 400rpx;
- .chart-canvas {
- width: 100%;
- height: 100%;
- }
- }
- }
- }
- .copy-icon{
- width: 40rpx;
- height: 40rpx;
- }
- /* 历史数据表格 */
- .history-section {
- background: #FFFFFF;
- border-radius: 16rpx;
- padding: 24rpx 32rpx 32rpx;
- .history-header {
- margin-bottom: 24rpx;
- .history-title {
- font-size: 32rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 700;
- color: #042118;
- }
- }
- .history-table {
- margin-bottom: 24rpx;
- .table-container {
- display: flex;
- position: relative;
- /* 固定列 */
- .fixed-column {
- width: 240rpx;
- position: relative;
- z-index: 2;
- background: #FFFFFF;
- .fixed-header {
- border-bottom: 2rpx solid #F0F0F0;
- padding: 16rpx 0;
- .header-cell.fixed {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 500;
- color: #666666;
- text-align: left;
- padding-left: 0;
- }
- }
- .fixed-body {
- .fixed-row {
- padding: 16rpx 0;
- border-bottom: 1rpx solid #F5F5F5;
- height: 80rpx;
- display: flex;
- align-items: center;
- &.even {
- background: #FAFAFA;
- }
- .body-cell.fixed {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #042118;
- text-align: left;
- padding-left: 0;
- }
- }
- }
- }
- /* 可滑动列 */
- .scrollable-column {
- flex: 1;
- overflow-x: auto;
- white-space: nowrap;
- /* 隐藏滚动条 */
- &::-webkit-scrollbar {
- display: none;
- }
- scrollbar-width: none;
- .scrollable-header {
- display: flex;
- border-bottom: 2rpx solid #F0F0F0;
- padding: 20rpx 0;
- .header-cell {
- min-width: 140rpx;
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 500;
- color: #666666;
- text-align: center;
- // 超出隐藏
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- margin-right: 10rpx;
- }
- }
- .scrollable-body {
- .scrollable-row {
- display: flex;
- padding: 16rpx 0;
- border-bottom: 1rpx solid #F5F5F5;
- height: 80rpx;
- align-items: center;
- &.even {
- background: #FAFAFA;
- }
- .body-cell {
- min-width: 140rpx;
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #042118;
- text-align: center;
- margin-right: 10rpx;
- }
- }
- }
- }
- }
- }
- .pagination {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .pagination-btn {
- font-size: 24rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- padding: 6rpx 18rpx;
- border-radius: 8rpx;
- transition: all 0.3s;
- &.prev-btn {
- color: #656565;
- border: 1px solid #E4E7ED;
- }
- &.next-btn {
- color: #0BBC58;
- border: 1px solid #0BBC58;
- }
- }
- .pagination-info {
- font-size: 28rpx;
- font-family: 'Source Han Sans CN VF', sans-serif;
- font-weight: 400;
- color: #999999;
- }
- }
- }
- </style>
|