import { defineComponent, reactive, ref } from 'vue' import styles from './approval-item.module.less' import clockIcon from '@/school/attendance/images/clock-icon.png' import passIcon from '../images/pass-icon.png' import unpassIcon from '../images/unpass-icon.png' import defaultIcon from '@/school/images/default-icon.jpg' import msgIcon from '@/school/images/msg-icon.png' import { Icon, ActionSheet, showToast } from 'vant' import dayjs from 'dayjs' import { useRouter } from 'vue-router' import { postMessage } from '@/helpers/native-message' export default defineComponent({ props: ['item', 'type'], name: 'approval-item', setup(props) { const router = useRouter() const gotoStudentDetail = () => { // router.push({ path: '/student-att-day', query: { time: props.item.time } }) } const gotoMsg = async () => { console.log(props.item) try { await postMessage({ api: 'joinChatGroup', content: { type: 'single', // single 单人 multi 多人 id: props.item.imUserId } }) } catch (e) { showToast('发起聊天失败') } } return () => ( <>

{dayjs(props.item.createTime).format('YYYY-MM-DD hh:mm')}

{props.type == 'end' && props.item.status == 'PASS' ? (

通过

) : null} {props.type == 'end' && props.item.status == 'UNPASS' ? (

拒绝

) : null} {props.type == 'doing' && props.item.status == 'DOING' ? (
) : null}

{props.item.nickName}

{props.item.clientType == 'STUDENT' ? (

学生

) : (

老师

)}
{props.item.leaveCategoryId == 1 ?

请假

: null} {props.item.leaveCategoryId == 2 ?

退团

: null} {props.type != 'doing' ? : null}
) } })