Sfoglia il codice sorgente

优化首页展示

vothin 1 anno fa
parent
commit
7e81520b4a

+ 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();
 }

BIN
libs/armeabi/libzkgui.so


BIN
obj/activity/mainActivity.o


BIN
obj/activity/statusbar.o


BIN
obj/service/time.o


BIN
resources/icon/fang.png


BIN
resources/main/bedNum-bg.png


BIN
resources/main/chuang-bai.png


BIN
resources/main/chuang-l.png


BIN
resources/main/chuang-l@2x.png


BIN
resources/main/chuang-wu.png


BIN
resources/main/chuanghao-bg.png


BIN
resources/main/doctor-pic.png


BIN
resources/main/doctor-prc.png


BIN
resources/main/doctor.png


BIN
resources/main/fang-bg.png


BIN
resources/main/fang.png


BIN
resources/main/hushi@3x.png


BIN
resources/main/nurse-pic.png


BIN
resources/main/nurse-prc.png


BIN
resources/main/nurse.png


BIN
resources/main/white_270x355.png


BIN
resources/main/white_270x385.png


BIN
resources/main/white_270x404.png


BIN
resources/main/yisheng@3x.png


BIN
ui/main.ftu


BIN
ui/navibar.ftu


BIN
ui/statusbar.ftu