添加赋能结果查询列表
This commit is contained in:
parent
67516c02ca
commit
1c6e7e229e
|
@ -13,8 +13,8 @@ android {
|
|||
applicationId "com.police.policedatasystem"
|
||||
minSdk 24
|
||||
targetSdk 33
|
||||
versionCode 10026
|
||||
versionName "1.0.26"
|
||||
versionCode 10029
|
||||
versionName "1.0.29"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
|
|
|
@ -39,12 +39,18 @@
|
|||
android:theme="@style/Theme.PoliceDataSystem"
|
||||
tools:ignore="MissingTvBanner"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".apply.activity.QueryApplyResultActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".mine.activity.ApplyDetailActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".apply.activity.SuccessActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".apply.activity.ApplyActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".data.activity.PoliceEmergencyDetailActivity"
|
||||
android:exported="false"
|
||||
|
|
|
@ -0,0 +1,292 @@
|
|||
package com.police.policedatasystem.apply.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
|
||||
import com.police.policedatasystem.R;
|
||||
import com.police.policedatasystem.apply.model.ApplyDept;
|
||||
import com.police.policedatasystem.apply.model.ApplyPerson;
|
||||
import com.police.policedatasystem.apply.viewmodel.ApplyPostViewModel;
|
||||
import com.police.policedatasystem.databinding.ActivityApplyBinding;
|
||||
import com.police.policedatasystem.databinding.DialogDeptSelectorBinding;
|
||||
import com.police.policedatasystem.databinding.DialogSelectorBinding;
|
||||
import com.police.policedatasystem.http.RequestClient;
|
||||
import com.police.policedatasystem.util.UiUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ApplyActivity extends AppCompatActivity {
|
||||
|
||||
private ApplyPostViewModel viewModel;
|
||||
public List<ApplyDept> applyDept;
|
||||
public List<ApplyPerson> applyPeople;
|
||||
public RequestClient requestClient;
|
||||
|
||||
private com.police.policedatasystem.databinding.ActivityApplyBinding binding;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityApplyBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
requestClient = RequestClient.instance();
|
||||
binding.ivBack.setOnClickListener(view -> finish());
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
viewModel = new ApplyPostViewModel(this);
|
||||
binding.includeApply.tvCommitBtn.setOnClickListener(view -> addApply());
|
||||
binding.rlLoading.setOnClickListener(view -> {
|
||||
});
|
||||
binding.includeApply.tvQueryOrg.setOnClickListener(view -> showDeptDialog((TextView) view, "选择部门", applyDept));
|
||||
binding.includeApply.tvQueryName.setOnClickListener(view -> showPerson(applyPeople));
|
||||
viewModel.getApplyDept();
|
||||
binding.includeApply.tvQueryOrg.setOnClickListener(view -> showDept(applyDept));
|
||||
binding.includeApply.etSearchTitle.setText(getIntent().getStringExtra("jqbh"));
|
||||
// binding.includeApply.tvQueryName2.setOnClickListener(view -> {
|
||||
// //打开相册选择一张图片
|
||||
// openAlbum();
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
private void openAlbum() {
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.setType("image/*");
|
||||
startActivityForResult(intent, 250);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
//相册
|
||||
if (requestCode == 250 && resultCode == RESULT_OK && data != null) {
|
||||
nrFj = UiUtils.uriToBase64(this, data.getData());
|
||||
// binding.includeApply.tvQueryName2.setText(data.getData().toString());
|
||||
}
|
||||
}
|
||||
|
||||
private String nrFj = "";
|
||||
|
||||
public void showDept(List<ApplyDept> applyDept) {
|
||||
if (applyDept == null || applyDept.isEmpty()) {
|
||||
Toast.makeText(this, "暂无归属部门", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
showDeptDialog(binding.includeApply.tvQueryOrg, "选择归属部门", applyDept);
|
||||
}
|
||||
|
||||
public void showPerson(List<ApplyPerson> applyPeople) {
|
||||
if (applyPeople == null || applyPeople.isEmpty()) {
|
||||
Toast.makeText(this, "暂无审批人", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
List<String> names = applyPeople.stream().map(ApplyPerson::getUserName).collect(Collectors.toList());
|
||||
showDialog(binding.includeApply.tvQueryName, "选择审批人", names);
|
||||
}
|
||||
|
||||
public void showDialog(TextView textView, String title, List<String> items) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
DialogSelectorBinding selectorBinding = DialogSelectorBinding.inflate(getLayoutInflater());
|
||||
View dialogView = selectorBinding.getRoot();
|
||||
selectorBinding.tvDialogTitle.setText(title);
|
||||
RecyclerView recyclerView = selectorBinding.rcv;
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
BaseQuickAdapter<String, BaseViewHolder> adapter = new BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_dialog_selector, items) {
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder baseViewHolder, String s) {
|
||||
baseViewHolder.setText(R.id.tv_item_text, s);
|
||||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
builder.setView(dialogView);
|
||||
AlertDialog dialog = builder.create();
|
||||
adapter.setOnItemClickListener((adapter1, view, position) -> {
|
||||
textView.setText(items.get(position));
|
||||
dialog.dismiss();
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
public void showDeptDialog(TextView textView, String title, List<ApplyDept> items) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.TransparentAlertDialog);
|
||||
DialogDeptSelectorBinding selectorBinding = DialogDeptSelectorBinding.inflate(getLayoutInflater());
|
||||
View dialogView = selectorBinding.getRoot();
|
||||
selectorBinding.tvDialogTitle.setText(title);
|
||||
RecyclerView recyclerView = selectorBinding.rcv;
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
List<ApplyDept> data = new ArrayList<>();
|
||||
for (ApplyDept item : items) {
|
||||
if ("0".equals(item.getpId())) {
|
||||
data.add(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
BaseQuickAdapter<ApplyDept, BaseViewHolder> adapter = new BaseQuickAdapter<ApplyDept, BaseViewHolder>(R.layout.item_select_dept, data) {
|
||||
@Override
|
||||
protected void convert(@NonNull BaseViewHolder baseViewHolder, ApplyDept s) {
|
||||
baseViewHolder.setText(R.id.tv_title, s.getName());
|
||||
boolean hasChild = false;
|
||||
for (ApplyDept item : items) {
|
||||
if (s.getId().equals(item.getpId())) {
|
||||
hasChild = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
baseViewHolder.setVisible(R.id.iv_sanjiao, hasChild);
|
||||
if (s.isOpen()) {
|
||||
baseViewHolder.setImageResource(R.id.iv_sanjiao, R.mipmap.icon_down_sanjiao);
|
||||
baseViewHolder.setImageResource(R.id.iv_box, R.mipmap.icon_selected);
|
||||
baseViewHolder.setTextColor(R.id.tv_title, getResources().getColor(R.color.main_color));
|
||||
baseViewHolder.setBackgroundColor(R.id.tv_title, getResources().getColor(R.color.selected_bg_color));
|
||||
} else {
|
||||
baseViewHolder.setImageResource(R.id.iv_sanjiao, R.mipmap.icon_right_sanjiao);
|
||||
baseViewHolder.setImageResource(R.id.iv_box, R.mipmap.icon_unselected);
|
||||
baseViewHolder.setTextColor(R.id.tv_title, getResources().getColor(R.color.color_666));
|
||||
baseViewHolder.setBackgroundColor(R.id.tv_title, getResources().getColor(R.color.white));
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < s.getLevel(); i++) {
|
||||
sb.append(" ");
|
||||
}
|
||||
baseViewHolder.setText(R.id.v_level, sb);
|
||||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
builder.setView(dialogView);
|
||||
AlertDialog dialog = builder.create();
|
||||
adapter.setOnItemClickListener((adapter1, view, position) -> {
|
||||
ApplyDept dept = data.get(position);
|
||||
boolean open = dept.isOpen();
|
||||
int addCount = 1;
|
||||
for (ApplyDept item : items) {
|
||||
if (item.getpId().equals(dept.getId())) {
|
||||
if (open) {
|
||||
removeItem(data, item);
|
||||
} else {
|
||||
item.setLevel(dept.getLevel() + 1);
|
||||
data.add(position + addCount, item);
|
||||
addCount += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (open) {
|
||||
cancelSelected(dept);
|
||||
} else {
|
||||
enterSelected(data, dept);
|
||||
}
|
||||
adapter.setList(data);
|
||||
selectorBinding.tvEnter.setOnClickListener(view1 -> {
|
||||
long selectId = -1;
|
||||
ApplyDept selectDept = null;
|
||||
for (ApplyDept item : applyDept) {
|
||||
if (item.isOpen()) {
|
||||
item.setOpen(false);
|
||||
if (selectId < Long.parseLong(item.getId())) {
|
||||
selectId = Long.parseLong(item.getId());
|
||||
selectDept = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (selectId >= 0) {
|
||||
textView.setText(selectDept.getTitle());
|
||||
viewModel.getApplyPerson(selectId + "");
|
||||
dialog.dismiss();
|
||||
} else {
|
||||
Toast.makeText(this, "请选择一个归属部门", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
private void removeItem(List<ApplyDept> data, ApplyDept dept) {
|
||||
data.remove(dept);
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
if (data.get(i).getpId().equals(dept.getId())) {
|
||||
removeItem(data, data.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送成功,跳转到成功页面
|
||||
*/
|
||||
public void sendSuccess() {
|
||||
Toast.makeText(this, "提交成功!", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消勾选
|
||||
*/
|
||||
private void cancelSelected(ApplyDept dept) {
|
||||
dept.setOpen(false);
|
||||
for (ApplyDept item : applyDept) {
|
||||
if (item.getpId().equals(dept.getId())) {
|
||||
cancelSelected(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择勾选
|
||||
*/
|
||||
private void enterSelected(List<ApplyDept> data, ApplyDept dept) {
|
||||
for (ApplyDept item : applyDept) {
|
||||
if (item.getpId().equals(dept.getpId()) && !item.equals(dept)) {
|
||||
cancelSelected(item);
|
||||
for (ApplyDept i : applyDept) {
|
||||
if (i.getpId().equals(item.getId())) {
|
||||
removeItem(data, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dept.setOpen(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
private void addApply() {
|
||||
HashMap<String, String> params = new HashMap<>();
|
||||
params.put("jqbh", binding.includeApply.etSearchTitle.getText().toString());
|
||||
params.put("sy", "7");
|
||||
params.put("sqnr", binding.includeApply.etQueryBody.getText().toString());
|
||||
params.put("nrFj", nrFj);
|
||||
params.put("shrName", binding.includeApply.tvQueryName.getText().toString());
|
||||
for (ApplyPerson item : applyPeople) {
|
||||
if (item.getUserName().equals(binding.includeApply.tvQueryName.getText().toString())) {
|
||||
params.put("shrSfhm", item.getLoginName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
viewModel.addApply(params);
|
||||
}
|
||||
|
||||
public void loadingShow() {
|
||||
binding.rlLoading.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
public void loadingNone() {
|
||||
binding.rlLoading.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.police.policedatasystem.apply.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.police.policedatasystem.apply.viewmodel.ApplyResultViewModel;
|
||||
import com.police.policedatasystem.databinding.ActivityQueryApplyResultBinding;
|
||||
import com.police.policedatasystem.mine.activity.ApplyDetailActivity;
|
||||
import com.police.policedatasystem.mine.adapter.MineApplyListAdapter;
|
||||
import com.police.policedatasystem.mine.model.Apply;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class QueryApplyResultActivity extends AppCompatActivity {
|
||||
|
||||
private ActivityQueryApplyResultBinding binding;
|
||||
private MineApplyListAdapter adapter;
|
||||
private List<Apply> applyList;
|
||||
private ApplyResultViewModel viewModel;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = ActivityQueryApplyResultBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
viewModel = new ApplyResultViewModel(this);
|
||||
binding.ivBack.setOnClickListener(view -> finish());
|
||||
binding.mineRvGroup.setLayoutManager(new LinearLayoutManager(this));
|
||||
adapter = new MineApplyListAdapter();
|
||||
binding.mineRvGroup.setAdapter(adapter);
|
||||
adapter.setOnItemClickListener((adapter1, view, position) -> applyDetail(applyList.get(position).getBh()));
|
||||
viewModel.getApplyList(getIntent().getStringExtra("jqbh"));
|
||||
// viewModel.getApplyList("22010020240411234457000018");
|
||||
}
|
||||
|
||||
public void applyList(List<Apply> list) {
|
||||
applyList = list;
|
||||
adapter.setList(list);
|
||||
}
|
||||
|
||||
public void applyDetail(String applyDetail) {
|
||||
Intent intent = new Intent(this, ApplyDetailActivity.class);
|
||||
intent.putExtra("applyDetail", applyDetail);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void loadingShow() {
|
||||
binding.rlLoading.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
public void loadingNone() {
|
||||
binding.rlLoading.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package com.police.policedatasystem.apply.fragment;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
|
@ -31,7 +33,6 @@ import com.police.policedatasystem.databinding.DialogSelectorBinding;
|
|||
import com.police.policedatasystem.databinding.DropdownLayout4Binding;
|
||||
import com.police.policedatasystem.databinding.FragmentApplyBinding;
|
||||
import com.police.policedatasystem.indexActivity;
|
||||
import com.police.policedatasystem.main.App;
|
||||
import com.police.policedatasystem.util.UiUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -62,29 +63,15 @@ public class ApplyFragment extends Fragment {
|
|||
binding.includeApply.tvCommitBtn.setOnClickListener(view -> addApply());
|
||||
binding.rlLoading.setOnClickListener(view -> {
|
||||
});
|
||||
binding.vLock.setOnClickListener(view -> {
|
||||
});
|
||||
viewModel.getApplyType();
|
||||
viewModel.getApplyDept();
|
||||
viewModel.getApplyXXLY();
|
||||
viewModel.getApplyJWLX();
|
||||
binding.includeApply.tvQueryOrg.setOnClickListener(view -> showDept(applyDept));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (App.isLock) {
|
||||
binding.includeApply.etSearchTitle.setText(App.jqbh);
|
||||
binding.vLock.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
binding.vLock.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
// binding.includeApply.tvQueryName2.setOnClickListener(view -> {
|
||||
// //打开相册选择一张图片
|
||||
// openAlbum();
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,7 +79,7 @@ public class ApplyFragment extends Fragment {
|
|||
*
|
||||
* @param applyTypes 申请事由集合
|
||||
*/
|
||||
public void setPopupWindow(List<ApplyType> applyTypes) {
|
||||
public void setPopupWindow(List<ApplyType> applyTypes) {//布局,include,自定义view,service服务,启动方式
|
||||
if (applyTypes.isEmpty()) {
|
||||
Toast.makeText(this.getContext(), "用户未在大数据实战赋能系统登记,无法进行赋能", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
|
@ -257,6 +244,7 @@ public class ApplyFragment extends Fragment {
|
|||
}
|
||||
params.put("sy", dictValue);
|
||||
params.put("sqnr", binding.includeApply.etQueryBody.getText().toString());
|
||||
// params.put("nrFj", nrFj);
|
||||
params.put("shrName", binding.includeApply.tvQueryName.getText().toString());
|
||||
for (ApplyPerson item : applyPeople) {
|
||||
if (item.getUserName().equals(binding.includeApply.tvQueryName.getText().toString())) {
|
||||
|
@ -267,6 +255,8 @@ public class ApplyFragment extends Fragment {
|
|||
viewModel.addApply(params);
|
||||
}
|
||||
|
||||
// private String nrFj = "";
|
||||
|
||||
/**
|
||||
* 发送成功,跳转到成功页面
|
||||
*/
|
||||
|
@ -275,6 +265,22 @@ public class ApplyFragment extends Fragment {
|
|||
getActivity().startActivity(new Intent(getActivity(), SuccessActivity.class));
|
||||
}
|
||||
|
||||
private void openAlbum() {
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.setType("image/*");
|
||||
startActivityForResult(intent, 250);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
//相册
|
||||
if (requestCode == 250 && resultCode == RESULT_OK && data != null) {
|
||||
// nrFj = UiUtils.uriToBase64(this.getContext(), data.getData());
|
||||
// binding.includeApply.tvQueryName2.setText(data.getData().toString());
|
||||
}
|
||||
}
|
||||
|
||||
public void showDialog(TextView textView, String title, List<String> items) {
|
||||
if (getContext() == null) return;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
package com.police.policedatasystem.apply.viewmodel;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.police.policedatasystem.apply.activity.ApplyActivity;
|
||||
import com.police.policedatasystem.apply.model.ApplyDept;
|
||||
import com.police.policedatasystem.apply.model.ApplyPerson;
|
||||
import com.police.policedatasystem.apply.model.ApplyType;
|
||||
import com.police.policedatasystem.http.CustomCallBack;
|
||||
import com.police.policedatasystem.util.UiUtils;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import okhttp3.Call;
|
||||
|
||||
public class ApplyPostViewModel {
|
||||
public ApplyActivity activity;
|
||||
|
||||
public ApplyPostViewModel(ApplyActivity activity) {
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
|
||||
public void getApplyDept() {
|
||||
activity.loadingShow();
|
||||
activity.requestClient.getApplyDept(new CustomCallBack<List<ApplyDept>>() {
|
||||
@Override
|
||||
public void onError(@NonNull Call call, @NonNull Exception e) {
|
||||
UiUtils.toast(e.getMessage());
|
||||
activity.loadingNone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<ApplyDept> value) {
|
||||
activity.applyDept = value;
|
||||
activity.loadingNone();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getApplyPerson(String deptId) {
|
||||
activity.loadingShow();
|
||||
activity.requestClient.getApplyPerson(deptId, new CustomCallBack<List<ApplyPerson>>() {
|
||||
@Override
|
||||
public void onError(@NonNull Call call, @NonNull Exception e) {
|
||||
UiUtils.toast(e.getMessage());
|
||||
activity.loadingNone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<ApplyPerson> value) {
|
||||
activity.applyPeople = value;
|
||||
activity.loadingNone();
|
||||
}
|
||||
});
|
||||
}
|
||||
//
|
||||
// public void getApplyJWLX() {
|
||||
// activity.loadingShow();
|
||||
// activity.requestClient.getApplyJWLX(new CustomCallBack<List<ApplyType>>() {
|
||||
// @Override
|
||||
// public void onError(@NonNull Call call, @NonNull Exception e) {
|
||||
// UiUtils.toast(e.getMessage());
|
||||
// activity.loadingNone();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(List<ApplyType> value) {
|
||||
// activity.applyJWLX = value;
|
||||
// activity.loadingNone();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// public void getApplyXXLY() {
|
||||
// activity.loadingShow();
|
||||
// activity.requestClient.getApplyXXLY(new CustomCallBack<List<ApplyType>>() {
|
||||
// @Override
|
||||
// public void onError(@NonNull Call call, @NonNull Exception e) {
|
||||
// UiUtils.toast(e.getMessage());
|
||||
// activity.loadingNone();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(List<ApplyType> value) {
|
||||
// activity.applyXXLY = value;
|
||||
// activity.loadingNone();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
public void addApply(HashMap<String, String> map) {
|
||||
activity.loadingShow();
|
||||
activity.requestClient.addApply(map, new CustomCallBack<Object>() {
|
||||
@Override
|
||||
public void onError(@NonNull Call call, @NonNull Exception e) {
|
||||
UiUtils.toast(e.getMessage());
|
||||
activity.loadingNone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Object value) {
|
||||
activity.sendSuccess();
|
||||
activity.loadingNone();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.police.policedatasystem.apply.viewmodel;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.police.policedatasystem.apply.activity.QueryApplyResultActivity;
|
||||
import com.police.policedatasystem.http.CustomCallBack;
|
||||
import com.police.policedatasystem.http.RequestClient;
|
||||
import com.police.policedatasystem.mine.model.Apply;
|
||||
import com.police.policedatasystem.util.UiUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import okhttp3.Call;
|
||||
|
||||
public class ApplyResultViewModel {
|
||||
public QueryApplyResultActivity activity;
|
||||
|
||||
public ApplyResultViewModel(QueryApplyResultActivity activity) {
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
public void getApplyList(String fnbh) {
|
||||
activity.loadingShow();
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("jqbh", fnbh);
|
||||
// map.put("sfhm", "220283197910023151");
|
||||
RequestClient.instance().getApplyList(map, new CustomCallBack<List<Apply>>() {
|
||||
@Override
|
||||
public void onError(@NonNull Call call, @NonNull Exception e) {
|
||||
UiUtils.toast(e.getMessage());
|
||||
activity.loadingNone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<Apply> value) {
|
||||
activity.applyList(value);
|
||||
activity.loadingNone();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -17,6 +17,8 @@ import androidx.core.content.ContextCompat;
|
|||
import com.bumptech.glide.Glide;
|
||||
import com.google.gson.Gson;
|
||||
import com.police.policedatasystem.R;
|
||||
import com.police.policedatasystem.apply.activity.ApplyActivity;
|
||||
import com.police.policedatasystem.apply.activity.QueryApplyResultActivity;
|
||||
import com.police.policedatasystem.apply.model.ApplyType;
|
||||
import com.police.policedatasystem.apply.model.DetailQueryResult;
|
||||
import com.police.policedatasystem.data.model.PoliceEmergencyDetail;
|
||||
|
@ -24,7 +26,6 @@ import com.police.policedatasystem.databinding.ActivityPoliceEmergencyDetailBind
|
|||
import com.police.policedatasystem.http.CustomCallBack;
|
||||
import com.police.policedatasystem.http.RequestClient;
|
||||
import com.police.policedatasystem.main.App;
|
||||
import com.police.policedatasystem.mine.activity.ApplyDetailActivity;
|
||||
import com.police.policedatasystem.util.Constants;
|
||||
import com.police.policedatasystem.util.UiUtils;
|
||||
|
||||
|
@ -115,10 +116,9 @@ public class PoliceEmergencyDetailActivity extends Activity {
|
|||
if (value.isEmpty()) {
|
||||
Toast.makeText(PoliceEmergencyDetailActivity.this, "用户未在大数据实战赋能系统登记,无法填写工单", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
App.mainIndex = 1;
|
||||
App.isLock = true;
|
||||
App.jqbh = jqbh;
|
||||
finish();
|
||||
Intent intent = new Intent(PoliceEmergencyDetailActivity.this, ApplyActivity.class);
|
||||
intent.putExtra("jqbh", jqbh);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -137,7 +137,7 @@ public class PoliceEmergencyDetailActivity extends Activity {
|
|||
if (value.isEmpty()) {
|
||||
Toast.makeText(PoliceEmergencyDetailActivity.this, "用户未在大数据实战赋能系统登记,无法查看结果", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Intent intent = new Intent(PoliceEmergencyDetailActivity.this, ApplyDetailActivity.class);
|
||||
Intent intent = new Intent(PoliceEmergencyDetailActivity.this, QueryApplyResultActivity.class);
|
||||
intent.putExtra("jqbh", jqbh);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
|
|
@ -379,7 +379,7 @@ public class RequestClient extends BaseRequestClient {
|
|||
* }
|
||||
*/
|
||||
public void getApplyList(HashMap<String, String> params, CustomCallBack<List<Apply>> callBack) {
|
||||
params.put("sfhm", "220183197210264653");
|
||||
params.put("sfhm", Constants.SFZH);
|
||||
request(Constants.MINE_LIST_ID, new Gson().toJson(params), new CustomCallBack<String>() {
|
||||
@Override
|
||||
public void onError(Call call, @NonNull Exception e) {
|
||||
|
@ -420,7 +420,7 @@ public class RequestClient extends BaseRequestClient {
|
|||
/**
|
||||
* 警情详情跳转到我的赋能详情
|
||||
*/
|
||||
public void jumpApplyDetail(String jqbh, CustomCallBack<ApplyDetail> callBack) {
|
||||
public void jumpApplyDetail(String jqbh, CustomCallBack<List<Apply>> callBack) {
|
||||
HashMap<String, String> params = new HashMap<>();
|
||||
params.put("sfhm", Constants.SFZH);
|
||||
params.put("sfzh", Constants.SFZH);
|
||||
|
@ -434,8 +434,9 @@ public class RequestClient extends BaseRequestClient {
|
|||
|
||||
@Override
|
||||
public void onSuccess(String value) {
|
||||
ApplyDetail applyDetail = new Gson().fromJson(value, ApplyDetail.class);
|
||||
callBack.onSuccess(applyDetail);
|
||||
List<Apply> applyTypes = new Gson().fromJson(value, new TypeToken<List<Apply>>() {
|
||||
}.getType());
|
||||
callBack.onSuccess(applyTypes);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ import androidx.fragment.app.FragmentTransaction;
|
|||
import com.police.policedatasystem.apply.fragment.ApplyFragment;
|
||||
import com.police.policedatasystem.data.fragment.DataFragment;
|
||||
import com.police.policedatasystem.databinding.ActivityIndexBinding;
|
||||
import com.police.policedatasystem.http.BaseRequestClient;
|
||||
import com.police.policedatasystem.http.RequestClient;
|
||||
import com.police.policedatasystem.main.App;
|
||||
import com.police.policedatasystem.main.viewmodel.IndexViewModel;
|
||||
|
@ -43,15 +42,12 @@ public class indexActivity extends AppCompatActivity {
|
|||
initView();
|
||||
viewModel = new IndexViewModel(this);
|
||||
requestClient = RequestClient.instance();
|
||||
requestClient.init(() -> {
|
||||
initData();
|
||||
});
|
||||
requestClient.init(() -> initData());
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
binding.navBarGroup.navBar1.setOnClickListener(view -> {
|
||||
App.mainIndex = 0;
|
||||
App.isLock=false;
|
||||
changeFootBar();
|
||||
});
|
||||
binding.navBarGroup.navBar2.setOnClickListener(view -> {
|
||||
|
@ -60,7 +56,6 @@ public class indexActivity extends AppCompatActivity {
|
|||
});
|
||||
binding.navBarGroup.navBar3.setOnClickListener(view -> {
|
||||
App.mainIndex = 2;
|
||||
App.isLock=false;
|
||||
changeFootBar();
|
||||
});
|
||||
// binding.navBarGroup.navBar4.setOnClickListener(view -> {
|
||||
|
@ -98,8 +93,8 @@ public class indexActivity extends AppCompatActivity {
|
|||
}
|
||||
if (App.mainIndex == 3) {
|
||||
//replaceFragment(improveFragment);
|
||||
// binding.navBarGroup.navBarIcon4.setImageResource(R.mipmap.icon_improve_selected);
|
||||
// binding.navBarGroup.navBarText4.setTextColor(getColor(R.color.selected_color));
|
||||
// binding.navBarGroup.navBarIcon4.setImageResource(R.mipmap.icon_improve_selected);
|
||||
// binding.navBarGroup.navBarText4.setTextColor(getColor(R.color.selected_color));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@ public class App extends Application {
|
|||
* 首页显示fragment索引
|
||||
*/
|
||||
public static int mainIndex = 0;
|
||||
public static boolean isLock = false;
|
||||
public static String jqbh = "";
|
||||
private static Handler handler;
|
||||
|
||||
|
||||
|
|
|
@ -29,11 +29,11 @@ public class ApplyDetailActivity extends AppCompatActivity {
|
|||
|
||||
});
|
||||
viewModel = new DetailViewModel(this);
|
||||
if (getIntent().getStringExtra("applyDetail") == null) {
|
||||
viewModel.jumpApplyDetail(getIntent().getStringExtra("jqbh"));
|
||||
} else {
|
||||
// if (getIntent().getStringExtra("applyDetail") == null) {
|
||||
//// viewModel.jumpApplyDetail(getIntent().getStringExtra("jqbh"));
|
||||
// } else {
|
||||
viewModel.getApplyDetail(getIntent().getStringExtra("applyDetail"));
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -34,20 +34,20 @@ public class DetailViewModel {
|
|||
}
|
||||
});
|
||||
}
|
||||
public void jumpApplyDetail(String fnbh) {
|
||||
activity.loadingShow();
|
||||
requestClient.jumpApplyDetail(fnbh, new CustomCallBack<ApplyDetail>() {
|
||||
@Override
|
||||
public void onError(@NonNull Call call, @NonNull Exception e) {
|
||||
UiUtils.toast(e.getMessage());
|
||||
activity.loadingNone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(ApplyDetail value) {
|
||||
activity.applyDetail(value);
|
||||
activity.loadingNone();
|
||||
}
|
||||
});
|
||||
}
|
||||
// public void jumpApplyDetail(String fnbh) {
|
||||
// activity.loadingShow();
|
||||
// requestClient.jumpApplyDetail(fnbh, new CustomCallBack<ApplyDetail>() {
|
||||
// @Override
|
||||
// public void onError(@NonNull Call call, @NonNull Exception e) {
|
||||
// UiUtils.toast(e.getMessage());
|
||||
// activity.loadingNone();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(ApplyDetail value) {
|
||||
// activity.applyDetail(value);
|
||||
// activity.loadingNone();
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -73,11 +73,11 @@ public final class Constants {
|
|||
}
|
||||
|
||||
public static void setSFZH(String str) {
|
||||
// SFZH = str;
|
||||
SFZH = str;
|
||||
}
|
||||
|
||||
public static void setORG_ID(String str) {
|
||||
// USER_ORG_ID = str;
|
||||
USER_ORG_ID = str;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
package com.police.policedatasystem.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.util.Base64;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.police.policedatasystem.main.App;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.UUID;
|
||||
|
||||
public class UiUtils {
|
||||
|
@ -18,6 +23,7 @@ public class UiUtils {
|
|||
final float scale = App.getApp().getResources().getDisplayMetrics().density;
|
||||
return Math.round((float) dpValue * scale);
|
||||
}
|
||||
|
||||
public static String uuid() {
|
||||
return UUID.randomUUID().toString();
|
||||
}
|
||||
|
@ -39,7 +45,8 @@ public class UiUtils {
|
|||
}
|
||||
return !str.isEmpty();
|
||||
}
|
||||
public static void ui(){
|
||||
|
||||
public static void ui() {
|
||||
App.getHandler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -52,6 +59,7 @@ public class UiUtils {
|
|||
public static byte[] base64ToBytes(String base64Str) {
|
||||
return Base64.decode(base64Str, Base64.DEFAULT);
|
||||
}
|
||||
|
||||
public static String formatTime(String str) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
if (UiUtils.isEmpty(str)) return "";
|
||||
|
@ -75,4 +83,27 @@ public class UiUtils {
|
|||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String uriToBase64(Context context, Uri uri) {
|
||||
String base64 = null;
|
||||
try (InputStream inputStream = context.getContentResolver().openInputStream(uri);
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {
|
||||
|
||||
// 读取输入流的内容到字节数组输出流
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||
byteArrayOutputStream.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
// 将字节数组转换为Base64编码的字符串
|
||||
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
||||
base64 = Base64.encodeToString(byteArray, Base64.DEFAULT);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return base64;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="申请赋能"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="100dp"
|
||||
android:background="@drawable/top_10_f7_bg" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/table_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:background="@drawable/all_7_fff_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_my_key_person"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center"
|
||||
android:text="申请事由:"
|
||||
android:textColor="@color/normal_color"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/type_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_toRightOf="@id/tv_my_key_person"
|
||||
android:background="@drawable/all_10_ccc_bg"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_apply_search_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="处置警情"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/table_group"
|
||||
android:layout_marginTop="15dp">
|
||||
|
||||
<include
|
||||
android:id="@+id/include_apply"
|
||||
layout="@layout/item_apply_fragment_2" />
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_centerInParent="true" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".apply.activity.QueryApplyResultActivity">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="赋能结果"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp" />
|
||||
</RelativeLayout>
|
||||
<!-- 这里放置你的RecyclerView或其他需要刷新的布局 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mine_rv_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="50dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_centerInParent="true" />
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -98,13 +98,6 @@
|
|||
layout="@layout/item_apply_fragment_1" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_lock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="140dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_loading"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -145,6 +145,44 @@
|
|||
android:padding="7dp"
|
||||
android:src="@mipmap/icon_query" />
|
||||
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="40dp"-->
|
||||
<!-- android:layout_below="@id/tv_query_name"-->
|
||||
<!-- android:layout_marginTop="10dp"-->
|
||||
<!-- android:layout_toLeftOf="@id/tv_query_name"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:text="图片:"-->
|
||||
<!-- android:textColor="@color/normal_color"-->
|
||||
<!-- android:textSize="16sp" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_query_name2"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="40dp"-->
|
||||
<!-- android:layout_below="@id/tv_query_name"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginLeft="10dp"-->
|
||||
<!-- android:layout_marginTop="10dp"-->
|
||||
<!-- android:layout_toRightOf="@id/tv_my_key_person"-->
|
||||
<!-- android:background="@drawable/all_7_line_ccc_bg"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:paddingHorizontal="10dp"-->
|
||||
<!-- android:textColor="@color/color_666"-->
|
||||
<!-- android:textSize="16sp"-->
|
||||
<!-- tools:text="image" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="40dp"-->
|
||||
<!-- android:layout_height="40dp"-->
|
||||
<!-- android:layout_alignTop="@id/tv_query_name2"-->
|
||||
<!-- android:layout_alignRight="@id/tv_query_name2"-->
|
||||
<!-- android:background="@drawable/right_7_052eba_bg"-->
|
||||
<!-- android:padding="7dp"-->
|
||||
<!-- android:src="@mipmap/icon_query" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_commit_btn"
|
||||
android:layout_width="80dp"
|
||||
|
|
|
@ -0,0 +1,185 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:background="@drawable/all_7_fff_bg"
|
||||
android:padding="10dp">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_my_key_person"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center"
|
||||
android:text="警情编号:"
|
||||
android:textColor="@color/normal_color"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/et_search_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toRightOf="@id/tv_my_key_person"
|
||||
android:background="@drawable/all_7_line_ccc_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:textColor="@color/color_666"
|
||||
android:textSize="16sp"
|
||||
tools:text="987645561321312313" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/tv_my_key_person"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:text="查询内容:"
|
||||
android:textColor="@color/normal_color"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_query_body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="250dp"
|
||||
android:layout_below="@id/tv_my_key_person"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_toRightOf="@id/tv_my_key_person"
|
||||
android:background="@drawable/all_7_line_ccc_bg"
|
||||
android:gravity="top"
|
||||
android:maxLines="50"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:textColor="@color/color_666"
|
||||
android:textSize="16sp"
|
||||
tools:text="987645561321312313" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/et_query_body"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:text="归属部门:"
|
||||
android:textColor="@color/normal_color"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_query_org"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/et_query_body"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_toRightOf="@id/tv_my_key_person"
|
||||
android:background="@drawable/all_7_line_ccc_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:textColor="@color/color_666"
|
||||
android:textSize="16sp"
|
||||
tools:text="二道区公安分局" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignTop="@id/tv_query_org"
|
||||
android:layout_alignRight="@id/tv_query_org"
|
||||
android:background="@drawable/right_7_052eba_bg"
|
||||
android:padding="7dp"
|
||||
android:src="@mipmap/icon_query" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/tv_query_org"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_toLeftOf="@id/tv_query_name"
|
||||
android:gravity="center"
|
||||
android:text="审批人:"
|
||||
android:textColor="@color/normal_color"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_query_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/tv_query_org"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_toRightOf="@id/tv_my_key_person"
|
||||
android:background="@drawable/all_7_line_ccc_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:textColor="@color/color_666"
|
||||
android:textSize="16sp"
|
||||
tools:text="李大国" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignTop="@id/tv_query_name"
|
||||
android:layout_alignRight="@id/tv_query_name"
|
||||
android:background="@drawable/right_7_052eba_bg"
|
||||
android:padding="7dp"
|
||||
android:src="@mipmap/icon_query" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="40dp"-->
|
||||
<!-- android:layout_below="@id/tv_query_name"-->
|
||||
<!-- android:layout_marginTop="10dp"-->
|
||||
<!-- android:layout_toLeftOf="@id/tv_query_name"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:text="图片:"-->
|
||||
<!-- android:textColor="@color/normal_color"-->
|
||||
<!-- android:textSize="16sp" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_query_name2"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="40dp"-->
|
||||
<!-- android:layout_below="@id/tv_query_name"-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:layout_marginLeft="10dp"-->
|
||||
<!-- android:layout_marginTop="10dp"-->
|
||||
<!-- android:layout_toRightOf="@id/tv_my_key_person"-->
|
||||
<!-- android:background="@drawable/all_7_line_ccc_bg"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:paddingHorizontal="10dp"-->
|
||||
<!-- android:textColor="@color/color_666"-->
|
||||
<!-- android:textSize="16sp"-->
|
||||
<!-- tools:text="image" />-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:layout_width="40dp"-->
|
||||
<!-- android:layout_height="40dp"-->
|
||||
<!-- android:layout_alignTop="@id/tv_query_name2"-->
|
||||
<!-- android:layout_alignRight="@id/tv_query_name2"-->
|
||||
<!-- android:background="@drawable/right_7_052eba_bg"-->
|
||||
<!-- android:padding="7dp"-->
|
||||
<!-- android:src="@mipmap/icon_query" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_commit_btn"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_below="@id/tv_query_name"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="40dp"
|
||||
android:background="@drawable/all_7_main_bg"
|
||||
android:gravity="center"
|
||||
android:text="提交"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue