riku
2022-01-20 5a0fff8095cd5356f57c181b7e7b820e0f7efacf
appDucha/src/main/java/com/flightfeather/ducha/module/task/DCTaskFragment.java
@@ -27,6 +27,7 @@
import java.util.List;
import java.util.Map;
import cn.flightfeather.thirdappmodule.CommonApplication;
import cn.flightfeather.thirdappmodule.activity.NewMonthTaskActivity;
import cn.flightfeather.thirdappmodule.activity.ScenseMapActivity;
import cn.flightfeather.thirdappmodule.activity.TaskActivity;
@@ -78,7 +79,7 @@
        taskViewModel = ViewModelProviders.of(this).get(DCTaskViewModel.class);
        return inflater.inflate(R.layout.fragment_task, container, false);
        return inflater.inflate(R.layout.dc_fragment_task, container, false);
    }
    @Override
@@ -86,20 +87,6 @@
        super.onViewCreated(view, savedInstanceState);
        initUI(view);
        initData();
//        view.findViewById(R.id.ll_container_todytask).setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                try {
//                    int a = 0 / 0;
//                } catch (Exception e) {
//                    MyCrashHandler c = MyCrashHandler.Companion.getInstance();
//                    if (c != null) {
//                        c.catchException(e);
//                    }
//                }
//            }
//        });
    }
    @Override
@@ -120,14 +107,24 @@
    private void initUI(View view) {
        ViewGroup rl_addTask = view.findViewById(R.id.rl_add_task);
        ViewGroup rl_add_scense = view.findViewById(R.id.rl_add_scense);
        view.findViewById(R.id.rl_scense_map).setOnClickListener(this);
        view.findViewById(R.id.cl_add_subTask).setOnClickListener(this);
        view.findViewById(R.id.rl_add_scense).setOnClickListener(this);
        view.findViewById(R.id.day_task).setOnClickListener(this);
        view.findViewById(R.id.week_task).setOnClickListener(this);
        view.findViewById(R.id.month_task).setOnClickListener(this);
        view.findViewById(R.id.ll_container_taskadjust).setOnClickListener(this);
        view.findViewById(R.id.rl_container_task_export).setOnClickListener(this);
        // 只有管理人员可以看到“总任务管理”和“新增场景”按钮
        if (CommonApplication.getInstance().getCurrentUser().getUsertypeid() == 0) {
            rl_addTask.setOnClickListener(this);
            rl_add_scense.setOnClickListener(this);
        } else {
            rl_addTask.setVisibility(View.GONE);
            rl_add_scense.setVisibility(View.GONE);
        }
        view_waiting = view.findViewById(R.id.view_waiting);
        tv_no_task = view.findViewById(R.id.tv_no_task);
        RecyclerView mRecyclerView = view.findViewById(R.id.rv_container);
@@ -148,7 +145,6 @@
        daytask_circleprogress.setProgress(0, 0);
        weektask_circleprogress.setProgress(0, 0);
        monthtask_circleprogress.setProgress(0, 0);
        rl_addTask.setOnClickListener(this);
    }
    private void getTodaySubTask() {
@@ -274,7 +270,8 @@
                getActivity().startActivityForResult(intent1, Constant.REQUESTCODE_FROM_TASKFRAGMENT);
                break;
            case R.id.cl_add_subTask:
                showTaskKindDialog();
//                showTaskKindDialog();
                startActivity(new Intent(getActivity(), DCNewTempTaskActivity.class));
                break;
            case R.id.rl_add_scense:
                startActivity(new Intent(getActivity(), SceneDetailActivity.class));