|
|
@@ -76,10 +76,11 @@
|
|
|
</template>
|
|
|
|
|
|
<template #columns>
|
|
|
- <a-table-column :width="80">
|
|
|
+ <a-table-column :width="100">
|
|
|
<template #cell="{ record }">
|
|
|
<div>
|
|
|
- <a-tag color="arcoblue" v-if="record.uuid === user.uuid" size="small">我的记录</a-tag>
|
|
|
+ <a-tag color="orangered" v-if="record.uuid === user.uuid && record.run_mode === 'manual'" size="small">手动乐跑</a-tag>
|
|
|
+ <a-tag color="arcoblue" v-else-if="record.uuid === user.uuid" size="small">自动乐跑</a-tag>
|
|
|
<a-tag color="orangered" size="small" v-else>关联记录</a-tag>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -143,7 +144,7 @@
|
|
|
</a-table-column>
|
|
|
<a-table-column title="" :width="100" fixed="right">
|
|
|
<template #cell="{ record }">
|
|
|
- <a-button @click="$router.push(`/lepao/recordDetail/${record.id}`)">查看详情</a-button>
|
|
|
+ <a-button @click="openDetail(record)">查看详情</a-button>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
</template>
|
|
|
@@ -155,14 +156,16 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, reactive, onMounted, h } from 'vue'
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
import { lepaoRecords } from '@/api/lepao'
|
|
|
-import { Notification } from '@arco-design/web-vue'
|
|
|
+import { Notification, Message } from '@arco-design/web-vue'
|
|
|
import { IconSearch } from '@arco-design/web-vue/es/icon'
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
import { getNotice, getSemesterTimestamps } from '@/utils/util'
|
|
|
|
|
|
const notice = ref('')
|
|
|
+const router = useRouter()
|
|
|
|
|
|
const GetNotice = async () => {
|
|
|
const { path } = useRoute()
|
|
|
@@ -235,6 +238,14 @@ const getRecords = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const openDetail = (record) => {
|
|
|
+ const key = record.public_id || record.id
|
|
|
+ if (!key) {
|
|
|
+ return Message.warning('该记录缺少可用标识,无法打开详情')
|
|
|
+ }
|
|
|
+ return router.push(`/lepao/recordDetail/${encodeURIComponent(String(key))}`)
|
|
|
+}
|
|
|
+
|
|
|
// 分页 - 页码变化
|
|
|
const handlePageChange = (page) => {
|
|
|
pagination.current = page
|