<template>
    <hc-sys class="hc-my-record-page" navBarUi='nav-bar-white'>
        <template #navBar>
            <hc-nav-back-bar title="填报记录">
                <text @click="setDataClick" class="i-ri-more-fill text-50"/>
            </hc-nav-back-bar>
        </template>
        <!-- 时间轴记录 -->
        <view class="hc-record-time-line">
            <view class="time-line-item">
                <view class="item-icon">
                    <view class="dot"/>
                </view>
                <view class="item-content">
                    <view class="time">2023-08-14</view>
                    <view class="card">
                        <view class="title">WBS单位节点名称</view>
                        <view class="text">分部名称>分项名称>工序名称</view>
                    </view>
                    <view class="card">
                        <view class="title">K0+000~K1+050泗孟隧道（矿山、新奥法）</view>
                        <view class="text">洞口工程>K0+000~K1+050明洞防水层 >明洞防水层</view>
                    </view>
                </view>
            </view>
            <view class="time-line-item">
                <view class="item-icon">
                    <view class="dot"/>
                </view>
                <view class="item-content">
                    <view class="time">2023-08-12</view>
                    <view class="card">
                        <view class="title">K0+000~K1+050泗孟隧道（矿山、新奥法）</view>
                        <view class="text">洞口工程>K0+000~K1+050明洞防水层 >明洞防水层</view>
                    </view>
                </view>
            </view>
            <view class="time-line-item">
                <view class="item-icon">
                    <view class="dot"/>
                </view>
                <view class="item-content">
                    <view class="time">2023-08-11</view>
                    <view class="card">
                        <view class="title">K0+000~K1+050泗孟隧道（矿山、新奥法）</view>
                        <view class="text">洞口工程>K0+000~K1+050明洞防水层 >明洞防水层</view>
                    </view>
                </view>
            </view>
            <view class="time-line-item no-data">
                <view class="item-icon">
                    <view class="dot"/>
                </view>
                <view class="item-content">
                    <view class="time">更早的时间</view>
                    <view class="card">暂无更多数据</view>
                </view>
            </view>
        </view>
        <!-- 普通弹窗 -->
        <uni-popup ref="popupRef" class="hc-popup" type="bottom">
            <view class="hc-popup-content">
                <view class="title">清除填报记录？</view>
                <view class="popup-btn-bar">
                    <button type="primary" class="popup-btn c1" @click="setPurgeClick">清除记录</button>
                </view>
                <view class="popup-btn-bar">
                    <button type="primary" class="popup-btn c3" @click="cancelPopup">取消</button>
                </view>
            </view>
        </uni-popup>
    </hc-sys>
</template>

<script setup>
import {ref} from "vue";
import {onLoad} from '@dcloudio/uni-app'
import {useAppStore} from "@/store";
import {errorToast} from "@/utils/tools";

//初始变量
const store = useAppStore()
const userInfo = ref(store.userInfo);
const projectId = ref(store.projectId);
const contractId = ref(store.contractId);

//渲染完成
onLoad(() => {

})

//展开操作弹窗
const popupRef = ref(null)
const setDataClick = () => {
    popupRef.value?.open()
}

//清除记录
const setPurgeClick = async () => {
    popupRef.value?.close()
    errorToast('暂不支持清除记录')
}

//取消并关闭
const cancelPopup = () => {
    popupRef.value?.close()
}
</script>

<style lang="scss" scoped>
page {
    background: #EFEFF4;
}
</style>

<style lang="scss">
@import "@/style/my/record.scss";
</style>
