| @@ -12,6 +12,7 @@ | |||
| <entry key="..\:/work/escreen/app/src/main/res/drawable/switch_ios_track_on.xml" value="0.372" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/drawable/switch_ios_track_selector.xml" value="0.372" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/activity_book.xml" value="0.37135416666666665" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/activity_home.xml" value="0.12378472222222223" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/activity_main.xml" value="0.4279711884753902" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/activity_main1.xml" value="0.37135416666666665" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/activity_note.xml" value="0.37135416666666665" /> | |||
| @@ -20,11 +21,12 @@ | |||
| <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.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/dialog_vacation.xml" value="0.10822707953855495" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/fragment_home.xml" value="0.2941427960666952" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/fragment_my.xml" value="0.45940721649484534" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/layout_empty.xml" value="0.37135416666666665" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/layout_leave_step.xml" value="0.4681549573210768" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/layout_leave_table.xml" value="0.41030092592592593" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/layout_leave_step.xml" value="0.1" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/layout_leave_table.xml" value="0.21462163317657118" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/layout_loading.xml" value="0.30483112441214194" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/leave_dialog_title.xml" value="0.37135416666666665" /> | |||
| <entry key="..\:/work/escreen/app/src/main/res/layout/version_dialog.xml" value="0.30483112441214194" /> | |||
| @@ -16,8 +16,8 @@ android { | |||
| // minSdkVersion 26 | |||
| minSdkVersion 21 | |||
| targetSdkVersion 25 | |||
| versionCode 8 | |||
| versionName "2.0.6" | |||
| versionCode 9 | |||
| versionName "2.0.7" | |||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |||
| // ndk { | |||
| @@ -84,8 +84,8 @@ android { | |||
| // buildConfigField "String", "BASE_URL", '"http://192.168.69.99:9009"' | |||
| // buildConfigField "String", "M_URL", '"http://192.168.69.112:8098"' | |||
| // buildConfigField "String", "BASE_URL", '"https://oa.qbjjyyun.net/api"' | |||
| // buildConfigField "String", "OA_URL", '"https://oa.live.educlouddata.com"' | |||
| buildConfigField "String", "OA_URL", '"http://192.168.69.114:3000"' | |||
| buildConfigField "String", "OA_URL", '"https://oa.live.educlouddata.com"' | |||
| // buildConfigField "String", "OA_URL", '"http://192.168.69.114:3000"' | |||
| buildConfigField "String", "M_URL", '"https://m.live.educlouddata.com/"' | |||
| buildConfigField "String", "BASE_URL", '"https://oa.live.educlouddata.com/api"' | |||
| buildConfigField "String", "APP_NAME", '"家校互通(开发)"' | |||
| @@ -186,4 +186,5 @@ dependencies { | |||
| implementation 'com.qmuiteam:qmui:2.0.0-alpha10' | |||
| api 'com.tencent.tbs:tbssdk:44181' | |||
| implementation 'com.github.HuanTanSheng:EasyPhotos:3.1.5' | |||
| } | |||
| @@ -17,9 +17,10 @@ | |||
| <uses-permission android:name="android.permission.BATTERY_STATS" /> | |||
| <uses-permission android:name="android.permission.WAKE_LOCK" /> | |||
| <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | |||
| <uses-permission android:name="android.permission.CAMERA" /> | |||
| <application | |||
| android:name="com.yzx.escreen.App" | |||
| android:name=".App" | |||
| android:allowBackup="true" | |||
| android:icon="@mipmap/ic_launcher" | |||
| android:label="@string/app_name" | |||
| @@ -30,31 +31,32 @@ | |||
| android:theme="@style/AppTheme" | |||
| android:usesCleartextTraffic="true"> | |||
| <activity | |||
| android:name="com.yzx.escreen.MainActivity" | |||
| android:name=".activity.CameraActivity" | |||
| android:exported="false" /> | |||
| <activity | |||
| android:name=".MainActivity" | |||
| android:configChanges="orientation|keyboard" | |||
| android:launchMode="singleTask" | |||
| android:windowSoftInputMode="adjustPan|stateHidden" | |||
| android:screenOrientation="landscape"> | |||
| android:launchMode="singleInstance" | |||
| android:screenOrientation="landscape" | |||
| android:windowSoftInputMode="adjustPan|stateHidden"> | |||
| <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> | |||
| <activity | |||
| android:name="com.yzx.escreen.activity.WebActivity" | |||
| android:name=".activity.WebActivity" | |||
| android:configChanges="orientation|keyboard" | |||
| android:screenOrientation="landscape" /> | |||
| <!-- <activity--> | |||
| <!-- android:name="com.yzx.escreen.MainActivity"--> | |||
| <!-- android:configChanges="orientation|keyboard"--> | |||
| <!-- android:launchMode="singleTask"--> | |||
| <!-- android:screenOrientation="portrait" />--> | |||
| android:screenOrientation="landscape" /> <!-- <activity --> | |||
| <!-- android:name="com.yzx.escreen.MainActivity" --> | |||
| <!-- android:configChanges="orientation|keyboard" --> | |||
| <!-- android:launchMode="singleTask" --> | |||
| <!-- android:screenOrientation="portrait" /> --> | |||
| <provider | |||
| android:name="com.yzx.escreen.utils.YzxFileProvider" | |||
| android:name=".utils.YzxFileProvider" | |||
| android:authorities="${applicationId}.fileProvider" | |||
| android:exported="false" | |||
| android:grantUriPermissions="true" | |||
| @@ -64,17 +66,18 @@ | |||
| android:resource="@xml/provider_paths" | |||
| tools:replace="name,resource" /> | |||
| </provider> | |||
| <service | |||
| android:name="com.tencent.smtt.export.external.DexClassLoaderProviderService" | |||
| android:label="dexopt" | |||
| android:process=":dexopt" > | |||
| </service> | |||
| android:process=":dexopt"></service> | |||
| <receiver | |||
| android:name=".receiver.BootReceiver" | |||
| android:enabled="true" | |||
| android:exported="true"> | |||
| <intent-filter android:priority="1000"> | |||
| <action android:name="android.intent.action.BOOT_COMPLETED"/> | |||
| <action android:name="android.intent.action.BOOT_COMPLETED" /> | |||
| </intent-filter> | |||
| </receiver> | |||
| </application> | |||
| @@ -0,0 +1,24 @@ | |||
| package com.yzx.escreen.activity | |||
| import android.os.Bundle | |||
| import com.yzx.escreen.R | |||
| import com.yzx.escreen.activity.base.BaseActivity | |||
| import com.yzx.escreen.presenter.base.BasePresenter | |||
| class CameraActivity : BaseActivity<BasePresenter<*>>() { | |||
| override fun onCreate(savedInstanceState: Bundle?) { | |||
| super.onCreate(savedInstanceState) | |||
| setContentView(R.layout.activity_camera) | |||
| } | |||
| override val inflateId: Int | |||
| get() = R.layout.activity_camera | |||
| override fun initView() { | |||
| } | |||
| override fun initData() { | |||
| } | |||
| override fun initPresenter(): BasePresenter<*>? = null | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.yzx.escreen.adapter | |||
| import android.annotation.SuppressLint | |||
| import android.graphics.Color | |||
| import android.view.View | |||
| import com.chad.library.adapter.base.BaseQuickAdapter | |||
| import com.chad.library.adapter.base.viewholder.BaseViewHolder | |||
| @@ -10,24 +11,47 @@ import com.yzx.escreen.utils.setSrc | |||
| import com.yzx.escreen.utils.toTime | |||
| import kotlinx.android.synthetic.main.layout_leave_step.view.* | |||
| import org.jetbrains.anko.dip | |||
| import org.jetbrains.anko.textColor | |||
| class HomeDialogStepAdapter(list: MutableList<LeaveActivity>) : | |||
| BaseQuickAdapter<LeaveActivity, BaseViewHolder>(R.layout.layout_leave_step, list) { | |||
| @SuppressLint("SetTextI18n") | |||
| override fun convert(holder: BaseViewHolder, item: LeaveActivity) { | |||
| if (item.is_approve == 0) { | |||
| holder.itemView.addUserName.visibility = View.VISIBLE | |||
| holder.itemView.addUserName.text = item.add_user_name | |||
| holder.itemView.approvalComments.visibility = View.GONE | |||
| } else { | |||
| holder.itemView.addUserName.visibility = View.GONE | |||
| holder.itemView.approvalComments.visibility = View.VISIBLE | |||
| var str = "审批人:${item.add_user_name}" | |||
| if (item.approval_comments != null && item.approval_comments.isNotEmpty()) { | |||
| str += "。${item.approval_comments}" | |||
| holder.itemView.inImg.visibility = View.GONE | |||
| when (item.is_approve) { | |||
| 0 -> { | |||
| holder.itemView.addUserName.visibility = View.VISIBLE | |||
| holder.itemView.addUserName.text = item.add_user_name | |||
| holder.itemView.approvalComments.visibility = View.GONE | |||
| } | |||
| 2 -> { | |||
| holder.itemView.addUserName.visibility = View.GONE | |||
| holder.itemView.approvalComments.visibility = View.VISIBLE | |||
| holder.itemView.approvalComments.text = item.approval_comments | |||
| holder.itemView.approvalComments.textColor = if (item.color.isNotEmpty()) { | |||
| Color.parseColor(item.color) | |||
| } else { | |||
| Color.parseColor("#333333") | |||
| } | |||
| val inItem = item.getInImg() | |||
| if (inItem != null) { | |||
| holder.itemView.inImg.visibility = View.VISIBLE | |||
| holder.itemView.inImg.setSrc(inItem.identity, inItem.attachment_id) | |||
| } else { | |||
| holder.itemView.inImg.visibility = View.GONE | |||
| } | |||
| } | |||
| else -> { | |||
| holder.itemView.addUserName.visibility = View.GONE | |||
| holder.itemView.approvalComments.visibility = View.VISIBLE | |||
| var str = "审批人:${item.add_user_name}" | |||
| if (item.approval_comments != null && item.approval_comments.isNotEmpty()) { | |||
| str += "。${item.approval_comments}" | |||
| } | |||
| holder.itemView.approvalComments.text = str | |||
| } | |||
| holder.itemView.approvalComments.text = str | |||
| } | |||
| if (item.add_user_type_name.isNullOrBlank()) { | |||
| holder.itemView.addUserTypeName.visibility = View.GONE | |||
| @@ -16,6 +16,10 @@ import org.jetbrains.anko.textColor | |||
| class HomeListAdapter(list: MutableList<StuLeave>) : | |||
| BaseQuickAdapter<StuLeave, BaseViewHolder>(R.layout.layout_leave_table, list) { | |||
| init { | |||
| addChildClickViewIds(R.id.cancelBtn) | |||
| } | |||
| @SuppressLint("SetTextI18n") | |||
| override fun convert(holder: BaseViewHolder, item: StuLeave) { | |||
| holder.itemView.studentName.text = item.leave_student_name | |||
| @@ -36,12 +40,16 @@ class HomeListAdapter(list: MutableList<StuLeave>) : | |||
| 1 -> "待处理" | |||
| 2 -> "已确认" | |||
| 3 -> "已拒绝" | |||
| 4 -> "正常销假" | |||
| 5 -> "超时销假" | |||
| else -> "--" | |||
| } | |||
| holder.itemView.statusName.textColor = when (item.status) { | |||
| 1 -> Color.parseColor("#333333") | |||
| 2 -> Color.parseColor("#3c7ef6") | |||
| 3 -> Color.parseColor("#ff4040") | |||
| 4 -> Color.parseColor("#3c7ef6") | |||
| 5 -> Color.parseColor("#ff4040") | |||
| else -> Color.parseColor("#333333") | |||
| } | |||
| holder.itemView.applyTime.text = item.add_time.toTime() | |||
| @@ -51,5 +59,14 @@ class HomeListAdapter(list: MutableList<StuLeave>) : | |||
| } else { | |||
| View.VISIBLE | |||
| } | |||
| holder.itemView.cancelBtn.visibility = if(item.is_cancel_leave ==1 ){ | |||
| holder.itemView.placeHolder.visibility = View.GONE | |||
| View.VISIBLE | |||
| }else{ | |||
| holder.itemView.placeHolder.visibility = View.VISIBLE | |||
| View.GONE | |||
| } | |||
| } | |||
| } | |||
| @@ -47,5 +47,6 @@ object YzxInterface { | |||
| const val INTERFACE_GET_STU_LEAVE_INFO_DETAIL= "/edu/attendance/getStudentLeaveRequestDetail" //获取学生的请假信息详情 | |||
| const val INTERFACE_GET_TEACHER_INFO= "/rights/teacherWork/getTeacherByUserId"//获取人员信息 | |||
| const val INTERFACE_STUDENT_GET_SHOW_BOX_LIST= "/edu/attendance/student/getStudentLeaveIds" //获取需要弹出的数据 | |||
| const val INTERFACE_STUDENT_POST_LEAVE_VACATION= "/edu/attendance/student/studentLeaveVacation"//人工销假操作 | |||
| } | |||
| @@ -1,6 +1,9 @@ | |||
| package com.yzx.escreen.fragment | |||
| import android.Manifest | |||
| import android.annotation.SuppressLint | |||
| import android.app.Activity | |||
| import android.content.Intent | |||
| import android.content.res.ColorStateList | |||
| import android.graphics.Color | |||
| import android.os.Handler | |||
| @@ -9,27 +12,25 @@ import android.text.Editable | |||
| import android.text.TextWatcher | |||
| import android.view.KeyEvent | |||
| import android.view.View | |||
| import android.widget.EditText | |||
| import android.widget.ImageView | |||
| import android.widget.TextView | |||
| import androidx.recyclerview.widget.LinearLayoutManager | |||
| import androidx.recyclerview.widget.RecyclerView | |||
| import com.blankj.utilcode.util.KeyboardUtils | |||
| import com.blankj.utilcode.util.NetworkUtils | |||
| import com.blankj.utilcode.util.SPUtils | |||
| import com.blankj.utilcode.util.* | |||
| import com.huantansheng.easyphotos.EasyPhotos | |||
| import com.huantansheng.easyphotos.models.album.entity.Photo | |||
| import com.qmuiteam.qmui.widget.dialog.QMUIDialog | |||
| import com.qmuiteam.qmui.widget.dialog.QMUITipDialog | |||
| import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton | |||
| import com.yzx.escreen.R | |||
| 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.model.* | |||
| 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.utils.* | |||
| import com.yzx.escreen.widget.BaseDialog | |||
| import kotlinx.android.synthetic.main.fragment_home.* | |||
| import kotlinx.android.synthetic.main.layout_loading.view.* | |||
| @@ -38,11 +39,14 @@ import org.jetbrains.anko.support.v4.act | |||
| import org.jetbrains.anko.support.v4.ctx | |||
| import org.jetbrains.anko.textColor | |||
| class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| NetworkUtils.OnNetworkStatusChangedListener { | |||
| NetworkUtils.OnNetworkStatusChangedListener, FileUploadCallBack { | |||
| companion object { | |||
| val CAMER_REQUEST_CODE = 0x01 | |||
| @JvmStatic | |||
| fun getNewInstance() = | |||
| HomeFragment() | |||
| @@ -61,7 +65,11 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| private var isLoading = false | |||
| private val mShowList = mutableListOf<StuLeave>() | |||
| private val mShowDialogList = mutableListOf<BaseDialog>() | |||
| private var mCancelItem: StuLeave? = null | |||
| private var mCancelFaceImg: ImageView? = null | |||
| private var mDialogVacation: BaseDialog? = null | |||
| private val mVacation = Vacation() | |||
| private val mVacationAttachment = Attachment("","","") | |||
| private val mHandler = Handler(Looper.getMainLooper()) | |||
| private val runnable = object : Runnable { | |||
| @@ -89,16 +97,20 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| status1Btn.setOnClickListener { changeStatus(1) } | |||
| status2Btn.setOnClickListener { changeStatus(2) } | |||
| status3Btn.setOnClickListener { changeStatus(3) } | |||
| status4Btn.setOnClickListener { changeStatus(4) } | |||
| status5Btn.setOnClickListener { changeStatus(5) } | |||
| statusBtnList.add(allBtn) | |||
| statusBtnList.add(status1Btn) | |||
| statusBtnList.add(status2Btn) | |||
| statusBtnList.add(status3Btn) | |||
| statusBtnList.add(status4Btn) | |||
| statusBtnList.add(status5Btn) | |||
| keywordInput.setOnKeyListener { _, keyCode, _ -> | |||
| if (!isLoading) { | |||
| if (keyCode == KeyEvent.KEYCODE_ENTER) { | |||
| keyword = keywordInput.text.toString() | |||
| initData() | |||
| KeyboardUtils.hideSoftInput( keywordInput) | |||
| KeyboardUtils.hideSoftInput(keywordInput) | |||
| } | |||
| } | |||
| false | |||
| @@ -114,6 +126,16 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| mPresenter?.getDetail(mAdapter.getItem(position).id) | |||
| } | |||
| mAdapter.setOnItemChildClickListener { adapter, view, position -> | |||
| LogUtils.d("setOnItemChildClickListener", position) | |||
| when (view.id) { | |||
| R.id.cancelBtn -> { | |||
| mCancelItem = mAdapter.getItem(position) | |||
| showCancelDialog() | |||
| } | |||
| } | |||
| } | |||
| switchBtn.setOnCheckedChangeListener { buttonView, isChecked -> | |||
| SPUtils.getInstance().put("auto_show_leave", isChecked) | |||
| @@ -152,10 +174,84 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| }) | |||
| filterLayout.setOnClickListener { | |||
| KeyboardUtils.hideSoftInput( keywordInput) | |||
| KeyboardUtils.hideSoftInput(keywordInput) | |||
| } | |||
| } | |||
| @SuppressLint("SetTextI18n") | |||
| private fun showCancelDialog() { | |||
| val dialogVacation = BaseDialog(act, R.style.BaseDialog, R.layout.dialog_vacation) | |||
| mCancelItem?.apply { | |||
| mVacation.id = id | |||
| mVacation.vacation_type = 2 | |||
| mVacation.vacation_attachment = "" | |||
| mVacation.vacation_remark = "电子屏人工销假" | |||
| mVacationAttachment.clear() | |||
| dialogVacation.find<TextView>(R.id.leave_student_name).text = leave_student_name | |||
| dialogVacation.find<TextView>(R.id.class_name).text = "${grade_name}${class_name}" | |||
| dialogVacation.find<TextView>(R.id.add_time).text = | |||
| "${start_time.toTime()} - ${end_time.toTime()}" | |||
| val nowTime = (TimeUtils.getNowMills() / 1000).toInt() | |||
| dialogVacation.find<TextView>(R.id.vacation_time).text = nowTime.toTime() | |||
| mVacation.vacation_time = nowTime.toLong() | |||
| dialogVacation.find<EditText>(R.id.vacation_remark).setText(mVacation.vacation_remark) | |||
| dialogVacation.find<View>(R.id.cameraBtn).setOnClickListener { onCameraBtnClick() } | |||
| mCancelFaceImg = dialogVacation.find<ImageView>(R.id.face_img) | |||
| dialogVacation.find<View>(R.id.submitBtn).setOnClickListener { | |||
| postVacation() | |||
| } | |||
| dialogVacation.find<View>(R.id.closeBtn).setOnClickListener { | |||
| dialogVacation.dismiss() | |||
| } | |||
| } | |||
| //处理弹窗显示 | |||
| dialogVacation.show() | |||
| dialogVacation.hideNavigationBar() | |||
| mDialogVacation = dialogVacation | |||
| } | |||
| private fun postVacation(){ | |||
| if(mVacationAttachment.id.isNotEmpty()){ | |||
| mVacation.vacation_attachment = GsonUtils.toJson(mutableListOf(mVacationAttachment)) | |||
| } | |||
| showLoading("销假中") | |||
| mPresenter?.postVacation(mVacation) | |||
| } | |||
| private fun onCameraBtnClick() { | |||
| val isGranted = PermissionUtils.isGranted(Manifest.permission.CAMERA) | |||
| if (!isGranted) { | |||
| PermissionUtils.permission(Manifest.permission.CAMERA) | |||
| .callback { isAllGranted, granted, deniedForever, denied -> | |||
| if (!isAllGranted) { | |||
| val tipDialog = QMUIDialog.MessageDialogBuilder(activity) | |||
| .setTitle("温馨提示") | |||
| .setMessage("拍照权限被拒绝,请开启权限后重试") | |||
| .addAction("取消") { dialog, index -> | |||
| dialog.dismiss() | |||
| } | |||
| .addAction("确定") { dialog, index -> | |||
| dialog.dismiss() | |||
| PermissionUtils.launchAppDetailsSettings() | |||
| } | |||
| .create() | |||
| tipDialog.show() | |||
| tipDialog.hideNavigationBar() | |||
| } | |||
| } | |||
| .request() | |||
| } else { | |||
| openCamera() | |||
| } | |||
| } | |||
| private fun openCamera() { | |||
| EasyPhotos.createCamera(this, true) | |||
| .setFileProviderAuthority("${activity?.packageName}.fileProvider") | |||
| .start(CAMER_REQUEST_CODE)//也可以选择链式调用写法 | |||
| } | |||
| private fun changeSwitchBtnTxt(isChecked: Boolean) { | |||
| if (isChecked) { | |||
| switchBtnTxt.setTextColor(ctx.resources.getColor(R.color.green2)) | |||
| @@ -181,7 +277,8 @@ 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.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 | |||
| @@ -190,6 +287,8 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| 1 -> "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/mini/stutakeleave_wait.png" | |||
| 2 -> "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/mini/stutakeleave_pass.png" | |||
| 3 -> "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/mini/stutakeleave_nopass.png" | |||
| 4 -> "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/mini/cancellation.png" | |||
| 5 -> "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/mini/cancellation_overtime.png" | |||
| else -> "" | |||
| } | |||
| ) | |||
| @@ -233,7 +332,7 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| } | |||
| private fun changeStatus(status: Int) { | |||
| KeyboardUtils.hideSoftInput( keywordInput) | |||
| KeyboardUtils.hideSoftInput(keywordInput) | |||
| if (isLoading) { | |||
| return | |||
| } | |||
| @@ -295,7 +394,7 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| } | |||
| private fun pre() { | |||
| KeyboardUtils.hideSoftInput( keywordInput) | |||
| KeyboardUtils.hideSoftInput(keywordInput) | |||
| if (isLoading) { | |||
| return | |||
| } | |||
| @@ -307,7 +406,7 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| } | |||
| private fun next() { | |||
| KeyboardUtils.hideSoftInput( keywordInput) | |||
| KeyboardUtils.hideSoftInput(keywordInput) | |||
| if (isLoading) { | |||
| return | |||
| } | |||
| @@ -391,6 +490,20 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| } | |||
| } | |||
| override fun postVacationSuccess(msg: String) { | |||
| showDialogToast(msg,2000L) | |||
| hideLoading() | |||
| mDialogVacation?.apply { | |||
| dismiss() | |||
| refreshData() | |||
| } | |||
| } | |||
| override fun postVacationError(msg: String) { | |||
| hideLoading() | |||
| showDialogToast(msg,2000L,QMUITipDialog.Builder.ICON_TYPE_FAIL) | |||
| } | |||
| override fun onDisconnected() { | |||
| } | |||
| @@ -398,4 +511,34 @@ class HomeFragment : BaseFragment<HomePresenter>(), HomeView, | |||
| override fun onConnected(networkType: NetworkUtils.NetworkType?) { | |||
| refreshData() | |||
| } | |||
| } | |||
| override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { | |||
| if (resultCode == Activity.RESULT_OK) { | |||
| if (requestCode == CAMER_REQUEST_CODE) { | |||
| val photos = data?.getParcelableArrayListExtra<Photo>(EasyPhotos.RESULT_PHOTOS) | |||
| LogUtils.d("photos", photos) | |||
| photos?.apply { | |||
| if (this.size > 0) { | |||
| mVacationAttachment.name = this[0].name | |||
| FileUpload.upload(this[0].path, this@HomeFragment) | |||
| } | |||
| } | |||
| } | |||
| } | |||
| super.onActivityResult(requestCode, resultCode, data) | |||
| } | |||
| override fun onSuccess(identity: String, key: String) { | |||
| LogUtils.d(identity, key) | |||
| mCancelFaceImg?.setSrc(identity, key) | |||
| mVacationAttachment.identity = identity | |||
| mVacationAttachment.id = key | |||
| } | |||
| override fun onError(msg: String) { | |||
| LogUtils.d(msg) | |||
| } | |||
| } | |||
| @@ -1,14 +1,12 @@ | |||
| package com.yzx.escreen.fragment | |||
| import android.text.InputType | |||
| import com.blankj.utilcode.util.ActivityUtils | |||
| import com.blankj.utilcode.util.KeyboardUtils | |||
| import com.blankj.utilcode.util.LogUtils | |||
| 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 | |||
| import com.yzx.escreen.config.Config | |||
| @@ -18,9 +16,7 @@ import com.yzx.escreen.model.User | |||
| import com.yzx.escreen.presenter.MyPresenter | |||
| import com.yzx.escreen.presenter.MyView | |||
| import com.yzx.escreen.utils.hideNavigationBar | |||
| import kotlinx.android.synthetic.main.activity_home.* | |||
| import kotlinx.android.synthetic.main.fragment_my.* | |||
| import org.jetbrains.anko.startActivity | |||
| import kotlin.system.exitProcess | |||
| class MyFragment : BaseFragment<MyPresenter>(), MyView { | |||
| @@ -71,7 +67,7 @@ class MyFragment : BaseFragment<MyPresenter>(), MyView { | |||
| LogUtils.d("112233".equals(text)) | |||
| if ("112233" == text.toString()) { | |||
| activity?.finish() | |||
| // exitProcess(0) | |||
| exitProcess(0) | |||
| } else { | |||
| // ToastUtils.showShort("密码不正确") | |||
| showPwdErrorTip() | |||
| @@ -6,7 +6,9 @@ import android.view.LayoutInflater | |||
| import android.view.View | |||
| import android.view.ViewGroup | |||
| import androidx.fragment.app.Fragment | |||
| import com.qmuiteam.qmui.widget.dialog.QMUITipDialog | |||
| import com.yzx.escreen.presenter.base.BasePresenter | |||
| import com.yzx.escreen.utils.hideNavigationBar | |||
| /** | |||
| * fragment 基类 | |||
| @@ -18,6 +20,8 @@ abstract class BaseFragment<out P : BasePresenter<*>> : Fragment() { | |||
| */ | |||
| abstract val inflateId: Int | |||
| private var mLoadingDialog: QMUITipDialog? = null | |||
| /** | |||
| * 初始化视图操作在这里执行,执行时机为onCreate之后 | |||
| */ | |||
| @@ -35,7 +39,6 @@ abstract class BaseFragment<out P : BasePresenter<*>> : Fragment() { | |||
| abstract fun initPresenter(): P? | |||
| override fun onCreateView( | |||
| inflater: LayoutInflater, | |||
| container: ViewGroup?, | |||
| @@ -52,8 +55,41 @@ abstract class BaseFragment<out P : BasePresenter<*>> : Fragment() { | |||
| } | |||
| override fun onDestroy() { | |||
| super.onDestroy() | |||
| } | |||
| fun showDialogToast( | |||
| msg: String, | |||
| duration: Long = 1500, | |||
| @QMUITipDialog.Builder.IconType icon: Int = QMUITipDialog.Builder.ICON_TYPE_SUCCESS | |||
| ) { | |||
| val tipDialog = QMUITipDialog.Builder(activity) | |||
| .setIconType(icon) | |||
| .setTipWord(msg) | |||
| .create() | |||
| tipDialog.show() | |||
| tipDialog.hideNavigationBar() | |||
| view?.postDelayed({ | |||
| tipDialog.dismiss() | |||
| }, duration) | |||
| } | |||
| fun showLoading(msg: String = "加载中") { | |||
| mLoadingDialog = QMUITipDialog.Builder(activity) | |||
| .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING) | |||
| .setTipWord(msg) | |||
| .create() | |||
| mLoadingDialog?.apply { | |||
| show() | |||
| } | |||
| } | |||
| fun hideLoading() { | |||
| mLoadingDialog?.apply { | |||
| if (isShowing) { | |||
| dismiss() | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -2,6 +2,7 @@ package com.yzx.escreen.model | |||
| import android.app.Dialog | |||
| import com.blankj.utilcode.util.LogUtils | |||
| import com.yzx.escreen.utils.durationStr | |||
| data class StuLeave( | |||
| val activities: MutableList<LeaveActivity> = mutableListOf(), | |||
| @@ -24,6 +25,7 @@ data class StuLeave( | |||
| val grade_name: String = "", | |||
| val headteacher_id: Int = 0, | |||
| val id: Int = 0, | |||
| val is_cancel_leave: Int = 0, | |||
| val leave_request_reason: String = "", | |||
| val leave_request_type: Int = 0, | |||
| val leave_request_type_name: String = "", | |||
| @@ -37,54 +39,54 @@ data class StuLeave( | |||
| val status: Int = 0, | |||
| val todo_list_id: Int = 0, | |||
| val todo_status: Int = 0 | |||
| ){ | |||
| ) { | |||
| fun getStep(): MutableList<LeaveActivity> { | |||
| val logList = mutableListOf<LeaveActivity>() | |||
| for (item in activities) { | |||
| if(item.child.isNotEmpty()){ | |||
| if (item.child.isNotEmpty()) { | |||
| for (it in item.child) { | |||
| it.activity_name = when(it.approve_user_type){ | |||
| 0->"领导审批" | |||
| 1->"自选" | |||
| 2->if (it.role_type==3){ | |||
| it.activity_name = when (it.approve_user_type) { | |||
| 0 -> "领导审批" | |||
| 1 -> "自选" | |||
| 2 -> if (it.role_type == 3) { | |||
| "班主任审批" | |||
| }else{ | |||
| } else { | |||
| "任课老师审批" | |||
| } | |||
| 3->"专业部领导审批" | |||
| 4->"值班领导审批" | |||
| else->"领导审批" | |||
| 3 -> "专业部领导审批" | |||
| 4 -> "值班领导审批" | |||
| else -> "领导审批" | |||
| } | |||
| } | |||
| val approvedList = item.child.filter { | |||
| return@filter it.approval_status>1 | |||
| return@filter it.approval_status > 1 | |||
| } | |||
| if(approvedList.isNotEmpty()){ | |||
| if(item.approve_way==2){ | |||
| if (approvedList.isNotEmpty()) { | |||
| if (item.approve_way == 2) { | |||
| logList.addAll(approvedList) | |||
| }else{ | |||
| } else { | |||
| logList.addAll(item.child) | |||
| } | |||
| }else{ | |||
| item.activity_name = when(item.approve_user_type){ | |||
| 0->"领导审批" | |||
| 1->"自选" | |||
| 2->if (item.role_type==3){ | |||
| } else { | |||
| item.activity_name = when (item.approve_user_type) { | |||
| 0 -> "领导审批" | |||
| 1 -> "自选" | |||
| 2 -> if (item.role_type == 3) { | |||
| "班主任审批" | |||
| }else{ | |||
| } else { | |||
| "任课老师审批" | |||
| } | |||
| 3->"专业部领导审批" | |||
| 4->"值班领导审批" | |||
| else->"领导审批" | |||
| 3 -> "专业部领导审批" | |||
| 4 -> "值班领导审批" | |||
| else -> "领导审批" | |||
| } | |||
| if(item.child.size>1){ | |||
| item.activity_name += when(item.approve_way){ | |||
| 0-> "(依次审批)" | |||
| 1-> "(会签)" | |||
| 2-> "(或签)" | |||
| else->"" | |||
| if (item.child.size > 1) { | |||
| item.activity_name += when (item.approve_way) { | |||
| 0 -> "(依次审批)" | |||
| 1 -> "(会签)" | |||
| 2 -> "(或签)" | |||
| else -> "" | |||
| } | |||
| } | |||
| item.add_user_name = item.child.map { | |||
| @@ -95,14 +97,37 @@ data class StuLeave( | |||
| item.is_approve = 1 | |||
| logList.add(item) | |||
| } | |||
| }else{ //提交人 | |||
| item.activity_name = "提交申请" | |||
| if(item.add_user_type == 0){ | |||
| } else if (item.is_approve == 0) { //提交人 | |||
| if (item.activity_name.contains("并直接通过") || item.is_auto_pass == 1) { | |||
| item.activity_name = "提交申请(直接通过)" | |||
| } else { | |||
| item.activity_name = "提交申请" | |||
| } | |||
| if (item.add_user_type == 0) { | |||
| item.add_user_type_name = "老师" | |||
| }else if (item.add_user_type == 1){ | |||
| } else if (item.add_user_type == 1) { | |||
| item.add_user_type_name = "学生家长" | |||
| } | |||
| logList.add(item) | |||
| } else if (item.is_approve == 2) { //学生返校销假 | |||
| if (item.vacation_type == 2) { //销假/返校类型(1自动销假 2老师操作销假) | |||
| val remark = item.approval_comments | |||
| item.approval_comments = "人工销假,销假操作人:${item.add_user_name}。" | |||
| if (item.add_time > end_time) { //超时 | |||
| item.approval_comments += "超出请假时长:${(item.add_time - end_time).durationStr()}。" | |||
| item.color = "#ff4040" | |||
| } | |||
| if (remark.isNotEmpty()) { | |||
| item.approval_comments += "备注:${remark}" | |||
| } | |||
| } else if (item.vacation_type == 1) { | |||
| item.approval_comments = "刷脸进校,自动销假。" | |||
| if (item.add_time > end_time) { //超时 | |||
| item.approval_comments += "超出请假时长:${(item.add_time - end_time).durationStr()}。" | |||
| item.color = "#ff4040" | |||
| } | |||
| } | |||
| logList.add(item) | |||
| } | |||
| } | |||
| @@ -141,7 +166,33 @@ data class LeaveActivity( | |||
| var type: Int = 0, | |||
| var unit_id: Int = 0, | |||
| var unit_name: String = "", | |||
| var add_user_type_name: String="" | |||
| var add_user_type_name: String = "", | |||
| var is_auto_pass: Int = 0, | |||
| var vacation_type: Int = 0, | |||
| var color: String = "", | |||
| val face_infos: MutableList<FaceInfo> = mutableListOf() | |||
| ) { | |||
| fun getInImg(): FaceInfo? { | |||
| val imgList = face_infos.filter { it.isImg() } | |||
| if (imgList.isNotEmpty()) { | |||
| return imgList[0] | |||
| } | |||
| return null | |||
| } | |||
| } | |||
| data class FaceInfo( | |||
| var attachment_name: String = "", | |||
| var attachment_id: String = "", | |||
| var identity: String = "" | |||
| ) { | |||
| fun isImg(): Boolean { | |||
| if (attachment_name.isNullOrBlank()) { | |||
| return false | |||
| } | |||
| if (attachment_name.endsWith(".jpg", true) || attachment_name.endsWith(".png", true)) { | |||
| return true | |||
| } | |||
| return false | |||
| } | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| package com.yzx.escreen.model | |||
| data class Vacation( | |||
| var vacation_time: Long = 0, | |||
| var vacation_type: Int = 2, | |||
| var vacation_remark: String = "", | |||
| var vacation_attachment: String = "", | |||
| var id: Int = 0 | |||
| ) | |||
| data class Attachment( | |||
| var name: String, | |||
| var id: String, | |||
| var identity: String | |||
| ){ | |||
| fun clear(){ | |||
| name ="" | |||
| id ="" | |||
| identity ="" | |||
| } | |||
| } | |||
| @@ -4,15 +4,9 @@ import com.blankj.utilcode.util.LogUtils | |||
| import com.lzy.okgo.OkGo | |||
| import com.lzy.okgo.model.Response | |||
| import com.yzx.escreen.config.Config | |||
| import com.yzx.escreen.model.LeaveID | |||
| import com.yzx.escreen.model.Pager | |||
| import com.yzx.escreen.model.StuLeave | |||
| import com.yzx.escreen.model.User | |||
| import com.yzx.escreen.model.* | |||
| import com.yzx.escreen.presenter.base.* | |||
| import com.yzx.webebook.config.YzxInterface | |||
| import com.yzx.escreen.presenter.base.BasePresenter | |||
| import com.yzx.escreen.presenter.base.IView | |||
| import com.yzx.escreen.presenter.base.JsonCallBack | |||
| import com.yzx.escreen.presenter.base.YzxResponse | |||
| class HomePresenter(view: HomeView) : BasePresenter<HomeView>(view) { | |||
| @@ -94,6 +88,35 @@ class HomePresenter(view: HomeView) : BasePresenter<HomeView>(view) { | |||
| }) | |||
| } | |||
| fun postVacation(data:Vacation){ | |||
| if(!User.isLogin()){ | |||
| return | |||
| } | |||
| val url = "${Config.BASE_URL}${YzxInterface.INTERFACE_STUDENT_POST_LEAVE_VACATION}" | |||
| OkGo.post<SimpleResponse>(url) | |||
| .tag(this) | |||
| .params("id", data.id) | |||
| .params("vacation_type", data.vacation_type) | |||
| .params("vacation_time", data.vacation_time) | |||
| .params("vacation_remark", data.vacation_remark) | |||
| .params("vacation_attachment", data.vacation_attachment) | |||
| .execute(object : JsonCallBack<SimpleResponse>() { | |||
| override fun onSuccess(response: Response<SimpleResponse>?) { | |||
| LogUtils.d(response) | |||
| if (response?.isSuccessful == true) { | |||
| mView?.postVacationSuccess("销假成功!") | |||
| } | |||
| } | |||
| override fun onError(response: Response<SimpleResponse>?) { | |||
| super.onError(response) | |||
| LogUtils.d(response) | |||
| mView?.postVacationError(response?.body()?.msg ?: "销假失败,请重试!") | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| @@ -103,4 +126,6 @@ interface HomeView : IView { | |||
| fun onLeaveDetailSuccess(detail: StuLeave) | |||
| fun onLeaveDetailError(error: String) | |||
| fun onLeaveIDsSuccess(list: MutableList<LeaveID>) | |||
| fun postVacationSuccess(msg: String) | |||
| fun postVacationError(msg: String) | |||
| } | |||
| @@ -0,0 +1,49 @@ | |||
| package com.yzx.escreen.utils | |||
| import com.lzy.okgo.OkGo | |||
| import com.lzy.okgo.callback.StringCallback | |||
| import com.lzy.okgo.model.Response | |||
| import com.yzx.escreen.model.User | |||
| import com.yzx.webebook.config.YzxInterface | |||
| import org.json.JSONObject | |||
| import java.io.File | |||
| object FileUpload { | |||
| fun upload(path: String, callBack: FileUploadCallBack) { | |||
| val user = User.getUser() | |||
| OkGo.post<String>(YzxInterface.FILE_UPLOAD_URL) | |||
| .tag(this) | |||
| .params("token", user.token) | |||
| .params("user", user.user_id) | |||
| .params("file", File(path)) | |||
| .execute(object : StringCallback() { | |||
| override fun onSuccess(response: Response<String>) { | |||
| try { | |||
| val noteJson = response.body() | |||
| val noteJsonObject = JSONObject(noteJson) | |||
| val noteContent = noteJsonObject.optString("content") | |||
| val noteContentObject = JSONObject(noteContent) | |||
| val noteKey = noteContentObject.optString("key") | |||
| val noteIdentity = noteContentObject.optString("identity") | |||
| callBack.onSuccess(noteIdentity, noteKey) | |||
| } catch (e: Exception) { | |||
| } | |||
| } | |||
| override fun onError(response: Response<String>) { | |||
| super.onError(response) | |||
| callBack.onError("上传失败") | |||
| } | |||
| override fun onFinish() { | |||
| super.onFinish() | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| interface FileUploadCallBack { | |||
| fun onSuccess(identity: String, key: String) | |||
| fun onError(msg: String) | |||
| } | |||
| @@ -0,0 +1,9 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <androidx.appcompat.widget.LinearLayoutCompat 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:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| tools:context=".activity.CameraActivity"> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| @@ -0,0 +1,206 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <FrameLayout 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:layout_width="match_parent" | |||
| android:layout_height="match_parent" | |||
| android:orientation="vertical"> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout | |||
| android:layout_width="1400dp" | |||
| android:layout_height="wrap_content" | |||
| android:minWidth="1400dp" | |||
| android:orientation="vertical" | |||
| app:qmui_backgroundColor="@color/white" | |||
| app:qmui_radius="@dimen/d_15"> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundFrameLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| app:qmui_backgroundColor="@color/colorPrimary" | |||
| app:qmui_radiusTopLeft="@dimen/d_15" | |||
| app:qmui_radiusTopRight="@dimen/d_15"> | |||
| <TextView | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:gravity="center" | |||
| android:padding="@dimen/d_28" | |||
| android:text="人工销假" | |||
| android:textColor="@color/white" | |||
| android:textSize="@dimen/sp20" | |||
| android:textStyle="bold" /> | |||
| </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundFrameLayout> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:layout_marginTop="@dimen/d_20" | |||
| android:orientation="horizontal"> | |||
| <RelativeLayout | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_weight="1"> | |||
| <ImageView | |||
| android:id="@+id/statusImg" | |||
| android:layout_width="200dp" | |||
| android:layout_height="200dp" | |||
| android:layout_alignParentEnd="true" | |||
| android:layout_marginEnd="40dp" /> | |||
| <LinearLayout | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:orientation="vertical"> | |||
| <LinearLayout style="@style/leave_dialog_row"> | |||
| <TextView | |||
| style="@style/leave_dialog_title" | |||
| android:text="请假学生" /> | |||
| <TextView | |||
| android:id="@+id/leave_student_name" | |||
| style="@style/leave_dialog_left_content" | |||
| android:text="颜小华" /> | |||
| </LinearLayout> | |||
| <LinearLayout style="@style/leave_dialog_row"> | |||
| <TextView | |||
| style="@style/leave_dialog_title" | |||
| android:text="班级" /> | |||
| <TextView | |||
| android:id="@+id/class_name" | |||
| style="@style/leave_dialog_left_content" | |||
| android:text="颜小华" /> | |||
| </LinearLayout> | |||
| <LinearLayout style="@style/leave_dialog_row"> | |||
| <TextView | |||
| style="@style/leave_dialog_title" | |||
| android:text="请假时间" /> | |||
| <TextView | |||
| android:id="@+id/add_time" | |||
| style="@style/leave_dialog_left_content" | |||
| android:textColor="@color/colorPrimary" | |||
| 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/vacation_time" | |||
| style="@style/leave_dialog_left_content" | |||
| android:text="2022年4月21日15:38:15" /> | |||
| </LinearLayout> | |||
| <LinearLayout style="@style/leave_dialog_row"> | |||
| <TextView | |||
| style="@style/leave_dialog_title" | |||
| android:text="附件" | |||
| android:paddingVertical="@dimen/d_10"/> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton | |||
| android:id="@+id/cameraBtn" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:text="点击拍照" | |||
| app:qmui_radius="@dimen/d_2" | |||
| android:paddingHorizontal="@dimen/d_20" | |||
| android:paddingVertical="@dimen/d_5"/> | |||
| </LinearLayout> | |||
| <LinearLayout | |||
| style="@style/leave_dialog_row" | |||
| android:paddingEnd="80dp"> | |||
| <TextView | |||
| style="@style/leave_dialog_title" | |||
| android:text="备注" /> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundFrameLayout | |||
| android:layout_width="0dp" | |||
| android:layout_height="wrap_content" | |||
| android:layout_weight="1" | |||
| app:qmui_borderColor="@color/colorPrimary" | |||
| app:qmui_radius="@dimen/d_5" | |||
| app:qmui_borderWidth="1dp" | |||
| android:focusable="true" | |||
| android:focusableInTouchMode="true" | |||
| android:padding="@dimen/d_1"> | |||
| <EditText | |||
| android:id="@+id/vacation_remark" | |||
| style="@style/leave_dialog_left_content" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="150dp" | |||
| android:background="@null" | |||
| android:gravity="top|left" | |||
| android:padding="@dimen/d_15" | |||
| android:text="2022年4月21日15:38:15" /> | |||
| </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundFrameLayout> | |||
| </LinearLayout> | |||
| </LinearLayout> | |||
| </RelativeLayout> | |||
| <com.qmuiteam.qmui.widget.QMUIRadiusImageView | |||
| android:id="@+id/face_img" | |||
| android:layout_width="180dp" | |||
| android:layout_height="222dp" | |||
| android:text="颜小华" | |||
| app:qmui_corner_radius="@dimen/d_5" | |||
| app:qmui_border_color="@color/white" | |||
| android:layout_marginEnd="100dp"/> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:gravity="center" | |||
| android:orientation="horizontal" | |||
| android:layout_marginTop="@dimen/d_30"> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton | |||
| android:id="@+id/closeBtn" | |||
| android:layout_width="300dp" | |||
| android:layout_height="80dp" | |||
| android:layout_gravity="center_horizontal" | |||
| android:layout_marginTop="@dimen/dp_40" | |||
| android:layout_marginBottom="@dimen/d_20" | |||
| android:padding="@dimen/d_10" | |||
| android:text="关闭" | |||
| android:textColor="@color/black" | |||
| android:textSize="@dimen/sp20" | |||
| app:qmui_borderColor="@color/gray" | |||
| app:qmui_radius="@dimen/d_5" /> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton | |||
| android:id="@+id/submitBtn" | |||
| android:layout_width="300dp" | |||
| android:layout_height="80dp" | |||
| android:layout_gravity="center_horizontal" | |||
| android:layout_marginStart="@dimen/d_30" | |||
| android:layout_marginTop="@dimen/dp_40" | |||
| android:layout_marginBottom="@dimen/d_20" | |||
| android:padding="@dimen/d_10" | |||
| android:text="确定销假" | |||
| android:textColor="@color/white" | |||
| android:textSize="@dimen/sp20" | |||
| app:qmui_backgroundColor="@color/colorPrimary" | |||
| app:qmui_borderColor="@color/colorPrimary" | |||
| app:qmui_radius="@dimen/d_5" /> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout> | |||
| </FrameLayout> | |||
| @@ -129,6 +129,22 @@ | |||
| app:qmui_backgroundColor="#fff" | |||
| app:qmui_borderColor="#dcdee0" /> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton | |||
| android:id="@+id/status4Btn" | |||
| style="@style/home_status_btn" | |||
| android:text="正常销假" | |||
| android:textColor="@color/gray_80" | |||
| app:qmui_backgroundColor="#fff" | |||
| app:qmui_borderColor="#dcdee0" /> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton | |||
| android:id="@+id/status5Btn" | |||
| style="@style/home_status_btn" | |||
| android:text="超时销假" | |||
| android:textColor="@color/gray_80" | |||
| app:qmui_backgroundColor="#fff" | |||
| app:qmui_borderColor="#dcdee0" /> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| @@ -185,6 +201,11 @@ | |||
| <TextView | |||
| style="@style/table_header" | |||
| android:text="申请时间" /> | |||
| <TextView | |||
| style="@style/table_header" | |||
| android:gravity="center" | |||
| android:text="操作" /> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| <View | |||
| @@ -251,6 +272,8 @@ | |||
| android:text="下一页" | |||
| android:textColor="#3ca0e9" | |||
| android:textSize="@dimen/sp18" /> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| </LinearLayout> | |||
| @@ -1,6 +1,6 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto" | |||
| xmlns:android="http://schemas.android.com/apk/res/android" | |||
| <LinearLayout 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:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| @@ -9,18 +9,20 @@ | |||
| <LinearLayout | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="match_parent" | |||
| android:orientation="vertical" | |||
| android:gravity="center_horizontal"> | |||
| android:gravity="center_horizontal" | |||
| android:orientation="vertical"> | |||
| <View | |||
| android:id="@+id/line1" | |||
| android:layout_width="1px" | |||
| android:layout_height="8dp" | |||
| android:background="@color/gray_1" /> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundFrameLayout | |||
| android:layout_width="@dimen/d_6" | |||
| android:layout_height="@dimen/d_6" | |||
| app:qmui_backgroundColor="#3ca0e9" | |||
| app:qmui_radius="@dimen/d_3"/> | |||
| app:qmui_radius="@dimen/d_3" /> | |||
| <View | |||
| android:id="@+id/line2" | |||
| @@ -34,9 +36,9 @@ | |||
| android:id="@+id/contentLayout" | |||
| android:layout_width="0dp" | |||
| android:layout_height="match_parent" | |||
| android:orientation="vertical" | |||
| android:layout_weight="1" | |||
| android:layout_marginStart="@dimen/d_20" | |||
| android:layout_weight="1" | |||
| android:orientation="vertical" | |||
| android:paddingBottom="@dimen/dp_40"> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| @@ -49,8 +51,8 @@ | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:textSize="@dimen/sp20" | |||
| tools:text="王大仙" | |||
| android:textStyle="bold" /> | |||
| android:textStyle="bold" | |||
| tools:text="王大仙" /> | |||
| <TextView | |||
| android:id="@+id/addUserTypeName" | |||
| @@ -58,55 +60,63 @@ | |||
| android:layout_height="wrap_content" | |||
| android:textColor="@color/colorPrimary" | |||
| android:textSize="@dimen/sp20" | |||
| tools:text="(学生家长)" | |||
| android:textStyle="bold" /> | |||
| android:textStyle="bold" | |||
| tools:text="(学生家长)" /> | |||
| <TextView | |||
| android:id="@+id/activityName" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:textSize="@dimen/sp20" | |||
| tools:text="提交申请" | |||
| android:textStyle="bold" /> | |||
| android:textStyle="bold" | |||
| tools:text="提交申请" /> | |||
| <TextView | |||
| android:id="@+id/statusName" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:textSize="@dimen/sp20" | |||
| tools:text="提交申请" | |||
| android:textStyle="bold" /> | |||
| android:textStyle="bold" | |||
| tools:text="提交申请" /> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| <TextView | |||
| android:id="@+id/approvalComments" | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| tools:text="审批人:颜小华。允许出校,请放行" | |||
| android:layout_marginTop="@dimen/dp_10" | |||
| android:textSize="@dimen/sp20" | |||
| android:layout_marginTop="@dimen/dp_10" /> | |||
| tools:text="审批人:颜小华。允许出校,请放行" /> | |||
| <androidx.appcompat.widget.LinearLayoutCompat | |||
| android:layout_width="match_parent" | |||
| android:layout_height="wrap_content" | |||
| android:orientation="horizontal" | |||
| android:layout_marginTop="@dimen/dp_10" | |||
| android:gravity="bottom" | |||
| android:layout_marginTop="@dimen/dp_10"> | |||
| android:orientation="horizontal"> | |||
| <ImageView | |||
| android:id="@+id/signImg" | |||
| android:layout_width="150dp" | |||
| android:layout_height="75dp" | |||
| android:background="@color/white" | |||
| android:layout_marginEnd="@dimen/dp_10"/> | |||
| android:layout_marginEnd="@dimen/dp_10" | |||
| android:background="@color/white" /> | |||
| <TextView | |||
| android:id="@+id/stepTime" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| tools:text="2022-4-21 15:50:42" | |||
| android:textColor="@color/gray" | |||
| android:textSize="@dimen/sp20" | |||
| android:textColor="@color/gray" /> | |||
| tools:text="2022-4-21 15:50:42" /> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| <ImageView | |||
| android:id="@+id/inImg" | |||
| android:layout_width="200dp" | |||
| android:layout_height="150dp" | |||
| android:layout_marginTop="@dimen/dp_10" | |||
| android:background="@color/white" | |||
| android:scaleType="centerCrop"/> | |||
| </LinearLayout> | |||
| </LinearLayout> | |||
| @@ -17,8 +17,8 @@ | |||
| android:id="@+id/studentName" | |||
| style="@style/table_cell" | |||
| android:layout_weight="1.5" | |||
| android:text="请假学生" | |||
| android:paddingStart="@dimen/dp_40"/> | |||
| android:paddingStart="@dimen/dp_40" | |||
| android:text="请假学生" /> | |||
| <FrameLayout | |||
| style="@style/table_cell" | |||
| @@ -29,8 +29,8 @@ | |||
| android:id="@+id/faceImg" | |||
| android:layout_width="@dimen/d_70" | |||
| android:layout_height="@dimen/d_70" | |||
| app:qmui_corner_radius="@dimen/d_5" | |||
| app:qmui_border_color="@color/white"/> | |||
| app:qmui_border_color="@color/white" | |||
| app:qmui_corner_radius="@dimen/d_5" /> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton | |||
| android:id="@+id/faceEmpty" | |||
| @@ -79,6 +79,28 @@ | |||
| android:id="@+id/applyTime" | |||
| style="@style/table_cell" | |||
| android:text="申请时间" /> | |||
| <FrameLayout style="@style/table_cell"> | |||
| <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton | |||
| android:id="@+id/cancelBtn" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center" | |||
| android:paddingHorizontal="@dimen/d_5" | |||
| android:paddingVertical="@dimen/d_3" | |||
| android:text="销假" | |||
| app:qmui_radius="@dimen/d_2" /> | |||
| <TextView | |||
| android:id="@+id/placeHolder" | |||
| android:layout_width="wrap_content" | |||
| android:layout_height="wrap_content" | |||
| android:layout_gravity="center" | |||
| android:text="--" | |||
| android:textColor="#333" | |||
| android:textSize="@dimen/sp18" /> | |||
| </FrameLayout> | |||
| </androidx.appcompat.widget.LinearLayoutCompat> | |||
| <View | |||
| @@ -2,7 +2,11 @@ | |||
| <resources> | |||
| <paths> | |||
| <root-path | |||
| name="camera_photos" | |||
| path="" /> | |||
| <external-path path="" name="download"/> | |||
| </paths> | |||
| </resources> | |||