文档详情Bug,我的发起列表
This commit is contained in:
parent
32da55f568
commit
9590b630fa
@ -10,8 +10,8 @@
|
|||||||
{
|
{
|
||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"versionCode": 2,
|
"versionCode": 3,
|
||||||
"versionName": "1.0.2",
|
"versionName": "1.0.3",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -26,10 +26,13 @@ import android.text.TextUtils;
|
|||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
|
import android.view.KeyCharacterMap;
|
||||||
|
import android.view.KeyEvent;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.TouchDelegate;
|
import android.view.TouchDelegate;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewConfiguration;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.animation.LinearInterpolator;
|
import android.view.animation.LinearInterpolator;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
@ -54,6 +57,7 @@ import com.jcodecraeer.xrecyclerview.progressindicator.AVLoadingIndicatorView;
|
|||||||
import com.tenlionsoft.baselib.R;
|
import com.tenlionsoft.baselib.R;
|
||||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||||
import com.tenlionsoft.baselib.core.widget.views.AfxTextView;
|
import com.tenlionsoft.baselib.core.widget.views.AfxTextView;
|
||||||
|
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -243,6 +247,19 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
protected boolean isHasNavBar(){
|
||||||
|
//通过判断设备是否有返回键、菜单键(不是虚拟键,是手机屏幕外的按键)来确定是否有navigation bar
|
||||||
|
boolean hasMenuKey = ViewConfiguration.get(this)
|
||||||
|
.hasPermanentMenuKey();
|
||||||
|
boolean hasBackKey = KeyCharacterMap
|
||||||
|
.deviceHasKey(KeyEvent.KEYCODE_BACK);
|
||||||
|
|
||||||
|
if (!hasMenuKey && !hasBackKey) {
|
||||||
|
// 做任何你需要做的,这个设备有一个导航栏
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
protected void setLocalBroad(LocalBroad localBroad) {
|
protected void setLocalBroad(LocalBroad localBroad) {
|
||||||
this.mLocalBroad = localBroad;
|
this.mLocalBroad = localBroad;
|
||||||
|
@ -124,7 +124,7 @@ public class PreviewFileActivity extends BaseActivity {
|
|||||||
private void setWebContent(String url) {
|
private void setWebContent(String url) {
|
||||||
mWvWeb = new WebView(mActivity);
|
mWvWeb = new WebView(mActivity);
|
||||||
WebSettings settings = mWvWeb.getSettings();
|
WebSettings settings = mWvWeb.getSettings();
|
||||||
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
|
||||||
settings.setJavaScriptEnabled(true);//启用JS
|
settings.setJavaScriptEnabled(true);//启用JS
|
||||||
settings.setBlockNetworkImage(true);//阻塞页面图片加载
|
settings.setBlockNetworkImage(true);//阻塞页面图片加载
|
||||||
settings.setDomStorageEnabled(true);
|
settings.setDomStorageEnabled(true);
|
||||||
|
21
baselib/src/main/res/layout/item_tab_custom_text_view.xml
Normal file
21
baselib/src/main/res/layout/item_tab_custom_text_view.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp">
|
||||||
|
|
||||||
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
|
android:id="@+id/tv_tab_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:text_type_cus="1"
|
||||||
|
tools:text="新闻" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -2,7 +2,7 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
@ -8,6 +8,8 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.gyf.immersionbar.ImmersionBar;
|
import com.gyf.immersionbar.ImmersionBar;
|
||||||
@ -35,7 +37,6 @@ import com.tenlionsoft.baselib.utils.UserLgUtils;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.viewpager2.widget.ViewPager2;
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.Unbinder;
|
import butterknife.Unbinder;
|
||||||
@ -184,7 +185,8 @@ public class MainTabActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (isNavBarHasShown(this)) {
|
boolean isHas = isNavBarHasShown(this);
|
||||||
|
if (isHas) {
|
||||||
checkNavigation();
|
checkNavigation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,9 @@ import android.graphics.Color;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.google.android.flexbox.FlexDirection;
|
import com.google.android.flexbox.FlexDirection;
|
||||||
import com.google.android.flexbox.FlexWrap;
|
import com.google.android.flexbox.FlexWrap;
|
||||||
@ -36,8 +39,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import io.reactivex.rxjava3.annotations.NonNull;
|
import io.reactivex.rxjava3.annotations.NonNull;
|
||||||
@ -149,6 +150,7 @@ public class ChooseDocTypeActivity extends BaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLowerDept(DocumentTypeList bean, int pos) {
|
public void onLowerDept(DocumentTypeList bean, int pos) {
|
||||||
|
if ("0".equals(bean.getDocumentDirId())) return;
|
||||||
//添加到当前选中的集合中
|
//添加到当前选中的集合中
|
||||||
mSelCatalog.add(bean);
|
mSelCatalog.add(bean);
|
||||||
mTypeAdapter.setData(mSelCatalog);
|
mTypeAdapter.setData(mSelCatalog);
|
||||||
@ -440,6 +442,14 @@ public class ChooseDocTypeActivity extends BaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull List<DocumentTypeList> documentTypeLists) {
|
public void onNext(@NonNull List<DocumentTypeList> documentTypeLists) {
|
||||||
|
if ("0".equals(mSelCatalogId)) {
|
||||||
|
DocumentTypeList rootBean = new DocumentTypeList();
|
||||||
|
rootBean.setChecked(false);
|
||||||
|
rootBean.setDirName("根目录");
|
||||||
|
rootBean.setDocumentDirPid("0");
|
||||||
|
rootBean.setDocumentDirId("0");
|
||||||
|
documentTypeLists.add(0,rootBean);
|
||||||
|
}
|
||||||
if (documentTypeLists.size() > 0) {
|
if (documentTypeLists.size() > 0) {
|
||||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||||
mDatas.addAll(documentTypeLists);
|
mDatas.addAll(documentTypeLists);
|
||||||
|
@ -77,6 +77,7 @@ public class NoticeListActivity extends BaseActivity {
|
|||||||
|
|
||||||
private List<NoticeListBean.RowsBean> mDatas;
|
private List<NoticeListBean.RowsBean> mDatas;
|
||||||
private NoticeAdapter mAdapter;
|
private NoticeAdapter mAdapter;
|
||||||
|
private String mId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int setLayoutId() {
|
protected int setLayoutId() {
|
||||||
@ -86,7 +87,9 @@ public class NoticeListActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void initData() {
|
public void initData() {
|
||||||
ButterKnife.bind(this);
|
ButterKnife.bind(this);
|
||||||
mTvBaseTitle.setText("通知公告");
|
mId = getIntent().getStringExtra("id");
|
||||||
|
String title = getIntent().getStringExtra("title");
|
||||||
|
mTvBaseTitle.setText(title);
|
||||||
refreshView(STATE_LOAD_SUCCESS);
|
refreshView(STATE_LOAD_SUCCESS);
|
||||||
refreshPageState(STATE_LOAD_LOADING);
|
refreshPageState(STATE_LOAD_LOADING);
|
||||||
initViews();
|
initViews();
|
||||||
@ -243,7 +246,7 @@ public class NoticeListActivity extends BaseActivity {
|
|||||||
String end = mTvEndDate.getText().toString().trim();
|
String end = mTvEndDate.getText().toString().trim();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(OAApi.class)
|
.create(OAApi.class)
|
||||||
.getNoticeList("2", PathConfig.NOTICE_CONFIG_ID, start, end, mKeywords, mCurrentPage + "", "20")
|
.getNoticeList("2", mId, start, end, mKeywords, mCurrentPage + "", "20")
|
||||||
.compose(RxTransformer.getTransformer())
|
.compose(RxTransformer.getTransformer())
|
||||||
.subscribe(new Observer<NoticeListBean>() {
|
.subscribe(new Observer<NoticeListBean>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -13,6 +13,10 @@ import android.widget.RadioGroup;
|
|||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||||
@ -32,6 +36,7 @@ import com.tenlionsoft.baselib.utils.TimeUtils;
|
|||||||
import com.tenlionsoft.oamodule.R;
|
import com.tenlionsoft.oamodule.R;
|
||||||
import com.tenlionsoft.oamodule.R2;
|
import com.tenlionsoft.oamodule.R2;
|
||||||
import com.tenlionsoft.oamodule.adapter.MineTodoAdapter;
|
import com.tenlionsoft.oamodule.adapter.MineTodoAdapter;
|
||||||
|
import com.tenlionsoft.oamodule.beans.MineApplyBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineTodoBean;
|
import com.tenlionsoft.oamodule.beans.MineTodoBean;
|
||||||
import com.tenlionsoft.oamodule.net.OAApi;
|
import com.tenlionsoft.oamodule.net.OAApi;
|
||||||
@ -39,9 +44,6 @@ import com.tenlionsoft.oamodule.net.OAApi;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import io.reactivex.rxjava3.annotations.NonNull;
|
import io.reactivex.rxjava3.annotations.NonNull;
|
||||||
@ -85,7 +87,7 @@ public class MineTodoActivity extends BaseActivity {
|
|||||||
@BindView(R2.id.tv_end_date)
|
@BindView(R2.id.tv_end_date)
|
||||||
TextView mTvEndDate;
|
TextView mTvEndDate;
|
||||||
private List<Object> mDatas;
|
private List<Object> mDatas;
|
||||||
private int mType = 1;//1我的待办 2我的已办
|
private int mType = 1;//1我的待办 2我的已办 3我发起的
|
||||||
private MineTodoAdapter mAdapter;
|
private MineTodoAdapter mAdapter;
|
||||||
private int mCurrentPage = 1;
|
private int mCurrentPage = 1;
|
||||||
private String mKeywords = "";
|
private String mKeywords = "";
|
||||||
@ -126,6 +128,8 @@ public class MineTodoActivity extends BaseActivity {
|
|||||||
} else if (checkedId == R.id.rb_mine) {
|
} else if (checkedId == R.id.rb_mine) {
|
||||||
//我已办
|
//我已办
|
||||||
mType = 2;
|
mType = 2;
|
||||||
|
} else if (checkedId == R.id.rb_mine_apply) {
|
||||||
|
mType = 3;
|
||||||
}
|
}
|
||||||
//重置搜索条件
|
//重置搜索条件
|
||||||
resetCondition();
|
resetCondition();
|
||||||
@ -151,6 +155,14 @@ public class MineTodoActivity extends BaseActivity {
|
|||||||
.withString("title", b.getTaskName())
|
.withString("title", b.getTaskName())
|
||||||
.withSerializable("bean", b)
|
.withSerializable("bean", b)
|
||||||
.navigation(mActivity, 12);
|
.navigation(mActivity, 12);
|
||||||
|
} else if (true) {
|
||||||
|
//我发起的
|
||||||
|
MineApplyBean.RowsBean b = (MineApplyBean.RowsBean) o;
|
||||||
|
ARouter.getInstance()
|
||||||
|
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_OAFLOW_CENTER)
|
||||||
|
.withString("title", b.getProcessDefinitionName())
|
||||||
|
.withSerializable("bean", b)
|
||||||
|
.navigation(mActivity, 12);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
doRefresh();
|
doRefresh();
|
||||||
@ -225,8 +237,10 @@ public class MineTodoActivity extends BaseActivity {
|
|||||||
private void doLoadMore() {
|
private void doLoadMore() {
|
||||||
if (mType == 1) {
|
if (mType == 1) {
|
||||||
getMineTodoList(mCurrentPage);
|
getMineTodoList(mCurrentPage);
|
||||||
} else {
|
} else if (mType == 2) {
|
||||||
getMineDoneList(mCurrentPage);
|
getMineDoneList(mCurrentPage);
|
||||||
|
} else {
|
||||||
|
getMineApplyList(mCurrentPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,12 +253,89 @@ public class MineTodoActivity extends BaseActivity {
|
|||||||
mAdapter.setData(mDatas);
|
mAdapter.setData(mDatas);
|
||||||
if (mType == 1) {
|
if (mType == 1) {
|
||||||
getMineTodoList(1);
|
getMineTodoList(1);
|
||||||
} else {
|
} else if (mType == 2) {
|
||||||
getMineDoneList(1);
|
getMineDoneList(1);
|
||||||
|
} else {
|
||||||
|
getMineApplyList(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取我发起的
|
||||||
|
*
|
||||||
|
* @param i
|
||||||
|
*/
|
||||||
|
private void getMineApplyList(int currentPage) {
|
||||||
|
mCurrentPage = currentPage;
|
||||||
|
String start = mTvStartDate.getText().toString().trim();
|
||||||
|
String end = mTvEndDate.getText().toString().trim();
|
||||||
|
RetrofitManager.getInstance()
|
||||||
|
.create(OAApi.class)
|
||||||
|
.getMineApplyList(mKeywords, start, end, mCurrentPage + "")
|
||||||
|
.compose(RxTransformer.getTransformer())
|
||||||
|
.subscribe(new Observer<MineApplyBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull MineApplyBean listBean) {
|
||||||
|
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||||
|
++mCurrentPage;
|
||||||
|
if (currentPage == 1) {
|
||||||
|
mDatas.clear();
|
||||||
|
mDatas.addAll(listBean.getRows());
|
||||||
|
} else {
|
||||||
|
mDatas.addAll(listBean.getRows());
|
||||||
|
}
|
||||||
|
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||||
|
mAdapter.notifyDataSetChanged();
|
||||||
|
mSrlContent.finishRefresh();
|
||||||
|
if (mDatas.size() >= listBean.getTotal()) {
|
||||||
|
mSrlContent.finishLoadMore();
|
||||||
|
mSrlContent.setNoMoreData(true);
|
||||||
|
} else {
|
||||||
|
mSrlContent.finishLoadMore();
|
||||||
|
mSrlContent.setNoMoreData(false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mSrlContent.finishRefresh();
|
||||||
|
mSrlContent.finishLoadMore();
|
||||||
|
if (currentPage > 1) {
|
||||||
|
mSrlContent.setNoMoreData(true);
|
||||||
|
} else {
|
||||||
|
if (TextUtils.isEmpty(mKeywords)) {
|
||||||
|
//无数据
|
||||||
|
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||||
|
} else {
|
||||||
|
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||||
|
ToastUtils.show("未查询到相关内容");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull Throwable e) {
|
||||||
|
mSrlContent.finishLoadMore();
|
||||||
|
mSrlContent.finishRefresh();
|
||||||
|
ExceptionHandler.handleException(e);
|
||||||
|
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取我的待办
|
||||||
|
*
|
||||||
|
* @param currentPage
|
||||||
|
*/
|
||||||
private void getMineTodoList(int currentPage) {
|
private void getMineTodoList(int currentPage) {
|
||||||
mCurrentPage = currentPage;
|
mCurrentPage = currentPage;
|
||||||
String start = mTvStartDate.getText().toString().trim();
|
String start = mTvStartDate.getText().toString().trim();
|
||||||
@ -313,7 +404,7 @@ public class MineTodoActivity extends BaseActivity {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取被督办的列表
|
* 获取我的已办
|
||||||
*/
|
*/
|
||||||
private void getMineDoneList(int currentPage) {
|
private void getMineDoneList(int currentPage) {
|
||||||
mCurrentPage = currentPage;
|
mCurrentPage = currentPage;
|
||||||
|
@ -78,6 +78,7 @@ import com.tenlionsoft.oamodule.beans.CarBean;
|
|||||||
import com.tenlionsoft.oamodule.beans.ChoosePersonListBean;
|
import com.tenlionsoft.oamodule.beans.ChoosePersonListBean;
|
||||||
import com.tenlionsoft.oamodule.beans.DriverBean;
|
import com.tenlionsoft.oamodule.beans.DriverBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
|
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
|
||||||
|
import com.tenlionsoft.oamodule.beans.MineApplyBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineReadBean;
|
import com.tenlionsoft.oamodule.beans.MineReadBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineTodoBean;
|
import com.tenlionsoft.oamodule.beans.MineTodoBean;
|
||||||
@ -653,6 +654,21 @@ public class OaFlowCenterActivity extends BaseActivity {
|
|||||||
params.put("type", "show");
|
params.put("type", "show");
|
||||||
params.put("processId", b.getProcessInstanceId());
|
params.put("processId", b.getProcessInstanceId());
|
||||||
params.put("taskId", b.getReportUid());
|
params.put("taskId", b.getReportUid());
|
||||||
|
}else if(mBean instanceof MineApplyBean.RowsBean){
|
||||||
|
//我的已办
|
||||||
|
MineApplyBean.RowsBean b = (MineApplyBean.RowsBean) mBean;
|
||||||
|
String url = String.format(mActivity.getResources()
|
||||||
|
.getString(R.string.mine_todo_detail),
|
||||||
|
b.getFormCode(),
|
||||||
|
b.getFormVersion() + "",
|
||||||
|
UserLgUtils.getToken(),
|
||||||
|
b.getReportUid(),
|
||||||
|
b.getProcessInstanceId());
|
||||||
|
String path = BaseUrlApi.BASE_OA + url;
|
||||||
|
params.put("url", path);
|
||||||
|
params.put("type", "show");
|
||||||
|
params.put("processId", b.getProcessInstanceId());
|
||||||
|
params.put("taskId", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,99 @@
|
|||||||
|
package com.tenlionsoft.oamodule.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.tenlionsoft.oamodule.R;
|
||||||
|
import com.tenlionsoft.oamodule.beans.NoticeTabListBean;
|
||||||
|
|
||||||
|
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.CommonPagerTitleView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作者: adam
|
||||||
|
* 日期: 2021/11/4 - 3:17 下午
|
||||||
|
* 邮箱: itgaojian@163.com
|
||||||
|
* 描述: viewpage2简单指示器
|
||||||
|
*/
|
||||||
|
public class ListNavigatorAdapter extends CommonNavigatorAdapter {
|
||||||
|
private List<NoticeTabListBean> mTitles;
|
||||||
|
private Context mContext;
|
||||||
|
private MagicIndicator mMiTabs;
|
||||||
|
|
||||||
|
public ListNavigatorAdapter(Context ctx, List<NoticeTabListBean> titles, MagicIndicator magicIndicator) {
|
||||||
|
this.mTitles = titles;
|
||||||
|
this.mContext = ctx;
|
||||||
|
mMiTabs = magicIndicator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return mTitles.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPagerTitleView getTitleView(Context context, int index) {
|
||||||
|
CommonPagerTitleView titleView = new CommonPagerTitleView(context);
|
||||||
|
titleView.setContentView(R.layout.item_tab_custom_text_view);
|
||||||
|
TextView tvTitle = titleView.findViewById(R.id.tv_tab_title);
|
||||||
|
tvTitle.setText(mTitles.get(index).getDesktopTitleName());
|
||||||
|
titleView.setOnPagerTitleChangeListener(new CommonPagerTitleView.OnPagerTitleChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onSelected(int index, int totalCount) {
|
||||||
|
tvTitle.setTextColor(Color.parseColor("#2262FB"));
|
||||||
|
tvTitle.setTextSize(15);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDeselected(int index, int totalCount) {
|
||||||
|
tvTitle.setTextColor(Color.BLACK);
|
||||||
|
tvTitle.setTextSize(14);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLeave(int index, int totalCount, float leavePercent, boolean leftToRight) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEnter(int index, int totalCount, float enterPercent, boolean leftToRight) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
titleView.setOnClickListener(v -> {
|
||||||
|
mMiTabs.onPageSelected(index);
|
||||||
|
mMiTabs.onPageScrolled(index,0f,0);
|
||||||
|
if (mListener != null) {
|
||||||
|
mListener.onChange(index, mTitles.get(index));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return titleView;
|
||||||
|
}
|
||||||
|
|
||||||
|
private OnChangeListener mListener;
|
||||||
|
|
||||||
|
public void addOnChangeListener(OnChangeListener listener) {
|
||||||
|
this.mListener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnChangeListener {
|
||||||
|
void onChange(int index, NoticeTabListBean b);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPagerIndicator getIndicator(Context context) {
|
||||||
|
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||||
|
indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||||
|
indicator.setRoundRadius(5);
|
||||||
|
indicator.setLineWidth(15);
|
||||||
|
indicator.setColors(Color.parseColor("#2262FB"));
|
||||||
|
return indicator;
|
||||||
|
}
|
||||||
|
}
|
@ -8,6 +8,7 @@ import android.view.ViewGroup;
|
|||||||
|
|
||||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||||
import com.tenlionsoft.oamodule.R;
|
import com.tenlionsoft.oamodule.R;
|
||||||
|
import com.tenlionsoft.oamodule.beans.MineApplyBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineTodoBean;
|
import com.tenlionsoft.oamodule.beans.MineTodoBean;
|
||||||
import com.tenlionsoft.oamodule.holder.MineTodoHolder;
|
import com.tenlionsoft.oamodule.holder.MineTodoHolder;
|
||||||
@ -49,6 +50,13 @@ public class MineTodoAdapter extends BaseRecyclerAdapter<Object, MineTodoHolder>
|
|||||||
h.mTvTitle.setText(b.getMainTitle());
|
h.mTvTitle.setText(b.getMainTitle());
|
||||||
h.mTvName.setText(b.getTaskName());
|
h.mTvName.setText(b.getTaskName());
|
||||||
h.mTvState.setVisibility(View.GONE);
|
h.mTvState.setVisibility(View.GONE);
|
||||||
|
} else if (o instanceof MineApplyBean.RowsBean) {
|
||||||
|
MineApplyBean.RowsBean b = (MineApplyBean.RowsBean) o;
|
||||||
|
h.mTvTitle.setTextColor(Color.BLACK);
|
||||||
|
h.mTvTime.setText(b.getStartTime());
|
||||||
|
h.mTvTitle.setText(b.getProcessDefinitionName());
|
||||||
|
h.mTvName.setText(b.getEndTime());
|
||||||
|
h.mTvState.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,155 @@
|
|||||||
|
package com.tenlionsoft.oamodule.beans;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MineApplyBean {
|
||||||
|
|
||||||
|
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 implements Serializable {
|
||||||
|
private String deploymentId;
|
||||||
|
private String endTime;
|
||||||
|
private String formCode;
|
||||||
|
private int formVersion;
|
||||||
|
private String processDefinitionId;
|
||||||
|
private String processDefinitionKey;
|
||||||
|
private String processDefinitionName;
|
||||||
|
private int processDefinitionVersion;
|
||||||
|
private String processInstanceId;
|
||||||
|
private String reportUid;
|
||||||
|
private String startActivityId;
|
||||||
|
private String startTime;
|
||||||
|
private String startUserId;
|
||||||
|
|
||||||
|
public String getDeploymentId() {
|
||||||
|
return deploymentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeploymentId(String deploymentId) {
|
||||||
|
this.deploymentId = deploymentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(String endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFormCode() {
|
||||||
|
return formCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormCode(String formCode) {
|
||||||
|
this.formCode = formCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFormVersion() {
|
||||||
|
return formVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormVersion(int formVersion) {
|
||||||
|
this.formVersion = formVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcessDefinitionId() {
|
||||||
|
return processDefinitionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessDefinitionId(String processDefinitionId) {
|
||||||
|
this.processDefinitionId = processDefinitionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcessDefinitionKey() {
|
||||||
|
return processDefinitionKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessDefinitionKey(String processDefinitionKey) {
|
||||||
|
this.processDefinitionKey = processDefinitionKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcessDefinitionName() {
|
||||||
|
return processDefinitionName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessDefinitionName(String processDefinitionName) {
|
||||||
|
this.processDefinitionName = processDefinitionName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getProcessDefinitionVersion() {
|
||||||
|
return processDefinitionVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessDefinitionVersion(int processDefinitionVersion) {
|
||||||
|
this.processDefinitionVersion = processDefinitionVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcessInstanceId() {
|
||||||
|
return processInstanceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessInstanceId(String processInstanceId) {
|
||||||
|
this.processInstanceId = processInstanceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReportUid() {
|
||||||
|
return reportUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReportUid(String reportUid) {
|
||||||
|
this.reportUid = reportUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartActivityId() {
|
||||||
|
return startActivityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartActivityId(String startActivityId) {
|
||||||
|
this.startActivityId = startActivityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(String startTime) {
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartUserId() {
|
||||||
|
return startUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartUserId(String startUserId) {
|
||||||
|
this.startUserId = startUserId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,212 @@
|
|||||||
|
package com.tenlionsoft.oamodule.beans;
|
||||||
|
|
||||||
|
public class NoticeTabListBean {
|
||||||
|
|
||||||
|
private String beoverdueTime;
|
||||||
|
private String checkSwitch;
|
||||||
|
private String commentSwitch;
|
||||||
|
private double configOrder;
|
||||||
|
private String configSwitch;
|
||||||
|
private String configUserRange;
|
||||||
|
private String creator;
|
||||||
|
private String deleteSwitch;
|
||||||
|
private String desktopTitleName;
|
||||||
|
private String desktopViewSwitch;
|
||||||
|
private String gmtCreate;
|
||||||
|
private String gmtModified;
|
||||||
|
private String iconFileSwitch;
|
||||||
|
private String isDelete;
|
||||||
|
private String menuNameManager;
|
||||||
|
private String menuNameView;
|
||||||
|
private String modifier;
|
||||||
|
private String noticeConfigId;
|
||||||
|
private String publishRange;
|
||||||
|
private String remark;
|
||||||
|
private String rollSwitch;
|
||||||
|
private String uploadFileSwitch;
|
||||||
|
private String watermarkContent;
|
||||||
|
|
||||||
|
public String getBeoverdueTime() {
|
||||||
|
return beoverdueTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBeoverdueTime(String beoverdueTime) {
|
||||||
|
this.beoverdueTime = beoverdueTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCheckSwitch() {
|
||||||
|
return checkSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCheckSwitch(String checkSwitch) {
|
||||||
|
this.checkSwitch = checkSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCommentSwitch() {
|
||||||
|
return commentSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommentSwitch(String commentSwitch) {
|
||||||
|
this.commentSwitch = commentSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getConfigOrder() {
|
||||||
|
return configOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigOrder(double configOrder) {
|
||||||
|
this.configOrder = configOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigSwitch() {
|
||||||
|
return configSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigSwitch(String configSwitch) {
|
||||||
|
this.configSwitch = configSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConfigUserRange() {
|
||||||
|
return configUserRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConfigUserRange(String configUserRange) {
|
||||||
|
this.configUserRange = configUserRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeleteSwitch() {
|
||||||
|
return deleteSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteSwitch(String deleteSwitch) {
|
||||||
|
this.deleteSwitch = deleteSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesktopTitleName() {
|
||||||
|
return desktopTitleName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesktopTitleName(String desktopTitleName) {
|
||||||
|
this.desktopTitleName = desktopTitleName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesktopViewSwitch() {
|
||||||
|
return desktopViewSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesktopViewSwitch(String desktopViewSwitch) {
|
||||||
|
this.desktopViewSwitch = desktopViewSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtCreate() {
|
||||||
|
return gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtCreate(String gmtCreate) {
|
||||||
|
this.gmtCreate = gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtModified() {
|
||||||
|
return gmtModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtModified(String gmtModified) {
|
||||||
|
this.gmtModified = gmtModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIconFileSwitch() {
|
||||||
|
return iconFileSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIconFileSwitch(String iconFileSwitch) {
|
||||||
|
this.iconFileSwitch = iconFileSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsDelete() {
|
||||||
|
return isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsDelete(String isDelete) {
|
||||||
|
this.isDelete = isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuNameManager() {
|
||||||
|
return menuNameManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuNameManager(String menuNameManager) {
|
||||||
|
this.menuNameManager = menuNameManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMenuNameView() {
|
||||||
|
return menuNameView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMenuNameView(String menuNameView) {
|
||||||
|
this.menuNameView = menuNameView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModifier() {
|
||||||
|
return modifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifier(String modifier) {
|
||||||
|
this.modifier = modifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNoticeConfigId() {
|
||||||
|
return noticeConfigId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNoticeConfigId(String noticeConfigId) {
|
||||||
|
this.noticeConfigId = noticeConfigId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPublishRange() {
|
||||||
|
return publishRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublishRange(String publishRange) {
|
||||||
|
this.publishRange = publishRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRollSwitch() {
|
||||||
|
return rollSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRollSwitch(String rollSwitch) {
|
||||||
|
this.rollSwitch = rollSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUploadFileSwitch() {
|
||||||
|
return uploadFileSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUploadFileSwitch(String uploadFileSwitch) {
|
||||||
|
this.uploadFileSwitch = uploadFileSwitch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWatermarkContent() {
|
||||||
|
return watermarkContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWatermarkContent(String watermarkContent) {
|
||||||
|
this.watermarkContent = watermarkContent;
|
||||||
|
}
|
||||||
|
}
|
@ -187,13 +187,14 @@ public class DocFragment extends BaseFragment {
|
|||||||
mSelCatalogAdapter.setData(mSelCatalog);
|
mSelCatalogAdapter.setData(mSelCatalog);
|
||||||
mSelCatalogId = b.getDocumentDirId();
|
mSelCatalogId = b.getDocumentDirId();
|
||||||
doRefresh();
|
doRefresh();
|
||||||
} else if (rowsBean instanceof DocumentListBean) {
|
} else if (rowsBean instanceof DocumentListBean.RowsBean) {
|
||||||
DocumentListBean.RowsBean b = (DocumentListBean.RowsBean) rowsBean;
|
DocumentListBean.RowsBean b = (DocumentListBean.RowsBean) rowsBean;
|
||||||
Intent intent = new Intent(mActivity, DocumentDetailActivity.class);
|
Intent intent = new Intent(mActivity, DocumentDetailActivity.class);
|
||||||
intent.putExtra("id", b.getDocumentFileId());
|
intent.putExtra("id", b.getDocumentFileId());
|
||||||
intent.putExtra("type", mType);
|
intent.putExtra("type", mType);
|
||||||
mLauncher.launch(intent);
|
mLauncher.launch(intent);
|
||||||
}
|
}
|
||||||
|
LogUtils.e(rowsBean instanceof DocumentListBean.RowsBean);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,13 +52,18 @@ import com.tenlionsoft.baselib.utils.UIUtil;
|
|||||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||||
import com.tenlionsoft.oamodule.R;
|
import com.tenlionsoft.oamodule.R;
|
||||||
import com.tenlionsoft.oamodule.R2;
|
import com.tenlionsoft.oamodule.R2;
|
||||||
|
import com.tenlionsoft.oamodule.adapter.ListNavigatorAdapter;
|
||||||
import com.tenlionsoft.oamodule.adapter.NoticeShowAdapter;
|
import com.tenlionsoft.oamodule.adapter.NoticeShowAdapter;
|
||||||
import com.tenlionsoft.oamodule.beans.BySuperviseListBean;
|
import com.tenlionsoft.oamodule.beans.BySuperviseListBean;
|
||||||
import com.tenlionsoft.oamodule.beans.NoticeListBean;
|
import com.tenlionsoft.oamodule.beans.NoticeListBean;
|
||||||
|
import com.tenlionsoft.oamodule.beans.NoticeTabListBean;
|
||||||
import com.tenlionsoft.oamodule.beans.ToDoCountBean;
|
import com.tenlionsoft.oamodule.beans.ToDoCountBean;
|
||||||
import com.tenlionsoft.oamodule.beans.UnReadCountBean;
|
import com.tenlionsoft.oamodule.beans.UnReadCountBean;
|
||||||
import com.tenlionsoft.oamodule.net.OAApi;
|
import com.tenlionsoft.oamodule.net.OAApi;
|
||||||
|
|
||||||
|
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -132,6 +137,10 @@ public class OaMainFragment extends BaseFragment {
|
|||||||
LinearLayout mLlTodoCount;
|
LinearLayout mLlTodoCount;
|
||||||
@BindView(R2.id.ll_unread_count)
|
@BindView(R2.id.ll_unread_count)
|
||||||
LinearLayout mLlUnreadCount;
|
LinearLayout mLlUnreadCount;
|
||||||
|
@BindView(R2.id.mi_notice_tabs)
|
||||||
|
MagicIndicator mMiTabs;
|
||||||
|
@BindView(R2.id.ll_notice_tab)
|
||||||
|
LinearLayout mLlNoticeTab;
|
||||||
@BindView(R2.id.ll_supervise_count)
|
@BindView(R2.id.ll_supervise_count)
|
||||||
LinearLayout mLlSuperviseCount;
|
LinearLayout mLlSuperviseCount;
|
||||||
private List<FuncBean> mFuncBeans;
|
private List<FuncBean> mFuncBeans;
|
||||||
@ -139,6 +148,8 @@ public class OaMainFragment extends BaseFragment {
|
|||||||
private ActivityResultLauncher<Intent> mLauncher;
|
private ActivityResultLauncher<Intent> mLauncher;
|
||||||
private NoticeShowAdapter mNoticeShowAdapter;
|
private NoticeShowAdapter mNoticeShowAdapter;
|
||||||
private List<NoticeListBean.RowsBean> mNoticeListBeanRows;
|
private List<NoticeListBean.RowsBean> mNoticeListBeanRows;
|
||||||
|
private String mCurrentNoticeId;
|
||||||
|
private String mCurrentNoticeTitle;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getContentViewId() {
|
protected int getContentViewId() {
|
||||||
@ -195,6 +206,8 @@ public class OaMainFragment extends BaseFragment {
|
|||||||
|
|
||||||
mTvNoticeMore.setOnClickListener(v -> ARouter.getInstance()
|
mTvNoticeMore.setOnClickListener(v -> ARouter.getInstance()
|
||||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_NOTICE)
|
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_NOTICE)
|
||||||
|
.withString("id", mCurrentNoticeId)
|
||||||
|
.withString("title", mCurrentNoticeTitle)
|
||||||
.navigation());//通知公告更多
|
.navigation());//通知公告更多
|
||||||
mIvScan.setOnClickListener(v -> {
|
mIvScan.setOnClickListener(v -> {
|
||||||
Intent intent = new Intent(mActivity, CaptureActivity.class);
|
Intent intent = new Intent(mActivity, CaptureActivity.class);
|
||||||
@ -223,7 +236,7 @@ public class OaMainFragment extends BaseFragment {
|
|||||||
//获取菜单
|
//获取菜单
|
||||||
getMainMenuList();
|
getMainMenuList();
|
||||||
//获取通知公告
|
//获取通知公告
|
||||||
getNoticeList();
|
getNoticeTabs();
|
||||||
mSrlContent.finishRefresh();
|
mSrlContent.finishRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,10 +284,64 @@ public class OaMainFragment extends BaseFragment {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getNoticeList() {
|
/**
|
||||||
|
* 获取新闻类别
|
||||||
|
*/
|
||||||
|
private void getNoticeTabs() {
|
||||||
|
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(OAApi.class)
|
.create(OAApi.class)
|
||||||
.getNoticeList("2", PathConfig.NOTICE_CONFIG_ID, "", "", "", "1", "15")
|
.getNoticeTabList()
|
||||||
|
.compose(RxTransformer.getTransformer())
|
||||||
|
.subscribe(new Observer<List<NoticeTabListBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@io.reactivex.rxjava3.annotations.NonNull List<NoticeTabListBean> noticeTabListBeans) {
|
||||||
|
if (noticeTabListBeans != null && noticeTabListBeans.size() > 0) {
|
||||||
|
CommonNavigator commonNavigator = new CommonNavigator(mActivity);
|
||||||
|
ListNavigatorAdapter adapter = new ListNavigatorAdapter(mActivity, noticeTabListBeans, mMiTabs);
|
||||||
|
commonNavigator.setAdapter(adapter);
|
||||||
|
commonNavigator.setAdjustMode(false);
|
||||||
|
mMiTabs.setNavigator(commonNavigator);
|
||||||
|
adapter.addOnChangeListener((index, b) -> {
|
||||||
|
mCurrentNoticeId = b.getNoticeConfigId();
|
||||||
|
mCurrentNoticeTitle = b.getDesktopTitleName();
|
||||||
|
mCsvNotice.setVisibility(View.VISIBLE);
|
||||||
|
getNoticeList(mCurrentNoticeId);
|
||||||
|
});
|
||||||
|
getNoticeList(noticeTabListBeans.get(0).getNoticeConfigId());//默认获取第一条数据
|
||||||
|
mCurrentNoticeId = noticeTabListBeans.get(0).getNoticeConfigId();
|
||||||
|
mCurrentNoticeTitle = noticeTabListBeans.get(0).getDesktopTitleName();
|
||||||
|
} else {
|
||||||
|
mRlvNotice.setVisibility(View.GONE);
|
||||||
|
mCsvNotice.setVisibility(View.VISIBLE);
|
||||||
|
mCsvNotice.setState(CustomStateView.STATE_EMPTY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||||
|
mRlvNotice.setVisibility(View.GONE);
|
||||||
|
mCsvNotice.setState(CustomStateView.STATE_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getNoticeList(String id) {
|
||||||
|
mNoticeListBeanRows.clear();
|
||||||
|
mNoticeShowAdapter.setData(mNoticeListBeanRows);
|
||||||
|
RetrofitManager.getInstance()
|
||||||
|
.create(OAApi.class)
|
||||||
|
.getNoticeList("2", id, "", "", "", "1", "15")
|
||||||
.compose(RxTransformer.getTransformer())
|
.compose(RxTransformer.getTransformer())
|
||||||
.subscribe(new Observer<NoticeListBean>() {
|
.subscribe(new Observer<NoticeListBean>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -32,6 +32,7 @@ import com.tenlionsoft.oamodule.beans.MeetingQrBean;
|
|||||||
import com.tenlionsoft.oamodule.beans.MeetingRecordListBean;
|
import com.tenlionsoft.oamodule.beans.MeetingRecordListBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
|
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MeetingRoomRecordBean;
|
import com.tenlionsoft.oamodule.beans.MeetingRoomRecordBean;
|
||||||
|
import com.tenlionsoft.oamodule.beans.MineApplyBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineJoinMeetingListBean;
|
import com.tenlionsoft.oamodule.beans.MineJoinMeetingListBean;
|
||||||
import com.tenlionsoft.oamodule.beans.MineReadBean;
|
import com.tenlionsoft.oamodule.beans.MineReadBean;
|
||||||
@ -41,6 +42,7 @@ import com.tenlionsoft.oamodule.beans.NewsListBean;
|
|||||||
import com.tenlionsoft.oamodule.beans.NewsTypeBean;
|
import com.tenlionsoft.oamodule.beans.NewsTypeBean;
|
||||||
import com.tenlionsoft.oamodule.beans.NoticeCommentListBean;
|
import com.tenlionsoft.oamodule.beans.NoticeCommentListBean;
|
||||||
import com.tenlionsoft.oamodule.beans.NoticeListBean;
|
import com.tenlionsoft.oamodule.beans.NoticeListBean;
|
||||||
|
import com.tenlionsoft.oamodule.beans.NoticeTabListBean;
|
||||||
import com.tenlionsoft.oamodule.beans.OaFlowApplyBean;
|
import com.tenlionsoft.oamodule.beans.OaFlowApplyBean;
|
||||||
import com.tenlionsoft.oamodule.beans.OaFlowLogBean;
|
import com.tenlionsoft.oamodule.beans.OaFlowLogBean;
|
||||||
import com.tenlionsoft.oamodule.beans.RoutineAcceptListBean;
|
import com.tenlionsoft.oamodule.beans.RoutineAcceptListBean;
|
||||||
@ -1050,6 +1052,14 @@ public interface OAApi {
|
|||||||
Observable<MineDoneBean> getMineDoneList(@Query("keywords") String key, @Query("startTime") String start, @Query(
|
Observable<MineDoneBean> getMineDoneList(@Query("keywords") String key, @Query("startTime") String start, @Query(
|
||||||
"endTime") String end, @Query("page") String page);
|
"endTime") String end, @Query("page") String page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 我发起的
|
||||||
|
*/
|
||||||
|
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||||
|
@GET("app/oa/base/listpage-start-of-mine")
|
||||||
|
Observable<MineApplyBean> getMineApplyList(@Query("keywords") String key, @Query("startTime") String start, @Query(
|
||||||
|
"endTime") String end, @Query("page") String page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转交
|
* 转交
|
||||||
*/
|
*/
|
||||||
@ -1161,4 +1171,11 @@ public interface OAApi {
|
|||||||
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||||
@PUT("app/indextemplaterecord/update/{indexTemplateRecordId}")
|
@PUT("app/indextemplaterecord/update/{indexTemplateRecordId}")
|
||||||
Observable<BaseSuccessBean> doEditDataReport(@Path("indexTemplateRecordId") String id, @Body RequestBody body);
|
Observable<BaseSuccessBean> doEditDataReport(@Path("indexTemplateRecordId") String id, @Body RequestBody body);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取首页新闻列表
|
||||||
|
*/
|
||||||
|
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||||
|
@GET("app/noticeconfig/listswitchview")
|
||||||
|
Observable<List<NoticeTabListBean>> getNoticeTabList();
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="32dp"
|
android:layout_height="32dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/switch_custom_gray_white_right"
|
android:background="@drawable/switch_custom_gray_white_center"
|
||||||
android:button="@null"
|
android:button="@null"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
@ -82,6 +82,20 @@
|
|||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:text="我的已办"
|
android:text="我的已办"
|
||||||
android:textColor="@color/col_gray_black" />
|
android:textColor="@color/col_gray_black" />
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_mine_apply"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/switch_custom_gray_white_right"
|
||||||
|
android:button="@null"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:paddingBottom="5dp"
|
||||||
|
android:text="我发起的"
|
||||||
|
android:textColor="@color/col_gray_black" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@
|
|||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:text="我的已办"
|
android:text="我的已办"
|
||||||
android:textColor="@color/col_gray_black" />
|
android:textColor="@color/col_gray_black" />
|
||||||
|
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,12 +224,12 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/blue_bg"
|
android:background="@color/blue_bg"
|
||||||
android:visibility="gone"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingTop="6dp"
|
android:paddingTop="6dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
android:paddingBottom="6dp">
|
android:paddingBottom="6dp"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="17dp"
|
android:layout_width="17dp"
|
||||||
@ -287,19 +287,33 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="10dp">
|
android:padding="10dp">
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_notice_tab"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginTop="5dp"
|
android:gravity="center_vertical"
|
||||||
android:gravity="center_vertical">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||||
|
android:id="@+id/mi_notice_tabs"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:background="@color/white" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_notice_icon"
|
android:id="@+id/iv_notice_icon"
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:src="@drawable/ic_notice_title_icon" />
|
android:src="@drawable/ic_notice_title_icon"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -310,22 +324,24 @@
|
|||||||
android:text="通知公告"
|
android:text="通知公告"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/text_15"
|
android:textSize="@dimen/text_15"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||||
android:id="@+id/tv_notice_more"
|
android:id="@+id/tv_notice_more"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
android:text="查看更多 >>"
|
android:text="更多 >>"
|
||||||
android:textColor="#BBBBBB"
|
android:textColor="#BBBBBB"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</RelativeLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user