app/src/main/java/cn/flightfeather/thirdapp/module/inspection/InspectionFragment.kt
@@ -15,13 +15,12 @@
import cn.flightfeather.thirdapp.R
import cn.flightfeather.thirdapp.activity.UploadMediaFilesActivity
import cn.flightfeather.thirdapp.adapter.TaskListAdapter
import cn.flightfeather.thirdapp.bean.Subtask
import cn.flightfeather.thirdapp.bean.entity.Subtask
import cn.flightfeather.thirdapp.bean.vo.DayTaskProgressVo
import cn.flightfeather.thirdapp.module.base.BaseFragment
import cn.flightfeather.thirdapp.util.DateFormatter
import cn.flightfeather.thirdapp.util.DialogUtil
import cn.flightfeather.thirdapp.util.slideswaphelper.PlusItemSlideCallback
import cn.flightfeather.thirdapp.util.slideswaphelper.WItemTouchHelperPlus
import cn.flightfeather.thirdapp.util.Domain
import com.haibin.calendarview.Calendar
import com.haibin.calendarview.CalendarView
import kotlinx.android.synthetic.main.fragment_inspection2.*
@@ -47,7 +46,7 @@
    //当前选中的日期
    private var curDate = Date()
    lateinit var subTaskListAdapter: TaskListAdapter
    private lateinit var subTaskListAdapter: TaskListAdapter
    private var loadingDialog: Dialog? = null
@@ -84,10 +83,10 @@
        viewModel.dayTaskList.observe(this, Observer {
            // 2019/7/29 在日历上添加标记点
            it?.let {
                closeLoading()
                curDayTaskList = it
                addScheme(it)
                refreshText(it)
//                closeLoading()
            }
        })
@@ -126,7 +125,6 @@
    }
    private fun refreshSubTaskList(newSubTaskList: ArrayList<Subtask> = arrayListOf(), taskDate:Date) {
        closeLoading()
        curSubTaskList.clear()
        with(curDayTaskList) breaking@{
            forEach {
@@ -153,8 +151,16 @@
                extension3 = "0"
            })
        }
        curSubTaskList.addAll(newSubTaskList)
        curSubTaskList.addAll(newSubTaskList.sortedBy {
            when (it.status) {
                Domain.TASK_STATUS_WAITING -> 1
                Domain.TASK_STATUS_RUNNING -> 2
                Domain.TASK_STATUS_FINISHED -> 3
                else -> -1
            }
        })
        subTaskListAdapter.notifyDataSetChanged()
        closeLoading()
    }
    /**
     * 初始化日历控件
@@ -316,9 +322,9 @@
            }
        }
        Handler().postDelayed({
            closeLoading()
        }, 5000)
//        Handler().postDelayed({
//            closeLoading()
//        }, 10000)
    }
    private fun closeLoading() {