102 lines
2.3 KiB
Vue
102 lines
2.3 KiB
Vue
<template>
|
|
<view>
|
|
<uni-card spacing="0">
|
|
<view style="height: 72vh">
|
|
<zb-table
|
|
ref="zbTableRef"
|
|
isShowLoadMore
|
|
stripe
|
|
:fit="false"
|
|
:columns="column"
|
|
:cellStyle="setCellStyle"
|
|
:cellHeaderStyle="setCellHeaderStyle"
|
|
:data="listData"
|
|
@detail="handleDetail"
|
|
@pullUpLoading="pullUpLoadingAction"
|
|
></zb-table>
|
|
</view>
|
|
</uni-card>
|
|
<period-check-detail-popup :show="detailShow" :checkInfo="checkInfo" @close="detailShow = false" />
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref, reactive, onMounted, watch, computed } from 'vue'
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
import { setCellHeaderStyle, setCellStyle } from '@/nx/config/zbTable'
|
|
import PeriodCheckDetailPopup from './detail.vue'
|
|
import { list } from './period.api'
|
|
import { useListData } from '@/nx/hooks/usePageListData'
|
|
import nx from '@/nx'
|
|
|
|
const column = reactive([
|
|
{
|
|
label: '核查日期',
|
|
name: 'checkDate',
|
|
width: 120
|
|
},
|
|
{
|
|
label: '核查人',
|
|
name: 'checkPersonName',
|
|
width: 120
|
|
},
|
|
{
|
|
label: '核查方法',
|
|
name: 'checkAccording',
|
|
width: 120
|
|
},
|
|
{
|
|
label: '期间核查频次',
|
|
name: 'frequencyRemark',
|
|
width: 200
|
|
},
|
|
{
|
|
name: 'operation',
|
|
type: 'operation',
|
|
label: '操作',
|
|
renders: [{ name: '详情', func: 'detail' }]
|
|
}
|
|
])
|
|
const deviceId = ref('')
|
|
const deviceText = ref('')
|
|
|
|
onMounted(() => {
|
|
const { id, deviceName } = nx.$store('biz').deviceInfo
|
|
deviceId.value = id
|
|
deviceText.value = deviceName
|
|
getInitData()
|
|
})
|
|
const searchParams = computed(() => ({
|
|
deviceId: deviceId.value,
|
|
effectiveFlag: '1',
|
|
wfStatus: 'finished',
|
|
cancelFlag: '0'
|
|
}))
|
|
const { listData, loadingData, scrollToLower, loadStatus, getInitData } = useListData({
|
|
searchParams,
|
|
api: list
|
|
})
|
|
const zbTableRef = ref()
|
|
function pullUpLoadingAction() {
|
|
if (loadingData.value) return
|
|
if (loadStatus.value === 'nomore') {
|
|
zbTableRef.value.pullUpCompleteLoading('ok')
|
|
} else {
|
|
scrollToLower()
|
|
}
|
|
}
|
|
|
|
const detailShow = ref(false)
|
|
const checkInfo = ref({})
|
|
function handleDetail(row) {
|
|
checkInfo.value = row
|
|
detailShow.value = true
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
:deep(.zb-table uni-button[type='primary']) {
|
|
background-color: $uni-color-primary !important;
|
|
}
|
|
</style>
|