|
@@ -86,6 +86,16 @@
|
|
|
<el-card shadow="never">
|
|
<el-card shadow="never">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
+ <!-- 发牌信息显示 -->
|
|
|
|
|
+<!-- <el-col :span="24" style="font-size: 14px; color: #333; margin-bottom: 6px;">
|
|
|
|
|
+ <strong>发牌信息:</strong>
|
|
|
|
|
+ <span v-html="blindsInfoText"></span>
|
|
|
|
|
+ </el-col>-->
|
|
|
|
|
+ <el-col :span="24" style="font-size: 14px; color: #333; margin-bottom: 6px;">
|
|
|
|
|
+ <strong>公共牌:</strong>
|
|
|
|
|
+ <span v-html="publicInfoText"></span>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+
|
|
|
<!-- <el-col :span="1.5">
|
|
<!-- <el-col :span="1.5">
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:history:add']">新增</el-button>
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:history:add']">新增</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -109,18 +119,23 @@
|
|
|
<el-table v-loading="loading" border :data="historyList" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="loading" border :data="historyList" @selection-change="handleSelectionChange">
|
|
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
|
<el-table-column label="" align="center" prop="id" v-if="false" />
|
|
<el-table-column label="" align="center" prop="id" v-if="false" />
|
|
|
- <el-table-column label="事件" align="center" prop="operateText" />
|
|
|
|
|
- <el-table-column label="公共牌" align="center" prop="publicBrand" />
|
|
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
- <!-- <template #default="scope">
|
|
|
|
|
|
|
+ <!-- 事件列:自定义渲染,高亮“小盲”和“大盲” -->
|
|
|
|
|
+ <el-table-column label="事件" align="left">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-html="highlightBlinds(scope.row.operateText)"></span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+<!-- <el-table-column label="公共牌" align="center" prop="publicBrand" />-->
|
|
|
|
|
+<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
+ <!– <template #default="scope">
|
|
|
<el-tooltip content="修改" placement="top">
|
|
<el-tooltip content="修改" placement="top">
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:history:edit']"></el-button>
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:history:edit']"></el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
<el-tooltip content="删除" placement="top">
|
|
<el-tooltip content="删除" placement="top">
|
|
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:history:remove']"></el-button>
|
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:history:remove']"></el-button>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
- </template>-->
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
|
+ </template>–>
|
|
|
|
|
+ </el-table-column>-->
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
@@ -184,7 +199,10 @@ const total = ref(0);
|
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
|
const historyFormRef = ref<ElFormInstance>();
|
|
const historyFormRef = ref<ElFormInstance>();
|
|
|
const showMore = ref(false); // 定义 showMore 状态
|
|
const showMore = ref(false); // 定义 showMore 状态
|
|
|
-
|
|
|
|
|
|
|
+// 响应式变量
|
|
|
|
|
+const blindsInfoText = ref<string>('');
|
|
|
|
|
+//公共牌
|
|
|
|
|
+const publicInfoText = ref<string>('');
|
|
|
const dialog = reactive<DialogOption>({
|
|
const dialog = reactive<DialogOption>({
|
|
|
visible: false,
|
|
visible: false,
|
|
|
title: ''
|
|
title: ''
|
|
@@ -255,6 +273,19 @@ const getList = async () => {
|
|
|
/* queryParams.value.tournamentId = 5147;
|
|
/* queryParams.value.tournamentId = 5147;
|
|
|
queryParams.value.historyId = 46569;*/
|
|
queryParams.value.historyId = 46569;*/
|
|
|
const res = await listHistory2(queryParams.value);
|
|
const res = await listHistory2(queryParams.value);
|
|
|
|
|
+
|
|
|
|
|
+ // ✅ 提取第一条数据的 parseBlindsInfo
|
|
|
|
|
+ if (res.rows && res.rows.length > 0 && res.rows[0]?.parseBlindsInfo) {
|
|
|
|
|
+ blindsInfoText.value = highlightBlinds(res.rows[0].parseBlindsInfo);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ blindsInfoText.value = '';
|
|
|
|
|
+ }
|
|
|
|
|
+ if (res.rows && res.rows.length > 0 && res.rows[0]?.publicBrand) {
|
|
|
|
|
+ publicInfoText.value = highlightBlinds(res.rows[0].publicBrand);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ publicInfoText.value = '';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
historyList.value = res.rows;
|
|
historyList.value = res.rows;
|
|
|
total.value = res.total;
|
|
total.value = res.total;
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
@@ -430,6 +461,7 @@ const tournamentInfo = ref<Partial<TournamentsVO>>({
|
|
|
await getList(); // 如果 getList 也是异步函数,这里也使用 await
|
|
await getList(); // 如果 getList 也是异步函数,这里也使用 await
|
|
|
});*/
|
|
});*/
|
|
|
|
|
|
|
|
|
|
+
|
|
|
watch(
|
|
watch(
|
|
|
() => route.query,
|
|
() => route.query,
|
|
|
async (newQuery) => {
|
|
async (newQuery) => {
|
|
@@ -467,6 +499,14 @@ const handleTableClick = (table: any) => {
|
|
|
queryParams.value.historyId = table.id;
|
|
queryParams.value.historyId = table.id;
|
|
|
getList();
|
|
getList();
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+// 高亮小盲、大盲
|
|
|
|
|
+function highlightBlinds(text: string): string {
|
|
|
|
|
+ if (!text) return '';
|
|
|
|
|
+ return text
|
|
|
|
|
+ .replace(/小盲/g, '<span style="color: blue; font-weight: bold;">小盲</span>')
|
|
|
|
|
+ .replace(/大盲/g, '<span style="color: red; font-weight: bold;">大盲</span>');
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.table-card {
|
|
.table-card {
|