[6.10.0]数据落盘增加快速重复点击判断
This commit is contained in:
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.diskcopy.adapter.DiskCopyCalendarAdapter
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import kotlinx.android.synthetic.main.view_disk_copy.view.groupDateSelect
|
||||
@@ -91,47 +92,55 @@ class DiskCopyView @JvmOverloads constructor(
|
||||
rvCalendar.layoutManager = gridLayoutManager
|
||||
//拷贝状态
|
||||
tvCopyStatus.setOnClickListener {
|
||||
when (copyStatus) {
|
||||
1 -> {
|
||||
//开始拷贝数据
|
||||
val result = CallerAutoPilotControlManager.sendCopyBagCopyDate(currentCopyDate)
|
||||
if(result){
|
||||
ToastUtils.showShort("已发起拷贝")
|
||||
}else{
|
||||
ToastUtils.showShort("拷贝命令发送失败")
|
||||
if(ClickUtils.isFastClick()){
|
||||
when (copyStatus) {
|
||||
1 -> {
|
||||
//开始拷贝数据
|
||||
val result = CallerAutoPilotControlManager.sendCopyBagCopyDate(currentCopyDate)
|
||||
if(result){
|
||||
ToastUtils.showShort("已发起拷贝")
|
||||
}else{
|
||||
ToastUtils.showShort("拷贝命令发送失败")
|
||||
}
|
||||
}
|
||||
2 -> {
|
||||
//拷贝中
|
||||
ToastUtils.showShort("正在拷贝中...")
|
||||
}
|
||||
3 -> {
|
||||
//拷贝成功
|
||||
ToastUtils.showShort("当前日期数据已拷贝成功")
|
||||
}
|
||||
4 -> {
|
||||
//剩余空间不足
|
||||
ToastUtils.showShort("当前硬盘剩余空间不足")
|
||||
}
|
||||
5 -> {
|
||||
//所选日期无法拷贝
|
||||
ToastUtils.showShort("所选日期无法拷贝")
|
||||
}
|
||||
}
|
||||
2 -> {
|
||||
//拷贝中
|
||||
ToastUtils.showShort("正在拷贝中...")
|
||||
}
|
||||
3 -> {
|
||||
//拷贝成功
|
||||
ToastUtils.showShort("当前日期数据已拷贝成功")
|
||||
}
|
||||
4 -> {
|
||||
//剩余空间不足
|
||||
ToastUtils.showShort("当前硬盘剩余空间不足")
|
||||
}
|
||||
5 -> {
|
||||
//所选日期无法拷贝
|
||||
ToastUtils.showShort("所选日期无法拷贝")
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
}
|
||||
}
|
||||
//拔出硬盘
|
||||
ivDiskUnplug.setOnClickListener {
|
||||
if(copyStatus == 2){
|
||||
//如果处于拷贝中,弹出终止数据拷贝确认提示窗
|
||||
CallerHmiManager.showTerminateCopyDataDialog()
|
||||
}else{
|
||||
//如果处于未拷贝状态,则调用硬盘安全弹出请求
|
||||
val result = CallerAutoPilotControlManager.sendCopyBagSafeUnmount()
|
||||
if(result){
|
||||
ToastUtils.showShort("硬盘安全弹出命令已发送")
|
||||
if(ClickUtils.isFastClick()){
|
||||
if(copyStatus == 2){
|
||||
//如果处于拷贝中,弹出终止数据拷贝确认提示窗
|
||||
CallerHmiManager.showTerminateCopyDataDialog()
|
||||
}else{
|
||||
ToastUtils.showShort("硬盘安全弹出命令发送失败")
|
||||
//如果处于未拷贝状态,则调用硬盘安全弹出请求
|
||||
val result = CallerAutoPilotControlManager.sendCopyBagSafeUnmount()
|
||||
if(result){
|
||||
ToastUtils.showShort("硬盘安全弹出命令已发送")
|
||||
}else{
|
||||
ToastUtils.showShort("硬盘安全弹出命令发送失败")
|
||||
}
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort("请勿连续点击,稍后再试")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user