添加日志功能

This commit is contained in:
itgaojian163 2022-10-26 21:30:01 +08:00
parent 47d946f814
commit f348402ffd
15 changed files with 1256 additions and 155 deletions

View File

@ -8,7 +8,12 @@
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="commonmodule/src/main/res/layout/activity_incident_list.xml" value="0.3651041666666667" />
<entry key="commonmodule/src/main/res/layout/activity_journal_detail.xml" value="0.27853260869565216" />
<entry key="commonmodule/src/main/res/layout/activity_journal_list.xml" value="0.3651041666666667" />
<entry key="commonmodule/src/main/res/layout/item_journal_list.xml" value="0.27853260869565216" />
<entry key="mainmodule/src/main/res/layout/activity_login.xml" value="0.3591485507246377" />
<entry key="mainmodule/src/main/res/layout/fragment_main_leader.xml" value="0.3651041666666667" />
</map>
</option>
</component>

View File

@ -186,6 +186,9 @@ public class PathConfig {
public static final String PATH_MODULE_PLAYER_SIMPLE_VIDEO = "/moduleplayer/activity/simpleplayer";//单纯播放器
/*============================公共模块=============================*/
public static final String PATH_MODULE_COMMON_ACTIVITY_JOURNAL_LIST = "/modulecommon/activity/journalList";//日志列表
public static final String PATH_MODULE_COMMON_ACTIVITY_JOURNAL_DETAIL = "/modulecommon/activity/journalDetail";//日志详情
public static final String PATH_MODULE_COMMON_ACTIVITY_ATTENDANCE = "/modulecommon/activity/attendance";//考勤
public static final String PATH_MODULE_COMMON_DEMO = "/modulecommon/activity/mapdemo";//地图测试
public static final String PATH_MODULE_COMMON_ACTIVITY_USER_CENTER = "/modulecommon/activity/userCenter";//用户中心activity

View File

@ -21,6 +21,7 @@ public class BaseUrlApi {
public static final String BASE_MAIN_IP = IP + SYS_USERCENTER;
public static final String BASE_CASE_IP = IP + SYS_CASE;
public static final String BASE_CASE_LOCAL_IP="http://49.233.36.36:58099/case/";
public static final String BASE_LIBRARY_IP = IP + SYS_LIBRARY;
public static final String BASE_TASK_IP = IP + SYS_TASK;
public static final String BASE_PERSON_IP = IP + SYS_POPULATION;

View File

@ -3,7 +3,18 @@
package="com.tengshisoft.commonmodule">
<application>
<activity
android:name=".activitys.journal.JournalDetailActivity"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".activitys.journal.JournalListActivity"
android:exported="false"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".activitys.usercenter.ForgetPwdActivity"
android:launchMode="singleTop"

View File

@ -0,0 +1,165 @@
package com.tengshisoft.commonmodule.activitys.journal;
import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tengshisoft.commonmodule.R;
import com.tengshisoft.commonmodule.R2;
import com.tengshisoft.commonmodule.beans.JournalListBean;
import com.tengshisoft.commonmodule.nets.CenterApis;
import com.tenlionsoft.baselib.constant.PathConfig;
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.core.widget.base.BaseShowPhotoAdapter;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
/**
* 日志详情
*/
@Route(path = PathConfig.PATH_MODULE_COMMON_ACTIVITY_JOURNAL_DETAIL)
public class JournalDetailActivity extends BaseActivity {
@BindView(R2.id.tv_title)
TextView mTvTitle;
@BindView(R2.id.tv_date)
TextView mTvDate;
@BindView(R2.id.tv_level)
TextView mTvLevel;
@BindView(R2.id.tv_type)
TextView mTvType;
@BindView(R2.id.tv_content)
TextView mTvContent;
@BindView(R2.id.rlv_photos)
RecyclerView mRlvPhotos;
@BindView(R2.id.srl_content)
SmartRefreshLayout mSrlContent;
private String mId;
@Override
protected int setLayoutId() {
return R.layout.activity_journal_detail;
}
@Override
public void initData() {
ButterKnife.bind(this);
mId = getIntent().getStringExtra("id");
mTvBaseTitle.setText("详情");
mSrlContent.setEnableLoadMore(false);
mSrlContent.setEnableRefresh(false);
getDetailData();
}
private void getDetailData() {
RetrofitManager.getInstance()
.create(CenterApis.class)
.getGridLogDetail(mId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<JournalListBean.RowsBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(JournalListBean.@NonNull RowsBean rowsDTO) {
setDataToView(rowsDTO);
}
@Override
public void onError(@NonNull Throwable e) {
ExceptionHandler.handleException(e);
refreshView(STATE_LOAD_ERROR);
}
@Override
public void onComplete() {
}
});
}
private void setDataToView(JournalListBean.RowsBean rowsDTO) {
refreshView(STATE_LOAD_SUCCESS);
mTvTitle.setText(rowsDTO.getGridOgTitle());
mTvDate.setText(rowsDTO.getGridLogDate());
switch (rowsDTO.getGridLogLevel()) {
case "1":
mTvLevel.setText("日报");
break;
case "2":
mTvLevel.setText("月报");
break;
case "3":
mTvLevel.setText("年报");
break;
}
mTvType.setText("1".equals(rowsDTO.getGridLogType()) ? "当天填报" : "以往补填");
mTvContent.setText(rowsDTO.getGridLogContent());
if (!TextUtils.isEmpty(rowsDTO.getGridLogImage())) {
//有图片
mRlvPhotos.setVisibility(View.VISIBLE);
String[] doorIds = rowsDTO.getGridLogImage().split(",");
ArrayList<String> paths = new ArrayList<>();
BaseShowPhotoAdapter mAdapter = new BaseShowPhotoAdapter(mActivity, paths);
mRlvPhotos.setLayoutManager(new GridLayoutManager(mActivity, 4));
mRlvPhotos.setAdapter(mAdapter);
mAdapter.setOnItemClickListener((data, pos) -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
.withStringArrayList("imgUrls", paths)
.withInt("curItem", pos)
.navigation());
for (String doorId : doorIds) {
if (!TextUtils.isEmpty(doorId)) {
paths.add(BaseUrlApi.BASE_IMG_URL + doorId);
}
}
mAdapter.setData(paths);
} else {
//没有图片
mRlvPhotos.setVisibility(View.GONE);
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
if (requestCode == 12) {
refreshView(STATE_LOAD_LOADING);
getDetailData();
}
}
}
@Override
protected void doSearchByTitle() {
}
@Override
protected void clearSearch() {
}
}

View File

@ -0,0 +1,280 @@
package com.tengshisoft.commonmodule.activitys.journal;
import android.app.ProgressDialog;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.gyf.immersionbar.ImmersionBar;
import com.hjq.toast.ToastUtils;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tengshisoft.commonmodule.R;
import com.tengshisoft.commonmodule.R2;
import com.tengshisoft.commonmodule.adapters.JournalListAdapter;
import com.tengshisoft.commonmodule.beans.JournalListBean;
import com.tengshisoft.commonmodule.nets.CenterApis;
import com.tenlionsoft.baselib.constant.PathConfig;
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.core.widget.views.ItemSplitDivider;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
/**
* 日志列表
*/
@Route(path = PathConfig.PATH_MODULE_COMMON_ACTIVITY_JOURNAL_LIST)
public class JournalListActivity extends BaseActivity {
@BindView(R2.id.rlv_components)
RecyclerView mRlvComponents;
@BindView(R2.id.srl_content)
SmartRefreshLayout mSrlContent;
@BindView(R2.id.pb_loading)
ProgressBar mPbLoading;
@BindView(R2.id.iv_empty_data)
ImageView mIvEmptyData;
@BindView(R2.id.tv_error_hint)
TextView mTvErrorHint;
@BindView(R2.id.et_search_key)
EditText mEtSearchKey;
private Unbinder mBind;
private List<JournalListBean.RowsBean> mDatas;
private JournalListAdapter mAdapter;
private int mCurrentPage = 1;
private String mKeywords = "";
private ProgressDialog mDialog;
private int mSearchDelay = 600;
@Override
protected int setLayoutId() {
return R.layout.activity_journal_list;
}
@Override
public void initData() {
ButterKnife.bind(this);
mTvBaseTitle.setText("工作日志");
ImmersionBar.with(mActivity)
.statusBarColor("#FFFFFF")
.statusBarDarkFont(true)
.titleBar(mRlTitleBar)
.init();
mTvBaseTitle.setTextColor(Color.BLACK);
mRlTitleBar.setBackgroundColor(getResources().getColor(R.color.white));
mIvAppSearchIcon.setVisibility(View.GONE);
mTvAppBack.setBackgroundResource(R.drawable.ic_back_black);
refreshView(STATE_LOAD_SUCCESS);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mDatas = new ArrayList<>();
mAdapter = new JournalListAdapter(mActivity, mDatas);
mRlvComponents.setLayoutManager(new LinearLayoutManager(mActivity));
mRlvComponents.setAdapter(mAdapter);
mRlvComponents.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#BFBFBF")));
mSrlContent.setOnRefreshListener(v -> doRefresh());
mSrlContent.setOnLoadMoreListener(v -> doLoadMore());
setStateView(13);
mAdapter.addOnItemClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_JOURNAL_DETAIL)
.withString("id", v.getGridLogId())
.navigation());
mDialog = UIUtil.initDialog(mActivity, "搜索中...");
doRefresh();
mEtSearchKey.setOnEditorActionListener((v, actionId, event) -> {
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
hideSoftKeyboard();
mEtSearchKey.clearFocus();
mKeywords = v.getText().toString();
mDialog.show();
doRefresh();
return true;
} else {
return false;
}
});
}
/**
* 获取片区内的部件列表
*/
private void getGridListArea(int currentPage) {
mCurrentPage = currentPage;
RetrofitManager.getInstance()
.create(CenterApis.class)
.getGridLogListArea(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<JournalListBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull JournalListBean communityListBean) {
if (mDialog != null && mDialog.isShowing()) {
mDialog.dismiss();
}
if (communityListBean.getRows() != null && communityListBean.getRows().size() > 0) {
++mCurrentPage;
if (currentPage == 1) {
mDatas.clear();
mDatas.addAll(communityListBean.getRows());
} else {
mDatas.addAll(communityListBean.getRows());
}
setStateView(14);
mAdapter.notifyDataSetChanged();
mSrlContent.finishRefresh();
if (mDatas.size() >= communityListBean.getTotal()) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(true);
} else {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(false);
}
} else {
if (currentPage > 1) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(true);
setStateView(14);
} else {
if (TextUtils.isEmpty(mKeywords)) {
//无数据
setStateView(15);
} else {
setStateView(15);
ToastUtils.show("未查询到相关内容");
}
}
}
}
@Override
public void onError(@NonNull Throwable e) {
if (mDialog != null && mDialog.isShowing()) {
mDialog.dismiss();
}
mSrlContent.finishLoadMore();
mSrlContent.finishRefresh();
ExceptionHandler.handleException(e);
setStateView(16);
}
@Override
public void onComplete() {
}
});
}
/**
*
*/
private void doSearch() {
String searchContent = mEtAppSearchContent.getText().toString().trim();
if (!TextUtils.isEmpty(searchContent)) {
hideSoftKeyboard();
setStateView(13);
mKeywords = searchContent;
mCurrentPage = 1;
getGridListArea(mCurrentPage);
} else {
ToastUtils.show("请输入要查询的内容");
}
}
@Override
protected void clearSearch() {
mKeywords = "";
doRefresh();
}
//加载更多
private void doLoadMore() {
getGridListArea(mCurrentPage);
}
//刷新
private void doRefresh() {
mDatas.clear();
mAdapter.setData(mDatas);
getGridListArea(1);
}
/**
* 根据状态显示
* 12 默认
* 13 搜索中
* 14 搜索完成有数据
* 15 搜索完成没有数据
* 16 搜索失败
*
* @param state
*/
private void setStateView(int state) {
switch (state) {
case 12://默认
case 15:
mPbLoading.setVisibility(View.GONE);
mSrlContent.setVisibility(View.GONE);
mIvEmptyData.setVisibility(View.VISIBLE);
mTvErrorHint.setVisibility(View.VISIBLE);
mTvErrorHint.setText("暂无数据");
break;
case 13://搜索中
mPbLoading.setVisibility(View.VISIBLE);
mSrlContent.setVisibility(View.GONE);
mIvEmptyData.setVisibility(View.GONE);
mTvErrorHint.setVisibility(View.VISIBLE);
mTvErrorHint.setText("加载中...");
break;
case 14://搜索完成有数据
mPbLoading.setVisibility(View.GONE);
mSrlContent.setVisibility(View.VISIBLE);
mIvEmptyData.setVisibility(View.GONE);
mTvErrorHint.setVisibility(View.GONE);
break;
case 16://搜索失败
mPbLoading.setVisibility(View.GONE);
mSrlContent.setVisibility(View.GONE);
mIvEmptyData.setVisibility(View.VISIBLE);
mTvErrorHint.setVisibility(View.VISIBLE);
mTvErrorHint.setText("加载失败,请稍后重试");
break;
}
}
@Override
protected void doSearchByTitle() {
}
}

View File

@ -0,0 +1,84 @@
package com.tengshisoft.commonmodule.adapters;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.bumptech.glide.Glide;
import com.tengshisoft.commonmodule.R;
import com.tengshisoft.commonmodule.beans.JournalListBean;
import com.tengshisoft.commonmodule.beans.PenalListBean;
import com.tengshisoft.commonmodule.holders.JournalHolder;
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
import java.util.List;
/**
* 作者: adam
* 日期: 2021/9/26 - 3:01 下午
* 邮箱: itgaojian@163.com
* 描述: 日志列表
*/
public class JournalListAdapter extends BaseRecyclerAdapter<JournalListBean.RowsBean, JournalHolder> {
public JournalListAdapter(Context ctx, List<JournalListBean.RowsBean> list) {
super(ctx, list);
}
@Override
public JournalHolder createHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_journal_list, parent, false);
return new JournalHolder(itemView);
}
@Override
public void bindHolder(JournalHolder holder, int i) {
JournalListBean.RowsBean bean = mData.get(i);
holder.mTvTitle.setText(bean.getGridOgTitle());
holder.mTvContent.setText(bean.getGridLogContent());
holder.mTvTime.setText(bean.getGridLogDate());
holder.mTvName.setText(bean.getCreatorName());
switch (bean.getGridLogLevel()) {
case "1":
holder.mTvLevel.setText("日报");
break;
case "2":
holder.mTvLevel.setText("月报");
break;
case "3":
holder.mTvLevel.setText("年报");
break;
}
if (!TextUtils.isEmpty(bean.getGridLogImage())) {
String[] split = bean.getGridLogImage().split(",");
String s = BaseUrlApi.BASE_IMG_URL + split[0];
Glide.with(mContext)
.load(s)
.apply(options)
.into(holder.mIvPic);
} else {
Glide.with(mContext)
.load(R.drawable.ic_default_img_icon)
.apply(options)
.into(holder.mIvPic);
}
}
private OnEditOrDel mPatrolListener;
public void addOnPatrolListener(OnEditOrDel listener) {
this.mPatrolListener = listener;
}
public interface OnEditOrDel {
void onEdit(PenalListBean.RowsBean bean, int pos);
void onDel(PenalListBean.RowsBean bean, int pos);
}
}

View File

@ -0,0 +1,145 @@
package com.tengshisoft.commonmodule.beans;
import java.util.List;
public class JournalListBean {
private int page;
private List<RowsBean> rows;
private int total;
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public List<RowsBean> getRows() {
return rows;
}
public void setRows(List<RowsBean> rows) {
this.rows = rows;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public static class RowsBean {
private String creator;
private String creatorName;
private String gmtCreate;
private String gridLogContent;
private String gridLogDate;
private String gridLogId;
private String gridLogImage;
private String gridLogLevel;
private String gridLogType;
private String gridLogUserAreaCode;
private String gridLogUserAreaName;
private String gridOgTitle;
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getCreatorName() {
return creatorName;
}
public void setCreatorName(String creatorName) {
this.creatorName = creatorName;
}
public String getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getGridLogContent() {
return gridLogContent;
}
public void setGridLogContent(String gridLogContent) {
this.gridLogContent = gridLogContent;
}
public String getGridLogDate() {
return gridLogDate;
}
public void setGridLogDate(String gridLogDate) {
this.gridLogDate = gridLogDate;
}
public String getGridLogId() {
return gridLogId;
}
public void setGridLogId(String gridLogId) {
this.gridLogId = gridLogId;
}
public String getGridLogImage() {
return gridLogImage;
}
public void setGridLogImage(String gridLogImage) {
this.gridLogImage = gridLogImage;
}
public String getGridLogLevel() {
return gridLogLevel;
}
public void setGridLogLevel(String gridLogLevel) {
this.gridLogLevel = gridLogLevel;
}
public String getGridLogType() {
return gridLogType;
}
public void setGridLogType(String gridLogType) {
this.gridLogType = gridLogType;
}
public String getGridLogUserAreaCode() {
return gridLogUserAreaCode;
}
public void setGridLogUserAreaCode(String gridLogUserAreaCode) {
this.gridLogUserAreaCode = gridLogUserAreaCode;
}
public String getGridLogUserAreaName() {
return gridLogUserAreaName;
}
public void setGridLogUserAreaName(String gridLogUserAreaName) {
this.gridLogUserAreaName = gridLogUserAreaName;
}
public String getGridOgTitle() {
return gridOgTitle;
}
public void setGridOgTitle(String gridOgTitle) {
this.gridOgTitle = gridOgTitle;
}
}
}

View File

@ -0,0 +1,29 @@
package com.tengshisoft.commonmodule.holders;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.tengshisoft.commonmodule.R;
public class JournalHolder extends RecyclerView.ViewHolder {
public ImageView mIvPic;
public TextView mTvContent;
public TextView mTvTime;
public TextView mTvTitle;
public TextView mTvLevel;
public TextView mTvName;
public JournalHolder(@NonNull View itemView) {
super(itemView);
mIvPic = itemView.findViewById(R.id.iv_pic);
mTvContent = itemView.findViewById(R.id.tv_content);
mTvTime = itemView.findViewById(R.id.tv_time);
mTvTitle = itemView.findViewById(R.id.tv_title);
mTvLevel = itemView.findViewById(R.id.tv_level);
mTvName = itemView.findViewById(R.id.tv_name);
}
}

View File

@ -13,6 +13,7 @@ import com.tengshisoft.commonmodule.beans.IncidentDeferListBean;
import com.tengshisoft.commonmodule.beans.IncidentListBean;
import com.tengshisoft.commonmodule.beans.IncidentMineOverseeListBean;
import com.tengshisoft.commonmodule.beans.IncidentOverseeDetailBean;
import com.tengshisoft.commonmodule.beans.JournalListBean;
import com.tengshisoft.commonmodule.beans.KnowAskDetailBean;
import com.tengshisoft.commonmodule.beans.KnowAskListBean;
import com.tengshisoft.commonmodule.beans.KnowReportDetailBean;
@ -307,4 +308,44 @@ public interface CenterApis {
@Headers({"base_url_name:library", "Content-Type: application/json", "Accept: application/json"})
@PUT("app/knowledge-report/update-report/{knowledgeId}")
Observable<SuccessBean> doEditKnowReport(@Path("knowledgeId") String id, @Body RequestBody body, @Header("token") String token);
/*===========日志=========*/
// 上报日志
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
@POST("app/gridlog/save")
Observable<SuccessBean> doSaveGridLog(@Body RequestBody body, @Header("token") String token);
//修改日志
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
@PUT("app/gridlog/update/{gridLogId}")
Observable<SuccessBean> doEditGridLog(@Path("gridLogId") String id, @Body RequestBody body, @Header("token") String token);
//我的上报日志
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
@GET("app/gridlog/listpage")
Observable<JournalListBean> getGridLogList(@Query("gridLogDateStart") String start,
@Query("gridLogDateEnd") String end,
@Query("rows") String rows,
@Header("token") String token);
//日志详情
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
@GET("app/gridlog/get/{gridLogId}")
Observable<JournalListBean.RowsBean> getGridLogDetail(@Path("gridLogId") String id, @Header("token") String token);
/**
* 删除汽车
*/
@Headers({"base_url_name:usercenter", "Content-Type: application/json", "Accept: application/json"})
@DELETE("app/car/remove/{ids}")
Observable<SuccessBean> doDelGridLog(@Path("ids") String id, @Header("token") String token);
//区域上报日志列表
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
@GET("app/gridlog/listpage-area")
Observable<JournalListBean> getGridLogListArea(@Query("keywords") String key,
@Query("page") String page,
@Header("token") String token);
}

View File

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:background="@color/white">
<LinearLayout
android:id="@+id/ll_base_info"
android:layout_width="match_parent"
android:layout_height="80dp"
android:background="@drawable/shape_blue_bg"
android:orientation="vertical"
android:padding="20dp">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_base_info"
android:layout_marginTop="-50dp"
android:background="@drawable/shape_rectangle_white_top">
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.core.widget.NestedScrollView
android:id="@+id/nsv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:visibility="visible">
<TextView
style="@style/issue_report_title"
android:padding="8dp"
android:text="填报详情"
android:textStyle="bold" />
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:text="日志标题" />
<TextView
android:id="@+id/tv_title"
style="@style/item_content"
android:hint="未录入" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:text="上报日期" />
<TextView
android:id="@+id/tv_date"
style="@style/item_content"
android:hint="未录入" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:text="类型" />
<TextView
android:id="@+id/tv_level"
style="@style/item_content"
android:hint="未录入" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:text="填报类型" />
<TextView
android:id="@+id/tv_type"
style="@style/item_content"
android:hint="未录入" />
</LinearLayout>
<TextView
style="@style/issue_report_title"
android:padding="8dp"
android:text="填报内容"
android:textStyle="bold" />
<LinearLayout style="@style/item_white_vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shp_rectangle_gray"
android:orientation="vertical">
<TextView
android:id="@+id/tv_content"
style="@style/item_content_ver"
android:minLines="8" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_photos"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:itemCount="1"
tools:listitem="@layout/item_show_photo_smail"
tools:visibility="visible" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,63 @@
<?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:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<include layout="@layout/layout_search_item" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp">
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_components"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ProgressBar
android:id="@+id/pb_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminateBehavior="repeat"
android:indeterminateDrawable="@drawable/anim_loading" />
<ImageView
android:id="@+id/iv_empty_data"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerInParent="true"
android:background="@drawable/ic_empty_data" />
<TextView
android:id="@+id/tv_error_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:clickable="true"
android:textColor="@color/black"
tools:text="加载数据失败" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View File

@ -0,0 +1,108 @@
<?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="wrap_content"
android:layout_margin="5dp"
android:background="@color/white"
android:orientation="vertical"
android:padding="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_pic"
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_gravity="center_vertical"
tools:background="@drawable/ic_default_img_icon" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingLeft="5dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_level"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/shp_status_blue"
android:gravity="center"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:textColor="@color/text_blue"
tools:text="日报" />
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_toStartOf="@id/tv_level"
android:ellipsize="end"
android:maxLines="1"
android:minLines="1"
android:textColor="@color/text_20"
android:textSize="14sp"
android:textStyle="bold"
tools:text="内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容" />
</RelativeLayout>
<TextView
android:id="@+id/tv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="2"
android:minLines="2"
android:textColor="@color/text_gray"
android:textSize="12sp"
tools:text="内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_20"
android:textSize="12sp"
tools:text="2022-2-22" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:textColor="@color/text_20"
android:textSize="12sp"
tools:text="2022-2-22" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@ -7,6 +7,11 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.tengshisoft.commonmodule.adapters.KnowLedgeListAdapter;
@ -36,10 +41,6 @@ import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
@ -82,18 +83,20 @@ public class LeaderMainFragment extends BaseFragment {
private Unbinder mBind;
private List<FuncBean> mFuncs = new ArrayList<>();
private String[] mBtnStrs = new String[]{
"事件派遣",
"超时预警事件",
"督办消息",
"归档事件",
"通讯录",
"事件派遣",
"超时预警事件",
"督办消息",
"归档事件",
"通讯录",
"工作日志",
};
private int[] mBtnIds = new int[]{
R.drawable.ic_incident_accept_icon,
R.drawable.ic_early_icon,
R.drawable.ic_supervise_icon,
R.drawable.ic_file_icon,
R.drawable.ic_list_contact};
R.drawable.ic_incident_accept_icon,
R.drawable.ic_early_icon,
R.drawable.ic_supervise_icon,
R.drawable.ic_file_icon,
R.drawable.ic_list_contact,
R.drawable.ic_journal_list};
private FunctionTitleNumAdapter mNumAdapter;
private Disposable mDisposable;
private List mDatas;
@ -125,44 +128,44 @@ public class LeaderMainFragment extends BaseFragment {
*/
private void getKnowList() {
RetrofitManager.getInstance()
.create(GridApis.class)
.getLibraryList("", "", "", "1", "1", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<KnowLedgeListBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
.create(GridApis.class)
.getLibraryList("", "", "", "1", "1", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<KnowLedgeListBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
}
@Override
public void onNext(@NonNull KnowLedgeListBean knowLedgeListBean) {
if (knowLedgeListBean.getRows() != null && knowLedgeListBean.getRows().size() > 0) {
if (knowLedgeListBean.getRows().size() > 5) {
mDatas = knowLedgeListBean.getRows().subList(0, 5);
@Override
public void onNext(@NonNull KnowLedgeListBean knowLedgeListBean) {
if (knowLedgeListBean.getRows() != null && knowLedgeListBean.getRows().size() > 0) {
if (knowLedgeListBean.getRows().size() > 5) {
mDatas = knowLedgeListBean.getRows().subList(0, 5);
} else {
mDatas.addAll(knowLedgeListBean.getRows());
}
mKnowLedgeListAdapter.setData(mDatas);
mRlvKnowledge.setVisibility(View.VISIBLE);
mLlKnowHint.setVisibility(View.GONE);
} else {
mDatas.addAll(knowLedgeListBean.getRows());
mRlvKnowledge.setVisibility(View.GONE);
mLlKnowHint.setVisibility(View.VISIBLE);
}
mKnowLedgeListAdapter.setData(mDatas);
mRlvKnowledge.setVisibility(View.VISIBLE);
mLlKnowHint.setVisibility(View.GONE);
} else {
}
@Override
public void onError(@NonNull Throwable e) {
mRlvKnowledge.setVisibility(View.GONE);
mLlKnowHint.setVisibility(View.VISIBLE);
}
}
@Override
public void onError(@NonNull Throwable e) {
mRlvKnowledge.setVisibility(View.GONE);
mLlKnowHint.setVisibility(View.VISIBLE);
}
@Override
public void onComplete() {
@Override
public void onComplete() {
}
});
}
});
}
@Override
@ -184,113 +187,113 @@ public class LeaderMainFragment extends BaseFragment {
mNumAdapter.setData(mFuncs);
Observable<IncidentCenterTimeOutCount> timeOutCount = RetrofitManager.getInstance()
.create(CenterApis.class)
.getCenterIncidentTimeOutCount(UserLgUtils.getUserAreaCode(), UserLgUtils.getToken())
.compose(RxTransformer.getTransformer());
.create(CenterApis.class)
.getCenterIncidentTimeOutCount(UserLgUtils.getUserAreaCode(), UserLgUtils.getToken())
.compose(RxTransformer.getTransformer());
Observable<IncidentCenterEarlyWarnCount> earlyWarnCount = RetrofitManager.getInstance()
.create(CenterApis.class)
.getCenterIncidentEarlyWarnCount(UserLgUtils.getUserAreaCode(), UserLgUtils.getToken())
.compose(RxTransformer.getTransformer());
.create(CenterApis.class)
.getCenterIncidentEarlyWarnCount(UserLgUtils.getUserAreaCode(), UserLgUtils.getToken())
.compose(RxTransformer.getTransformer());
Observable<IncidentCountBean> incidentCount = RetrofitManager.getInstance()
.create(CenterApis.class)
.getIncidentCount(UserLgUtils.getToken())
.compose(RxTransformer.getTransformer());
.create(CenterApis.class)
.getIncidentCount(UserLgUtils.getToken())
.compose(RxTransformer.getTransformer());
Observable<IncidentByOverseeListBean> compose = RetrofitManager.getInstance()
.create(CenterApis.class)
.getIncidentByOverseeList("", "1", UserLgUtils.getToken())
.compose(RxTransformer.getTransformer());//督办消息
.create(CenterApis.class)
.getIncidentByOverseeList("", "1", UserLgUtils.getToken())
.compose(RxTransformer.getTransformer());//督办消息
Observable.mergeDelayError(timeOutCount, earlyWarnCount, incidentCount, compose)
.compose(RxTransformer.getTransformer())
.subscribe(new Observer<Object>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
mDisposable = d;
}
.compose(RxTransformer.getTransformer())
.subscribe(new Observer<Object>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
mDisposable = d;
}
@Override
public void onNext(@NonNull Object o) {
if (o instanceof IncidentCountBean) {
IncidentCountBean incidentCountBean = (IncidentCountBean) o;
if (incidentCountBean.getData() != null && incidentCountBean.getData().size() > 0) {
List<IncidentCountBean.DataBean> data = incidentCountBean.getData();
for (int i = 0; i < data.size(); i++) {
IncidentCountBean.DataBean dataBean = data.get(i);
for (int j = 0; j < mFuncs.size(); j++) {
if ("TASK_ACCEPT".equals(dataBean.getType())) {
//事件受理数量
if (dataBean.getNum() > 0) {
mTvAcceptNum.setVisibility(View.VISIBLE);
} else {
mTvAcceptNum.setVisibility(View.GONE);
@Override
public void onNext(@NonNull Object o) {
if (o instanceof IncidentCountBean) {
IncidentCountBean incidentCountBean = (IncidentCountBean) o;
if (incidentCountBean.getData() != null && incidentCountBean.getData().size() > 0) {
List<IncidentCountBean.DataBean> data = incidentCountBean.getData();
for (int i = 0; i < data.size(); i++) {
IncidentCountBean.DataBean dataBean = data.get(i);
for (int j = 0; j < mFuncs.size(); j++) {
if ("TASK_ACCEPT".equals(dataBean.getType())) {
//事件受理数量
if (dataBean.getNum() > 0) {
mTvAcceptNum.setVisibility(View.VISIBLE);
} else {
mTvAcceptNum.setVisibility(View.GONE);
}
if (dataBean.getNum() > 99) {
mTvAcceptNum.setText("99+");
} else {
mTvAcceptNum.setText(dataBean.getNum() + "");
}
}
if (dataBean.getNum() > 99) {
mTvAcceptNum.setText("99+");
} else {
mTvAcceptNum.setText(dataBean.getNum() + "");
if ("TASK_RESULT_EXAMINE".equals(dataBean.getType())) {
//事件受理数量
if (dataBean.getNum() > 0) {
mTvRecheckNum.setVisibility(View.VISIBLE);
} else {
mTvRecheckNum.setVisibility(View.GONE);
}
if (dataBean.getNum() > 99) {
mTvRecheckNum.setText("99+");
} else {
mTvRecheckNum.setText(dataBean.getNum() + "");
}
}
if (mFuncs.get(j).getType().equals(dataBean.getType())) {
mFuncs.get(j).setHintNum(dataBean.getNum());
break;
}
}
if ("TASK_RESULT_EXAMINE".equals(dataBean.getType())) {
//事件受理数量
if (dataBean.getNum() > 0) {
mTvRecheckNum.setVisibility(View.VISIBLE);
} else {
mTvRecheckNum.setVisibility(View.GONE);
}
if (dataBean.getNum() > 99) {
mTvRecheckNum.setText("99+");
} else {
mTvRecheckNum.setText(dataBean.getNum() + "");
}
}
if (mFuncs.get(j).getType().equals(dataBean.getType())) {
mFuncs.get(j).setHintNum(dataBean.getNum());
break;
}
}
mNumAdapter.setData(mFuncs);
}
} else if (o instanceof IncidentCenterTimeOutCount) {
for (int i = 0; i < mFuncs.size(); i++) {
if ("超时预警事件".equals(mFuncs.get(i).getText())) {
IncidentCenterTimeOutCount bea = (IncidentCenterTimeOutCount) o;
mFuncs.get(i).setHintNum(mFuncs.get(i).getHintNum() + bea.getData());
break;
}
}
mNumAdapter.setData(mFuncs);
}
} else if (o instanceof IncidentCenterTimeOutCount) {
for (int i = 0; i < mFuncs.size(); i++) {
if ("超时预警事件".equals(mFuncs.get(i).getText())) {
IncidentCenterTimeOutCount bea = (IncidentCenterTimeOutCount) o;
mFuncs.get(i).setHintNum(mFuncs.get(i).getHintNum() + bea.getData());
break;
} else if (o instanceof IncidentCenterEarlyWarnCount) {
for (int i = 0; i < mFuncs.size(); i++) {
if ("超时预警事件".equals(mFuncs.get(i).getText())) {
IncidentCenterEarlyWarnCount bea = (IncidentCenterEarlyWarnCount) o;
mFuncs.get(i).setHintNum(mFuncs.get(i).getHintNum() + bea.getData());
break;
}
}
}
mNumAdapter.setData(mFuncs);
} else if (o instanceof IncidentCenterEarlyWarnCount) {
for (int i = 0; i < mFuncs.size(); i++) {
if ("超时预警事件".equals(mFuncs.get(i).getText())) {
IncidentCenterEarlyWarnCount bea = (IncidentCenterEarlyWarnCount) o;
mFuncs.get(i).setHintNum(mFuncs.get(i).getHintNum() + bea.getData());
break;
mNumAdapter.setData(mFuncs);
} else if (o instanceof IncidentByOverseeListBean) {
IncidentByOverseeListBean bean = (IncidentByOverseeListBean) o;
if (bean.getTotal() > 99) {
mTvHint2.setText("99+");
} else {
mTvHint2.setText(bean.getTotal() + "");
}
}
mNumAdapter.setData(mFuncs);
} else if (o instanceof IncidentByOverseeListBean) {
IncidentByOverseeListBean bean = (IncidentByOverseeListBean) o;
if (bean.getTotal() > 99) {
mTvHint2.setText("99+");
} else {
mTvHint2.setText(bean.getTotal() + "");
}
}
}
@Override
public void onError(@NonNull Throwable e) {
@Override
public void onError(@NonNull Throwable e) {
}
}
@Override
public void onComplete() {
@Override
public void onComplete() {
}
});
}
});
}
/**
@ -299,18 +302,18 @@ public class LeaderMainFragment extends BaseFragment {
private void initContentView() {
mTvHint2.setText("0");
mRlSupervise.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_OVERSEE)
.navigation());
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_OVERSEE)
.navigation());
mLlAccept.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_ACCEPT_LIST)
.navigation());//事件受理
.build(PathConfig.PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_ACCEPT_LIST)
.navigation());//事件受理
mLlRecheck.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_CENTER_CHECK)
.navigation());//事件核查
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_CENTER_CHECK)
.navigation());//事件核查
mLlKnowledge.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_KNOWLEDGE_LIBRARY_LIST)
.withString("type", "center")
.navigation());//知识库
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_KNOWLEDGE_LIBRARY_LIST)
.withString("type", "center")
.navigation());//知识库
for (int i = 0; i < mBtnStrs.length; i++) {
FuncBean bean = new FuncBean();
bean.setText(mBtnStrs[i]);
@ -340,9 +343,9 @@ public class LeaderMainFragment extends BaseFragment {
mKnowLedgeListAdapter = new KnowLedgeListAdapter(mActivity, mDatas, 1);
mKnowLedgeListAdapter.addOnItemClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_KNOWLEDGE_LIBRARY_DETAIL)
.withString("id", v.getKnowledgeId())
.navigation());
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_KNOWLEDGE_LIBRARY_DETAIL)
.withString("id", v.getKnowledgeId())
.navigation());
mRlvKnowledge.setLayoutManager(new LinearLayoutManager(mActivity));
mRlvKnowledge.setAdapter(mKnowLedgeListAdapter);
@ -351,10 +354,10 @@ public class LeaderMainFragment extends BaseFragment {
mLlKnowHint.setVisibility(View.VISIBLE);
mRlvKnowledge.setVisibility(View.GONE);
mTvMineIncident.setOnClickListener(v ->
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_DONE)
.withString("client", "center")
.navigation());
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_DONE)
.withString("client", "center")
.navigation());
getKnowList();
}
@ -366,28 +369,33 @@ public class LeaderMainFragment extends BaseFragment {
switch (text) {
case "事件派遣":
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_DISPATCH_LIST)
.navigation();
.build(PathConfig.PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_DISPATCH_LIST)
.navigation();
break;
case "归档事件":
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_ARCHIVE_LIST)
.navigation();
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_ARCHIVE_LIST)
.navigation();
break;
case "超时预警事件":
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_CENTER_SPECIAL)
.navigation();
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_CENTER_SPECIAL)
.navigation();
break;
case "督办消息":
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_OVERSEE)
.navigation();
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_OVERSEE)
.navigation();
break;
case "通讯录":
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_CHAT_ADDRESSLIST)
.navigation();
.build(PathConfig.PATH_MODULE_CHAT_ADDRESSLIST)
.navigation();
break;
case "工作日志":
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_JOURNAL_LIST)
.navigation();
break;
default:
break;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB