diff --git a/src/api/checkCode/index.ts b/src/api/checkCode/index.ts
index d2b66a1..0e1ce24 100644
--- a/src/api/checkCode/index.ts
+++ b/src/api/checkCode/index.ts
@@ -18,4 +18,12 @@ export function fetchCodeList(query?: Object) {
method: 'get',
params: query,
});
+}
+// 查询项目
+export function fetchCodeDetail(query?: Object) {
+ return request({
+ url: 'zyreq/detail',
+ method: 'get',
+ params: query,
+ });
}
\ No newline at end of file
diff --git a/src/api/liswork/dict/ComDict.js b/src/api/liswork/dict/ComDict.js
index aaecb47..3995af2 100644
--- a/src/api/liswork/dict/ComDict.js
+++ b/src/api/liswork/dict/ComDict.js
@@ -2,37 +2,45 @@ import request from '@/utils/request'
// 查询字典数据列表
export function queryComDictListService(query) {
- return request({
- url: '/comdict/query',
- method: 'get',
- params: query
- })
+ return request({
+ url: '/comdict/query',
+ method: 'get',
+ params: query
+ })
}
//增加字典数据
export function addComDictService(data) {
- return request({
- url: '/comdict/add',
- method: 'post',
- data
- })
+ return request({
+ url: '/comdict/add',
+ method: 'post',
+ data
+ })
}
//修改字典数据
export function updateComDictService(data) {
- return request({
- url: '/comdict/update',
- method: 'post',
- data
- })
+ return request({
+ url: '/comdict/update',
+ method: 'post',
+ data
+ })
+
+}
+//删除字典数据
+export function delComDictService(data) {
+ return request({
+ url: '/comdict/del',
+ method: 'delete',
+ data
+ })
}
// 根据字典类型查询字典数据信息
export function getComDicts(zdlb) {
- return request({
- url: '/comdict/getComDicts',
- method: 'get',
- params: zdlb
- })
-}
-
+ return request({
+ url: '/comdict/getComDicts',
+ method: 'get',
+ params: zdlb
+ })
+}
\ No newline at end of file
diff --git a/src/components/tableCom/index.vue b/src/components/tableCom/index.vue
index 195c3af..c5b9dac 100644
--- a/src/components/tableCom/index.vue
+++ b/src/components/tableCom/index.vue
@@ -1,7 +1,7 @@
-
-
+
diff --git a/src/utils/classCom.ts b/src/utils/classCom.ts
new file mode 100644
index 0000000..760394e
--- /dev/null
+++ b/src/utils/classCom.ts
@@ -0,0 +1,61 @@
+
+/**
+ * 颜色处理工具类
+ * 提供十进制颜色值转十六进制颜色码(支持BGR转RGB)及文字对比度计算功能
+ */
+
+function decimalToHexColor(decimal: number | string): string {
+ // 处理空值和非数字情况
+ if (decimal === undefined || decimal === null || decimal === '') {
+ return '#FFFFFF';
+ }
+
+ // 统一转换为数字类型
+ const num = typeof decimal === 'string' ? parseFloat(decimal) : decimal;
+ if (isNaN(num)) {
+ return '#FFFFFF';
+ }
+
+ // 十进制转十六进制并转为大写
+ let hex = Math.floor(num).toString(16).toUpperCase();
+
+ // 确保十六进制字符串为6位,不足则补0
+ if (hex.length < 6) {
+ hex = hex.padStart(6, '0');
+ }
+
+ // BGR转RGB(交换前后两位)
+ const r = hex.substring(4, 6);
+ const g = hex.substring(2, 4);
+ const b = hex.substring(0, 2);
+ const rgbHex = r + g + b;
+
+ return `#${rgbHex}`;
+}
+
+/**
+ * 根据背景色计算对比度文字颜色(黑/白)
+ * @param bgColor 十六进制背景色(如#FFFF80)
+ * @returns 对比度文字颜色(#333333或#FFFFFF)
+ */
+function getContrastTextColor(bgColor: string): string {
+ // 验证颜色格式
+ if (!/^#([0-9A-F]{6})$/i.test(bgColor)) {
+ throw new Error('Invalid hex color format. Expected #RRGGBB');
+ }
+
+ // 提取RGB分量
+ const r = parseInt(bgColor.slice(1, 3), 16);
+ const g = parseInt(bgColor.slice(3, 5), 16);
+ const b = parseInt(bgColor.slice(5, 7), 16);
+
+ // 计算亮度(标准 luminance 公式)
+ const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
+
+ // 根据亮度返回对比色
+ return luminance > 0.5 ? '#333333' : '#FFFFFF';
+}
+
+
+export const classCom = { decimalToHexColor, getContrastTextColor }
+
diff --git a/src/utils/print-utils.ts b/src/utils/hiprintPrinter.ts
similarity index 99%
rename from src/utils/print-utils.ts
rename to src/utils/hiprintPrinter.ts
index 8797d90..a752904 100644
--- a/src/utils/print-utils.ts
+++ b/src/utils/hiprintPrinter.ts
@@ -1,4 +1,4 @@
-// src/utils/print-utils.ts
+// src/utils/hiprintPrinter.ts
import { io, Socket } from "socket.io-client";
import { ElMessage, ElMessageBox } from 'element-plus'
import { usePrintStore } from '@/store/modules/printStore'
diff --git a/src/views/checkCode/index.vue b/src/views/checkCode/index.vue
index 2cfaeb6..5468e7b 100644
--- a/src/views/checkCode/index.vue
+++ b/src/views/checkCode/index.vue
@@ -4,22 +4,23 @@
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
@@ -74,17 +75,36 @@
:columns="columns">
-
-
- {{ row.tfailed5 }}
+
+
+ {{ row.jzbz == '1' ? '急诊' : '非急诊' }}
+
+
+ {{ row.jjzt == '1' ? '计价' : '无' }}
+
+
+ {{ formatDict(row.brly, 'PT') }}
+
+
+ {{ formatDict(row.zt, 'ST') }}
+
+
+ {{ formatDict(row.yljg, 'HOS') }}
项目
- 拆分选中项目
-
+
+
+
+ {{ row.jjzt == '1' ? '计价' : '无' }}
+
+
+ {{ formatDict(row.zt, 'ST') }}
+
@@ -110,7 +130,7 @@
保存
-
+
@@ -134,7 +154,7 @@
保存
-
+
@@ -143,12 +163,16 @@
@@ -512,21 +450,31 @@ const getContrastTextColor = (bgColor) => {
.app-container {
display: flex;
flex-direction: column;
- height: 90vh; /* 容器高度等于窗口高度 */
+ height: 90vh;
+ /* 容器高度等于窗口高度 */
overflow: hidden;
}
+
.compact-form {
- height: 75px; /* 固定高度 */
+ height: 75px;
+ /* 固定高度 */
}
+
.mb8 {
- height: 30px; /* 固定高度 */
+ height: 30px;
+ /* 固定高度 */
}
-.table-summary{
- height: 10px; /* 固定高度 */
+
+.table-summary {
+ height: 10px;
+ /* 固定高度 */
}
+
.table-container {
- flex: 1; /* 占满剩余高度 */
- overflow: hidden; /* 避免表格超出容器 */
+ flex: 1;
+ /* 占满剩余高度 */
+ overflow: hidden;
+ /* 避免表格超出容器 */
}
.compact-form .el-form-item {
@@ -537,22 +485,32 @@ const getContrastTextColor = (bgColor) => {
.compact-form .el-form-item__label {
padding-bottom: 0px;
}
+
::v-deep .my-table .el-table__row td {
- padding: 1px 0; /* 减小行高 */
+ padding: 1px 0;
+ /* 减小行高 */
}
+
::v-deep .my-table .el-table__header-wrapper th {
- padding: 6px 0; /* 表头内边距 */
- background-color: #b3d8ff !important; /* 表头背景色(保留之前的设置) */
- color: #333; /* 文字颜色加深,提升可读性 */
- font-weight: 500; /* 文字加粗 */
+ padding: 6px 0;
+ /* 表头内边距 */
+ background-color: #b3d8ff !important;
+ /* 表头背景色(保留之前的设置) */
+ color: #333;
+ /* 文字颜色加深,提升可读性 */
+ font-weight: 500;
+ /* 文字加粗 */
}
+
::v-deep .my-table .el-table__cell {
- padding: 0 2px; /* 减小列间距 */
+ padding: 0 2px;
+ /* 减小列间距 */
}
/* 可选:调整表格整体样式 */
::v-deep .my-table {
- font-size: 13px; /* 适当减小字体 */
+ font-size: 13px;
+ /* 适当减小字体 */
}
::v-deep .my-table .el-table__cell,
@@ -560,17 +518,25 @@ const getContrastTextColor = (bgColor) => {
border-width: 1px;
border-color: #ebeef5;
}
+
.card-content {
- max-height: 450px; /* 设置最大高度 */
- overflow-y: auto; /* 超出高度时显示垂直滚动条 */
- padding: 5px; /* 保持与卡片默认一致的内边距 */
+ max-height: 450px;
+ /* 设置最大高度 */
+ overflow-y: auto;
+ /* 超出高度时显示垂直滚动条 */
+ padding: 5px;
+ /* 保持与卡片默认一致的内边距 */
}
+
.clickable:hover {
- cursor: pointer; /* 鼠标悬停时显示手型 */
- transition: all 0.3s; /* 平滑过渡效果 */
+ cursor: pointer;
+ /* 鼠标悬停时显示手型 */
+ transition: all 0.3s;
+ /* 平滑过渡效果 */
color: blue;
}
+
/* 汇总行样式 */
.table-summary {
display: flex;
@@ -582,7 +548,9 @@ const getContrastTextColor = (bgColor) => {
border: 1px solid #ebeef5;
border-radius: 4px;
font-weight: 500;
- line-height: 24px; /* 汇总行文字行高 */
+ line-height: 24px;
+
+ /* 汇总行文字行高 */
.summary-item {
display: flex;
align-items: center;
@@ -596,12 +564,16 @@ const getContrastTextColor = (bgColor) => {
.summary-value {
color: #303133;
min-width: 40px;
- text-align: left;/* 核心:数值左对齐 */
+ text-align: left;
+ /* 核心:数值左对齐 */
}
+
/* 单独设置"单价合计"的值为红色 */
&:nth-child(3) .summary-value {
- color: #f56c6c; /* Element UI 红色主题色 */
- font-weight: 600; /* 可选:加粗字体 */
+ color: #f56c6c;
+ /* Element UI 红色主题色 */
+ font-weight: 600;
+ /* 可选:加粗字体 */
}
}
}