From e44c74ab8bdc51dcd027307e147ae3ab602edb00 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 10 四月 2025 17:58:37 +0800
Subject: [PATCH] 检查状态 显示
---
src/utils/statusFormatter.ts | 25 +++++++++++++++++++++++--
src/views/ecg/devmanage/DevStatistic.vue | 4 ++--
src/api/ecg/devrent/index.ts | 1 +
src/views/ecg/devrent/index.vue | 10 ++++++++--
4 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/src/api/ecg/devrent/index.ts b/src/api/ecg/devrent/index.ts
index 05509e3..1503a3e 100644
--- a/src/api/ecg/devrent/index.ts
+++ b/src/api/ecg/devrent/index.ts
@@ -17,6 +17,7 @@
baseline: string | undefined // 鍩虹嚎绮�
detachment: string | undefined // 鑴辫惤
remark: string | undefined // 澶囨敞
+ state: number | undefined // 鐘舵��
paid: number | undefined
roomId: number | undefined | null
bedNo: string | undefined | null
diff --git a/src/utils/statusFormatter.ts b/src/utils/statusFormatter.ts
index 1578c1b..5dbfd98 100644
--- a/src/utils/statusFormatter.ts
+++ b/src/utils/statusFormatter.ts
@@ -1,5 +1,5 @@
/**
- *
+ * 璁惧鐘舵��
*/
export const DevStateOptions = [
{label: "绌洪棽", value: 0},
@@ -17,7 +17,28 @@
}
/**
- *
+ * 妫�鏌ョ姸鎬�
+ */
+export const CheckStateOptions = [
+ {label: "寰呮鏌�", value: 0},
+ {label: "宸查鐢�", value: 5},
+ {label: "宸茶鏈�", value: 10},
+ {label: "宸叉媶鏈�", value: 20},
+ {label: "宸插綍鍏�", value: 25},
+ {label: "棰嗙敤鏀惧純", value: 30},
+ {label: "瀹夎鏀惧純", value: 35},
+ {label: "宸查仐澶�", value: 40},
+ {label: "妫�鏌ユ斁寮�", value: 50},
+ {label: "妫�鏌ュ畬鎴�", value: 60},
+]
+
+export const tranlateCheckState = (state) => {
+ const stateOption = CheckStateOptions.find(obj => obj.value === state)
+ return stateOption?.label || '-'
+}
+
+/**
+ * 鎺掗槦鐘舵��
*/
export const queueStatusConvert = (status: number) => {
if (3 === status)
diff --git a/src/views/ecg/devmanage/DevStatistic.vue b/src/views/ecg/devmanage/DevStatistic.vue
index 14c949c..e7b435a 100644
--- a/src/views/ecg/devmanage/DevStatistic.vue
+++ b/src/views/ecg/devmanage/DevStatistic.vue
@@ -79,7 +79,7 @@
</el-table-column>
<el-table-column label="鍨嬪彿" align="center" prop="model" />
-->
- <el-table-column label="浣跨敤鐘舵��" align="center" prop="lost" >
+ <el-table-column label="浣跨敤鐘舵��" align="center" prop="state" >
<template #default="scope">
<span>{{tranlateDevState(scope.row.state)}}</span>
</template>
@@ -216,4 +216,4 @@
getList()
})
-</script>
\ No newline at end of file
+</script>
diff --git a/src/views/ecg/devrent/index.vue b/src/views/ecg/devrent/index.vue
index e16a966..052b3fe 100644
--- a/src/views/ecg/devrent/index.vue
+++ b/src/views/ecg/devrent/index.vue
@@ -101,7 +101,12 @@
<el-table-column label="璁惧缂栧彿" align="center" prop="devId" />
<el-table-column label="鎮h�呯紪鍙�" align="center" prop="patId" />
<el-table-column label="鎮h�呭悕绉�" align="center" prop="patName" />
- <el-table-column
+ <el-table-column label="妫�鏌ョ姸鎬�" align="center" prop="state" >
+ <template #default="scope">
+ <span>{{tranlateCheckState(scope.row.state)}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
label="妫�鏌�&瑁呮満鏃堕棿"
align="center"
prop="rentTime"
@@ -167,6 +172,7 @@
import download from '@/utils/download'
import { DevRentApi, DevRentVO } from '@/api/ecg/devrent'
import DevRentForm from './DevRentForm.vue'
+import {tranlateCheckState} from "../../../utils/statusFormatter";
/** 瑁呮満鎷嗘満 鍒楄〃 */
defineOptions({ name: 'DevRent' })
@@ -256,4 +262,4 @@
onMounted(() => {
getList()
})
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3