瀏覽代碼

祁阳的分机修改主界面显示,床位号字体加大,名字加大,调整布局,去掉下方3个护理项显示等

weizhengliang 1 年之前
父節點
當前提交
47e144fab7

+ 2 - 1
callingbed/src/main/java/com/wdkl/app/ncs/callingbed/activity/CallingbedActivity.kt

@@ -528,7 +528,6 @@ class CallingbedActivity :BaseActivity<CallingbedActivityPresenter, CallingbedMa
         if (deviceInfo.customerId != null) {
             Constant.CUSTOM_ID = deviceInfo.customerId
         }
-        EventBus.getDefault().post(MessageEvent("updateCustom", Constant.EVENT_UPDATE_CUSTOM))
 
         if (TextUtils.isEmpty(Constant.SIP_ID)) {
             showMessage("SIP ID为空")
@@ -629,6 +628,8 @@ class CallingbedActivity :BaseActivity<CallingbedActivityPresenter, CallingbedMa
             e.printStackTrace()
         }
 
+        EventBus.getDefault().post(MessageEvent("updateCustom", Constant.EVENT_UPDATE_CUSTOM))
+
         updateSettings(true)
     }
 

+ 10 - 8
callingbed/src/main/java/com/wdkl/app/ncs/callingbed/fragment/MainFragment.kt

@@ -25,8 +25,7 @@ import com.wdkl.ncs.android.middleware.model.dto.NurseConfigDto
 import com.wdkl.ncs.android.middleware.model.vo.CustomerInfoVO
 import com.wdkl.ncs.android.middleware.utils.StringUtil
 import kotlinx.android.synthetic.main.main_view.*
-import kotlinx.android.synthetic.main.main_view_layout.*
-import kotlinx.android.synthetic.main.view_bed_name.*
+import kotlinx.android.synthetic.main.view_bed_name_home.*
 import org.greenrobot.eventbus.EventBus
 import org.greenrobot.eventbus.Subscribe
 import org.greenrobot.eventbus.ThreadMode
@@ -98,7 +97,7 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
                     (activity as CallingbedActivity).updateNurseConfig(customInfo.list)
                 }
             }
-            updateMoreConfigs(customInfo.list)
+            //updateMoreConfigs(customInfo.list)
         }
 
         if (customInfo.advanceFeePay != null) {
@@ -116,6 +115,9 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
         if (Constant.convenientServiceEnabled) {
             main_view_qr_code?.visibility = View.VISIBLE
             tv_qr_code_title?.visibility = View.VISIBLE
+        } else {
+            main_view_qr_code?.visibility = View.GONE
+            tv_qr_code_title?.visibility = View.GONE
         }
 
         if (Constant.DEVICE_STATUS == 1 && Constant.CUSTOM_ID != -1) {
@@ -165,11 +167,11 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
 
     fun updateInfo() {
         if (Constant.DEVICE_STATUS == 0) {
-            tv_bed_name.text = "设备未启用"
-            tv_bed_name.setTextColor(resources.getColor(R.color.red_color))
+            tv_home_bed_name.text = "设备未启用"
+            tv_home_bed_name.setTextColor(resources.getColor(R.color.red_color))
         } else {
-            tv_bed_name.text = Constant.BED_NAME
-            tv_bed_name.setTextColor(resources.getColor(R.color.black))
+            tv_home_bed_name.text = Constant.BED_NAME
+            tv_home_bed_name.setTextColor(resources.getColor(R.color.black))
         }
 
         if (Constant.CUSTOM_ID != -1) {
@@ -177,7 +179,7 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
             presenter.loadCustomInfo(Constant.CUSTOM_ID)
         }
 
-        tv_version.text = "V"+BuildConfig.VERSION_NAME+"_"+BuildConfig.VERSION_CODE
+        tv_home_version.text = "V"+BuildConfig.VERSION_NAME+"_"+BuildConfig.VERSION_CODE
     }
 
     private fun updateMoreConfigs(data: List<NurseConfigDto>) {

+ 1 - 1
callingbed/src/main/res/layout/callingbed_main_lay.xml

@@ -33,7 +33,7 @@
             android:layout_height="match_parent"
             android:layout_marginTop="10dp"
             android:layout_marginBottom="2dp"
-            android:layout_marginRight="10dp"
+            android:layout_marginRight="4dp"
             android:layout_toRightOf="@id/rl_left_view"
             android:layout_below="@id/activity_calling_bed_layout_title" />
 

+ 18 - 18
callingbed/src/main/res/layout/main_view.xml

@@ -6,7 +6,7 @@
         android:layout_height="match_parent">
 
         <include android:id="@+id/lay_main_bed_name"
-            layout="@layout/view_bed_name"/>
+            layout="@layout/view_bed_name_home"/>
 
         <LinearLayout
             android:id="@+id/ll_doctor_nurse_view"
@@ -124,9 +124,7 @@
                 android:id="@+id/ll_custom_view"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:paddingTop="4dp"
-                android:paddingLeft="12dp"
-                android:paddingRight="12dp"
+                android:padding="2dp"
                 android:background="#D5EFFC"
                 android:orientation="vertical"
                 android:visibility="gone">
@@ -255,16 +253,18 @@
 
                 <com.wdkl.ncs.android.lib.widget.MarqueeTextView
                     android:id="@+id/tv_custom_name"
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:textSize="76sp"
+                    android:layout_toLeftOf="@+id/main_view_qr_code"
+                    android:textSize="96sp"
                     android:textStyle="bold"
                     android:textColor="@color/black"
                     android:text="---"
-                    android:singleLine="true"
                     android:ellipsize="marquee"
                     android:focusable="true"
-                    android:focusableInTouchMode="true"/>
+                    android:focusableInTouchMode="true"
+                    android:marqueeRepeatLimit="-1"
+                    android:singleLine="true"/>
                 <TextView
                     android:id="@+id/tv_custom_gender"
                     android:layout_width="wrap_content"
@@ -297,30 +297,30 @@
                     android:id="@+id/tv_custom_card_no"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_below="@id/tv_custom_indate"
+                    android:layout_below="@id/tv_custom_gender"
+                    android:layout_alignParentRight="true"
                     android:layout_marginTop="6dp"
+                    android:layout_marginRight="4dp"
                     android:textSize="22sp"
                     android:textColor="@color/black"
                     android:text=""/>
 
                 <ImageView
                     android:id="@+id/main_view_qr_code"
-                    android:layout_width="180dp"
-                    android:layout_height="180dp"
-                    android:layout_marginRight="-4dp"
-                    android:layout_alignParentRight="true"
+                    android:layout_width="168dp"
+                    android:layout_height="168dp"
+                    android:layout_toLeftOf="@+id/tv_qr_code_title"
                     android:visibility="gone"/>
                 <TextView
                     android:id="@+id/tv_qr_code_title"
-                    android:layout_width="180dp"
-                    android:layout_height="wrap_content"
-                    android:layout_below="@id/main_view_qr_code"
-                    android:layout_marginRight="-10dp"
+                    android:layout_width="24dp"
+                    android:layout_height="168dp"
                     android:layout_alignParentRight="true"
+                    android:layout_marginRight="-4dp"
                     android:gravity="center"
                     android:text="便民服务"
                     android:textColor="@color/black"
-                    android:textSize="24sp"
+                    android:textSize="20sp"
                     android:visibility="gone"/>
             </RelativeLayout>
         </FrameLayout>

+ 44 - 0
callingbed/src/main/res/layout/view_bed_name_home.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="200dp"
+    android:background="@color/white">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginTop="-16dp"
+        tools:ignore="UselessParent">
+        <com.wdkl.ncs.android.lib.widget.MarqueeTextView
+            android:id="@+id/tv_home_bed_name"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_above="@+id/tv_home_version"
+            android:gravity="center_horizontal"
+            android:textColor="@color/black"
+            android:textSize="168sp"
+            android:textStyle="bold"
+            android:text="--"
+            android:ellipsize="marquee"
+            android:focusable="true"
+            android:focusableInTouchMode="true"
+            android:marqueeRepeatLimit="-1"
+            android:singleLine="true"/>
+
+        <TextView
+            android:id="@+id/tv_home_version"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:layout_alignParentRight="true"
+            android:paddingLeft="6dp"
+            android:paddingRight="6dp"
+            android:gravity="bottom"
+            android:textColor="@color/black"
+            android:textSize="16sp"
+            android:text="v--"/>
+    </RelativeLayout>
+
+</LinearLayout>

+ 5 - 5
callingbed/src/main/res/layout/view_title_layout.xml

@@ -8,10 +8,10 @@
     <!--SIP状态图标-->
     <TextView
         android:id="@+id/view_title_layout_tv_point"
-        android:layout_width="12dp"
-        android:layout_height="12dp"
+        android:layout_width="20dp"
+        android:layout_height="20dp"
         android:layout_centerVertical="true"
-        android:layout_marginLeft="20dp"
+        android:layout_marginLeft="10dp"
         android:background="@color/register_text_color"/>
 
     <!--医院名称-->
@@ -20,7 +20,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerVertical="true"
-        android:layout_marginLeft="20dp"
+        android:layout_marginLeft="4dp"
         android:layout_toRightOf="@+id/view_title_layout_tv_point"
         android:text="----"
         android:textColor="@color/main_color"
@@ -48,7 +48,7 @@
         android:layout_toLeftOf="@+id/view_title_layout_ll_right"
         android:text="设备ID:"
         android:textColor="@color/main_color"
-        android:textSize="16sp" />
+        android:textSize="18sp" />
 
     <!--状态图标-->
     <LinearLayout

+ 1 - 1
resource/src/main/res/values/strings.xml

@@ -95,7 +95,7 @@
     <string name="str_call_speaker">免提</string>
 
     <string name="card_no">住院号: </string>
-    <string name="indate">入日期: </string>
+    <string name="indate">入日期: </string>
     <string name="fee_price">单价: </string>
     <string name="fee_type">类型: </string>
     <string name="subtotal">小计: </string>