pull/480/head
liting 2024-06-12 22:50:18 +08:00
parent 382e31d530
commit 076b39f7eb
1 changed files with 25 additions and 14 deletions

View File

@ -146,24 +146,25 @@
<Dialog title="审核记录" v-model="dialogVisible2"> <Dialog title="审核记录" v-model="dialogVisible2">
<ContentWrap> <ContentWrap>
<el-timeline> <el-timeline>
<el-timeline-item v-for="(log, index) in logList" :key="index" :timestamp="formatDate(log.createTime)" <el-timeline-item :timestamp="formatDate(log.createTime)" placement="top" v-for="(log, index) in logList"
placement="top"> :key="index">
<div class="el-timeline-right-content"> <el-card>
<el-tag class="mr-10px" type="success">{{ log.userName }}</el-tag> <div>{{ log.creatorName }}</div>
{{ log.action }} <p>{{ log.comment }}</p>
</div> <el-tag class="mr-10px" type="danger" v-if="log.status == '0'"></el-tag>
<template #dot> <el-tag class="mr-10px" type="success" v-if="log.status == '1'"></el-tag>
</el-card>
</template>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
<div v-if="logList.length == 0"> </div> <div v-if="logList.length == 0"> </div>
</ContentWrap> </ContentWrap>
</Dialog> </Dialog>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<MainForm ref="formRef" @success="getList" />0 <MainForm ref="formRef" @success="getList" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -199,7 +200,17 @@ const queryParams = reactive({
technicalField: undefined, technicalField: undefined,
year: undefined, year: undefined,
}) })
/** 获得 userType 颜色 */
const getUserTypeColor = (type: any) => {
switch (type) {
case '1':
return '#67C23A'
case '0':
return '#E6A23C'
}
return '#409EFF'
}
const queryParams1 = reactive({ const queryParams1 = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -327,8 +338,7 @@ const handleRecord = async (id: number) => {
dialogVisible2.value = true dialogVisible2.value = true
try { try {
const data = await MainApi.getAuditList({ id: id }) const data = await MainApi.getAuditList({ id: id })
console.log(data) logList.value = data
logList.value = data.list
} finally { } finally {
loading.value = false loading.value = false
@ -353,4 +363,5 @@ const handleExport = async () => {
onMounted(() => { onMounted(() => {
getList() getList()
}) })
</script> </script>