设备详情-设备运行率-完成
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"?>
|
<?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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
tools:context=".ui.fragment.DeviceMonitoringStatisticsFragment">
|
tools:context=".ui.fragment.DeviceMonitoringStatisticsFragment">
|
||||||
|
<LinearLayout
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="#242e2f"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<include
|
||||||
android:id="@+id/bottomBtn"
|
android:id="@+id/item_qy"
|
||||||
|
layout="@layout/item_device_detail_row"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_marginTop="5dp"
|
||||||
android:background="#138CF2"
|
android:layout_marginStart="10dp"
|
||||||
android:visibility="gone"
|
android:layout_marginEnd="10dp"
|
||||||
android:gravity="center">
|
android:layout_marginBottom="5dp" />
|
||||||
|
|
||||||
<TextView
|
<include
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/item_sbmc"
|
||||||
|
layout="@layout/item_device_detail_row"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="分类课程"
|
android:layout_marginStart="10dp"
|
||||||
android:textColor="#ffffff" />
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginBottom="5dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
<ScrollView
|
||||||
android:id="@+id/lv"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@+id/bottomBtn"
|
tools:ignore="UselessParent">
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:divider="@null"
|
|
||||||
android:dividerHeight="5dp" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/lv_member_nodata"
|
|
||||||
android:layout_width="match_parent"
|
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: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>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
|
||||||
Loading…
Reference in New Issue