修改检验项目设置的样式风格

This commit is contained in:
2025-12-22 10:33:14 +08:00
parent e832b6d38e
commit c1074fc4fb
2 changed files with 103 additions and 50 deletions

View File

@@ -116,11 +116,28 @@
<td><span class="status-tag" :class="item.display === '是' ? 'status-yes' : 'status-no'">{{ item.display }}</span></td>
<td><span class="status-tag" :class="item.enabled === '是' ? 'status-yes' : 'status-no'">{{ item.enabled }}</span></td>
<td>{{ item.operator }}</td>
<td>
<div class="action-icons">
<el-button type="text" @click="handleEdit(item)"><el-icon><Edit /></el-icon></el-button>
<el-button type="text" @click="handleView(item)"><el-icon><View /></el-icon></el-button>
<el-button type="text" @click="handleDelete(item)"><el-icon><Delete /></el-icon></el-button>
<td class="action-cell">
<div class="action-btns">
<button class="action-btn edit-btn" @click="handleEdit(item)">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path>
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>
</svg>
</button>
<button class="action-btn view-btn" @click="handleView(item)">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
<circle cx="12" cy="12" r="3"></circle>
</svg>
</button>
<button class="action-btn delete-btn" @click="handleDelete(item)">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="3 6 5 6 21 6"></polyline>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
<line x1="10" y1="11" x2="10" y2="17"></line>
<line x1="14" y1="11" x2="14" y2="17"></line>
</svg>
</button>
</div>
</td>
</tr>
@@ -146,7 +163,6 @@
<script setup>
import { ref, reactive, computed, onMounted } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { Edit, View, Delete } from '@element-plus/icons-vue';
import { getLocationTree } from '@/views/charge/outpatientregistration/components/outpatientregistration';
// 创建路由实例
@@ -590,25 +606,56 @@ tr:hover {
color: var(--danger);
}
/* 操作图标 */
.action-icons {
/* 操作 */
.action-cell {
display: flex;
justify-content: center;
gap: 8px;
position: relative;
z-index: 10;
}
.action-btns {
display: flex;
justify-content: center;
gap: 8px;
}
.action-icons .el-button {
color: var(--danger);
padding: 0;
width: 24px;
height: 24px;
.action-btn {
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border: none;
transition: all 0.2s ease;
font-size: 16px;
font-weight: bold;
position: relative;
z-index: 10;
background-color: #66b1ff;
color: white;
}
.action-icons .el-button:hover {
background-color: #fff2f0;
color: var(--danger);
.edit-btn {
background-color: #FFC107;
color: white;
font-size: 14px;
}
.view-btn {
background-color: #1890FF;
color: white;
}
.delete-btn {
background-color: #FF4D4F;
color: white;
font-size: 14px;
z-index: 20;
pointer-events: auto;
}
/* 分页样式 */

View File

@@ -138,11 +138,12 @@
class="action-btn delete-btn"
@click="handleDelete(row.id)"
>
<svg v-if="editingRowId === row.id" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="3 6 5 6 21 6"></polyline>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
<line x1="10" y1="11" x2="10" y2="17"></line>
<line x1="14" y1="11" x2="14" y2="17"></line>
</svg>
<span v-else>×</span>
</div>
</td>
</tr>
@@ -361,7 +362,6 @@
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path>
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>
</svg>
编辑
</div>
</template>
<div
@@ -369,13 +369,12 @@
@click="deleteItem(item.id)"
v-if="!editingRowId || editingRowId === item.id"
>
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="3 6 5 6 21 6"></polyline>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
<line x1="10" y1="11" x2="10" y2="17"></line>
<line x1="14" y1="11" x2="14" y2="17"></line>
</svg>
删除
</div>
</td>
</tr>
@@ -1881,45 +1880,52 @@ watch(packageItems, (newVal) => {
/* 操作列 */
.action-cell {
display: flex;
justify-content: center;
gap: 8px;
align-items: center;
position: relative;
z-index: 10;
}
.action-btn {
width: 24px;
height: 24px;
border-radius: 4px;
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: #666;
transition: all 0.2s;
border: none;
transition: all 0.2s ease;
font-size: 16px;
font-weight: bold;
position: relative;
z-index: 10;
background-color: #66b1ff;
color: white;
}
.action-btn:hover {
background-color: #f5f5f5;
color: #1890ff;
.confirm-btn {
background-color: #1890FF;
color: white;
}
.confirm-btn:hover {
background-color: #f6ffed;
color: #52c41a;
.edit-btn {
background-color: #FFC107;
color: white;
font-size: 14px;
}
.edit-btn:hover {
background-color: #e6f7ff;
color: #1890ff;
.add-btn {
background-color: #1890FF;
color: white;
}
.add-btn:hover {
background-color: #e6f7ff;
color: #1890ff;
}
.delete-btn:hover {
background-color: #fff2f0;
color: #ff4d4f;
.delete-btn {
background-color: #FF4D4F;
color: white;
font-size: 14px;
z-index: 20;
pointer-events: auto;
}
/* 分页 */