2.3.2 版本发布

master
admin-pc\admin 1 year ago
parent 11d4919201
commit dc1edb8495

@ -11,8 +11,8 @@ android {
applicationId "com.rehome.zhdcoa" applicationId "com.rehome.zhdcoa"
minSdk 24 minSdk 24
targetSdk 34 targetSdk 34
versionCode 15 versionCode 16
versionName "2.3.1" versionName "2.3.2"
multiDexEnabled true multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
//authorities //authorities
@ -106,6 +106,10 @@ dependencies {
implementation project(':calendarview') implementation project(':calendarview')
//CalenderView //CalenderView
implementation project(':zxingLite') implementation project(':zxingLite')
//
implementation project(':videocompressor')
//wavmp3
implementation project(':recorderlib')
@ -180,7 +184,4 @@ dependencies {
//implementation 'com.google.android.play:app-update:2.0.1' //implementation 'com.google.android.play:app-update:2.0.1'
//emoji //emoji
implementation 'androidx.emoji:emoji-bundled:1.0.0' implementation 'androidx.emoji:emoji-bundled:1.0.0'
implementation project(':videocompressor')
//wavmp3
implementation project(':recorderlib')
} }

@ -82,7 +82,6 @@
tools:replace="android:allowBackup" tools:replace="android:allowBackup"
tools:targetApi="s"> tools:targetApi="s">
<meta-data <meta-data
android:name="design_width" android:name="design_width"
android:value="768" /> android:value="768" />
@ -612,6 +611,9 @@
<activity <activity
android:name=".ui.activity.PhotoActivity" android:name=".ui.activity.PhotoActivity"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.PhotoRiskViewActivity"
android:screenOrientation="portrait" />
<activity <activity
android:name=".ui.activity.TmdyActivity" android:name=".ui.activity.TmdyActivity"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
@ -1130,11 +1132,15 @@
<activity <activity
android:name=".ui.activity.WorkRiskListHuiBaoActivity" android:name=".ui.activity.WorkRiskListHuiBaoActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize|stateHidden" /> <!-- 作业风险清单 --> android:windowSoftInputMode="adjustResize|stateHidden" /> <!-- 作业风险清单报告提交 -->
<activity <activity
android:name=".ui.activity.WorkRiskListReportActivity" android:name=".ui.activity.WorkRiskListReportActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize|stateHidden" /> <!-- 作业风险清单 --> android:windowSoftInputMode="adjustResize|stateHidden" /> <!-- 每日工作报告列表 -->
<activity
android:name=".ui.activity.WorkRiskListHuiBaoDetailActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize|stateHidden" /> <!-- 每日工作报告详情 -->
<activity <activity
android:name=".ui.activity.WorkRiskListTipActivity" android:name=".ui.activity.WorkRiskListTipActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"

@ -0,0 +1,64 @@
package com.rehome.zhdcoa.adapter;
import android.content.Context;
import android.graphics.Color;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import com.rehome.zhdcoa.base.BaseViewBindingAdapter;
import com.rehome.zhdcoa.bean.WorkRiskLevelListBean;
import com.rehome.zhdcoa.bean.WorkRiskListReportBean;
import com.rehome.zhdcoa.databinding.AdapterWorkRiskLevelListBinding;
import com.rehome.zhdcoa.databinding.AdapterWorkRiskListReportBinding;
import java.util.List;
public class WorkRiskListReportAdapter extends BaseViewBindingAdapter<AdapterWorkRiskListReportBinding> {
private final Context context;
private List<WorkRiskListReportBean.WorkRiskListReportDataListBean> datas;
public WorkRiskListReportAdapter(Context context, List<WorkRiskListReportBean.WorkRiskListReportDataListBean> datas) {
super(context);
this.context = context;
this.datas = datas;
}
@Override
protected void handleData(int position, @NonNull AdapterWorkRiskListReportBinding binding) {
WorkRiskListReportBean.WorkRiskListReportDataListBean item = datas.get(position);
if (item != null) {
binding.tvHbr.setText(item.getReporterName());
binding.tvHbbm.setText(item.getReporterDepartment());
binding.tvHbsj.setText(item.getReportTime());
binding.tvLevel.setText(item.getLevel());
binding.tvHbnr.setText(item.getContent());
}
}
@Override
protected AdapterWorkRiskListReportBinding getBinding(@NonNull LayoutInflater inflater, ViewGroup parent) {
return AdapterWorkRiskListReportBinding.inflate(inflater, parent, false);
}
@Override
public int getCount() {
return datas.size();
}
@Override
public Object getItem(int position) {
return datas.get(position);
}
@Override
public long getItemId(int position) {
return Long.valueOf(position);
}
}

@ -0,0 +1,228 @@
package com.rehome.zhdcoa.adapter;
/**
* Create By HuangWenFei
* 2024-09-25 11:54
*
*/
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.luck.picture.lib.config.PictureMimeType;
import com.luck.picture.lib.config.SelectMimeType;
import com.luck.picture.lib.entity.LocalMedia;
import com.luck.picture.lib.utils.DateUtils;
import com.rehome.zhdcoa.Contans;
import com.rehome.zhdcoa.R;
import com.rehome.zhdcoa.adapter.luck.OnItemLongClickListener;
import com.rehome.zhdcoa.bean.WorkRiskListReportBean;
import com.rehome.zhdcoa.utils.NohttpUtils;
import com.yolanda.nohttp.NoHttp;
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 com.luck.pictureselector.R;
//import com.luck.pictureselector.listener.OnItemLongClickListener;
import java.util.ArrayList;
import java.util.List;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
/**
* @authorluck
* @date2016-7-27 23:02
* @describeGridImageAdapter
*/
public class WorkRiskListReportAttachmentAdapter extends RecyclerView.Adapter<WorkRiskListReportAttachmentAdapter.ViewHolder> {
private Context context;
public static final String TAG = "PictureSelector";
//public static final int TYPE_CAMERA = 1;
public static final int TYPE_PICTURE = 2;
private final LayoutInflater mInflater;
private final ArrayList<WorkRiskListReportBean.AttachmentListBean> list = new ArrayList<>();
private RequestQueue queue;
public WorkRiskListReportAttachmentAdapter(Context context, List<WorkRiskListReportBean.AttachmentListBean> attachmentList) {
this.mInflater = LayoutInflater.from(context);
this.context=context;
this.list.addAll(attachmentList);
queue = NoHttp.newRequestQueue(1);
}
public ArrayList<WorkRiskListReportBean.AttachmentListBean> getData() {
return list;
}
public void remove(int position) {
if (position < list.size()) {
list.remove(position);
}
}
public static class ViewHolder extends RecyclerView.ViewHolder {
ImageView mImg;
public ViewHolder(View view) {
super(view);
mImg = view.findViewById(R.id.fiv);
}
}
@Override
public int getItemCount() {
return list.size();
}
@Override
public int getItemViewType(int position) {
// if (isShowAddItem(position)) {
// return TYPE_CAMERA;
// } else {
// return TYPE_PICTURE;
// }
return TYPE_PICTURE;
}
/**
* ViewHolder
*/
@Override
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
View view = mInflater.inflate(R.layout.gv_filter_image_risk, viewGroup, false);
return new ViewHolder(view);
}
/**
*
*/
@Override
public void onBindViewHolder(final ViewHolder viewHolder, final int position) {
WorkRiskListReportBean.AttachmentListBean item = list.get(position);
String path = item.getUrl();
String fullPath = Contans.BASE_URL_AI_3D_SERVER + "sc_v1" + path;
Request<Bitmap> request = NoHttp.createImageRequest(fullPath);
//request.setCacheMode(CacheMode.ONLY_REQUEST_NETWORK);
request.setCacheMode(CacheMode.NONE_CACHE_REQUEST_NETWORK);
if(Contans.BASE_URL_AI_3D_SERVER.equals(Contans.BASE_URL_AI_3D_SERVER_EXTRANET)){
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;
}
});
}
}
if (!TextUtils.isEmpty(path)) {
Log.i("app", "path is" + path);
Log.i("app", "fullPath is:" + fullPath);
queue.add(6, request, new OnResponseListener<>() {
@Override
public void onStart(int what) {
}
@Override
public void onSucceed(int what, Response<Bitmap> response) {
Bitmap bitmap = response.get();
Drawable drawable = new BitmapDrawable(context.getResources(), bitmap);
viewHolder.mImg.setImageDrawable(drawable);
}
@Override
public void onFailed(int what, Response<Bitmap> response) {
Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.head_photo);
Drawable drawable = new BitmapDrawable(context.getResources(), bitmap);
viewHolder.mImg.setImageDrawable(drawable);
}
@Override
public void onFinish(int what) {
}
});
} else {
Log.i("app", "path is null");
fullPath = "";
}
// Glide.with(viewHolder.itemView.getContext())
// .load(fullPath)
// .centerCrop()
// .placeholder(R.color.app_color_f6)
// .diskCacheStrategy(DiskCacheStrategy.ALL)
// .into(viewHolder.mImg);
//itemView 的点击事件
if (mItemClickListener != null) {
viewHolder.itemView.setOnClickListener(v -> {
int adapterPosition = viewHolder.getAbsoluteAdapterPosition();
mItemClickListener.onItemClick(v, adapterPosition);
});
}
if (mItemLongClickListener != null) {
viewHolder.itemView.setOnLongClickListener(v -> {
int adapterPosition = viewHolder.getAbsoluteAdapterPosition();
mItemLongClickListener.onItemLongClick(viewHolder, adapterPosition, v);
return true;
});
}
}
private OnItemClickListener mItemClickListener;
public void setOnItemClickListener(OnItemClickListener l) {
this.mItemClickListener = l;
}
public interface OnItemClickListener {
/**
* Item click event
*
* @param v
* @param position
*/
void onItemClick(View v, int position);
}
private OnItemLongClickListener mItemLongClickListener;
public void setItemLongClickListener(OnItemLongClickListener l) {
this.mItemLongClickListener = l;
}
}

@ -0,0 +1,181 @@
package com.rehome.zhdcoa.bean;
import java.util.List;
public class WorkRiskListReportBean extends AIRiskListBaseBean{
private RowsBean data;
public RowsBean getData() {
return data;
}
public void setData(RowsBean data) {
this.data = data;
}
public static class RowsBean {
//id
private int pageNo;
//id
private int pageSize;
//id
private int totalRow;
//id
private int totalPage;
private List<WorkRiskListReportDataListBean> dataList;
public int getPageNo() {
return pageNo;
}
public void setPageNo(int pageNo) {
this.pageNo = pageNo;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalRow() {
return totalRow;
}
public void setTotalRow(int totalRow) {
this.totalRow = totalRow;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public List<WorkRiskListReportDataListBean> getDataList() {
return dataList;
}
public void setDataList(List<WorkRiskListReportDataListBean> dataList) {
this.dataList = dataList;
}
}
public static class WorkRiskListReportDataListBean {
//id
private int id;
//工作票id
private int ticketId;
//报告人工号
private String reporterNo;
private String reporterName;
private String reporterDepartment;
private String reportTime;
private String content;
private String level;
private List<AttachmentListBean> attachmentList;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getTicketId() {
return ticketId;
}
public void setTicketId(int ticketId) {
this.ticketId = ticketId;
}
public String getReporterNo() {
return reporterNo;
}
public void setReporterNo(String reporterNo) {
this.reporterNo = reporterNo;
}
public String getReporterName() {
return reporterName;
}
public void setReporterName(String reporterName) {
this.reporterName = reporterName;
}
public String getReporterDepartment() {
return reporterDepartment;
}
public void setReporterDepartment(String reporterDepartment) {
this.reporterDepartment = reporterDepartment;
}
public String getReportTime() {
return reportTime;
}
public void setReportTime(String reportTime) {
this.reportTime = reportTime;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
public List<AttachmentListBean> getAttachmentList() {
return attachmentList;
}
public void setAttachmentList(List<AttachmentListBean> attachmentList) {
this.attachmentList = attachmentList;
}
}
public static class AttachmentListBean {
//id
private int id;
//图片地址
private String url;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
}

@ -170,14 +170,12 @@ class LoginActivity : BaseActivityOaToolbarViewBinding<ActivityLoginBinding>() {
if (isApkInDebug(context)) { if (isApkInDebug(context)) {
// 管理员 // 管理员
binding.etUsername.setText("ZHPS_Admin") // binding.etUsername.setText("ZHPS_Admin")
binding.etPassword.setText("Rehome.zhps@996") // binding.etPassword.setText("Rehome.zhps@996")
binding.etUsername.setText("310430")
binding.etPassword.setText("Laq**201610")
//吴云强
// binding.etUsername.setText("310430")
// binding.etPassword.setText("Laq**201610")
//马 //马
// binding.etUsername.setText("310482") // binding.etUsername.setText("310482")

@ -0,0 +1,149 @@
package com.rehome.zhdcoa.ui.activity;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.Toast;
import com.rehome.zhdcoa.Contans;
import com.rehome.zhdcoa.R;
import com.rehome.zhdcoa.utils.NohttpUtils;
import com.yolanda.nohttp.NoHttp;
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 javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
public class PhotoRiskViewActivity extends AppCompatActivity {
private ImageView iv;
private RequestQueue queue;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
queue = NoHttp.newRequestQueue(1);
//设置全屏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_photo_risk_view);
initView();
}
private void initView() {
setTitle(getIntent().getExtras().getString("fileName"));
iv = findViewById(R.id.iv);
String path = getIntent().getExtras().getString("path");
String imageUrl = getIntent().getExtras().getString("url");
showLog(path);
showLog(imageUrl);
Request<Bitmap> request = NoHttp.createImageRequest(imageUrl);
//request.setCacheMode(CacheMode.ONLY_REQUEST_NETWORK);
request.setCacheMode(CacheMode.NONE_CACHE_REQUEST_NETWORK);
if(Contans.BASE_URL_AI_3D_SERVER.equals(Contans.BASE_URL_AI_3D_SERVER_EXTRANET)){
SSLSocketFactory socketFactory = NohttpUtils.getSSLSocketFactory(this);
if (socketFactory != null) {
request.setSSLSocketFactory(socketFactory);
request.setHostnameVerifier(new HostnameVerifier() {
@Override
public boolean verify(String s, SSLSession sslSession) {
return true;
}
});
}
}
queue.add(3, request, new OnResponseListener<>() {
@Override
public void onStart(int what) {
}
@Override
public void onSucceed(int what, Response<Bitmap> response) {
Bitmap bitmap = response.get();
Drawable drawable = new BitmapDrawable(getResources(), bitmap);
iv.setImageDrawable(drawable);
}
@Override
public void onFailed(int what, Response<Bitmap> response) {
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.head_photo);
Drawable drawable = new BitmapDrawable(getResources(), bitmap);
iv.setImageDrawable(drawable);
}
@Override
public void onFinish(int what) {
}
});
// if (!TextUtils.isEmpty(url)) {
// Glide.with(PhotoRiskViewActivity.this)
// .load(url)
// .dontAnimate()
// .skipMemoryCache(true)
// .diskCacheStrategy(DiskCacheStrategy.NONE)
// .placeholder(R.drawable.head_photo)
// .into(iv);
// } else {
// if (!TextUtils.isEmpty(path)) {
// Bitmap bitmap = BitmapFactory.decodeFile(path);
// iv.setImageBitmap(bitmap);
// }
// }
}
public Drawable bitmapToDrawable(Bitmap bitmap) {
return new BitmapDrawable(getResources(), bitmap);
}
public void showLog(String logText) {
if (isApkInDebug(this)) {
if(TextUtils.isEmpty(logText)){
Log.i("app", "logText is null");
}else{
Log.i("app", logText);
}
}
}
/**
* debug
*/
public static boolean isApkInDebug(Context context) {
try {
ApplicationInfo info = context.getApplicationInfo();
return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
} catch (Exception e) {
return false;
}
}
public void showToast(String msg) {
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
}
}

@ -21,6 +21,7 @@ import com.rehome.zhdcoa.databinding.ActivityTrainInfoMoreBinding
import com.rehome.zhdcoa.ui.toastview.toastviewbymyself import com.rehome.zhdcoa.ui.toastview.toastviewbymyself
import com.rehome.zhdcoa.utils.DownloadUtil import com.rehome.zhdcoa.utils.DownloadUtil
import com.rehome.zhdcoa.utils.FileUtils import com.rehome.zhdcoa.utils.FileUtils
import com.rehome.zhdcoa.utils.GsonUtils
import com.rehome.zhdcoa.utils.HttpUtils import com.rehome.zhdcoa.utils.HttpUtils
import com.rehome.zhdcoa.utils.TimeUtils import com.rehome.zhdcoa.utils.TimeUtils
import com.rehome.zhdcoa.weiget.AuditDialog import com.rehome.zhdcoa.weiget.AuditDialog
@ -410,13 +411,16 @@ class TrainInfoMoreActivity : BaseActivityOaToolbarViewBinding<ActivityTrainInfo
) { ) {
val bean = response?.body() val bean = response?.body()
if (bean != null) { if (bean != null) {
showLog(GsonUtils.GsonString(bean))
if (bean.result == "success") { if (bean.result == "success") {
val resultsBean = bean.results val resultsBean = bean.results
if (resultsBean != null) { if (resultsBean != null) {
filedataBeans.clear() filedataBeans.clear()
for (resultsbean in resultsBean) { for (resultsbean in resultsBean) {
filedataBeans.addAll(resultsbean.files) filedataBeans.addAll(resultsbean.files)
} }
showLog(GsonUtils.GsonString(filedataBeans))
initDHRDialogDatas() initDHRDialogDatas()
} }
binding.kcmcTx.text = bean.results[0].kcname binding.kcmcTx.text = bean.results[0].kcname

@ -0,0 +1,109 @@
package com.rehome.zhdcoa.ui.activity
import android.content.Context
import android.content.Intent
import android.os.Looper
import android.text.TextUtils
import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import com.bumptech.glide.Glide
import com.luck.picture.lib.decoration.GridSpacingItemDecoration
import com.luck.picture.lib.utils.DensityUtil
import com.rehome.zhdcoa.Contans
import com.rehome.zhdcoa.adapter.WorkRiskListReportAttachmentAdapter
import com.rehome.zhdcoa.base.BaseActivityOaToolbarViewBinding
import com.rehome.zhdcoa.bean.WorkRiskListReportBean
import com.rehome.zhdcoa.bean.WorkRiskListReportBean.AttachmentListBean
import com.rehome.zhdcoa.databinding.ActivityWorkRiskListHuiBaoDetailBinding
import com.rehome.zhdcoa.utils.FullyGridLayoutManager
import com.rehome.zhdcoa.utils.GsonUtils
class WorkRiskListHuiBaoDetailActivity : BaseActivityOaToolbarViewBinding<ActivityWorkRiskListHuiBaoDetailBinding>() {
private lateinit var item: WorkRiskListReportBean.WorkRiskListReportDataListBean
private lateinit var mAdapter: WorkRiskListReportAttachmentAdapter
private var datas: MutableList<WorkRiskListReportBean.AttachmentListBean> = mutableListOf()
override fun getViewBinding() = ActivityWorkRiskListHuiBaoDetailBinding.inflate(layoutInflater)
override fun getToolbar() = binding.toolbarView.toolbar
override fun initView() {
initToolbar("每日工作报告详情")
setLeftOnClickListener {
finish()
}
var itemStr = intent.getStringExtra("item")!!
item = GsonUtils.GsonToBean(itemStr,WorkRiskListReportBean.WorkRiskListReportDataListBean::class.java)
}
override fun initData() {
binding.tvHbr.text = item.reporterName
binding.tvHbbm.text = item.reporterDepartment
binding.tvHbsj.text = item.reportTime
binding.tvLevel.text = item.level
binding.etMs.setText(item.content)
//WorkRiskListReportAttachmentAdapter
clearImageDiskCache(this)
val manager: FullyGridLayoutManager = FullyGridLayoutManager(
this,
4, GridLayoutManager.VERTICAL, false
)
binding.recycle.setLayoutManager(manager)
binding.recycle.addItemDecoration(
GridSpacingItemDecoration(
4,
DensityUtil.dip2px(this, 8f), false
)
)
if(item.attachmentList!=null&&item.attachmentList.size>0){
binding.llPhoto.visibility= View.VISIBLE
datas.addAll(item.attachmentList)
}else{
binding.llPhoto.visibility= View.GONE
}
mAdapter = WorkRiskListReportAttachmentAdapter(this, datas)
binding.recycle.setAdapter(mAdapter)
mAdapter.setOnItemClickListener { v, position ->
val item: AttachmentListBean = item.attachmentList[position]
val st = Intent(context, PhotoRiskViewActivity::class.java)
if (!TextUtils.isEmpty(item.url)) {
var fullPath = Contans.BASE_URL_AI_3D_SERVER + "sc_v1" + item.url
st.putExtra("url", fullPath)
}
st.putExtra("fileName", "图片预览")
st.putExtra("path", "/")
startActivity(st)
}
}
/**
* 清除图片磁盘缓存
*/
private fun clearImageDiskCache(context: Context?) {
try {
if (Looper.myLooper() == Looper.getMainLooper()) {
Thread { Glide.get(context!!).clearDiskCache() }.start()
} else {
Glide.get(context!!).clearDiskCache()
}
} catch (e: Exception) {
e.printStackTrace()
}
}
}

@ -1,35 +1,37 @@
package com.rehome.zhdcoa.ui.activity package com.rehome.zhdcoa.ui.activity
import android.os.Bundle import android.content.Intent
import android.view.View import android.view.View
import androidx.activity.enableEdgeToEdge import android.widget.AdapterView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.rehome.zhdcoa.Contans import com.rehome.zhdcoa.Contans
import com.rehome.zhdcoa.R import com.rehome.zhdcoa.adapter.WorkRiskListReportAdapter
import com.rehome.zhdcoa.adapter.WorkRiskLevelListAdapter
import com.rehome.zhdcoa.base.BaseActivityOaToolbarViewBinding import com.rehome.zhdcoa.base.BaseActivityOaToolbarViewBinding
import com.rehome.zhdcoa.bean.WorkRiskLevelListBean import com.rehome.zhdcoa.bean.WorkRiskListReportBean
import com.rehome.zhdcoa.databinding.ActivityWorkRiskListReportBinding import com.rehome.zhdcoa.databinding.ActivityWorkRiskListReportBinding
import com.rehome.zhdcoa.utils.AuthenticationLoginAIUtils import com.rehome.zhdcoa.utils.AuthenticationLoginAIUtils
import com.rehome.zhdcoa.utils.GsonUtils import com.rehome.zhdcoa.utils.GsonUtils
import com.rehome.zhdcoa.utils.HttpListener import com.rehome.zhdcoa.utils.HttpListener
import com.rehome.zhdcoa.utils.NohttpUtils import com.rehome.zhdcoa.utils.NohttpUtils
import com.rehome.zhdcoa.utils.RSAAndroid import com.rehome.zhdcoa.utils.RSAAndroid
import com.rehome.zhdcoa.weiget.OAToolbar import com.rehome.zhdcoa.utils.RiskDatePickDialog
import com.yolanda.nohttp.NoHttp import com.yolanda.nohttp.NoHttp
import com.yolanda.nohttp.RequestMethod import com.yolanda.nohttp.RequestMethod
import com.yolanda.nohttp.rest.Response import com.yolanda.nohttp.rest.Response
import java.text.SimpleDateFormat
import java.util.Calendar
import javax.net.ssl.HostnameVerifier import javax.net.ssl.HostnameVerifier
class WorkRiskListReportActivity : BaseActivityOaToolbarViewBinding<ActivityWorkRiskListReportBinding>() { class WorkRiskListReportActivity : BaseActivityOaToolbarViewBinding<ActivityWorkRiskListReportBinding>() {
private lateinit var headView: View private var stime: String = ""
private var etime: String = ""
private var datas: MutableList<WorkRiskLevelListBean.RowsBean> = mutableListOf() private var datas: MutableList<WorkRiskListReportBean.WorkRiskListReportDataListBean> = mutableListOf()
private lateinit var mAdapter: WorkRiskLevelListAdapter private lateinit var mAdapter: WorkRiskListReportAdapter
//WorkRiskListReportAdapter
//adapter_work_risk_list_report
//WorkRiskListReportBean
override fun getViewBinding() = ActivityWorkRiskListReportBinding.inflate(layoutInflater) override fun getViewBinding() = ActivityWorkRiskListReportBinding.inflate(layoutInflater)
@ -43,10 +45,79 @@ class WorkRiskListReportActivity : BaseActivityOaToolbarViewBinding<ActivityWork
} }
binding.lv.emptyView = binding.tvNodata binding.lv.emptyView = binding.tvNodata
headView = View.inflate(this, R.layout.item_work_risk_list, null)
mAdapter = WorkRiskListReportAdapter(context,datas)
binding.lv.adapter = mAdapter
binding.lv.onItemClickListener =
AdapterView.OnItemClickListener { _: AdapterView<*>?, _: View?, position: Int, _: Long ->
val item:WorkRiskListReportBean.WorkRiskListReportDataListBean = datas[position]
//进入每日工作报告详情
val intent = Intent(context, WorkRiskListHuiBaoDetailActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
intent.putExtra("item", GsonUtils.GsonString(item))
startActivity(intent)
}
//格式化日期的对象(转化成习惯的时间格式)
val sdFormat = SimpleDateFormat("yyyy-MM-dd")
var calendar = Calendar.getInstance()
val dayOfWeek: Int = calendar.get(Calendar.DAY_OF_WEEK) // 获取当前是周几1代表周日2代表周一依次类推
if (dayOfWeek == Calendar.SUNDAY) {
calendar.add(Calendar.DAY_OF_MONTH, -6) // 如果是周日向前推6天
} else {
calendar.add(
Calendar.DAY_OF_MONTH,
-dayOfWeek + 2
) // 向前推dayOfWeek-2天dayOfWeek减2代表前一周的周一
}
val nowStr = sdFormat.format(calendar.time)
showLog("周一:")
showLog(nowStr)
var calendarSunday = Calendar.getInstance()
calendarSunday[Calendar.DAY_OF_WEEK] = Calendar.SUNDAY
calendarSunday.add(Calendar.DATE, 7)
val sundayStr = sdFormat.format(calendarSunday.time)
showLog("本周日:")
showLog(sundayStr)
binding.tvSt.text = nowStr
binding.tvEt.text = sundayStr
binding.tvSt.setOnClickListener(View.OnClickListener { view: View? ->
val dialog = RiskDatePickDialog(
context, calendar
) { outPutDate: String?,calendarBack: Calendar? ->
stime = binding.tvSt.getText().toString().trim { it <= ' ' }
binding.tvSt.text = outPutDate
calendar = calendarBack;
authenticationLoginAI()
}
dialog.show()
})
binding.tvEt.setOnClickListener(View.OnClickListener { view: View? ->
val dialog = RiskDatePickDialog(
context, calendarSunday
) { outPutDate: String?,calendarBack: Calendar? ->
etime = binding.tvEt.getText().toString().trim { it <= ' ' }
binding.tvEt.text = outPutDate
calendarSunday = calendarBack;
authenticationLoginAI()
}
dialog.show()
})
//WorkRiskListHuiBaoDetailActivity
} }
override fun initData() { override fun initData() {
@ -82,6 +153,12 @@ class WorkRiskListReportActivity : BaseActivityOaToolbarViewBinding<ActivityWork
RequestMethod.GET RequestMethod.GET
) )
request.add("startTime", String.format("%s 00:00:00", binding.tvSt.text.toString().trim()))
request.add("endTime", String.format("%s 23:59:59", binding.tvEt.text.toString().trim()))
request.add("pageNo", 1)
request.add("pageSize", 1000)
if (Contans.BASE_URL_AI_3D_SERVER == Contans.BASE_URL_AI_3D_SERVER_EXTRANET) { if (Contans.BASE_URL_AI_3D_SERVER == Contans.BASE_URL_AI_3D_SERVER_EXTRANET) {
val socketFactory = NohttpUtils.getSSLSocketFactory(context) val socketFactory = NohttpUtils.getSSLSocketFactory(context)
if (socketFactory != null) { if (socketFactory != null) {
@ -97,59 +174,25 @@ class WorkRiskListReportActivity : BaseActivityOaToolbarViewBinding<ActivityWork
val result = response?.get() val result = response?.get()
showLog("----------------") showLog("----------------")
showLog(result) showLog(result)
// val bean = GsonUtils.GsonToBean( val bean = GsonUtils.GsonToBean(
// result, result,
// WorkRiskLevelListBean::class.java WorkRiskListReportBean::class.java
// ) )
// if (bean != null && bean.data != null) { if (bean != null && bean.data != null&&bean.data.totalRow>0) {
// val workRiskLevelLists = bean.data val dataList = bean.data.dataList
// if (workRiskLevelLists != null && workRiskLevelLists.size > 0) { if (dataList != null && dataList.size > 0) {
// binding.tvNodata.visibility = View.GONE binding.tvNodata.visibility = View.GONE
// headView.visibility = View.VISIBLE datas.clear()
// datas.clear() datas.addAll(dataList)
// datas.addAll(workRiskLevelLists) mAdapter.notifyDataSetChanged()
// mAdapter.notifyDataSetChanged() } else {
// binding.tvNodata.visibility = View.VISIBLE
// dataA.clear() }
// dataB.clear() }else{
// dataC1.clear() binding.tvNodata.visibility = View.VISIBLE
// dataC2.clear() datas.clear()
// dataC3.clear() mAdapter.notifyDataSetChanged()
// dataLowRisk.clear() }
//
//
// for(item in datas){
// showLog(GsonUtils.GsonString(item))
// if(item.level!=null&&item.level=="A"){
// dataA.add(item)
// }
// if(item.level!=null&&item.level=="B"){
// dataB.add(item)
// }
// if(item.level!=null&&item.level=="C1"){
// dataC1.add(item)
// }
// if(item.level!=null&&item.level=="C2"){
// dataC2.add(item)
// }
// if(item.level!=null&&item.level=="C3"){
// dataC3.add(item)
// }
// if(item.level!=null&&item.level=="低风险"){
// dataLowRisk.add(item)
// }
// }
// binding.tvA.text = dataA.size.toString()
// binding.tvB.text = dataB.size.toString()
// binding.tvC1.text = dataC1.size.toString()
// binding.tvC2.text = dataC2.size.toString()
// binding.tvC3.text = dataC3.size.toString()
// binding.tvLowLisk.text = dataLowRisk.size.toString()
//
// } else {
// binding.tvNodata.visibility = View.VISIBLE
// }
// }
} }
override fun onFailed(what: Int, response: Response<String?>?) { override fun onFailed(what: Int, response: Response<String?>?) {

@ -0,0 +1,168 @@
package com.rehome.zhdcoa.utils;
import android.app.Dialog;
import android.content.Context;
import android.view.Display;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.DatePicker;
import android.widget.TextView;
import android.widget.TimePicker;
import com.rehome.zhdcoa.R;
import java.text.SimpleDateFormat;
import java.util.Calendar;
/**
*
* Created by Rehome-rjb1 on 2017/4/10.
*/
public class RiskDatePickDialog extends Dialog implements DatePicker.OnDateChangedListener,
TimePicker.OnTimeChangedListener {
private final TextView tv_dialog_title;
private TextView tv_dialog_msg;
private final TextView tv_dialog_commit;
private final TextView tv_dialog_cancel;
private final View lay_dialog_title;
private final View lay_dialog_cancel;
private View lay_dialog_commit;
private final CommitClickListener commitClickListener;
private final DatePicker datePicker;
private String outPutDateTime;
private Calendar calendarBack = Calendar.getInstance();
//private final Calendar nowCalendar = Calendar.getInstance();//现在时间
//private Calendar tempCalendar = Calendar.getInstance();//历史时间
//private final SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
//private final SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
private final SimpleDateFormat simpleDateFormat3 = new SimpleDateFormat("yyyy-MM-dd");
//private final SimpleDateFormat simpleDateFormat4 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
public RiskDatePickDialog(Context context, Calendar calendar,CommitClickListener commitClickListener) {
super(context);
this.commitClickListener = commitClickListener;
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
setContentView(R.layout.layout_date_tj_dialog);
Window window = getWindow();
WindowManager.LayoutParams lp = window.getAttributes();
lp.width = (getScreenWidth(context)) * 4 / 5;
window.setGravity(Gravity.CENTER);
lay_dialog_title = findViewById(R.id.lay_dialog_title);
tv_dialog_title = findViewById(R.id.dialog_title);
lay_dialog_cancel = findViewById(R.id.lay_dialog_cancel);
// lay_dialog_commit = findViewById(R.id.lay_dialog_commit);
tv_dialog_cancel = findViewById(R.id.dialog_cancel);
tv_dialog_commit = findViewById(R.id.dialog_commit);
datePicker = findViewById(R.id.datePicker);
//this.calendar=calendar;
initDateTime(datePicker, calendar);
tv_dialog_cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
}
});
tv_dialog_commit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
commitClickListener.confirm(outPutDateTime,calendarBack);
dismiss();
}
});
}
public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
onDateChanged(null, 0, 0, 0);
}
/**
*
*
* @param view
* @param year
* @param monthOfYear
* @param dayOfMonth
*/
public void onDateChanged(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
// tempCalendar.set(datePicker.getYear(), datePicker.getMonth(),
// datePicker.getDayOfMonth(), 0,
// 0,0);
/**
*
*/
//calendar = tempCalendar;
Calendar calendar = Calendar.getInstance();
calendar.set(datePicker.getYear(), datePicker.getMonth(),
datePicker.getDayOfMonth(), 0,
0,0);
calendarBack = calendar;
outPutDateTime = simpleDateFormat3.format(calendar.getTime());
tv_dialog_title.setText(outPutDateTime);
}
/**
*
*
* @param datePicker
* @param calendar
*/
private void initDateTime(DatePicker datePicker, Calendar calendar) {
//calendar.add(Calendar.DATE, 1);
datePicker.init(calendar.get(Calendar.YEAR),
calendar.get(Calendar.MONTH),
calendar.get(Calendar.DAY_OF_MONTH), this);
//设置不显示年
((ViewGroup) ((ViewGroup) datePicker.getChildAt(0)).getChildAt(0)).getChildAt(0).setVisibility(View.VISIBLE);
calendar.set(datePicker.getYear(), datePicker.getMonth(),
datePicker.getDayOfMonth(), 0,
0,0);
tv_dialog_title.setText(simpleDateFormat3.format(calendar.getTime()));
//tempCalendar = calendar;
outPutDateTime = simpleDateFormat3.format(calendar.getTime());
}
public interface CommitClickListener {
/**
* @param outPutDate
*/
void confirm(String outPutDate,Calendar calendarBack);
}
//获取屏幕宽度
public static int getScreenWidth(Context context) {
WindowManager manager = (WindowManager) context
.getSystemService(Context.WINDOW_SERVICE);
Display display = manager.getDefaultDisplay();
return display.getWidth();
}
}

@ -0,0 +1,17 @@
<?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:layout_gravity="center"
android:background="#000000"
android:orientation="vertical"
tools:context=".ui.activity.PhotoRiskViewActivity">>
<!--<include layout="@layout/toolbar"></include>-->
<uk.co.senab.photoview.PhotoView
android:id="@+id/iv"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

@ -0,0 +1,224 @@
<?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:id="@+id/activity_sqxgdlr3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ui.activity.WorkRiskListHuiBaoDetailActivity">
<include
android:id="@+id/toolbarView"
layout="@layout/layout_base" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="汇报人:" />
<TextView
android:id="@+id/tv_hbr"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="部门:" />
<TextView
android:id="@+id/tv_hbbm"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="风险等级:" />
<TextView
android:id="@+id/tv_level"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:text="汇报时间:" />
<TextView
android:id="@+id/tv_hbsj"
style="@style/dagerDetailRightStyle"
android:textSize="12sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:gravity="center|left">
<TextView
android:id="@+id/tv_xydj"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right|center_vertical"
android:textSize="18sp"
android:text="汇报内容:" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="300px"
android:layout_margin="10dp"
android:gravity="center">
<EditText
android:id="@+id/et_ms"
style="@style/editTextTheme"
android:layout_width="match_parent"
android:layout_height="300px"
android:gravity="top|left"
android:enabled="false"
android:inputType="textMultiLine"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="90dp"
android:layout_margin="10dp"
android:background="@drawable/radius"
android:orientation="vertical">
<CheckBox
android:id="@+id/cb_crop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:visibility="gone"
android:text="是否裁剪图片"
android:textColor="#53575e"
android:textSize="14sp" />
<CheckBox
android:id="@+id/cb_compress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:visibility="gone"
android:checked="true"
android:text="是否压缩图片"
android:textColor="#53575e"
android:textSize="14sp" />
<CheckBox
android:id="@+id/cb_editor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:gravity="center_vertical"
android:text="是否开启图片编辑"
android:visibility="gone"
android:textColor="#53575e"
android:textSize="14sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:overScrollMode="never" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

@ -10,19 +10,50 @@
android:id="@+id/toolbarView" android:id="@+id/toolbarView"
layout="@layout/layout_base" /> layout="@layout/layout_base" />
<include <LinearLayout
android:id="@+id/item_head"
layout="@layout/item_work_risk_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginStart="10px" android:layout_height="wrap_content"
android:layout_marginEnd="10px" android:background="#dddddd"
android:layout_marginTop="5dp" android:padding="10dp"
android:layout_height="wrap_content" /> android:minHeight="30px">
<TextView
android:id="@+id/tv_st"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50px"
android:text="点击选择开始时间"
android:textSize="24px" />
<TextView
android:id="@+id/tv_to"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="0.2"
android:gravity="center"
android:minHeight="50px"
android:text="至"
android:textSize="24px" />
<TextView
android:id="@+id/tv_et"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_weight="1"
android:gravity="center"
android:minHeight="50px"
android:text="点击选择结束时间"
android:textSize="24px" />
</LinearLayout>
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginStart="10px" android:layout_marginStart="10px"
android:layout_marginEnd="10px" android:layout_marginEnd="10px"
android:layout_marginTop="10px"
android:layout_marginBottom="10px" android:layout_marginBottom="10px"
android:layout_weight="1"> android:layout_weight="1">
@ -31,7 +62,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:divider="#00000000" android:divider="#00000000"
android:dividerHeight="0px"/> android:dividerHeight="5dp"/>
<TextView <TextView
android:id="@+id/tv_nodata" android:id="@+id/tv_nodata"

@ -0,0 +1,142 @@
<?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:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#dddddd"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="汇报人:" />
<TextView
android:id="@+id/tv_hbr"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="部门:" />
<TextView
android:id="@+id/tv_hbbm"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="风险等级:" />
<TextView
android:id="@+id/tv_level"
style="@style/dagerDetailRightStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
android:text="汇报时间:" />
<TextView
android:id="@+id/tv_hbsj"
style="@style/dagerDetailRightStyle"
android:textSize="12sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/dagerListMarginTopStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
style="@style/dagerDetailLeftStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="汇报内容:" />
<TextView
android:id="@+id/tv_hbnr"
style="@style/dagerDetailRightStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<com.luck.picture.lib.widget.SquareRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/fiv"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:src="@color/app_color_f6" />
</com.luck.picture.lib.widget.SquareRelativeLayout>

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<com.zhy.autolayout.AutoLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/dialog_radius"
android:orientation="vertical">
<LinearLayout
android:id="@+id/lay_dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible">
<TextView
android:id="@+id/dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
android:text="时间"
android:textColor="#000000"
android:textSize="40px"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<DatePicker
android:id="@+id/datePicker"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:calendarViewShown="false"
android:datePickerMode="spinner" />
</LinearLayout>
<include layout="@layout/layout_dialog_bottom" />
</com.zhy.autolayout.AutoLinearLayout>
Loading…
Cancel
Save