|
|
|
@ -1,449 +0,0 @@
|
|
|
|
package com.rehome.zhdcoa.weiget;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import android.app.Dialog;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
|
|
|
import android.text.TextUtils;
|
|
|
|
|
|
|
|
import android.view.Display;
|
|
|
|
|
|
|
|
import android.view.Gravity;
|
|
|
|
|
|
|
|
import android.view.Window;
|
|
|
|
|
|
|
|
import android.view.WindowManager;
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.App;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.R;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.adapter.GridViewAdapter;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.bean.GridItem;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.AbActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ActivityFactoryWorkerInfo;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ActivityMZDH;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ActivitySHYK;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ActivityWdhy;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.Activity_Dzdt;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.Activity_YJYAJX;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ApplyChangeShiftActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ApplyConferenceActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ApplyDinnerActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ApplyLeaveActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ApplyReceiveActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ApplySuppliesActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ApplyTakeOutActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.AttendanceCheckActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.BfwwActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ClcrzsqcxActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ConferenceAudioActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ConferenceDateActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.DJExamOnlineActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.DJPeixunActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.DJPxKjglActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.DJTimeActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.DagerEnterApplyActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ExamPracticeActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.GgzxActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.GzpActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.GzqkckActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.GzqksbActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.HmActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.JcyrsqActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.LrqyryActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.LsgkActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.MyTaskActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.OrdinaryVisitActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.OthersTaskActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.PxKjglActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.SisActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.SisdtDataActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.TaskCountActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.TaskDateActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.TrainStudyActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.WorkRiskListActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.XfssqActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.XmjdActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.YjynMainActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ZddbActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ZddbgzActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ZdqyActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ZdqycwActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ZdqylsActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ZxDjtpActivity;
|
|
|
|
|
|
|
|
import com.rehome.zhdcoa.ui.activity.ZxtpActivity;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Created by Rehome-rjb1 on 2017/5/18.
|
|
|
|
|
|
|
|
* 每个模块弹窗,选择模块的对话框
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class GridViewDialog extends Dialog {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final String TAG_VISIT = "TAG_VISIT";//来访
|
|
|
|
|
|
|
|
public static final String TAG_MEET = "TAG_MEET";//会议
|
|
|
|
|
|
|
|
public static final String TAG_DINNER = "TAG_DINNER";//用餐
|
|
|
|
|
|
|
|
public static final String TAG_TASK = "TAG_TASK";//任务
|
|
|
|
|
|
|
|
public static final String TAG_SCHEDULE = "TAG_SCHEDULE";//日程
|
|
|
|
|
|
|
|
public static final String TAG_CHECK = "TAG_CHECK";//考勤
|
|
|
|
|
|
|
|
public static final String TAG_OFFICE = "TAG_OFFICE";//办公用品
|
|
|
|
|
|
|
|
public static final String TAG_PEIXUN = "TAG_PEIXUN";//培训
|
|
|
|
|
|
|
|
public static final String TAG_PDANGJIAN = "TAG_DANGJIAN";//党建
|
|
|
|
|
|
|
|
public static final String TAG_GONGHUI = "TAG_GONGHUI";//工会
|
|
|
|
|
|
|
|
public static final String TAG_JD = "TAG_JD";//生产过程监督
|
|
|
|
|
|
|
|
public static final String TAG_YJYA = "TAG_YJYA";//应急预案
|
|
|
|
|
|
|
|
public static final String TAG_LSGK = "TAG_LSGK";//临时管控
|
|
|
|
|
|
|
|
public static final String TAG_AF = "TAG_AF";//安防
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String[] results = App.getInstance().getUserInfo().getPermissionsResult().split(";");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String TAG = "";
|
|
|
|
|
|
|
|
AutoGridView gv;
|
|
|
|
|
|
|
|
private GridViewAdapter adapter;
|
|
|
|
|
|
|
|
private List<GridItem> datas;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public GridViewDialog(@NonNull Context context, String tag) {
|
|
|
|
|
|
|
|
super(context);
|
|
|
|
|
|
|
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
|
|
|
|
|
|
|
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
|
|
|
|
|
|
|
|
setContentView(R.layout.layout_gridview_dialog);
|
|
|
|
|
|
|
|
findView();
|
|
|
|
|
|
|
|
Window window = getWindow();
|
|
|
|
|
|
|
|
WindowManager.LayoutParams lp = window.getAttributes();
|
|
|
|
|
|
|
|
lp.width = (getScreenWidth(context)) * 2 / 3;
|
|
|
|
|
|
|
|
window.setGravity(Gravity.CENTER);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TAG = tag;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(TAG.equals(TAG_AF)){
|
|
|
|
|
|
|
|
lp.width = (getScreenWidth(context)) * 4 / 5;
|
|
|
|
|
|
|
|
gv.setNumColumns(3);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
lp.width = (getScreenWidth(context)) * 2 / 3;
|
|
|
|
|
|
|
|
gv.setNumColumns(2);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initDatas();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (datas != null) {
|
|
|
|
|
|
|
|
setAdapter();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void findView(){
|
|
|
|
|
|
|
|
gv = findViewById(R.id.gv);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setAdapter() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (adapter == null) {
|
|
|
|
|
|
|
|
adapter = new GridViewAdapter(getContext(), datas);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gv.setAdapter(adapter);
|
|
|
|
|
|
|
|
gv.setOnItemClickListener((parent, view, position, id) -> {
|
|
|
|
|
|
|
|
Intent intent = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (TAG) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TAG_VISIT:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), OrdinaryVisitActivity.class);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ApplyReceiveActivity.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TAG_MEET:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ApplyConferenceActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 1) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ConferenceDateActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 2) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ConferenceAudioActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 3) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ActivityWdhy.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// else if (position == 4) {
|
|
|
|
|
|
|
|
// intent = new Intent(getContext(), InitAuthSDKActivity.class);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TAG_DINNER:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ApplyDinnerActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 1) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ApplyTakeOutActivity.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// else if (position == 2) {
|
|
|
|
|
|
|
|
// intent = new Intent(getContext(), YcryglActivity.class);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TAG_TASK:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), MyTaskActivity.class);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), OthersTaskActivity.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TAG_SCHEDULE:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), TaskDateActivity.class);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), TaskCountActivity.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TAG_CHECK:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ApplyLeaveActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 1) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ApplyChangeShiftActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 2) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), AttendanceCheckActivity.class);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
//陈坚标主任提出 APP里把 管理 -> 考勤/出差 图标里的这个文字把 考勤/出差的文字/出差去掉
|
|
|
|
|
|
|
|
// 点击这个按钮进去,出差申请 禁掉, 现在处理结果:出差申请图标隐藏起来,和苹果端保持一致
|
|
|
|
|
|
|
|
//intent = new Intent(getContext(), ApplyTravelActivity.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TAG_OFFICE:
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ApplySuppliesActivity.class);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TAG_PEIXUN:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
//学习中心
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), TrainStudyActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 1) {
|
|
|
|
|
|
|
|
//课件管理
|
|
|
|
|
|
|
|
//intent = new Intent(getContext(), PxKjglActivity.class);
|
|
|
|
|
|
|
|
//考试练习
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ExamPracticeActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 2) {
|
|
|
|
|
|
|
|
//公告中心
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), GgzxActivity.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_PDANGJIAN:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ZxDjtpActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 1) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ActivitySHYK.class);
|
|
|
|
|
|
|
|
} else if (position == 2) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), DJPeixunActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 3) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), DJPxKjglActivity.class);
|
|
|
|
|
|
|
|
}else if (position == 4) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), DJTimeActivity.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// else if (position == 4) {
|
|
|
|
|
|
|
|
// intent = new Intent(getContext(), ActivitySavedhxx.class);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// else if (position == 5) {
|
|
|
|
|
|
|
|
// intent = new Intent(getContext(), DJExamOnlineActivity.class);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_GONGHUI:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ZxtpActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 1) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ActivityMZDH.class);
|
|
|
|
|
|
|
|
} else if (position == 2) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), BfwwActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 3) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), DJExamOnlineActivity.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_JD:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), XmjdActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 1) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), SisdtDataActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 2) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), SisActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 3) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), Activity_Dzdt.class);
|
|
|
|
|
|
|
|
} else if (position == 4) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), GzqksbActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 5) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), GzqkckActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 6) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), YjynMainActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 7) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), LsgkActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 8) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ZddbActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 9) {
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ZddbgzActivity.class);
|
|
|
|
|
|
|
|
}else if (position == 10) {
|
|
|
|
|
|
|
|
//消防水申请
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), XfssqActivity.class);
|
|
|
|
|
|
|
|
}else if (position == 11) {
|
|
|
|
|
|
|
|
//危化品入厂申请
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), DagerEnterApplyActivity.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_AF:
|
|
|
|
|
|
|
|
if (position == 0) {
|
|
|
|
|
|
|
|
//当前厂内人员信息
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ActivityFactoryWorkerInfo.class);
|
|
|
|
|
|
|
|
}else if (position == 1) {
|
|
|
|
|
|
|
|
//作业风险清单
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), WorkRiskListActivity.class);
|
|
|
|
|
|
|
|
}else if (position == 2) {
|
|
|
|
|
|
|
|
//安防报警
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), AbActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 3) {
|
|
|
|
|
|
|
|
//豁免设置
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), HmActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 4) {
|
|
|
|
|
|
|
|
//工作票
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), GzpActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 5) {
|
|
|
|
|
|
|
|
//常维信息
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ZdqycwActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 6) {
|
|
|
|
|
|
|
|
//临时人员授权
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ZdqylsActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 7) {
|
|
|
|
|
|
|
|
//常维人员授权
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ZdqyActivity.class);
|
|
|
|
|
|
|
|
}else if (position == 8) {
|
|
|
|
|
|
|
|
//车辆出入证
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), ClcrzsqcxActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 9) {
|
|
|
|
|
|
|
|
//进厂人员申请
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), JcyrsqActivity.class);
|
|
|
|
|
|
|
|
} else if (position == 10) {
|
|
|
|
|
|
|
|
//应急预案
|
|
|
|
|
|
|
|
intent = new Intent(getContext(), Activity_YJYAJX.class);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (intent != null) {
|
|
|
|
|
|
|
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
|
|
|
|
|
|
|
getContext().startActivity(intent);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
dismiss();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
adapter.notifyDataSetChanged();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取屏幕宽度
|
|
|
|
|
|
|
|
public static int getScreenWidth(Context context) {
|
|
|
|
|
|
|
|
WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
|
|
|
|
|
|
|
|
Display display = manager.getDefaultDisplay();
|
|
|
|
|
|
|
|
return display.getWidth();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String getShowString(String type) {
|
|
|
|
|
|
|
|
for (String result : results) {
|
|
|
|
|
|
|
|
if (TextUtils.equals(type, result)) {
|
|
|
|
|
|
|
|
return "show";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
// return "show";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void initDatas() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
datas = new ArrayList<>();
|
|
|
|
|
|
|
|
switch (TAG) {
|
|
|
|
|
|
|
|
case TAG_VISIT:
|
|
|
|
|
|
|
|
datas.add(new GridItem("普通来访", R.drawable.icon_visit, getShowString("OrdinaryVisit_SH")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("接待来访", R.drawable.icon_reception, getShowString("ReceiveVisit")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_MEET:
|
|
|
|
|
|
|
|
datas.add(new GridItem("会议管理", R.drawable.icon_meet, getShowString("ApplyConference")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("会议一览表", R.drawable.icon_meet_date, getShowString("ApplyConference_YLB")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("会议录音", R.drawable.icon_audio, getShowString("MeetingRecord")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("我的会议", R.drawable.icon_wdhy, getShowString("MeetingRecord")));
|
|
|
|
|
|
|
|
// datas.add(new GridItem("视频会议", R.drawable.icon_meet_video, getShowString("MeetingRecord")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_DINNER:
|
|
|
|
|
|
|
|
datas.add(new GridItem("用餐管理", R.drawable.icon_dinner, getShowString("DinnerApply")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("送餐订单", R.drawable.icon_take_out, getShowString("OrderManage")));
|
|
|
|
|
|
|
|
// datas.add(new GridItem("就餐人员管理", R.drawable.icon_take_out, getShowString("DinnerApply")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_TASK:
|
|
|
|
|
|
|
|
datas.add(new GridItem("本人任务", R.drawable.icon_task, getShowString("MyTask")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("他人任务", R.drawable.icon_task_other, getShowString("OtherTask")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_SCHEDULE:
|
|
|
|
|
|
|
|
datas.add(new GridItem("任务日程", R.drawable.icon_date, getShowString("EveryDayTask")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("任务统计", R.drawable.icon_task_count, getShowString("JobStatistics")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_CHECK:
|
|
|
|
|
|
|
|
datas.add(new GridItem("请假申请", R.drawable.icon_check, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("调班申请", R.drawable.icon_change_shift, getShowString("RGKQ_RGKQTBSQ")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("考勤查询", R.drawable.icon_query, getShowString("RGKQ_KQZZCX")));
|
|
|
|
|
|
|
|
//陈坚标主任提出 APP里把 管理 -> 考勤/出差 图标里的这个文字把 考勤/出差的文字/出差去掉
|
|
|
|
|
|
|
|
// 点击这个按钮进去,出差申请 禁掉, 现在处理结果:出差申请图标隐藏起来,和苹果端保持一致
|
|
|
|
|
|
|
|
//datas.add(new GridItem("出差申请", R.drawable.icon_travel, getShowString("TraveCCSQGL")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_OFFICE:
|
|
|
|
|
|
|
|
datas.add(new GridItem("办公用品申请", R.drawable.icon_office, getShowString("BGSWPLY")));
|
|
|
|
|
|
|
|
// datas.add(new GridItem("办公设施增配", R.drawable.icon_office_add,getShowString("OfficeFacilities")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TAG_PEIXUN:
|
|
|
|
|
|
|
|
datas.add(new GridItem("学习中心", R.drawable.icon_px, getShowString("STUDYXT_ZRGL_ZXXX")));
|
|
|
|
|
|
|
|
//datas.add(new GridItem("课件管理", R.drawable.icon_kjgl, getShowString("STUDYXT_ZRGL_KJGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("考试练习", R.drawable.icon_ks, getShowString("STUDYXT_KSZX_ZXKS")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("公告中心", R.drawable.icon_ggzx, getShowString("GGZXManage_GGZX")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_PDANGJIAN:
|
|
|
|
|
|
|
|
datas.add(new GridItem("党建投票", R.drawable.icon_zxtp, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("三会一课", R.drawable.icon_qdmeet, getShowString("Branch_PartyMemberMeet")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("党建学习", R.drawable.icon_px, getShowString("STUDYXT_ZRGL_ZXXX_PS")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("党建课件", R.drawable.icon_kjgl, getShowString("STUDYXT_ZRGL_KJGL_PS")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("党龄", R.drawable.icon_dj, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
// datas.add(new GridItem("党员大会", R.drawable.icon_qdmeet, getShowString("STUDYXT_ZRGL_KJGL_PS")));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_GONGHUI:
|
|
|
|
|
|
|
|
datas.add(new GridItem("在线投票", R.drawable.icon_zxtp, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("民主对话", R.drawable.icon_mzdh, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("帮扶慰问", R.drawable.icon_bfww, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("考试练习", R.drawable.icon_ks, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_JD:
|
|
|
|
|
|
|
|
datas.add(new GridItem("项目进度跟踪", R.drawable.icon_xmjd, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("警报记录汇总", R.drawable.icon_sis, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("机组生产实况", R.drawable.icon_sis, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("电子地图", R.drawable.icon_dzdt, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("工作情况上报", R.drawable.icon1, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("工作情况", R.drawable.icon4, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("应急预案", R.drawable.icon_yjya, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("临时管控", R.drawable.icon_lsgk, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("重点工作督办", R.drawable.icon_gzdb, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("重点工作跟踪", R.drawable.icon_gzgz, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("消防水申请", R.drawable.icon_clcrz, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("危化品入厂申请", R.drawable.dager_logo, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TAG_AF:
|
|
|
|
|
|
|
|
datas.add(new GridItem("厂内人员信息", R.drawable.icon13, getShowString("ZNAF_ZYQYLSJRRY")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("作业风险清单", R.drawable.icon_travel, getShowString("ZNAF_ZYQYLSJRRY")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("安防报警", R.drawable.baojing, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("豁免设置", R.drawable.huomian, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("工作票", R.drawable.icon_xmjd, getShowString("YGKQGL_SQGL")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("常维信息", R.drawable.icon_task, getShowString("ZNAF_EMPAEAR_MANAGE")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("临时人员授权", R.drawable.icon_wdhy, getShowString("ZNAF_ZYQYLSJRRY")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("常维人员授权", R.drawable.icon_wdhy, getShowString("ZNAF_ZYQYLSJRRY")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("车辆出入证", R.drawable.icon_clcrz, getShowString("ZNAF_ZYQYLSJRRY")));
|
|
|
|
|
|
|
|
//datas.add(new GridItem("消防水申请", R.drawable.icon_clcrz, getShowString("ZNAF_ZYQYLSJRRY")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("进厂人员申请", R.drawable.icon_visit, getShowString("ZNAF_ZYQYLSJRRY")));
|
|
|
|
|
|
|
|
//datas.add(new GridItem("危化品入厂申请", R.drawable.dager_logo, getShowString("ZNAF_ZYQYLSJRRY")));
|
|
|
|
|
|
|
|
datas.add(new GridItem("应急预案", R.drawable.icon_yjya, getShowString("ZNAF_ZYQYLSJRRY")));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//WorkRiskListActivity
|
|
|
|
|