12 changed files with 249 additions and 26 deletions
@ -0,0 +1,72 @@ |
|||
<template> |
|||
<div class="h-full"> |
|||
<div class="text-base text-center font-semibold" style="height: 44px; line-height: 44px; background: rgb(248, 248, 248)">审核记录</div> |
|||
|
|||
<div class="p-3"> |
|||
<div class="bg-white p-3 text-gray-400 rounded-md" v-if="checkerList && checkerList.length"> |
|||
<div v-for="(item, index) in checkerList" :key="index" class="flex justify-between"> |
|||
<div> |
|||
<div class="mb-1 text-gray-800"> |
|||
{{ item.checkerName }} |
|||
</div> |
|||
<div class="mb-1 text-xs"> |
|||
{{ item.remark }} |
|||
</div> |
|||
<div class="text-xs" v-if="+item.checkTime > 0"> |
|||
{{ dayjs(+item.checkTime).format('MM-DD HH:mm') }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="flex flex-col justify-center"> |
|||
<div class="mb-1 text-green-600" v-if="item.status === 1">已通过</div> |
|||
<div class="mb-1 text-red-600" v-if="item.status === 2">已驳回</div> |
|||
<div v-if="+item.score > 0"> |
|||
<a-progress v-if="item.score" type="circle" :percent="item.score" strokeColor="#FA8C16" :width="40" :strokeWidth="10"> |
|||
<template #format="percent"> |
|||
<span |
|||
class="inline-block text-center text-white text-sm rounded-full" |
|||
style="background: #fa8c16; width: 24px; height: 24px; line-height: 24px" |
|||
> |
|||
{{ percent }} |
|||
</span> |
|||
</template> |
|||
</a-progress> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import { useStore } from 'vuex'; |
|||
import { ref, onMounted, computed, watch } from 'vue'; |
|||
import dayjs from 'dayjs'; |
|||
import { message } from 'ant-design-vue'; |
|||
import { queryCheckLog } from 'apis'; |
|||
|
|||
const store = useStore(); |
|||
const checkerList = ref([]); |
|||
const deliverRecordId = computed(() => store.state.task.deliverRecordId); |
|||
const sessionDeliverRecordId = sessionStorage.getItem('deliverRecordId'); |
|||
|
|||
onMounted(() => { |
|||
getQueryCheckLog(); |
|||
}); |
|||
|
|||
watch(deliverRecordId, () => { |
|||
getQueryCheckLog(); |
|||
}); |
|||
|
|||
async function getQueryCheckLog() { |
|||
try { |
|||
const { url } = store.state.projects.project; |
|||
const param = { param: { deliverRecordId: deliverRecordId.value || sessionDeliverRecordId } }; |
|||
const data = await queryCheckLog(param, url); |
|||
checkerList.value = data; |
|||
} catch (error) { |
|||
message.info('获取检查交付物历史失败'); |
|||
} |
|||
} |
|||
</script> |
|||
@ -0,0 +1,106 @@ |
|||
<template> |
|||
<div> |
|||
<div class="text-base text-center font-semibold" style="height: 44px; line-height: 44px; background: rgb(248, 248, 248)"> |
|||
交付物上传记录 |
|||
</div> |
|||
|
|||
<!-- 历史记录 --> |
|||
<div class="px-3 pt-1" v-if="listRef && listRef.length"> |
|||
<div class="bg-white my-2 rounded-md p-3 text-gray-400" v-for="(item, index) in listRef" :key="index"> |
|||
<!-- 插件名称和提交时间显示 --> |
|||
<div class="flex justify-between mb-2"> |
|||
<div class="text-gray-800">{{ deliverName }}</div> |
|||
<div class="text-xs">{{ dayjs(+item.submitTime).format('MM-DD HH:mm') }}</div> |
|||
</div> |
|||
|
|||
<!-- 提交的链接 --> |
|||
<div @click="openLink(item)" class="my-1 break-all text-blue-400 text-xs cursor-pointer" v-if="item.details[0]"> |
|||
{{ item.details[0] }} |
|||
</div> |
|||
|
|||
<!-- 该插件物的审核人 --> |
|||
<div class="mb-1 mt-3">审核人</div> |
|||
|
|||
<div class="flex justify-between mb-2" v-for="(checkItem, checkIndex) in item.checkerList" :key="checkIndex"> |
|||
<div> |
|||
<div class="mb-1 text-gray-800 font-semibold"> |
|||
{{ checkItem.checkerName }} |
|||
</div> |
|||
<div class="mb-1 text-xs"> |
|||
{{ checkItem.remark }} |
|||
</div> |
|||
<div class="mb-1 text-xs" v-if="+checkItem.checkTime > 0"> |
|||
{{ dayjs(+checkItem.checkTime).format('MM-DD HH:mm') }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="text-center text-xs"> |
|||
<div v-if="checkItem.status == null" class="text-gray-400">待审核</div> |
|||
<div v-else-if="checkItem.status === 1"> |
|||
<div class="text-green-600 mb-1">已通过</div> |
|||
|
|||
<a-progress |
|||
v-if="checkItem.score" |
|||
type="circle" |
|||
:percent="checkItem.score" |
|||
strokeColor="#FA8C16" |
|||
:width="40" |
|||
:strokeWidth="10" |
|||
> |
|||
<template #format="percent"> |
|||
<span |
|||
class="inline-block text-center text-white text-sm rounded-full" |
|||
style="background: #fa8c16; width: 24px; height: 24px; line-height: 24px" |
|||
> |
|||
{{ percent }} |
|||
</span> |
|||
</template> |
|||
</a-progress> |
|||
</div> |
|||
<div class="text-red-600" v-else>已驳回</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import { useStore } from 'vuex'; |
|||
import { ref, onMounted, computed, watch } from 'vue'; |
|||
import dayjs from 'dayjs'; |
|||
import { message } from 'ant-design-vue'; |
|||
import { getDeliverHistory } from 'apis'; |
|||
|
|||
const store = useStore(); |
|||
const listRef = ref([]); |
|||
const deliverName = ref(''); |
|||
const deliverId = computed(() => store.state.task.deliverId); |
|||
const sessionDeliverId = sessionStorage.getItem('deliverId'); |
|||
|
|||
onMounted(() => { |
|||
getHistory(); |
|||
}); |
|||
|
|||
watch(deliverId, () => { |
|||
getHistory(); |
|||
}); |
|||
|
|||
async function getHistory() { |
|||
try { |
|||
const { url } = store.state.projects.project; |
|||
const param = { param: { deliverId: deliverId.value || sessionDeliverId } }; |
|||
const data = await getDeliverHistory(param, url); |
|||
deliverName.value = data.deliverName; |
|||
listRef.value = data.deliverRecordList; |
|||
} catch (error) { |
|||
message.info('获取交付物历史失败'); |
|||
} |
|||
} |
|||
|
|||
// 交付物链接 |
|||
function openLink(item) { |
|||
console.log(item.details[0]); |
|||
window.open(item.details[0], '_blank'); |
|||
} |
|||
</script> |
|||
Loading…
Reference in new issue