| | |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.databinding.FragmentMeBinding; |
| | | import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch; |
| | | import com.hdl.photovoltaic.enums.UserRightType; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | | import com.hdl.photovoltaic.other.HdlAccountLogic; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | |
| | | import com.hdl.photovoltaic.ui.bean.BUserInfo; |
| | | import com.hdl.photovoltaic.ui.bean.CUserInfo; |
| | | import com.hdl.photovoltaic.ui.bean.UserRightTypeBean; |
| | | import com.hdl.photovoltaic.ui.test.TestMainActivity; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.utils.GlideUtils; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | import org.greenrobot.eventbus.Subscribe; |
| | | import org.greenrobot.eventbus.ThreadMode; |
| | | |
| | | |
| | | /** |
| | | * 我的-界面 |
| | |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | } |
| | | }); |
| | | //员工管理(主账号才显示) |
| | | viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineRightIconClickIv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_MINE_MINESTAFFMANAGER; |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | } |
| | | }); |
| | | // //员工管理(主账号才显示) |
| | | // viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineRightIconClickIv.setOnClickListener(new View.OnClickListener() { |
| | | // @Override |
| | | // public void onClick(View v) { |
| | | // String path = HDLUniMP.UNI_EVENT_OPEN_MINE_MINESTAFFMANAGER; |
| | | // HdlUniLogic.getInstance().openUniMP(path, null); |
| | | // } |
| | | // }); |
| | | //设置 |
| | | viewBinding.fragmentMeLineSetIl.fragmentMeLineRightIconClickIv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(AsRegardsActivity.class); |
| | | |
| | | } |
| | | }); |
| | | //帮助 |
| | | viewBinding.fragmentMeLineHelpIl.fragmentMeLineCl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(HelpWebActivity.class); |
| | | } |
| | | }); |
| | | |
| | |
| | | viewBinding.fragmentMeLineDeviceDebugIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.device_debug); |
| | | viewBinding.fragmentMeLineDeviceDebugIl.fragmentMeLineTitleIv.setText(R.string.device_debugging); |
| | | viewBinding.fragmentMeLineDeviceDebugIl.fragmentMeLineV.setVisibility(View.VISIBLE); |
| | | //员工管理 |
| | | viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.user_management); |
| | | viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineTitleIv.setText(R.string.staff_management); |
| | | viewBinding.fragmentMeLineUserManagementIl.getRoot().setVisibility(View.GONE);//先隐藏,读取到有限权在显示 |
| | | viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineV.setVisibility(View.VISIBLE); |
| | | // //员工管理 |
| | | // viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.user_management); |
| | | // viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineTitleIv.setText(R.string.staff_management); |
| | | // viewBinding.fragmentMeLineUserManagementIl.getRoot().setVisibility(View.GONE);//先隐藏,读取到有限权在显示 |
| | | // viewBinding.fragmentMeLineUserManagementIl.fragmentMeLineV.setVisibility(View.VISIBLE); |
| | | //设备 |
| | | viewBinding.fragmentMeLineSetIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.set); |
| | | viewBinding.fragmentMeLineSetIl.fragmentMeLineTitleIv.setText(R.string.me_set); |
| | |
| | | viewBinding.fragmentMeLineAsregardsIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.asregards); |
| | | viewBinding.fragmentMeLineAsregardsIl.fragmentMeLineTitleIv.setText(R.string.me_regard); |
| | | // viewBinding.fragmentMeLineAsregardsIl.fragmentMeLineV.setVisibility(View.VISIBLE); |
| | | |
| | | //帮助 |
| | | viewBinding.fragmentMeLineHelpIl.fragmentMeLineCl.setVisibility(View.GONE);//胡彬说先隐藏 |
| | | viewBinding.fragmentMeLineHelpIl.fragmentMeLineLeftIconIv.setImageResource(R.drawable.help); |
| | | viewBinding.fragmentMeLineHelpIl.fragmentMeLineTitleIv.setText(R.string.help); |
| | | |
| | | |
| | | setMemberName(UserConfigManage.getInstance().getUserName()); |
| | |
| | | } else { |
| | | this.getCMemberInfo(); |
| | | } |
| | | getUserRightType(); |
| | | // getUserRightType(); |
| | | |
| | | } |
| | | |
| | |
| | | HdlMemberLogic.getInstance().getUserRightType(new CloudCallBeak<UserRightTypeBean>() { |
| | | @Override |
| | | public void onSuccess(UserRightTypeBean obj) { |
| | | if (obj.getUserRightType().equals(UserRightType.MANAGER)) { |
| | | viewBinding.fragmentMeLineUserManagementIl.getRoot().setVisibility(View.VISIBLE); |
| | | } else { |
| | | viewBinding.fragmentMeLineUserManagementIl.getRoot().setVisibility(View.GONE); |
| | | } |
| | | // if (obj.getUserRightType().equals(UserRightType.MANAGER)) { |
| | | // viewBinding.fragmentMeLineUserManagementIl.getRoot().setVisibility(View.VISIBLE); |
| | | // } else { |
| | | // viewBinding.fragmentMeLineUserManagementIl.getRoot().setVisibility(View.GONE); |
| | | // } |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | HdlLogLogic.print("获取用户自定义配置温度单位详情--->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | HdlLogLogic.print("获取用户自定义配置温度单位详情---" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | // HdlThreadLogic.toast(_mActivity, e); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | } |