<template>
    <up-collapse-item title="考核记录（2）">
        <global-page
            :fixed="false"
            :height="height"
            :showNavbar="false"
            :custom="false"
            isDataList
            refresherEnabled
            loadingMoreEnabled
            :api="getRqmListApi"
            auto
        >
            <template #="{ dataList }">
                <view v-for="item in dataList" :key="item.id" class="item" @tap="goDetails(item)">
                    <view class="item-title">
                        <view class="desc">
                            <custom-state :value="item.status == 1 ? 'OPEN' : 'CLOSE'"></custom-state>
                            <view class="txt">{{ item.appraisee != '-1' ? item.appraisee : '' }}</view>
                            <view class="place">{{ item.department != '-1' ? item.department : '' }}</view>
                        </view>
                        <custom-score v-if="item.score != -1" :count="item.score" :type="item.eventType == 1 ? 'success' : 'warning'"></custom-score>
                    </view>
                    <view class="item-content u-line-3">
                        {{ item.eventMsg || '无' }}
                    </view>
                </view>
            </template>
        </global-page>
    </up-collapse-item>
</template>

<script setup>
import { getRqmListApi } from 'mocp/api/appraisal-record'

const ps = defineProps({
    height: {
        type: String,
        default: ''
    }
})
//跳转
const goDetails = (data) => {
    uni.$mocpJump.navigateTo('/panel/appraisal-record/details', {
        id: data.id
    })
}
</script>
<style lang="scss" scoped></style>
