提交 3312053c authored 作者: lgd's avatar lgd

1.设备监控

上级 078d7d67
...@@ -1735,6 +1735,22 @@ ...@@ -1735,6 +1735,22 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.MesMonitorActivity"
android:configChanges="keyboardHidden|orientation"
android:label="设备监控"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".ui.activity.mes.MesMonitorDetailActivity"
android:configChanges="keyboardHidden|orientation"
android:label="设备监控详情"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" />
<activity <activity
android:name=".ui.activity.mes.MesScrappedActivity" android:name=".ui.activity.mes.MesScrappedActivity"
android:configChanges="keyboardHidden|orientation" android:configChanges="keyboardHidden|orientation"
...@@ -2570,6 +2586,7 @@ ...@@ -2570,6 +2586,7 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Work.Base" android:theme="@style/Work.Base"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.wd.workoffice.fileprovider" android:authorities="com.wd.workoffice.fileprovider"
......
package com.wd.workoffice.bean.mesBean;
import com.wd.workoffice.app.BaseMesPageBean;
import java.util.List;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MonitorBean extends BaseMesPageBean {
/**
* pageNum : 2
* pageSize : 10
* size : 10
* startRow : 11
* endRow : 20
* total : 268
* pages : 27
* list : [{"id":"2011","pointCode":"2011","name":"湿度11","collectbox":"湿度变量","description":"1Shidu_11","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"},{"id":"2012","pointCode":"2012","name":"湿度12","collectbox":"湿度变量","description":"1Shidu_12","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"},{"id":"2013","pointCode":"2013","name":"湿度13","collectbox":"湿度变量","description":"1Shidu_13","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"},{"id":"2014","pointCode":"2014","name":"湿度14","collectbox":"湿度变量","description":"1Shidu_14","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"},{"id":"2015","pointCode":"2015","name":"湿度15","collectbox":"湿度变量","description":"1Shidu_15","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"},{"id":"2016","pointCode":"2016","name":"湿度16","collectbox":"湿度变量","description":"1Shidu_16","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"},{"id":"2017","pointCode":"2017","name":"湿度17","collectbox":"湿度变量","description":"1Shidu_17","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"},{"id":"2018","pointCode":"2018","name":"湿度18","collectbox":"湿度变量","description":"1Shidu_18","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"},{"id":"2019","pointCode":"2019","name":"湿度19","collectbox":"湿度变量","description":"1Shidu_19","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"},{"id":"2020","pointCode":"2020","name":"湿度20","collectbox":"湿度变量","description":"1Shidu_20","assetId":null,"assetDesc":null,"locaId":"9642fe84311011ea8334fa163e1166bd","locaDesc":"制料中心","meterId":"a3a31fbb522511ea8334fa163e1166bd","meterDesc":"湿度","locaCode":"HWLT01","assetCode":null,"meterCode":"JLB10008","meterType":3,"measureUnit":"RH%","lowerWarning":null,"lowerAction":null,"upperWarning":null,"upperAction":null,"createby":null,"createDateTime":null,"updateDateTime":null,"changeby":null,"delete":null,"selectTimeType":300,"pointType":"2"}]
* prePage : 1
* nextPage : 3
* isFirstPage : false
* isLastPage : false
* hasPreviousPage : true
* hasNextPage : true
* navigatePages : 8
* navigatepageNums : [1,2,3,4,5,6,7,8]
* navigateFirstPage : 1
* navigateLastPage : 8
* firstPage : 1
* lastPage : 8
*/
private List<ListBean> list;
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean {
/**
* id : 2011
* pointCode : 2011
* name : 湿度11
* collectbox : 湿度变量
* description : 1Shidu_11
* assetId : null
* assetDesc : null
* locaId : 9642fe84311011ea8334fa163e1166bd
* locaDesc : 制料中心
* meterId : a3a31fbb522511ea8334fa163e1166bd
* meterDesc : 湿度
* locaCode : HWLT01
* assetCode : null
* meterCode : JLB10008
* meterType : 3
* measureUnit : RH%
* lowerWarning : null
* lowerAction : null
* upperWarning : null
* upperAction : null
* createby : null
* createDateTime : null
* updateDateTime : null
* changeby : null
* delete : null
* selectTimeType : 300
* pointType : 2
*/
private String id;
private String pointCode;
private String name;
private String collectbox;
private String description;
private Object assetId;
private String assetDesc;
private String locaId;
private String locaDesc;
private String meterId;
private String meterDesc;
private String locaCode;
private Object assetCode;
private String meterCode;
private int meterType;
private String measureUnit;
private Object lowerWarning;
private Object lowerAction;
private Object upperWarning;
private Object upperAction;
private Object createby;
private Object createDateTime;
private Object updateDateTime;
private Object changeby;
private Object delete;
private int selectTimeType;
private String pointType;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPointCode() {
return pointCode;
}
public void setPointCode(String pointCode) {
this.pointCode = pointCode;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCollectbox() {
return collectbox;
}
public void setCollectbox(String collectbox) {
this.collectbox = collectbox;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Object getAssetId() {
return assetId;
}
public void setAssetId(Object assetId) {
this.assetId = assetId;
}
public String getAssetDesc() {
return assetDesc;
}
public void setAssetDesc(String assetDesc) {
this.assetDesc = assetDesc;
}
public String getLocaId() {
return locaId;
}
public void setLocaId(String locaId) {
this.locaId = locaId;
}
public String getLocaDesc() {
return locaDesc;
}
public void setLocaDesc(String locaDesc) {
this.locaDesc = locaDesc;
}
public String getMeterId() {
return meterId;
}
public void setMeterId(String meterId) {
this.meterId = meterId;
}
public String getMeterDesc() {
return meterDesc;
}
public void setMeterDesc(String meterDesc) {
this.meterDesc = meterDesc;
}
public String getLocaCode() {
return locaCode;
}
public void setLocaCode(String locaCode) {
this.locaCode = locaCode;
}
public Object getAssetCode() {
return assetCode;
}
public void setAssetCode(Object assetCode) {
this.assetCode = assetCode;
}
public String getMeterCode() {
return meterCode;
}
public void setMeterCode(String meterCode) {
this.meterCode = meterCode;
}
public int getMeterType() {
return meterType;
}
public void setMeterType(int meterType) {
this.meterType = meterType;
}
public String getMeasureUnit() {
return measureUnit;
}
public void setMeasureUnit(String measureUnit) {
this.measureUnit = measureUnit;
}
public Object getLowerWarning() {
return lowerWarning;
}
public void setLowerWarning(Object lowerWarning) {
this.lowerWarning = lowerWarning;
}
public Object getLowerAction() {
return lowerAction;
}
public void setLowerAction(Object lowerAction) {
this.lowerAction = lowerAction;
}
public Object getUpperWarning() {
return upperWarning;
}
public void setUpperWarning(Object upperWarning) {
this.upperWarning = upperWarning;
}
public Object getUpperAction() {
return upperAction;
}
public void setUpperAction(Object upperAction) {
this.upperAction = upperAction;
}
public Object getCreateby() {
return createby;
}
public void setCreateby(Object createby) {
this.createby = createby;
}
public Object getCreateDateTime() {
return createDateTime;
}
public void setCreateDateTime(Object createDateTime) {
this.createDateTime = createDateTime;
}
public Object getUpdateDateTime() {
return updateDateTime;
}
public void setUpdateDateTime(Object updateDateTime) {
this.updateDateTime = updateDateTime;
}
public Object getChangeby() {
return changeby;
}
public void setChangeby(Object changeby) {
this.changeby = changeby;
}
public Object getDelete() {
return delete;
}
public void setDelete(Object delete) {
this.delete = delete;
}
public int getSelectTimeType() {
return selectTimeType;
}
public void setSelectTimeType(int selectTimeType) {
this.selectTimeType = selectTimeType;
}
public String getPointType() {
return pointType;
}
public void setPointType(String pointType) {
this.pointType = pointType;
}
}
}
...@@ -658,6 +658,13 @@ public interface MesApiService { ...@@ -658,6 +658,13 @@ public interface MesApiService {
@POST("/himes/api/msSceneFeedbackHistory/show/page.json") @POST("/himes/api/msSceneFeedbackHistory/show/page.json")
Observable<BaseMesBean> historyList(@Query("functionId") String functionId, @Body RequestBody requestBody); Observable<BaseMesBean> historyList(@Query("functionId") String functionId, @Body RequestBody requestBody);
/**
*
* @return
*/
@POST("/himes/api/astMeasurePoint/show/list.json")
Observable<BaseMesBean> astMeasurePoint(@Query("functionId") String functionId, @Body RequestBody requestBody);
/** /**
* 用户信息采集历史详情 * 用户信息采集历史详情
* *
......
package com.wd.workoffice.ui.activity.mes;
import android.os.Bundle;
import android.view.View;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.wd.workoffice.R;
import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.SendApplyBean;
import com.wd.workoffice.bean.event.CheckSendEvent;
import com.wd.workoffice.bean.mesBean.MonitorBean;
import com.wd.workoffice.bean.mesBean.UserDataBean;
import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.ui.activity.mes.order.MesOrderDetailActivity;
import com.wd.workoffice.ui.adapter.MesMonitorAdapter;
import com.wd.workoffice.ui.adapter.MesProcessAdapter;
import com.wd.workoffice.util.WorkUtils;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import flexible.xd.android_base.network.rtfhttp.Transformer;
import io.reactivex.disposables.Disposable;
/**
* 质量监控
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesMonitorActivity extends WorkToolBarActivity {
@BindView(R.id.rv_data)
RecyclerView rvData;
@BindView(R.id.srl_refresh)
SmartRefreshLayout srlRefresh;
private int page = 1;
private Map<String, Object> param;
private MesMonitorAdapter dataAdapter;
private List<MonitorBean.ListBean> dataList;
@Override
protected void initView() {
ButterKnife.bind(this);
rvData.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
}
@Override
protected void initData() {
param = WorkUtils.pageMesKey();
page = 1;
param.put("pageNum", page);
dataList = new ArrayList<>();
dataAdapter = new MesMonitorAdapter(R.layout.item_mes_monitor, dataList);
dataAdapter.bindToRecyclerView(rvData);
dataAdapter.setEmptyView(R.layout.view_empty_content, rvData);
dataAdapter.notifyDataSetChanged();
getData();
}
private void getData() {
RtfUtils.getMesRtf().astMeasurePoint("1", WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseMesBean>() {
@Override
public void doOnSubscribe(Disposable d) {
}
@Override
public void onFail(String errorMsg) {
hideLoading();
toast(errorMsg);
}
@Override
public void onSuccess(BaseMesBean data) {
hideLoading();
if (!data.isSuccess()) {
toast(data.getMessage());
return;
}
List<MonitorBean.ListBean> getList = JSON.parseObject(data.getData().toString(), MonitorBean.class).getList();
if (page == 1) {
srlRefresh.finishRefresh();
dataList.clear();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
dataAdapter.loadMoreComplete();
} else {
dataAdapter.loadMoreComplete();
dataList.addAll(getList);
dataAdapter.notifyDataSetChanged();
}
if (getList.size() == 0) {
dataAdapter.loadMoreEnd();
} else {
page++;
}
}
});
}
@Override
protected void initEvent() {
srlRefresh.setOnRefreshListener(refreshLayout -> {
page = 1;
param.put("pageNum", page);
getData();
});
dataAdapter.setOnLoadMoreListener(() -> {
param.put("pageNum", page);
getData();
}, rvData);
dataAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
startActivity(MesMonitorDetailActivity.class, "info", JSON.toJSONString(
dataList.get(position)));
}
});
}
@Override
protected int layoutId() {
return R.layout.activity_pro_price;
}
}
package com.wd.workoffice.ui.activity.mes;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.AnalysisBean;
import com.wd.workoffice.bean.mesBean.MonitorBean;
import com.wd.workoffice.util.WorkUtils;
import butterknife.BindView;
import butterknife.ButterKnife;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public class MesMonitorDetailActivity extends WorkToolBarActivity {
@BindView(R.id.tv_name)
TextView tvName;
@BindView(R.id.tv_point)
TextView tvPoint;
@BindView(R.id.tv_change)
TextView tvChange;
@BindView(R.id.tv_location)
TextView tvLocation;
@BindView(R.id.tv_machine)
TextView tvMachine;
@BindView(R.id.tv_measure)
TextView tvMeasure;
@BindView(R.id.tv_measure_unit)
TextView tvMeasureUnit;
@BindView(R.id.tv_point_type)
TextView tvPointType;
@BindView(R.id.tv_gap)
TextView tvGap;
@BindView(R.id.tv_box)
TextView tvBox;
@Override
protected void initView() {
ButterKnife.bind(this);
}
@Override
protected void initData() {
MonitorBean.ListBean info = JSON.parseObject(getIntent().getStringExtra("info"), MonitorBean.ListBean.class);
tvName.setText(info.getName());
tvPoint.setText(info.getPointCode());
tvChange.setText(info.getDescription());
tvLocation.setText(info.getLocaDesc());
tvMachine.setText(info.getAssetDesc() );
tvMeasure.setText(info.getMeterDesc());
tvMeasureUnit.setText(info.getMeasureUnit());
tvPointType.setText(TextUtils.equals(info.getPointType(),"1") ? "设备测点" : "环境测点");
tvGap.setText(info.getSelectTimeType()+"");
tvBox.setText(info.getCollectbox());
}
@Override
protected void initEvent() {
}
@Override
protected int layoutId() {
return R.layout.activity_monitor_detail;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
ButterKnife.bind(this);
}
}
package com.wd.workoffice.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.MonitorBean;
import java.util.List;
/**
* Created by flexible on 2018/8/13.
*/
public class MesMonitorAdapter extends BaseQuickAdapter<MonitorBean.ListBean, BaseViewHolder> {
public MesMonitorAdapter(int layoutResId, List data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, MonitorBean.ListBean item) {
helper.setText(R.id.tv_title, String.format("测点名称:%s",item.getName()));
helper.setText(R.id.tv_machine, item.getAssetDesc());
helper.setText(R.id.tv_location, item.getLocaDesc());
}
}
...@@ -2,11 +2,14 @@ package com.wd.workoffice.ui.fg; ...@@ -2,11 +2,14 @@ package com.wd.workoffice.ui.fg;
import android.view.View; import android.view.View;
import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.wd.workoffice.R; import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkBaseFg; import com.wd.workoffice.app.WorkBaseFg;
import com.wd.workoffice.bean.vo.BatLayoutVo; import com.wd.workoffice.bean.vo.BatLayoutVo;
import com.wd.workoffice.ui.activity.mes.MesMonitorActivity;
import com.wd.workoffice.ui.activity.mes.MesMonitorDetailActivity;
import com.wd.workoffice.ui.activity.mes.analysis.MesAnalysisActivity; import com.wd.workoffice.ui.activity.mes.analysis.MesAnalysisActivity;
import com.wd.workoffice.ui.activity.mes.defect.MesDefectActivity; import com.wd.workoffice.ui.activity.mes.defect.MesDefectActivity;
import com.wd.workoffice.ui.activity.mes.repair.MesServiceActivity; import com.wd.workoffice.ui.activity.mes.repair.MesServiceActivity;
...@@ -38,17 +41,17 @@ public class MesFragment extends WorkBaseFg { ...@@ -38,17 +41,17 @@ public class MesFragment extends WorkBaseFg {
@BindView(R.id.rv_data) @BindView(R.id.rv_data)
RecyclerView rvData; RecyclerView rvData;
List<BatLayoutVo> dataList = new ArrayList<>(); List<BatLayoutVo> dataList = new ArrayList<>();
// int[] dataImg = new int[]{R.mipmap.mes_icon1, R.mipmap.mes_icon2, R.mipmap.mes_icon3, R.mipmap.mes_icon4, // int[] dataImg = new int[]{R.mipmap.mes_icon1, R.mipmap.mes_icon2, R.mipmap.mes_icon3, R.mipmap.mes_icon4,
// R.mipmap.mes_icon5, R.mipmap.mes_icon6, R.mipmap.mes_icon7, R.mipmap.mes_icon8, // R.mipmap.mes_icon5, R.mipmap.mes_icon6, R.mipmap.mes_icon7, R.mipmap.mes_icon8,
// R.mipmap.mes_icon9, R.mipmap.mes_icon10, R.mipmap.mes_icon10}; // R.mipmap.mes_icon9, R.mipmap.mes_icon10, R.mipmap.mes_icon10};
int[] dataImg = new int[]{R.mipmap.mes_icon1, R.mipmap.mes_icon2, R.mipmap.mes_icon3, int[] dataImg = new int[]{R.mipmap.mes_icon1, R.mipmap.mes_icon2, R.mipmap.mes_icon3,
R.mipmap.mes_icon5, R.mipmap.mes_icon5,
R.mipmap.mes_icon9,R.mipmap.mes_icon10, R.mipmap.mes_icon8, R.mipmap.mes_icon10}; R.mipmap.mes_icon9, R.mipmap.mes_icon10, R.mipmap.mes_icon8, R.mipmap.mes_icon10};
// String[] dataName = new String[]{"订单追踪", "质量报表", "质量分析", "质量绩效", // String[] dataName = new String[]{"订单追踪", "质量报表", "质量分析", "质量绩效",
// "质量追溯", "质量反馈", "过程检测", "报废管理", "检维修记录", "设备监控" // "质量追溯", "质量反馈", "过程检测", "报废管理", "检维修记录", "设备监控"
// , "工单管理"}; // , "工单管理"};
String[] dataName = new String[]{"订单追踪", "质量报表", "质量分析", String[] dataName = new String[]{"订单追踪", "质量报表", "质量分析",
"质量追溯","检维修记录" "质量追溯", "检维修记录"
, "市场服务", "设备工单", "设备监控"}; , "市场服务", "设备工单", "设备监控"};
...@@ -119,12 +122,13 @@ public class MesFragment extends WorkBaseFg { ...@@ -119,12 +122,13 @@ public class MesFragment extends WorkBaseFg {
startActivity(MesServiceActivity.class); startActivity(MesServiceActivity.class);
break; break;
case 5: case 5:
startActivity(MesTicketActivity.class);
break; break;
case 6: case 6:
startActivity(MesTicketActivity.class); startActivity(QualityWorkActivity.class);
break; break;
case 7: case 7:
startActivity(QualityWorkActivity.class); startActivity(MesMonitorActivity.class);
break; break;
} }
} }
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/ll_bottom">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="名称"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="11111"
android:textSize="14sp" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="测点"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_point"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="11111" />
</RelativeLayout>
<View style="@style/dividerX" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="采集变量"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_change"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3mm"
android:layout_marginRight="3mm"
android:text="11111" />
</LinearLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="位置"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="11111" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="设备"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_machine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="计量表"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_measure"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="计量单位"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_measure_unit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="11111" />
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="测点类型"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_point_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
/>
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="采集间隙(s)"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_gap"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
/>
</RelativeLayout>
<View style="@style/dividerX" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20mm"
android:paddingVertical="9mm">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="采集箱"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="3mm"
android:text="11111" />
</RelativeLayout>
<View style="@style/dividerX" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10mm"
android:background="@color/white"
android:orientation="vertical"
android:padding="10mm">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="检查单号"
android:textSize="14sp" />
<View
style="@style/dividerX"
android:layout_marginVertical="5mm" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="设备:"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_machine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4mm"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="位置:"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
<TextView
android:id="@+id/tv_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4mm"
android:textColor="@color/flexible_text_gray"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论