43 lines
1.6 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="open-approve-details" :data-id="msg.data.id">
<b>{{ title }}</b>
<div class="cause">
<p>{{$L("状态")}}<b>{{ $L(statusText) }}</b></p>
<p>{{$L("申请人")}}<span class="mark-color">@{{ msg.data.start_nickname }}</span> {{ msg.data.department }}</p>
<b>{{$L("详情")}}</b>
<p v-if="msg.data.type">{{$L("类型")}}{{ $L(msg.data.type) }}</p>
<p v-if="msg.data.start_time">{{$L("开始时间")}}{{ msg.data.start_time }}<template v-if="msg.data.start_day_of_week"> ({{ $L(msg.data.start_day_of_week) }})</template></p>
<p v-if="msg.data.end_time">{{$L("结束时间")}}{{ msg.data.end_time }}<template v-if="msg.data.end_day_of_week"> ({{ $L(msg.data.end_day_of_week) }})</template></p>
<p v-if="msg.data.description">{{$L("事由")}}{{ msg.data.description }}</p>
</div>
</div>
</template>
<script>
export default {
props: {
msg: Object,
},
data() {
return {};
},
computed: {
title({msg}) {
const name = this.$L(msg.data.proc_def_name)
return msg.action === 'pass'
? this.$L('您发起的「(*)」已通过', name)
: this.$L('您发起的「(*)」被(*)拒绝', name, msg.data.nickname)
},
statusText({msg}) {
switch (msg.action) {
case 'pass': return '已通过';
case 'refuse': return '已拒绝';
case 'withdraw': return '已撤销';
default: return '处理中';
}
},
},
methods: {},
}
</script>