会议管理页面、搜索,督办事项页面、搜索

This commit is contained in:
adam 2022-04-26 15:11:35 +08:00
parent b3254c04c7
commit b0840b2930
31 changed files with 472 additions and 192 deletions

View File

@ -38,7 +38,6 @@
<activity
android:name=".core.widget.base.PreviewFileActivity"
android:launchMode="singleTop"
android:process=":preview"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" />

View File

@ -86,4 +86,5 @@ public class AddFileAdapter extends BaseRecyclerAdapter<AddFileBean, AddFileHold
public interface OnDeleteListener {
void onDelete(AddFileBean bean, int i);
}
}

View File

@ -12,8 +12,10 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.provider.Settings;
import android.text.Editable;
import android.text.InputFilter;
@ -52,6 +54,8 @@ import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
@ -105,6 +109,7 @@ public abstract class BaseActivity extends AppCompatActivity {
private LinearLayout mLlBaseSearch;
private static final String NAVIGATION = "navigationBarBackground";
protected View mVStatusBar;
private ActivityResultLauncher<Intent> mLauncher;
@SuppressLint("ClickableViewAccessibility")
@ -134,12 +139,22 @@ public abstract class BaseActivity extends AppCompatActivity {
initData();
initMapView(savedInstanceState);//初始化MapView
mRlNotify.setVisibility(View.GONE);
String simpleName = getClass().getSimpleName();
if ("AddressUserDetailActivity".equals(simpleName)) {
sendBroadcast(new Intent(PathConfig.ACTION_UNREGISTER_BROAD));
} else {
sendBroadcast(new Intent(PathConfig.ACTION_REGISTER_BROAD));
}
//获取了文件管理权限
mLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
//判断是否有权限
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (!Environment.isExternalStorageManager()) {
//没有授权
ToastUtils.show("该功能需要SD卡的管理权限,请前往设置进行授权.");
} else {
//do some thing
hasManageFileManage();
}
} else {
hasManageFileManage();
}
});
}
@ -265,7 +280,7 @@ public abstract class BaseActivity extends AppCompatActivity {
mLlAppSearchContent.setVisibility(View.GONE);
mTvAppBack.setBackgroundResource(R.drawable.ic_back_white);
mTvAppBack.setBackgroundResource(R.drawable.ic_back_black);
mEtAppSearchContent.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
@ -297,10 +312,32 @@ public abstract class BaseActivity extends AppCompatActivity {
setTouchDelegate(mTvCancelSearch, 30);
setTouchDelegate(mTvDoSearch, 30);
setTouchDelegate(mTvPublish, 35);
ImmersionBar.with(this).titleBar(mRlTitleBar).statusBarDarkFont(true).init();
}
protected void checkManagePermission() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (!Environment.isExternalStorageManager()) {
//没有授权
ToastUtils.show("该功能需要SD卡的管理权限,请前往设置进行授权.");
Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);
intent.setData(Uri.parse("package:" + this.getPackageName()));
mLauncher.launch(intent);
} else {
//do some thing
hasManageFileManage();
}
} else {
hasManageFileManage();
}
}
//有权限进行文件的管理
protected void hasManageFileManage() {
}
protected void setDarkSearchBar() {
mTvSearchBack.setBackgroundResource(R.drawable.ic_back_black);
mTvDoSearch.setTextColor(getResources().getColor(R.color.text_20));

View File

@ -46,7 +46,6 @@ public class PreviewFileActivity extends BaseActivity {
ButterKnife.bind(this);
String fileName = getIntent().getStringExtra("fileName");
String fileId = getIntent().getStringExtra("fileId");
LogUtils.e(fileName + "==" + fileId);
if (TextUtils.isEmpty(fileName)) {
mTvBaseTitle.setText("附件");
} else {
@ -128,7 +127,6 @@ public class PreviewFileActivity extends BaseActivity {
mWvWeb.destroy();
mLlContent.removeAllViews();
super.onDestroy();
System.exit(0);
}
@Override

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/gray_bg" />
<solid android:color="@color/gray_f0" />
<corners android:radius="3dp" />
</shape>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/gray_state" />
<corners android:radius="3dp" />
</shape>

View File

@ -16,7 +16,7 @@
android:id="@+id/rl_title_bar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/main_theme"
android:background="@color/gray_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="5dp"
@ -38,7 +38,7 @@
android:textColor="@color/white"
android:textSize="13sp"
android:visibility="visible"
tools:background="@drawable/ic_back_white"
tools:background="@drawable/ic_back_black"
tools:text=""
tools:visibility="visible" />
@ -58,7 +58,7 @@
android:ellipsize="end"
android:maxEms="12"
android:maxLines="1"
android:textColor="@color/white"
android:textColor="@color/black"
android:textSize="18sp"
tools:text="页面标题" />
@ -174,7 +174,7 @@
android:layout_width="18dp"
android:layout_height="18dp"
android:scaleType="fitXY"
android:src="@drawable/ic_search_white" />
android:src="@drawable/ic_search_icon_black" />
<TextView
android:id="@+id/tv_app_publish"
@ -183,7 +183,7 @@
android:layout_marginLeft="10dp"
android:clickable="true"
android:focusable="true"
android:textColor="@color/col_white_gray_press"
android:textColor="@color/black"
android:textSize="15sp"
tools:text="操作" />
</LinearLayout>

View File

@ -33,6 +33,7 @@
android:layout_below="@id/iv_photo"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="center_horizontal"
android:maxLines="1"
android:textSize="12sp"
tools:text="文件名称.doc" />

View File

@ -3,8 +3,12 @@
android:id="@+id/ll_base_search_cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="10dp">
android:paddingLeft="10dp"
android:paddingTop="3dp"
android:paddingRight="10dp"
android:paddingBottom="3dp">
<EditText
@ -18,7 +22,7 @@
android:drawablePadding="5dp"
android:hint="搜索"
android:imeOptions="actionSearch"
android:padding="3dp"
android:padding="5dp"
android:singleLine="true"
android:textSize="14sp" />
@ -26,6 +30,8 @@
android:id="@+id/tv_base_search_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:text="取消"
android:textColor="@color/gray_text" />
</LinearLayout>

View File

@ -26,6 +26,8 @@
android:id="@+id/tv_base_search_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:text="取消"
android:textColor="@color/gray_text" />
</LinearLayout>

View File

@ -113,7 +113,7 @@
<color name="titleBarDeep">#9F1512</color>
<!--我的页面灰色背景-->
<color name="bg_gray">#FCF9F2</color>
<color name="gray_bg">#F1F1F6</color>
<color name="gray_bg">#f8f8f8</color>
<color name="gray">#F2F2F2</color>
<color name="gray_fa">#FAFAFA</color>
<color name="gray_BA">#BABABA</color>
@ -122,6 +122,7 @@
<color name="orange">#FF6300</color>
<color name="home_background">#f5f5f5</color>
<color name="gray_text">#777777</color>
<color name="gray_state">#D2D2D2</color>
<color name="my_blue_bg">#ff7271</color>
<color name="button_bg">#8bc6f7</color>
<color name="sifazhuanti_bg">#f4f4f4</color>

View File

@ -102,8 +102,8 @@
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/main_theme</item>
<item name="colorPrimaryDark">@color/main_theme</item>
<item name="colorAccent">@color/main_theme</item>
<item name="colorPrimaryDark">@color/gray_bg</item>
<item name="colorAccent">@color/gray_bg</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@style/AnimationActivity</item>
<item name="android:windowIsTranslucent">true</item>

View File

@ -5,9 +5,11 @@ import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.alibaba.android.arouter.facade.annotation.Route;
@ -43,7 +45,6 @@ import com.tenlionsoft.oamodule.adapter.BasePersonShowAdapter;
import com.tenlionsoft.oamodule.beans.ChoosePersonListBean;
import com.tenlionsoft.oamodule.beans.MeetingAttachListBean;
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
import com.tenlionsoft.oamodule.beans.PersonShowBean;
import com.tenlionsoft.oamodule.beans.SaveMeetingBean;
import com.tenlionsoft.oamodule.net.OAApi;
@ -101,6 +102,10 @@ public class MeetingApplyActivity extends BaseActivity {
CheckBox mCbNoticeMsg;
@BindView(R2.id.cb_notice_email)
CheckBox mCbNoticeEmail;
@BindView(R2.id.iv_add_file)
ImageView mIvAddFile;
@BindView(R2.id.tv_file_hint)
TextView mTvFileHint;
private List<AddFileBean> mFileBeans = new ArrayList<>();
private AddFileAdapter mAddFileAdapter;
@ -150,28 +155,9 @@ public class MeetingApplyActivity extends BaseActivity {
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_SEL_MEETING_ROOM)
.navigation(mActivity, 14));//选择会议室
mFileBeans.add(new AddFileBean());
mAddFileAdapter = new AddFileAdapter(mActivity, mFileBeans);
mAddFileAdapter.addOnItemClickListener(addFileBean -> {
LogUtils.e("添加文件");
if (TextUtils.isEmpty(addFileBean.getId())) {
//选择
if (mFileMax == 0) {
ToastUtils.show("超过最大上传数量限制");
} else {
//TODO 校验是否有权限
new LFilePicker()
.withActivity(this)
.withRequestCode(LionActions.REQUEST_CODE_AC)
.withTitle("文件选择")
.withMaxNum(mFileMax)
.withFileFilter(fileFilter)
.start();
}
} else {
//预览
//判断文件类型
}
//TODO 预览文件
});
//删除上传的文件
mAddFileAdapter.addOnDeleteListener((bean, i) -> {
@ -179,6 +165,11 @@ public class MeetingApplyActivity extends BaseActivity {
mFileBeans.remove(i);
mAddFileAdapter.notifyDataSetChanged();
++mFileMax;
if (mFileBeans.size() > 0) {
mTvFileHint.setVisibility(View.GONE);
} else {
mTvFileHint.setVisibility(View.VISIBLE);
}
});
mRlvFiles.setLayoutManager(new GridLayoutManager(mActivity, 4));
mRlvFiles.setAdapter(mAddFileAdapter);
@ -187,7 +178,7 @@ public class MeetingApplyActivity extends BaseActivity {
mJoinPerson = new ArrayList<>();
mJoinPerson.add(new MeetingAttachListBean());
mPersonShowAdapter = new BasePersonShowAdapter(mActivity, mJoinPerson, 1);
mRlvJoin.setLayoutManager(new GridLayoutManager(mActivity, 4));
mRlvJoin.setLayoutManager(new GridLayoutManager(mActivity, 5));
mRlvJoin.setAdapter(mPersonShowAdapter);
mPersonShowAdapter.addOnDelListener(this::showConfirmDialog);
mPersonShowAdapter.addOnItemClickListener(bean -> {
@ -198,9 +189,25 @@ public class MeetingApplyActivity extends BaseActivity {
.navigation(mActivity, 13);
}
});
mIvAddFile.setOnClickListener(v -> checkManagePermission());
mBtnConfirm.setOnClickListener(v -> doConfirm());
}
@Override
protected void hasManageFileManage() {
if (mFileMax == 0) {
ToastUtils.show("超过最大上传数量限制");
} else {
new LFilePicker()
.withActivity(this)
.withRequestCode(LionActions.REQUEST_CODE_AC)
.withTitle("文件选择")
.withMaxNum(mFileMax)
.withFileFilter(fileFilter)
.start();
}
}
private void showConfirmDialog(MeetingAttachListBean bean, int i) {
new AlertDialog.Builder(mActivity)
.setTitle("提示")
@ -308,16 +315,16 @@ public class MeetingApplyActivity extends BaseActivity {
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "上传中...");
progressDialog.show();
List<Observable> requests = new ArrayList<>();
List<Observable<BaseSuccessBean>> requests = new ArrayList<>();
List<String> fileNames = new ArrayList<>();
for (int i = 0; i < paths.size(); i++) {
File file = new File(paths.get(i));
Observable observable = createObservable(file);
Observable<BaseSuccessBean> observable = createObservable(file);
fileNames.add(file.getName());
if (observable == null) return;
requests.add(observable);
}
Observable[] observables1 = requests.toArray(new Observable[requests.size()]);
Observable<BaseSuccessBean>[] observables1 = requests.toArray(new Observable[requests.size()]);
Observable.mergeArrayDelayError(observables1)
.compose(RxTransformer.getTransformer())
@ -330,6 +337,7 @@ public class MeetingApplyActivity extends BaseActivity {
@Override
public void onNext(@NotNull Object o) {
++mUploadCount;
mTvFileHint.setVisibility(View.GONE);
if (o instanceof BaseSuccessBean) {
--mFileMax;
//刷新文件
@ -521,7 +529,7 @@ public class MeetingApplyActivity extends BaseActivity {
bean.setMeetingUserNames(jname);
bean.setMeetingUserIds(id);
}
if (mFileBeans.size() >= 2) {
if (mFileBeans.size() > 0) {
StringBuilder fileId = new StringBuilder();
for (AddFileBean fileBean : mFileBeans) {
if (!TextUtils.isEmpty(fileBean.getId())) {

View File

@ -1,10 +1,14 @@
package com.tenlionsoft.oamodule.activity.meeting;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
@ -16,6 +20,7 @@ import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
import com.tenlionsoft.baselib.core.widget.base.BaseViewPage2Adapter;
import com.tenlionsoft.baselib.core.widget.base.FragmentUtils;
import com.tenlionsoft.baselib.core.widget.views.OperatePopup;
import com.tenlionsoft.baselib.utils.LogUtils;
import com.tenlionsoft.oamodule.R;
import com.tenlionsoft.oamodule.R2;
@ -50,9 +55,16 @@ public class MeetingCenterActivity extends BaseActivity {
RelativeLayout mRlContentTitle;
@BindView(R2.id.iv_control)
ImageView mIvControl;
@BindView(R2.id.et_base_search_cancel)
EditText mEtBaseSearchCancel;
@BindView(R2.id.tv_base_search_cancel)
TextView mTvBaseSearchCancel;
@BindView(R2.id.ll_base_search_cancel)
LinearLayout mLlBaseSearchCancel;
private List<BaseFragment> mFragments;
private List<OperateBean> mControls;
private String mKeywords;
@Override
protected int setLayoutId() {
@ -104,6 +116,30 @@ public class MeetingCenterActivity extends BaseActivity {
mControls.add(addBean);
mControls.add(listBean);
mEtBaseSearchCancel.setOnEditorActionListener((v, actionId, event) -> {
LogUtils.e("搜索==" + actionId);
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
hideSoftKeyboard();
mEtBaseSearchCancel.clearFocus();
mKeywords = v.getText().toString();
doRefresh();
return true;
} else {
return false;
}
});
mTvBaseSearchCancel.setOnClickListener(v -> {
mEtBaseSearchCancel.setText("");
mEtBaseSearchCancel.clearFocus();
mKeywords = "";
doRefresh();
});
}
private void doRefresh() {
//刷新fragment
mFragments.get(mVpContent.getCurrentItem()).refreshContentView(mKeywords);
}
/**

View File

@ -14,16 +14,20 @@ import android.widget.CheckBox;
import android.widget.TextView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.hjq.toast.ToastUtils;
import com.tenlionsoft.baselib.constant.PathConfig;
import com.tenlionsoft.baselib.core.beans.AddFileBean;
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
import com.tenlionsoft.baselib.core.retrofit_net.bean.FileInfoBean;
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
import com.tenlionsoft.baselib.core.widget.base.AddFileAdapter;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.core.widget.base.ShowFileAdapter;
import com.tenlionsoft.baselib.core.widget.views.QrDialog;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.FileUtils;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import com.tenlionsoft.oamodule.R;
@ -51,6 +55,8 @@ import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import static com.tenlionsoft.baselib.core.widget.PhotoActivity.TAG_IMGURL;
@Route(path = PathConfig.PATH_MODULE_OA_ACTIVITY_MEETING_DETAIL)
public class MeetingDetailActivity extends BaseActivity {
@ -170,18 +176,7 @@ public class MeetingDetailActivity extends BaseActivity {
if (!TextUtils.isEmpty(b.getMeetingFile())) {
mRlvFiles.setVisibility(View.VISIBLE);
mTvFileHint.setVisibility(View.GONE);
List<AddFileBean> files = new ArrayList<>();
String[] split = b.getMeetingFile().split(",");
for (int i = 0; i < split.length; i++) {
AddFileBean bean = new AddFileBean();
bean.setId(split[i]);
bean.setPath(BaseUrlApi.BASE_IMG_URL + split[i]);
bean.setFileType(1);
files.add(bean);
}
ShowFileAdapter adapter = new ShowFileAdapter(mActivity, files);
mRlvFiles.setLayoutManager(new GridLayoutManager(mActivity, 4));
mRlvFiles.setAdapter(adapter);
doGetFileInfo(b.getMeetingFile(), null);
} else {
mRlvFiles.setVisibility(View.GONE);
mTvFileHint.setVisibility(View.VISIBLE);
@ -208,6 +203,88 @@ public class MeetingDetailActivity extends BaseActivity {
}
}
private void doGetFileInfo(String fileId, List<AddFileBean> files) {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
dialog.show();
RetrofitManager.getInstance()
.create(BaseApiService.class)
.getFileInfoList(fileId, UserLgUtils.getToken())
.compose(RxTransformer.getTransformer())
.subscribe(new Observer<List<FileInfoBean>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull List<FileInfoBean> fileInfoBeans) {
if (dialog.isShowing()) dialog.dismiss();
if (fileInfoBeans.size() > 0) {
List<AddFileBean> mFiles = new ArrayList<>();
for (int i = 0; i < fileInfoBeans.size(); i++) {
FileInfoBean infoBean = fileInfoBeans.get(i);
AddFileBean bean = new AddFileBean();
bean.setId(infoBean.getFileId());
bean.setPath(BaseUrlApi.BASE_IMG_URL + infoBean.getFileId());
bean.setFileType(FileUtils.getFileType(infoBean.getFileName()));
bean.setFileName(infoBean.getFileName());
mFiles.add(bean);
}
AddFileAdapter adapter = new AddFileAdapter(mActivity, mFiles);
mRlvFiles.setLayoutManager(new GridLayoutManager(mActivity, 5));
mRlvFiles.setAdapter(adapter);
adapter.addOnItemClickListener(addFileBean -> previewFile(addFileBean, mFiles));
} else {
ToastUtils.show("未找到文档信息");
}
}
@Override
public void onError(@NonNull Throwable e) {
if (dialog.isShowing()) dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 预览文件
*/
private void previewFile(AddFileBean addFileBean, List<AddFileBean> mFiles) {
if (addFileBean.getFileType() == 1) {
//文档
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_BASELIB_ACTIVITY_PREVIEW_FILE)
.withString("fileName", addFileBean.getFileName())
.withString("fileId", addFileBean.getId())
.navigation();
} else if (2 == addFileBean.getFileType()) {
//图片预览
//遍历文件获取所有图片文件
ArrayList<String> imgUrls = new ArrayList<>();
for (int i = 0; i < mFiles.size(); i++) {
if (mFiles.get(i).getFileType() == 2) {
AddFileBean fileBean = mFiles.get(i);
String url = BaseUrlApi.BASE_IMG_URL + fileBean.getId();
imgUrls.add(url);
}
}
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
.withStringArrayList(TAG_IMGURL, imgUrls)
.navigation();
} else if (3 == addFileBean.getFileType() || 4 == addFileBean.getFileType()) {
//TODO 视频或音频预览
}
}
/**
* 保存图片到相册
*
@ -305,7 +382,7 @@ public class MeetingDetailActivity extends BaseActivity {
if (dialog.isShowing()) dialog.dismiss();
mJoinPerson = new ArrayList<>();
mPersonShowAdapter = new BasePersonShowAdapter(mActivity, meetingAttachListBeans, 2);
mRlvJoin.setLayoutManager(new GridLayoutManager(mActivity, 4));
mRlvJoin.setLayoutManager(new GridLayoutManager(mActivity, 5));
mRlvJoin.setAdapter(mPersonShowAdapter);
}

View File

@ -2,6 +2,7 @@ package com.tenlionsoft.oamodule.activity.meeting;
import android.text.TextUtils;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
@ -18,6 +19,7 @@ import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.LogUtils;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import com.tenlionsoft.oamodule.R;
import com.tenlionsoft.oamodule.R2;
@ -94,6 +96,25 @@ public class MineMeetingListActivity extends BaseActivity {
refreshStateView(LionActions.STATE_LOAD);
doRefresh();
mEtBaseSearchCancel.setOnEditorActionListener((v, actionId, event) -> {
LogUtils.e("搜索==" + actionId);
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
hideSoftKeyboard();
mEtBaseSearchCancel.clearFocus();
mKeywords = v.getText().toString();
doRefresh();
return true;
} else {
return false;
}
});
mTvBaseSearchCancel.setOnClickListener(v -> {
mEtBaseSearchCancel.setText("");
mEtBaseSearchCancel.clearFocus();
mKeywords = "";
doRefresh();
});
}
/**

View File

@ -4,6 +4,7 @@ import android.content.Intent;
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.LinearLayout;
@ -26,6 +27,7 @@ import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.LogUtils;
import com.tenlionsoft.baselib.utils.TimeUtils;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import com.tenlionsoft.oamodule.R;
@ -171,6 +173,27 @@ public class SuperviseActivity extends BaseActivity {
}
});
doRefresh();
mEtBaseSearchCancel.setOnEditorActionListener((v, actionId, event) -> {
LogUtils.e("搜索==" + actionId);
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
hideSoftKeyboard();
mEtBaseSearchCancel.clearFocus();
mKeywords = v.getText().toString();
doRefresh();
return true;
} else {
return false;
}
});
mTvBaseSearchCancel.setOnClickListener(v -> {
mEtBaseSearchCancel.setText("");
mEtBaseSearchCancel.clearFocus();
mTvStartDate.setText("");
mTvEndDate.setText("");
mKeywords = "";
doRefresh();
});
}
@ -190,14 +213,14 @@ public class SuperviseActivity extends BaseActivity {
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
switch (i) {
case 1:
mTvStartDate.setText(TimeUtils.date2String(date));
mTvStartDate.setText(TimeUtils.dateToString(date));
break;
case 2:
//判断时间大小
String start = mTvStartDate.getText().toString().trim();
int span = TimeUtils.compareDate(date, TimeUtils.string2Date(start));
if (span >= 0) {
mTvEndDate.setText(TimeUtils.date2String(date));
mTvEndDate.setText(TimeUtils.dateToString(date));
refreshPageState(STATE_LOAD_LOADING);
doRefresh();
} else {

View File

@ -38,7 +38,6 @@ public class BasePersonShowAdapter extends BaseRecyclerAdapter<MeetingAttachList
@Override
public void bindHolder(BasePersonShowHolder h, int i) {
MeetingAttachListBean b = mData.get(i);
LogUtils.e(b.getUserId());
if (!TextUtils.isEmpty(b.getUserId()) ) {
h.mTvName.setVisibility(View.VISIBLE);
if (mType == 2) {

View File

@ -1,6 +1,7 @@
package com.tenlionsoft.oamodule.adapter;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -36,16 +37,18 @@ public class SuperviseAdapter extends BaseRecyclerAdapter<Object, SuperviseHolde
Object o = mData.get(i);
if (o instanceof SuperviseBean) {
SuperviseBean bean = (SuperviseBean) o;
h.mTvName.setText("督办名称:" + bean.getOverseeTitle());
h.mTvContent.setText("督办内容:" + bean.getOverseeContent());
h.mTvTime.setText("完成时限:" + bean.getOverseeCompleteTime());
h.mTvName.setText(bean.getOverseeTitle());
h.mTvContent.setText(bean.getOverseeNum());
h.mTvTime.setText(bean.getOverseeCompleteTime());
h.mTvType.setVisibility(TextUtils.isEmpty(bean.getOverseeTypeName()) ? View.GONE : View.VISIBLE);
h.mTvType.setText(bean.getOverseeTypeName());
h.mTvState.setVisibility(View.GONE);
} else if (o instanceof BySuperviseListBean.RowsBean) {
BySuperviseListBean.RowsBean bean = (BySuperviseListBean.RowsBean) o;
h.mTvName.setText("督办名称:" + bean.getOverseeDTO().getOverseeTitle());
h.mTvContent.setText("督办内容:" + bean.getOverseeDTO().getOverseeContent());
h.mTvTime.setText("完成时限:" + bean.getOverseeDTO().getOverseeCompleteTime());
h.mTvName.setText(bean.getOverseeDTO().getOverseeTitle());
h.mTvContent.setText(bean.getOverseeDTO().getOverseeNum());
h.mTvTime.setText(bean.getOverseeDTO().getOverseeCompleteTime());
h.mTvType.setVisibility(TextUtils.isEmpty(bean.getOverseeDTO().getOverseeTypeName()) ? View.GONE : View.VISIBLE);
h.mTvType.setText(bean.getOverseeDTO().getOverseeTypeName());
h.mTvState.setVisibility(View.VISIBLE);
h.mTvState.setText("nto".equals(bean.getStatus()) ? "未办结" : "已办结");

View File

@ -224,6 +224,19 @@ public class EmceeMeetingFragment extends BaseFragment {
}
}
@Override
public void refreshContentView(String... data) {
if (data != null && data.length > 0) {
//有内容
mKeywords = data[0];
doRefresh();
} else {
mKeywords = "";
doRefresh();
}
}
@Override
protected void refreshView() {

View File

@ -23,10 +23,7 @@ import com.tenlionsoft.baselib.utils.UserLgUtils;
import com.tenlionsoft.oamodule.R;
import com.tenlionsoft.oamodule.R2;
import com.tenlionsoft.oamodule.activity.meeting.MeetingDetailActivity;
import com.tenlionsoft.oamodule.adapter.MeetingMineApplyAdapter;
import com.tenlionsoft.oamodule.adapter.MeetingMineJoinEmceeAdapter;
import com.tenlionsoft.oamodule.beans.MeetingRecordListBean;
import com.tenlionsoft.oamodule.beans.MeetingRoomRecordBean;
import com.tenlionsoft.oamodule.beans.MineJoinMeetingListBean;
import com.tenlionsoft.oamodule.net.OAApi;
@ -226,6 +223,18 @@ public class JoinMeetingFragment extends BaseFragment {
}
}
@Override
public void refreshContentView(String... data) {
if (data != null && data.length > 0) {
//有内容
mKeywords = data[0];
doRefresh();
} else {
mKeywords = "";
doRefresh();
}
}
@Override
protected void refreshView() {

View File

@ -2,6 +2,7 @@ package com.tenlionsoft.oamodule.fragments;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.TextUtils;
import android.view.View;
import android.widget.FrameLayout;
@ -19,6 +20,7 @@ import com.bumptech.glide.request.target.CustomTarget;
import com.bumptech.glide.request.transition.Transition;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.hjq.toast.ToastUtils;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tenlionsoft.baselib.constant.PathConfig;
import com.tenlionsoft.baselib.core.beans.FuncBean;
@ -283,16 +285,7 @@ public class OaMainFragment extends BaseFragment {
mActivity = (BaseActivity) getActivity();
// mLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(),
// result -> {
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
// if (!Environment.isExternalStorageManager()) {
// //没有授权
// ToastUtils.show("该功能需要SD卡的管理权限,请前往设置进行授权.");
// } else {
// ARouter.getInstance()
// .build(PathConfig.PATH_MODULE_OA_ACTIVITY_DOCUMENT)
// .navigation();
// }
// }
// });
}

View File

@ -10,7 +10,7 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="50dp"
android:layout_marginBottom="105dp"
android:scrollbars="none">
<LinearLayout
@ -234,7 +234,6 @@
android:id="@+id/rlv_join"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHeight_default="wrap"
app:layout_constraintHeight_max="200dp"
@ -244,7 +243,7 @@
tools:itemCount="50"
tools:layoutManager="GridLayoutManager"
tools:listitem="@layout/item_person_base_show"
tools:spanCount="4" />
tools:spanCount="5" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
@ -311,7 +310,7 @@
android:textColor="@color/black"
android:textSize="14sp" />
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
@ -323,18 +322,46 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:itemCount="3" />
</LinearLayout>
<TextView
android:id="@+id/tv_file_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:hint="会议文件"
android:padding="10dp"
android:textSize="@dimen/text_14" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<Button
android:id="@+id/btn_confirm"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="提交申请" />
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:id="@+id/iv_add_file"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_file_add" />
</LinearLayout>
<Button
android:id="@+id/btn_confirm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="提交申请" />
</LinearLayout>
</RelativeLayout>

View File

@ -59,10 +59,10 @@
android:layout_weight="1"
android:background="@drawable/switch_custom_gray_white"
android:button="@null"
android:checked="true"
android:gravity="center"
android:paddingLeft="10dp"
android:paddingTop="5dp"
android:checked="true"
android:paddingRight="10dp"
android:paddingBottom="5dp"
android:text="我参加的"
@ -100,6 +100,8 @@
</RelativeLayout>
<include layout="@layout/layout_base_search_cancel" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp_content"
android:layout_width="match_parent"

View File

@ -45,6 +45,7 @@
android:background="@null"
android:gravity="right"
android:hint="未录入"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>

View File

@ -16,12 +16,16 @@
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="wrap_content"
android:background="@color/white" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<LinearLayout

View File

@ -110,15 +110,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="3dp"
android:layout_marginRight="5dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="5dp">
android:paddingLeft="5dp"
android:paddingRight="5dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_weight="1"
android:background="@drawable/shp_rectangle_white_5"
android:gravity="center">
@ -134,6 +135,7 @@
android:gravity="center"
android:hint="开始日期"
android:padding="5dp"
android:textColor="@color/black"
android:textSize="12sp" />
<TextView
@ -152,6 +154,7 @@
android:gravity="center"
android:hint="结束日期"
android:padding="5dp"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
@ -166,12 +169,15 @@
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="wrap_content"
android:background="@color/white" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<LinearLayout

View File

@ -43,6 +43,7 @@
android:background="@null"
android:gravity="right"
android:hint="未录入"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
@ -279,52 +280,52 @@
</LinearLayout>
</LinearLayout>
<!-- <LinearLayout style="@style/item_hor_content">-->
<!-- <LinearLayout style="@style/item_hor_content">-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:text="回复人员"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="14sp" />-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:text="回复人员"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="14sp" />-->
<!-- <TextView-->
<!-- android:id="@+id/tv_repect_users"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:clickable="true"-->
<!-- android:focusable="true"-->
<!-- android:gravity="right"-->
<!-- android:hint="未录入"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="14sp" />-->
<!-- </LinearLayout>-->
<!-- <TextView-->
<!-- android:id="@+id/tv_repect_users"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:clickable="true"-->
<!-- android:focusable="true"-->
<!-- android:gravity="right"-->
<!-- android:hint="未录入"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="14sp" />-->
<!-- </LinearLayout>-->
<!-- <LinearLayout style="@style/item_hor_content">-->
<!-- <LinearLayout style="@style/item_hor_content">-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:text="回复时间"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="14sp" />-->
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:text="回复时间"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="14sp" />-->
<!-- <TextView-->
<!-- android:id="@+id/tv_repect_time"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:clickable="true"-->
<!-- android:focusable="true"-->
<!-- android:gravity="right"-->
<!-- android:hint="未录入"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="14sp" />-->
<!-- </LinearLayout>-->
<!-- <TextView-->
<!-- android:id="@+id/tv_repect_time"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="center_vertical"-->
<!-- android:clickable="true"-->
<!-- android:focusable="true"-->
<!-- android:gravity="right"-->
<!-- android:hint="未录入"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="14sp" />-->
<!-- </LinearLayout>-->
</LinearLayout>
</LinearLayout>

View File

@ -9,9 +9,9 @@
android:id="@+id/srl_meeting"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp">
android:layout_marginRight="5dp">
<RelativeLayout
android:layout_width="match_parent"
@ -20,7 +20,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_meeting"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="wrap_content"
android:background="@color/white" />
<LinearLayout
android:id="@+id/ll_hint"

View File

@ -9,9 +9,9 @@
android:id="@+id/srl_meeting"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp">
android:layout_marginRight="5dp">
<RelativeLayout
android:layout_width="match_parent"
@ -20,7 +20,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_meeting"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="wrap_content"
android:background="@color/white" />
<LinearLayout
android:id="@+id/ll_hint"

View File

@ -3,67 +3,70 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:layout_marginLeft="3dp"
android:layout_marginTop="5dp"
android:layout_marginRight="3dp"
android:layout_marginBottom="5dp"
android:background="@color/white"
android:orientation="vertical"
android:padding="3dp">
android:padding="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
<TextView
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
tools:text="督办名称" />
<TextView
android:id="@+id/tv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
tools:text="督办内容" />
</LinearLayout>
<TextView
android:id="@+id/tv_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shp_status_blue"
android:gravity="center"
android:textColor="@color/text_blue" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="完成时限" />
android:textColor="@color/black"
tools:text="督办名称" />
<TextView
android:id="@+id/tv_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/shp_status_gray_rim"
android:padding="3dp"
android:textColor="@color/white"
android:textSize="@dimen/text_12"
tools:text="督办类型" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="督办内容" />
<TextView
android:id="@+id/tv_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
tools:text="完成时限" />
<TextView
android:id="@+id/tv_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="状态"
android:textColor="@color/text_blue" />
</LinearLayout>
</LinearLayout>