Jelajahi Sumber

优化首页展示

vothin 1 tahun lalu
induk
melakukan
7e81520b4a
31 mengubah file dengan 45 tambahan dan 34 penghapusan
  1. 1 0
      jni/activity/mainActivity.h
  2. 3 3
      jni/activity/statusbar.h
  3. 30 20
      jni/logic/mainLogic.cc
  4. 11 11
      jni/logic/moreLogic.cc
  5. TEMPAT SAMPAH
      libs/armeabi/libzkgui.so
  6. TEMPAT SAMPAH
      obj/activity/mainActivity.o
  7. TEMPAT SAMPAH
      obj/activity/statusbar.o
  8. TEMPAT SAMPAH
      obj/service/time.o
  9. TEMPAT SAMPAH
      resources/icon/fang.png
  10. TEMPAT SAMPAH
      resources/main/bedNum-bg.png
  11. TEMPAT SAMPAH
      resources/main/chuang-bai.png
  12. TEMPAT SAMPAH
      resources/main/chuang-l.png
  13. TEMPAT SAMPAH
      resources/main/chuang-l@2x.png
  14. TEMPAT SAMPAH
      resources/main/chuang-wu.png
  15. TEMPAT SAMPAH
      resources/main/chuanghao-bg.png
  16. TEMPAT SAMPAH
      resources/main/doctor-pic.png
  17. TEMPAT SAMPAH
      resources/main/doctor-prc.png
  18. TEMPAT SAMPAH
      resources/main/doctor.png
  19. TEMPAT SAMPAH
      resources/main/fang-bg.png
  20. TEMPAT SAMPAH
      resources/main/fang.png
  21. TEMPAT SAMPAH
      resources/main/hushi@3x.png
  22. TEMPAT SAMPAH
      resources/main/nurse-pic.png
  23. TEMPAT SAMPAH
      resources/main/nurse-prc.png
  24. TEMPAT SAMPAH
      resources/main/nurse.png
  25. TEMPAT SAMPAH
      resources/main/white_270x355.png
  26. TEMPAT SAMPAH
      resources/main/white_270x385.png
  27. TEMPAT SAMPAH
      resources/main/white_270x404.png
  28. TEMPAT SAMPAH
      resources/main/yisheng@3x.png
  29. TEMPAT SAMPAH
      ui/main.ftu
  30. TEMPAT SAMPAH
      ui/navibar.ftu
  31. TEMPAT SAMPAH
      ui/statusbar.ftu

+ 1 - 0
jni/activity/mainActivity.h

@@ -27,6 +27,7 @@
 #include "window/ZKSlideWindow.h"
 
 /*TAG:Macro宏ID*/
+#define ID_MAIN_CustomerNameSubItem    24010
 #define ID_MAIN_NurseSubItem    24008
 #define ID_MAIN_BedListView    80001
 #define ID_MAIN_InBedPicPainter    52005

+ 3 - 3
jni/activity/statusbar.h

@@ -22,13 +22,13 @@
 #include "control/ZKVideoView.h"
 #include "window/ZKSlideWindow.h"
 /*TAG:Macro宏ID*/
+#define ID_STATUSBAR_RestartTimeTextView    50009
+#define ID_STATUSBAR_DateView    50010
+#define ID_STATUSBAR_PartName    50008
 #define ID_STATUSBAR_TimePicPainter    52002
-#define ID_STATUSBAR_RestartTimeTextView    50005
 #define ID_STATUSBAR_TextViewTCP    50004
 #define ID_STATUSBAR_TextViewReg    50002
-#define ID_STATUSBAR_PartName    50003
 #define ID_STATUSBAR_Painter1    52001
-#define ID_STATUSBAR_DateView    50001
 /*TAG:Macro宏ID END*/
 class statusbar : public BaseApp,
                   public ZKSeekBar::ISeekBarChangeListener, 

+ 30 - 20
jni/logic/mainLogic.cc

@@ -572,59 +572,69 @@ static int getListItemCount_BedListView(const ZKListView *pListView) {
 
 static void obtainListItemData_BedListView(ZKListView *pListView,ZKListView::ZKListItem *pListItem, int index) {
     //LOGD(" obtainListItemData_ BedListView  !!!\n");
+
 	if (frameBedList.size() > 0) {
+		ZKListView::ZKListSubItem* bedNum = pListItem->findSubItemByID(ID_MAIN_BedNumSubItem);
+		ZKListView::ZKListSubItem* name = pListItem->findSubItemByID(ID_MAIN_CustomerNameSubItem);
+		ZKListView::ZKListSubItem* age = pListItem->findSubItemByID(ID_MAIN_AgeSubItem);
+		ZKListView::ZKListSubItem* sex = pListItem->findSubItemByID(ID_MAIN_SexSubItem);
+		ZKListView::ZKListSubItem* doctorTitle = pListItem->findSubItemByID(ID_MAIN_DoctorTitileSubItem);
+		ZKListView::ZKListSubItem* nurseTitle = pListItem->findSubItemByID(ID_MAIN_NurseTitleSubItem);
+		ZKListView::ZKListSubItem* doctor = pListItem->findSubItemByID(ID_MAIN_DoctorSubItem);
+		ZKListView::ZKListSubItem* nurse = pListItem->findSubItemByID(ID_MAIN_NurseSubItem);
+
 		string frameBedName = frameBedList[index]["frame_bed"]["full_name"].asString();
 		if (frameBedName == "") {
-			pListItem->findSubItemByID(ID_MAIN_BedNumSubItem)->setText(LANGUAGEMANAGER->getValue("EmptyBed"));
+			bedNum->setText(LANGUAGEMANAGER->getValue("EmptyBed"));
 		} else {
 			int nPos = frameBedName.find("-");
 			if (nPos != -1) {
 				frameBedName = frameBedName.substr(nPos + 1, frameBedName.length());
 			}
-			pListItem->findSubItemByID(ID_MAIN_BedNumSubItem)->setText(frameBedName);
+			bedNum->setText(frameBedName);
 		}
 
 		// 用户相关
 		string customerName = frameBedList[index]["customer_name"].asString();
 		if (customerName == "") {
-			pListItem->setText(LANGUAGEMANAGER->getValue("EmptyCustomer"));
+			name->setText(LANGUAGEMANAGER->getValue("EmptyCustomer"));
 		} else {
-			pListItem->setText(customerName);
+			name->setText(customerName);
 		}
-		pListItem->findSubItemByID(ID_MAIN_AgeSubItem)->setText(frameBedList[index]["customer_age"].asString() + frameBedList[index]["customer_age_unit"].asString());
+		age->setText(frameBedList[index]["customer_age"].asString() + frameBedList[index]["customer_age_unit"].asString());
 
 		string customerSex = frameBedList[index]["customer_sex"].asString();
 		if (customerSex == "0") {	// 如果性别为女性,替换成女性,底色为粉色
-			pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setText(LANGUAGEMANAGER->getValue("Woman"));
-			pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setTextColor(0xFF9F9F);
-			pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setBackgroundPic("main/woman.png");
+			sex->setText(LANGUAGEMANAGER->getValue("Woman"));
+			sex->setTextColor(0xFF9F9F);
+			sex->setBackgroundPic("main/woman.png");
 		}
 		else if (customerSex == "1") {
-			pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setText(LANGUAGEMANAGER->getValue("Man"));
-			pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setTextColor(0x3A78EF);
-			pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setBackgroundPic("main/man.png");
+			sex->setText(LANGUAGEMANAGER->getValue("Man"));
+			sex->setTextColor(0x3A78EF);
+			sex->setBackgroundPic("main/man.png");
 		}
 		else {
-			pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setText(LANGUAGEMANAGER->getValue("Unknown"));
-			pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setTextColor(0x37B643);
-			pListItem->findSubItemByID(ID_MAIN_SexSubItem)->setBackgroundPic("main/age.png");
+			sex->setText(LANGUAGEMANAGER->getValue("Unknown"));
+			sex->setTextColor(0x37B643);
+			sex->setBackgroundPic("main/age.png");
 		}
 
 
 		// 医生护士相关
 		if (rightTitleInfo["doctor_valid"] != 1){
-			pListItem->findSubItemByID(ID_MAIN_DoctorTitileSubItem)->setVisible(false);
+			doctorTitle->setVisible(false);
 		} else {
-			pListItem->findSubItemByID(ID_MAIN_DoctorTitileSubItem)->setText(rightTitleInfo["doctor_title"].asString());
+			doctorTitle->setText(rightTitleInfo["doctor_title"].asString());
 		}
 
 		if (rightTitleInfo["nurse_valid"] != 1){
-			pListItem->findSubItemByID(ID_MAIN_NurseTitleSubItem)->setVisible(false);
+			nurseTitle->setVisible(false);
 		} else {
-			pListItem->findSubItemByID(ID_MAIN_NurseTitleSubItem)->setText(rightTitleInfo["nurse_title"].asString());
+			nurseTitle->setText(rightTitleInfo["nurse_title"].asString());
 		}
-		pListItem->findSubItemByID(ID_MAIN_DoctorSubItem)->setText(frameBedList[index]["doctor_name"].asString());
-		pListItem->findSubItemByID(ID_MAIN_NurseSubItem)->setText(frameBedList[index]["nurse_name"].asString());
+		doctor->setText(frameBedList[index]["doctor_name"].asString());
+		nurse->setText(frameBedList[index]["nurse_name"].asString());
 
 //		// 护理项相关
 //		Json::Value nurseConfigList = frameBedList[index]["nurse_config_dtos"];

+ 11 - 11
jni/logic/moreLogic.cc

@@ -52,17 +52,17 @@ static void onUI_init(){
 	deviceMenus[0]["name"] = "设备信息";
 	deviceMenus[0]["introduction"] = "查看信息和设置";
 
-	deviceMenus[1]["icon_src"] ="/more/keshi.png";
-	deviceMenus[1]["name"] = "科室介绍";
-	deviceMenus[1]["introduction"] = "科室详细介绍";
-
-	deviceMenus[2]["icon_src"] ="/more/yiyuan.png";
-	deviceMenus[2]["name"] = "医院简介";
-	deviceMenus[2]["introduction"] = "医院详细介绍";
-
-	deviceMenus[3]["icon_src"] ="/more/yiyuan.png";
-	deviceMenus[3]["name"] = "医院简介";
-	deviceMenus[3]["introduction"] = "医院详细介绍";
+//	deviceMenus[1]["icon_src"] ="/more/keshi.png";
+//	deviceMenus[1]["name"] = "科室介绍";
+//	deviceMenus[1]["introduction"] = "科室详细介绍";
+//
+//	deviceMenus[2]["icon_src"] ="/more/yiyuan.png";
+//	deviceMenus[2]["name"] = "医院简介";
+//	deviceMenus[2]["introduction"] = "医院详细介绍";
+//
+//	deviceMenus[3]["icon_src"] ="/more/yiyuan.png";
+//	deviceMenus[3]["name"] = "医院简介";
+//	deviceMenus[3]["introduction"] = "医院详细介绍";
 
 	mDeviceMenuListViewPtr->refreshListView();
 }

TEMPAT SAMPAH
libs/armeabi/libzkgui.so


TEMPAT SAMPAH
obj/activity/mainActivity.o


TEMPAT SAMPAH
obj/activity/statusbar.o


TEMPAT SAMPAH
obj/service/time.o


TEMPAT SAMPAH
resources/icon/fang.png


TEMPAT SAMPAH
resources/main/bedNum-bg.png


TEMPAT SAMPAH
resources/main/chuang-bai.png


TEMPAT SAMPAH
resources/main/chuang-l.png


TEMPAT SAMPAH
resources/main/chuang-l@2x.png


TEMPAT SAMPAH
resources/main/chuang-wu.png


TEMPAT SAMPAH
resources/main/chuanghao-bg.png


TEMPAT SAMPAH
resources/main/doctor-pic.png


TEMPAT SAMPAH
resources/main/doctor-prc.png


TEMPAT SAMPAH
resources/main/doctor.png


TEMPAT SAMPAH
resources/main/fang-bg.png


TEMPAT SAMPAH
resources/main/fang.png


TEMPAT SAMPAH
resources/main/hushi@3x.png


TEMPAT SAMPAH
resources/main/nurse-pic.png


TEMPAT SAMPAH
resources/main/nurse-prc.png


TEMPAT SAMPAH
resources/main/nurse.png


TEMPAT SAMPAH
resources/main/white_270x355.png


TEMPAT SAMPAH
resources/main/white_270x385.png


TEMPAT SAMPAH
resources/main/white_270x404.png


TEMPAT SAMPAH
resources/main/yisheng@3x.png


TEMPAT SAMPAH
ui/main.ftu


TEMPAT SAMPAH
ui/navibar.ftu


TEMPAT SAMPAH
ui/statusbar.ftu