Преглед на файлове

一体化平台考勤

master
leiyun преди 3 години
родител
ревизия
074a252f5e
променени са 10 файла, в които са добавени 54 реда и са изтрити 24 реда
  1. +1
    -1
      .idea/misc.xml
  2. +3
    -3
      app/build.gradle
  3. +2
    -2
      app/src/main/AndroidManifest.xml
  4. +3
    -0
      app/src/main/java/com/yzx/escreen/MainActivity.kt
  5. +1
    -1
      app/src/main/java/com/yzx/escreen/adapter/HomeDialogStepAdapter.kt
  6. +5
    -6
      app/src/main/java/com/yzx/escreen/fragment/HomeFragment.kt
  7. +16
    -1
      app/src/main/java/com/yzx/escreen/fragment/MyFragment.kt
  8. +17
    -5
      app/src/main/res/layout/dialog_leave.xml
  9. +5
    -4
      app/src/main/res/layout/layout_loading.xml
  10. +1
    -1
      app/src/main/res/values/styles.xml

+ 1
- 1
.idea/misc.xml Целия файл

@@ -18,7 +18,7 @@
<entry key="..\:/work/escreen/app/src/main/res/layout/activity_read.xml" value="0.31567028985507245" />
<entry key="..\:/work/escreen/app/src/main/res/layout/activity_web.xml" value="0.30483112441214194" />
<entry key="..\:/work/escreen/app/src/main/res/layout/dialog_exit.xml" value="0.30483112441214194" />
<entry key="..\:/work/escreen/app/src/main/res/layout/dialog_leave.xml" value="0.5" />
<entry key="..\:/work/escreen/app/src/main/res/layout/dialog_leave.xml" value="0.30483112441214194" />
<entry key="..\:/work/escreen/app/src/main/res/layout/dialog_test.xml" value="0.29827742520398914" />
<entry key="..\:/work/escreen/app/src/main/res/layout/fragment_home.xml" value="0.6594650205761317" />
<entry key="..\:/work/escreen/app/src/main/res/layout/fragment_my.xml" value="0.45940721649484534" />


+ 3
- 3
app/build.gradle Целия файл

@@ -16,8 +16,8 @@ android {
// minSdkVersion 26
minSdkVersion 21
targetSdkVersion 25
versionCode 5
versionName "2.0.3"
versionCode 8
versionName "2.0.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

// ndk {
@@ -67,7 +67,7 @@ android {
buildConfigField "String", "BASE_URL", '"https://oa.qbjjyyun.net/api"'
buildConfigField "String", "M_URL", '"https://m.qbjjyyun.net"'
buildConfigField "String", "OA_URL", '"https://oa.qbjjyyun.net"'
buildConfigField "String", "APP_NAME", '"家校互通"'
buildConfigField "String", "APP_NAME", '"一体化平台"'

// buildConfigField "String", "BASE_URL", '"http://192.168.69.99:9009"'
// buildConfigField "String", "M_URL", '"http://192.168.69.99:8098"'


+ 2
- 2
app/src/main/AndroidManifest.xml Целия файл

@@ -38,8 +38,8 @@
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <category android:name="android.intent.category.HOME" />-->
<!-- <category android:name="android.intent.category.DEFAULT" />-->
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>


+ 3
- 0
app/src/main/java/com/yzx/escreen/MainActivity.kt Целия файл

@@ -58,6 +58,9 @@ class MainActivity : BaseActivity<BasePresenter<*>>(), NetworkUtils.OnNetworkSta
var netLoadingDialog:QMUIDialog? = null
var netErrorDialog:QMUIDialog? = null
private val netLoadingRun = Runnable {
netLoadingDialog?.apply {
dismiss()
}
showNetworkError()
}



+ 1
- 1
app/src/main/java/com/yzx/escreen/adapter/HomeDialogStepAdapter.kt Целия файл

@@ -72,7 +72,7 @@ class HomeDialogStepAdapter(list: MutableList<LeaveActivity>) :
if (holder.adapterPosition == data.size - 1) {
holder.itemView.contentLayout.setPadding(0, 0, 0, 0)
} else {
holder.itemView.contentLayout.setPadding(0, 0, 0, holder.itemView.contentLayout.dip(40))
holder.itemView.contentLayout.setPadding(0, 0, 0, holder.itemView.contentLayout.dip(20))
}
}
}

+ 5
- 6
app/src/main/java/com/yzx/escreen/fragment/HomeFragment.kt Целия файл

@@ -11,7 +11,6 @@ import android.view.KeyEvent
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.core.widget.addTextChangedListener
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.blankj.utilcode.util.KeyboardUtils
@@ -19,22 +18,20 @@ import com.blankj.utilcode.util.NetworkUtils
import com.blankj.utilcode.util.SPUtils
import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
import com.yzx.escreen.R
import com.yzx.escreen.activity.WebActivity
import com.yzx.escreen.adapter.HomeDialogStepAdapter
import com.yzx.escreen.adapter.HomeListAdapter
import com.yzx.escreen.fragment.base.BaseFragment
import com.yzx.escreen.model.LeaveID
import com.yzx.escreen.model.Pager
import com.yzx.escreen.model.StuLeave
import com.yzx.escreen.adapter.HomeListAdapter
import com.yzx.escreen.model.LeaveID
import com.yzx.escreen.presenter.HomePresenter
import com.yzx.escreen.presenter.HomeView
import com.yzx.escreen.utils.durationStr
import com.yzx.escreen.utils.hideNavigationBar
import com.yzx.escreen.utils.setSrc
import com.yzx.escreen.utils.toTime
import com.yzx.escreen.widget.BaseDialog
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_home.*
import kotlinx.android.synthetic.main.layout_loading.*
import kotlinx.android.synthetic.main.layout_loading.view.*
import org.jetbrains.anko.find
import org.jetbrains.anko.support.v4.act
@@ -101,6 +98,7 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView,
if (keyCode == KeyEvent.KEYCODE_ENTER) {
keyword = keywordInput.text.toString()
initData()
KeyboardUtils.hideSoftInput( keywordInput)
}
}
false
@@ -183,6 +181,7 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView,
}
dialog.find<TextView>(R.id.class_name).text = "${detail.grade_name}${detail.class_name}"
dialog.find<TextView>(R.id.leave_request_type_name).text = detail.leave_request_type_name
dialog.find<TextView>(R.id.leave_duration_str).text = (detail.end_time - detail.start_time).durationStr()
dialog.find<TextView>(R.id.add_time).text =
"${detail.start_time.toTime()} - ${detail.end_time.toTime()}"
dialog.find<TextView>(R.id.leave_request_reason).text = detail.leave_request_reason


+ 16
- 1
app/src/main/java/com/yzx/escreen/fragment/MyFragment.kt Целия файл

@@ -7,6 +7,7 @@ import com.blankj.utilcode.util.ScreenUtils
import com.blankj.utilcode.util.ToastUtils
import com.qmuiteam.qmui.widget.dialog.QMUIDialog
import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
import com.qmuiteam.qmui.widget.dialog.QMUITipDialog
import com.yzx.escreen.MainActivity
import com.yzx.escreen.R
import com.yzx.escreen.activity.WebActivity
@@ -72,15 +73,29 @@ class MyFragment : BaseFragment<MyPresenter>(), MyView {
activity?.finish()
exitProcess(0)
} else {
ToastUtils.showShort("密码不正确")
// ToastUtils.showShort("密码不正确")
showPwdErrorTip()
}
}
.setCancelable(false)
.setCanceledOnTouchOutside(false)
val dialog = builder.show()

dialog.hideNavigationBar()
}

private fun showPwdErrorTip() {
val tipDialog = QMUITipDialog.Builder(activity)
.setIconType(QMUITipDialog.Builder.ICON_TYPE_FAIL)
.setTipWord("密码错误")
.create()
tipDialog.show()
tipDialog.hideNavigationBar()
sysExitBtn.postDelayed({
tipDialog.dismiss()
}, 1500)
}

override fun initData() {
mPresenter?.getTeacherInfo(User.getUser().user_id)
density.text =


+ 17
- 5
app/src/main/res/layout/dialog_leave.xml Целия файл

@@ -48,7 +48,7 @@
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_alignParentEnd="true"
android:layout_marginEnd="100dp" />
android:layout_marginEnd="40dp" />

<LinearLayout
android:layout_width="match_parent"
@@ -75,8 +75,8 @@

<com.qmuiteam.qmui.widget.QMUIRadiusImageView
android:id="@+id/face_img"
android:layout_width="120dp"
android:layout_height="148dp"
android:layout_width="180dp"
android:layout_height="222dp"
android:text="颜小华"
app:qmui_corner_radius="@dimen/d_5"
app:qmui_border_color="@color/white"/>
@@ -129,6 +129,18 @@
tools:text="2022年4月21日15:38:15" />
</LinearLayout>

<LinearLayout style="@style/leave_dialog_row">

<TextView
style="@style/leave_dialog_title"
android:text="请假时长" />

<TextView
android:id="@+id/leave_duration_str"
style="@style/leave_dialog_left_content"
android:text="2022年4月21日15:38:15" />
</LinearLayout>

<LinearLayout style="@style/leave_dialog_row">

<TextView
@@ -145,7 +157,7 @@

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="700dp"
android:layout_marginStart="50dp"
android:layout_weight="1"
android:orientation="vertical"
@@ -154,7 +166,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/stepRecycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
tools:itemCount="4"
tools:listitem="@layout/layout_leave_step" />
</LinearLayout>


+ 5
- 4
app/src/main/res/layout/layout_loading.xml Целия файл

@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">

<com.qmuiteam.qmui.widget.QMUIEmptyView
android:id="@+id/QMUIEmptyView"
android:layout_width="match_parent"
android:layout_width="500dp"
android:layout_height="match_parent"
app:qmui_show_loading="true"
app:qmui_title_text="数据加载中"/>
app:qmui_title_text="数据加载中" />

</LinearLayout>

+ 1
- 1
app/src/main/res/values/styles.xml Целия файл

@@ -172,7 +172,7 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:orientation">horizontal</item>
<item name="android:layout_marginTop">@dimen/dp_40</item>
<item name="android:layout_marginTop">@dimen/d_30</item>
<item name="android:textSize">@dimen/sp20</item>
</style>



Зареждане…
Отказ
Запис