| | |
| | | /** |
| | | * @author Ljj |
| | | * @date 2023.03.18. 10:00 |
| | | * @desc 家大事记 Activity |
| | | * @desc 会议审批 Activity |
| | | */ |
| | | public class MeetingapproveActivity extends DLBaseActivity<ActivityMeetingApproveBinding,MeetingapproveActivityViewModel>{ |
| | | |
| | |
| | | //右上角操作弹窗 |
| | | mOperatePopupWindow = initPopUpWindow(View.inflate(this,R.layout.pop_operate_read,null)); |
| | | setOnClickListener( |
| | | mOperatePopupWindow.getContentView().findViewById(R.id.tv_add), |
| | | mOperatePopupWindow.getContentView().findViewById(R.id.tv_select), |
| | | mOperatePopupWindow.getContentView().findViewById(R.id.tv_from_new_to_old), |
| | | mOperatePopupWindow.getContentView().findViewById(R.id.tv_from_old_to_new), |
| | | mOperatePopupWindow.getContentView().findViewById(R.id.tv_own_top) |
| | |
| | | binding.tvTitle.setText("搜索结果"); |
| | | hideSoftKeyboard(); |
| | | }); |
| | | //点击添加按钮跳转到创建家大事记页面 |
| | | //点击添加按钮跳转到创建会议审批页面 |
| | | binding.fabAdd.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | |
| | | adapter.removeItem(bean); |
| | | } |
| | | }); |
| | | //观察家大事记数据的变化,有变化包括添加、修改、删除都会发送消息,接收到消息后重新获取数据 |
| | | //观察会议审批数据的变化,有变化包括添加、修改、删除都会发送消息,接收到消息后重新获取数据 |
| | | RxBus.getInstance().toObservable(this, MeetingBean.class) |
| | | .subscribe(bean -> { |
| | | viewModel.getMeeting(); |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | int id = v.getId(); |
| | | if (id == R.id.tv_add){ |
| | | AppManager.getAppManager().startActivity(new Intent(this, MeetingapproveDetailActivity.class).putExtra(BaseConfig.EXTRA_TYPE,1)); |
| | | }else if (id == R.id.tv_select){ |
| | | viewModel.getOperateTypeLiveData().postValue(1); |
| | | mOperatePopupWindow.dismiss(); |
| | | } else if (id == R.id.tv_from_new_to_old) { |
| | | if (id == R.id.tv_from_new_to_old) { |
| | | viewModel.changeOrder(true); |
| | | mOperatePopupWindow.dismiss(); |
| | | } else if (id == R.id.tv_from_old_to_new) { |