设备总览-完成

master
wenfei 4 weeks ago
parent dbb452fa7c
commit 3e3f9e2e62

@ -13,8 +13,8 @@ android {
applicationId "com.rehome.zhdcoa"
minSdk 24
targetSdk 36
versionCode 28
versionName "2.4.4"
versionCode 29
versionName "2.4.5"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
//authorities

@ -24,6 +24,7 @@ import com.yolanda.nohttp.rest.CacheMode
import com.yolanda.nohttp.rest.OnResponseListener
import com.yolanda.nohttp.rest.RequestQueue
import com.yolanda.nohttp.rest.Response
import org.w3c.dom.Text
import javax.net.ssl.HostnameVerifier
class DeviceManagerListAdapter(
@ -104,7 +105,7 @@ class DeviceManagerListAdapter(
if(!TextUtils.isEmpty(itemBean.areaFullName)){
binding.tvArea.text = itemBean.areaFullName
}
binding.tvSbzt.text = itemBean.description
//binding.tvSbzt.text = itemBean.description
if(itemBean.online){
binding.tvZxzt.text = "在线"
binding.tvZxzt.setTextColor(Color.parseColor("#67C23A"))//0099ff
@ -112,6 +113,26 @@ class DeviceManagerListAdapter(
binding.tvZxzt.text = "离线"
binding.tvZxzt.setTextColor(Color.parseColor("#ff0000"))
}
if(TextUtils.isEmpty(itemBean.major)){
binding.tvSbzt.text = ""
}else{
if(itemBean.status=="0"){
binding.tvSbzt.text = "检修/下线"
binding.tvSbzt.setTextColor(Color.parseColor("#ff0000"))
}
if(itemBean.status=="1"){
binding.tvSbzt.text = "上线"
binding.tvSbzt.setTextColor(Color.parseColor("#67C23A"))//0099ff
}
if(itemBean.status=="2"){
binding.tvSbzt.text = "丢失"
binding.tvSbzt.setTextColor(Color.parseColor("#ff0000"))
}
if(itemBean.status=="3"){
binding.tvSbzt.text = "报废"
binding.tvSbzt.setTextColor(Color.parseColor("#ff0000"))
}
}
binding.tvZtsysc.text = itemBean.continuedTime
binding.tvAzsj.text = itemBean.installTime
binding.tvYczsc.text = itemBean.runningTime

@ -104,10 +104,10 @@ class DeviceOverviewListAdapter(
}else{
binding.tvMc.text = itemBean.name
}
binding.tvSbzt.text = itemBean.description
if(!TextUtils.isEmpty(itemBean.description)&&"正常"==itemBean.description){
binding.tvSbzt.setTextColor(Color.parseColor("#67C23A"))//0099ff
}
// binding.tvSbzt.text = itemBean.description
// if(!TextUtils.isEmpty(itemBean.description)&&"正常"==itemBean.description){
// binding.tvSbzt.setTextColor(Color.parseColor("#67C23A"))//0099ff
// }
if(itemBean.online){
binding.tvZxzt.text = "在线"
@ -116,6 +116,26 @@ class DeviceOverviewListAdapter(
binding.tvZxzt.text = "离线"
binding.tvZxzt.setTextColor(Color.parseColor("#ff0000"))
}
if(TextUtils.isEmpty(itemBean.major)){
binding.tvSbzt.text = ""
}else{
if(itemBean.status=="0"){
binding.tvSbzt.text = "检修/下线"
binding.tvSbzt.setTextColor(Color.parseColor("#ff0000"))
}
if(itemBean.status=="1"){
binding.tvSbzt.text = "上线"
binding.tvSbzt.setTextColor(Color.parseColor("#67C23A"))//0099ff
}
if(itemBean.status=="2"){
binding.tvSbzt.text = "丢失"
binding.tvSbzt.setTextColor(Color.parseColor("#ff0000"))
}
if(itemBean.status=="3"){
binding.tvSbzt.text = "报废"
binding.tvSbzt.setTextColor(Color.parseColor("#ff0000"))
}
}
binding.tvYczsc.text = itemBean.runningTime
binding.tvSjgxsj.text = itemBean.warningTime
binding.llCwcz.setOnClickListener {

@ -44,9 +44,11 @@ public class DeviceManagerListResultBean extends DeviceAlarmBaseBean{
private String continuedTime;//状态持续时间
private String installTime;//安装时间
private String runningTime;//运行总时长
private String state;//设备状态
private String state;
private String areaFullPath;
private String areaFullName;
private String status;//设备状态
private String major;//专业
public String getCode() {
return code;
@ -175,5 +177,21 @@ public class DeviceManagerListResultBean extends DeviceAlarmBaseBean{
public void setAreaFullName(String areaFullName) {
this.areaFullName = areaFullName;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMajor() {
return major;
}
public void setMajor(String major) {
this.major = major;
}
}
}

@ -4,6 +4,7 @@ import android.content.Intent
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.RadioGroup
import androidx.activity.enableEdgeToEdge
@ -51,10 +52,12 @@ class DeviceManagerListActivity : BaseActivityOaToolbarViewBinding<ActivityDevic
private lateinit var launcherResultPhotoManager: ActivityResultLauncher<Intent>
private var nodeKey: String? = null
private var cname: String? = null
//DeviceManagerListAdapter
//adapter_device_manager_list
// DeviceManagerListResultBean
//专业下拉
val specialtyList = mutableListOf<String>("全部", "汽机", "环化", "锅炉", "电气")
private lateinit var spinnerAdapter:ArrayAdapter<CharSequence>
//设备状态下拉
val deviceSpinnerList = mutableListOf<String>("全部", "检修/下线", "上线", "丢失", "报废")
private lateinit var deviceSpinnerAdapter:ArrayAdapter<CharSequence>
override fun getViewBinding() = ActivityDeviceManagerListBinding.inflate(layoutInflater)
@ -86,6 +89,49 @@ class DeviceManagerListActivity : BaseActivityOaToolbarViewBinding<ActivityDevic
binding.lv.emptyView = binding.tvNodata
// 创建适配器
spinnerAdapter = ArrayAdapter.createFromResource(
this,
R.array.spinner_items_zy,
android.R.layout.simple_spinner_item
)
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
binding.spZy.adapter = spinnerAdapter
// 设置选择监听
binding.spZy.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
val selectedItem = parent?.getItemAtPosition(position).toString()
showLog(selectedItem)
authenticationLoginDeviceAlarmInfoRsa()
}
override fun onNothingSelected(parent: AdapterView<*>?) {
// 处理未选择的情况
}
}
// 创建适配器
deviceSpinnerAdapter = ArrayAdapter.createFromResource(
this,
R.array.spinner_items_sbzt,
android.R.layout.simple_spinner_item
)
deviceSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
binding.spSbzt.adapter = deviceSpinnerAdapter
// 设置选择监听
binding.spSbzt.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
val selectedItem = parent?.getItemAtPosition(position).toString()
showLog(selectedItem)
authenticationLoginDeviceAlarmInfoRsa()
}
override fun onNothingSelected(parent: AdapterView<*>?) {
// 处理未选择的情况
}
}
val gson = GsonBuilder()
.setPrettyPrinting()
.serializeNulls()
@ -239,6 +285,8 @@ class DeviceManagerListActivity : BaseActivityOaToolbarViewBinding<ActivityDevic
Contans.IP + Contans.DeviceManagerListUrl,
RequestMethod.GET
)
val zyIndex:Int = binding.spZy.selectedItemPosition
request.add("major",specialtyList[zyIndex])
NohttpUtils.getInstance().add(this, 0, request, object : HttpListener<String?> {
@ -352,6 +400,7 @@ class DeviceManagerListActivity : BaseActivityOaToolbarViewBinding<ActivityDevic
Contans.IP + Contans.DeviceOnlineStatusAreaBeanUrl,
RequestMethod.GET
)
NohttpUtils.getInstance().add(this, 0, request, object : HttpListener<String?> {
override fun onSucceed(what: Int, response: Response<String?>?) {

@ -4,6 +4,8 @@ import android.content.Intent
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.RadioGroup
import androidx.activity.enableEdgeToEdge
import androidx.activity.result.ActivityResultLauncher
@ -52,6 +54,10 @@ class DeviceOverviewListActivity :
private var nodeKey: String? = null
private var cname: String? = null
//专业下拉
val specialtyList = mutableListOf<String>("全部", "汽机", "环化", "锅炉", "电气")
private lateinit var spinnerAdapter: ArrayAdapter<CharSequence>
override fun getViewBinding() = ActivityDeviceOverviewListBinding.inflate(layoutInflater)
@ -73,6 +79,27 @@ class DeviceOverviewListActivity :
binding.lv.emptyView = binding.tvNodata
// 创建适配器
spinnerAdapter = ArrayAdapter.createFromResource(
this,
R.array.spinner_items_zy,
android.R.layout.simple_spinner_item
)
spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
binding.spZy.adapter = spinnerAdapter
// 设置选择监听
binding.spZy.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
val selectedItem = parent?.getItemAtPosition(position).toString()
showLog(selectedItem)
authenticationLoginDeviceAlarmInfoRsa()
}
override fun onNothingSelected(parent: AdapterView<*>?) {
// 处理未选择的情况
}
}
val gson = GsonBuilder()
.setPrettyPrinting()
.serializeNulls()
@ -193,6 +220,8 @@ class DeviceOverviewListActivity :
Contans.IP + Contans.DeviceManagerListUrl,
RequestMethod.GET
)
val zyIndex:Int = binding.spZy.selectedItemPosition
request.add("major",specialtyList[zyIndex])
NohttpUtils.getInstance().add(this, 0, request, object : HttpListener<String?> {

@ -136,7 +136,7 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
// Contans.BASE_URL_COMPANY_SERVER_EXTRANET //智慧安防平台登录 电厂外网
// Contans.BASE_URL_AI_3D_SERVER =
// Contans.BASE_URL_AI_3D_SERVER_EXTRANET //AI三维可视化安防平台登录 电厂外网
binding.rg.check(R.id.rb3)
binding.rg.check(R.id.rb1)
Contans.IP = Contans.IP_INTRANET //运行IP内网
Contans.BASE_URL = Contans.BASE_URL_INTRANET //行政IP内网
Contans.BASE_URL_COMPANY_SERVER =
@ -241,8 +241,8 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
if (isApkInDebug(context)) {
// 管理员
binding.etUsername.setText("ZHPS_Admin")
binding.etPassword.setText("Rehome.zhps@996")
// binding.etUsername.setText("ZHPS_Admin")
// binding.etPassword.setText("Rehome.zhps@996")
// binding.etUsername.setText("310187")
// binding.etPassword.setText("4321@cwxING")

@ -1,15 +1,50 @@
package com.rehome.zhdcoa.ui.fragment;
import static com.rehome.zhdcoa.utils.GsonUtils.GsonToBean;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.rehome.zhdcoa.Contans;
import com.rehome.zhdcoa.R;
import com.rehome.zhdcoa.base.BaseViewBindingFragment;
import com.rehome.zhdcoa.bean.DeviceOnlineStatusImgBean;
import com.rehome.zhdcoa.databinding.FragmentDeviceMonitoringPhotoBinding;
import com.rehome.zhdcoa.databinding.FragmentDeviceMonitoringStatisticsBinding;
import com.rehome.zhdcoa.ui.activity.PhotoRiskViewActivity;
import com.rehome.zhdcoa.utils.AuthenticationLoginAIUtils;
import com.rehome.zhdcoa.utils.HttpListener;
import com.rehome.zhdcoa.utils.NohttpUtils;
import com.rehome.zhdcoa.utils.OnAuthenticationLoginListener;
import com.rehome.zhdcoa.utils.RSAAndroid;
import com.yolanda.nohttp.NoHttp;
import com.yolanda.nohttp.RequestMethod;
import com.yolanda.nohttp.rest.CacheMode;
import com.yolanda.nohttp.rest.OnResponseListener;
import com.yolanda.nohttp.rest.Request;
import com.yolanda.nohttp.rest.RequestQueue;
import com.yolanda.nohttp.rest.Response;
import java.util.ArrayList;
import java.util.List;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
public class DeviceMonitoringPhotoFragment extends BaseViewBindingFragment<FragmentDeviceMonitoringPhotoBinding> {
@ -17,6 +52,10 @@ public class DeviceMonitoringPhotoFragment extends BaseViewBindingFragment<Fragm
private String deviceName;
private String areaFullName;
private ArrayList<String> onlinePhotoList = new ArrayList<>();
private List<DeviceOnlineStatusImgBean.DeviceOnlineStatusImg> deviceOnlineStatusImgList = new ArrayList<>();
private RequestQueue queue;
public DeviceMonitoringPhotoFragment(String deviceCode,String deviceName,String areaFullName){
this.deviceCode=deviceCode;
this.deviceName=deviceName;
@ -30,11 +69,158 @@ public class DeviceMonitoringPhotoFragment extends BaseViewBindingFragment<Fragm
@Override
protected void initView() {
queue = NoHttp.newRequestQueue(1);
binding.fivPhoto.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(!onlinePhotoList.isEmpty()){
//设置图片
String mediaUrl = onlinePhotoList.get(0);
Intent intent = new Intent(context, PhotoRiskViewActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("url", mediaUrl);
intent.putExtra("fileName", "图片预览");
intent.putExtra("path", "/");
startActivity(intent);
}
}
});
}
@Override
protected void initData() {
authenticationLoginDeviceAlarmInfoRsa();
}
private void authenticationLoginDeviceAlarmInfoRsa() {
try {
//AI三维登录接口
String userName = Contans.SP.DeviceAlermInfoAccount;
String strPublicDecode = RSAAndroid.decryptByPublicKeyForSpiltStr(
Contans.SP.DeviceAlermInfoPwd,
RSAAndroid.publicRsaKeyLocal
);
AuthenticationLoginAIUtils.authenticationDeviceAlermInfoRsaNotShowProgress(requireActivity(),userName,strPublicDecode,new OnAuthenticationLoginListener(){
@Override
public void onAuthenticationSuccess(boolean result, String token) {
if(token!=null&&token.isEmpty()){
//登录失败
showToast("设备状态智能监测及分析平台登录失败");
}else{
//登录成功
//获取照片列表
//http://10.19.0.17:1700/dserver/device/img/002c00e9?v=1770446858996
getDevicePhotoList();
}
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
public void getDevicePhotoList() {
String url = Contans.IP + Contans.getDevicePhotoListUrl+"/"+deviceCode;
Request<String> request = NoHttp.createStringRequest(url, RequestMethod.GET);
NohttpUtils.getInstance().add(requireActivity(),0, request, new HttpListener<String>() {
@SuppressLint({"SetTextI18n", "DefaultLocale", "NotifyDataSetChanged"})
@Override
public void onSucceed(int what, com.yolanda.nohttp.rest.Response<String> response) {
String result = response.get();
showLog(result);
DeviceOnlineStatusImgBean bean = GsonToBean(result, DeviceOnlineStatusImgBean.class);
if(bean!=null && bean.getCode()==20000 && bean.isSuccess() && bean.getData()!=null && !bean.getData().isEmpty()){
deviceOnlineStatusImgList.clear();
deviceOnlineStatusImgList.addAll(bean.getData());
onlinePhotoList.clear();
ArrayList<String> onlinePhotoListTemp = new ArrayList<>();
String imgDeviceOnlineBaseUrl = Contans.IP + Contans.getImgDeviceOnlineBaseUrl;
for(DeviceOnlineStatusImgBean.DeviceOnlineStatusImg item : deviceOnlineStatusImgList){
String fileName = item.getFileName();
String imgFullUrl = imgDeviceOnlineBaseUrl+fileName;
onlinePhotoListTemp.add(imgFullUrl);
onlinePhotoList.add(imgFullUrl);
showLog(imgFullUrl);
}
showLog(String.valueOf(onlinePhotoListTemp.size()));
if(!onlinePhotoList.isEmpty()){
//设置图片
String mediaUrl = onlinePhotoList.get(0);
setDevicePhotoToImageView(mediaUrl);
binding.tvNoPhoto.setVisibility(View.GONE);
}else{
Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.icon_device_place_big);
Drawable drawable = new BitmapDrawable(context.getResources(), bitmap);
binding.fivPhoto.setImageDrawable(drawable);
}
}
}
@Override
public void onFailed(int what, com.yolanda.nohttp.rest.Response<String> response) {
showLog("数据加载失败");
}
});
}
public void setDevicePhotoToImageView(String mediaUrl) {
Request<Bitmap> request = NoHttp.createImageRequest(mediaUrl);
request.setCacheMode(CacheMode.NONE_CACHE_REQUEST_NETWORK);
if (!TextUtils.isEmpty(mediaUrl)) {
Log.i("app", "fullPath is:" + mediaUrl);
if (!TextUtils.isEmpty(request.url())) {
String url = request.url();
if (url.startsWith("https://219.131.195.3:7100") || url.startsWith("https://219.131.195.3:7011") || url.startsWith("https://219.131.195.3:7081") || url.startsWith("https://219.131.195.3:7082")) {
SSLSocketFactory socketFactory = NohttpUtils.getSSLSocketFactory(context);
if (socketFactory != null) {
request.setSSLSocketFactory(socketFactory);
request.setHostnameVerifier(new HostnameVerifier() {
@Override
public boolean verify(String s, SSLSession sslSession) {
return true;
}
});
}
}
}
queue.add(6, request, new OnResponseListener<>() {
@Override
public void onStart(int what) {
}
@Override
public void onSucceed(int what, Response<Bitmap> response) {
showLog("--------bitmap-------");
Bitmap bitmap = response.get();
showLog(String.valueOf(bitmap==null));
Drawable drawable = new BitmapDrawable(context.getResources(), bitmap);
binding.fivPhoto.setImageDrawable(drawable);
}
@Override
public void onFailed(int what, Response<Bitmap> response) {
// Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.icon_device_place);
// Drawable drawable = new BitmapDrawable(context.getResources(), bitmap);
// binding.fiv.setImageDrawable(drawable);
}
@Override
public void onFinish(int what) {
}
});
} else {
Log.i("app", "path is null");
}
}
}

@ -145,7 +145,7 @@ public class DeviceMonitoringStatisticsFragment extends BaseViewBindingFragment<
String url = Contans.IP + Contans.getRateLineChartDataUrl+deviceCode;
Request<String> request = NoHttp.createStringRequest(url, RequestMethod.GET);
NohttpUtils.getInstance().add(requireActivity(),0, request, new HttpListener<String>() {
NohttpUtils.getInstance().addNoProgress(requireActivity(),0, request, new HttpListener<String>() {
@Override
public void onSucceed(int what, com.yolanda.nohttp.rest.Response<String> response) {

@ -198,7 +198,7 @@ class HomeFragment : BaseViewBindingFragment<FragmentHomeBinding>() {
private fun initLists() {
val titles = arrayOf(
// "来访管理",
"会议管理",
// "会议管理",
"用餐管理",
"车辆管理",
// "办公领用",
@ -214,7 +214,7 @@ class HomeFragment : BaseViewBindingFragment<FragmentHomeBinding>() {
)
val imgIds = intArrayOf(
// R.drawable.icon_visit,
R.drawable.icon_meet,
// R.drawable.icon_meet,
R.drawable.icon_dinner,
R.drawable.icon_vehicle,
// R.drawable.icon_office,
@ -258,12 +258,12 @@ class HomeFragment : BaseViewBindingFragment<FragmentHomeBinding>() {
binding.gv.setAdapter(adapter)
binding.gv.onItemClickListener =
AdapterView.OnItemClickListener { parent: AdapterView<*>?, view: View?, position: Int, id: Long ->
if (position == 2) {
if (position == 1) {
if (resultList.contains("ApplyVehicle")) {
val intent = Intent(getContext(), ApplyVehicleActivity::class.java)
startActivity(intent)
}
}else if (position == 8) {
}else if (position == 7) {
val intent = Intent(getContext(), WeatherActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
startActivity(intent)
@ -284,16 +284,16 @@ class HomeFragment : BaseViewBindingFragment<FragmentHomeBinding>() {
// 12 -> TAG = GridViewDialog.TAG_AF
// }
when (position) {
0 -> TAG = GridViewDialog.TAG_MEET
1 -> TAG = GridViewDialog.TAG_DINNER
// 0 -> TAG = GridViewDialog.TAG_MEET
0 -> TAG = GridViewDialog.TAG_DINNER
// 3 -> TAG = GridViewDialog.TAG_OFFICE
// 4 -> TAG = GridViewDialog.TAG_TASK
// 5 -> TAG = GridViewDialog.TAG_SCHEDULE
3 -> TAG = GridViewDialog.TAG_CHECK
4 -> TAG = GridViewDialog.TAG_PEIXUN
5 -> TAG = GridViewDialog.TAG_PDANGJIAN
6 -> TAG = GridViewDialog.TAG_JD
7 -> TAG = GridViewDialog.TAG_AF
2 -> TAG = GridViewDialog.TAG_CHECK
3 -> TAG = GridViewDialog.TAG_PEIXUN
4 -> TAG = GridViewDialog.TAG_PDANGJIAN
5 -> TAG = GridViewDialog.TAG_JD
6 -> TAG = GridViewDialog.TAG_AF
}
val dialog = GridViewDialog(context, TAG)
dialog.show()

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

@ -13,10 +13,10 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10px"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10px"
android:layout_marginRight="10px"
android:layout_marginTop="10px">
android:layout_marginTop="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -51,39 +51,8 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10px"
android:layout_marginLeft="10px"
android:layout_marginRight="10px"
android:layout_marginTop="10px">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_sysit"
android:padding="3dp"
android:textColor="#333333"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="设备名称:" />
<EditText
android:id="@+id/et_key"
style="@style/editTextTheme"
android:textSize="14sp"
android:layout_width="match_parent"
android:layout_weight="1"
android:hint="请输入设备名称" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginBottom="10dp"
android:layout_height="38dp"
android:layout_marginBottom="3dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
<LinearLayout
@ -99,11 +68,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="状态:" />
android:text="在线状态:" />
<RadioGroup
android:id="@id/rg"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_height="38dp"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal">
@ -123,29 +92,154 @@
style="@style/Widget.AppCompat.CompoundButton.RadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="10dp"
android:textSize="16sp"
android:text="离线" />
</RadioGroup>
</LinearLayout>
<RelativeLayout
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:orientation="horizontal">
<TextView
android:padding="3dp"
android:textColor="#333333"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="设备状态:" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:padding="3dp"
android:orientation="horizontal">
<Spinner
android:id="@+id/sp_sbzt"
style="@style/editTextTheme"
android:layout_width="match_parent"
android:layout_height="70px"
android:layout_gravity="center"
android:gravity="center"
android:padding="0px"
android:textSize="@dimen/px_30" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:orientation="horizontal">
<TextView
android:paddingStart="3dp"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:textColor="#333333"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="专业"
android:visibility="invisible"
tools:ignore="RtlSymmetry" />
<TextView
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:textColor="#333333"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="18sp"
android:text="专业:" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:gravity="center_vertical|end"
android:layout_weight="2" >
android:padding="3dp"
android:orientation="horizontal">
<Spinner
android:id="@+id/sp_zy"
style="@style/editTextTheme"
android:layout_width="match_parent"
android:layout_height="70px"
android:layout_gravity="center"
android:gravity="center"
android:padding="0px"
android:textSize="@dimen/px_30" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="38dp"
android:layout_marginBottom="6dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="3dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_sysit"
android:padding="3dp"
android:textColor="#333333"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:text="设备名称:" />
<EditText
android:id="@+id/et_key"
style="@style/editTextTheme"
android:textSize="14sp"
android:layout_width="0dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:hint="请输入设备名称" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="38dp"
android:layout_gravity="center"
android:gravity="center_vertical|end">
<Button
android:id="@+id/btn_query"
style="@style/button"
android:layout_width="wrap_content"
android:layout_height="38dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:textSize="18sp"
android:text="查询" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"

@ -99,6 +99,46 @@
</RadioGroup>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:orientation="horizontal">
<TextView
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:textColor="#333333"
android:layout_gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:textSize="18sp"
android:text="专业:" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center"
android:padding="3dp"
android:orientation="horizontal">
<Spinner
android:id="@+id/sp_zy"
style="@style/editTextTheme"
android:layout_width="match_parent"
android:layout_height="70px"
android:layout_gravity="center"
android:gravity="center"
android:padding="0px"
android:textSize="@dimen/px_30" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"

@ -5,43 +5,41 @@
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">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:layout_margin="5dp"
android:orientation="vertical">
<ImageView
android:id="@+id/fivPhoto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
tools:src="@drawable/icon_device_place_big" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_margin="5dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_no_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="暂无图片"/>
</LinearLayout>
</FrameLayout>
</ScrollView>
</LinearLayout>

@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingBottom="10dp"
android:numColumns="4" />
android:numColumns="3" />
<LinearLayout
android:id="@+id/ll_tip"
android:layout_width="match_parent"

@ -46,12 +46,19 @@
</string-array>
<string-array name="spinner_items_zy">
<item>所有</item>
<item>全部</item>
<item>汽机</item>
<item>环化</item>
<item>锅炉</item>
<item>电气</item>
</string-array>
<string-array name="spinner_items_sbzt">
<item>全部</item>
<item>检修/下线</item>
<item>上线</item>
<item>丢失</item>
<item>报废</item>
</string-array>
<string-array name="spinner_items_device_type">
<item>测振测温设备</item>
<item>油质监测设备</item>

Loading…
Cancel
Save