设备详情-设备运行率-完成
parent
56a9edeb94
commit
d68c8f7ce3
@ -0,0 +1,44 @@
|
||||
package com.rehome.zhdcoa.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DeviceRunRateBean extends DeviceAlarmBaseBean {
|
||||
/**
|
||||
* {
|
||||
* "date": "2026-02-26",
|
||||
* "rate": 0.0
|
||||
* },
|
||||
*/
|
||||
private List<DeviceRunRateItem> data;
|
||||
|
||||
public List<DeviceRunRateItem> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<DeviceRunRateItem> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static class DeviceRunRateItem {
|
||||
// 时间
|
||||
private String date;
|
||||
// 百分比
|
||||
private Double rate;
|
||||
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public Double getRate() {
|
||||
return rate;
|
||||
}
|
||||
|
||||
public void setRate(Double rate) {
|
||||
this.rate = rate;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.rehome.zhdcoa.ui.fragment;
|
||||
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.rehome.zhdcoa.base.BaseViewBindingFragment;
|
||||
import com.rehome.zhdcoa.databinding.FragmentDeviceMonitoringPhotoBinding;
|
||||
import com.rehome.zhdcoa.databinding.FragmentDeviceMonitoringStatisticsBinding;
|
||||
|
||||
|
||||
public class DeviceMonitoringPhotoFragment extends BaseViewBindingFragment<FragmentDeviceMonitoringPhotoBinding> {
|
||||
private String deviceCode;
|
||||
private String deviceName;
|
||||
private String areaFullName;
|
||||
|
||||
public DeviceMonitoringPhotoFragment(String deviceCode,String deviceName,String areaFullName){
|
||||
this.deviceCode=deviceCode;
|
||||
this.deviceName=deviceName;
|
||||
this.areaFullName=areaFullName;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FragmentDeviceMonitoringPhotoBinding getBinding(@NonNull LayoutInflater inflater, @Nullable ViewGroup container) {
|
||||
return FragmentDeviceMonitoringPhotoBinding.inflate(inflater);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.fragment.DeviceMonitoringPhotoFragment">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#242e2f"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/item_qy"
|
||||
layout="@layout/item_device_detail_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="5dp" />
|
||||
|
||||
<include
|
||||
android:id="@+id/item_sbmc"
|
||||
layout="@layout/item_device_detail_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="5dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="UselessParent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@ -1,53 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.fragment.DeviceMonitoringStatisticsFragment">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#242e2f"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomBtn"
|
||||
<include
|
||||
android:id="@+id/item_qy"
|
||||
layout="@layout/item_device_detail_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="#138CF2"
|
||||
android:visibility="gone"
|
||||
android:gravity="center">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="5dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<include
|
||||
android:id="@+id/item_sbmc"
|
||||
layout="@layout/item_device_detail_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="分类课程"
|
||||
android:textColor="#ffffff" />
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="5dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lv"
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/bottomBtn"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="5dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
android:layout_height="wrap_content"
|
||||
tools:ignore="UselessParent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lv_member_nodata"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无数据" />
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.github.mikephil.charting.charts.LineChart
|
||||
android:id="@+id/lineChartRunRate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginTop="5dp"/>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
Loading…
Reference in New Issue