From 491955d354201d9013f74cd21e824f30611bbb60 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 06 十一月 2024 18:17:05 +0800
Subject: [PATCH] 检查类型相关
---
src/api/ecg/checktype/index.ts | 2 +-
src/views/ecg/checktype/index.vue | 12 ++++++++++--
src/views/ecg/checktype/CheckTypeForm.vue | 22 +++++++++++++---------
3 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/src/api/ecg/checktype/index.ts b/src/api/ecg/checktype/index.ts
index c21363f..4066486 100644
--- a/src/api/ecg/checktype/index.ts
+++ b/src/api/ecg/checktype/index.ts
@@ -12,7 +12,7 @@
expenseRecognition: number // 鏄惁闇�瑕佺‘璐�
timeslotBookNum: number // 鏃舵棰勭害瑙勫畾浜烘暟
timeslotReservedNum: number // 姣忔椂娈甸鐣欎汉鏁�
- affinityCheckTypes: string // 浜插拰鐨勬鏌ョ被鍨�
+ affinityCheckTypes: number[] | null// 浜插拰鐨勬鏌ョ被鍨�
}
// 妫�鏌ョ被鍨� API
diff --git a/src/views/ecg/checktype/CheckTypeForm.vue b/src/views/ecg/checktype/CheckTypeForm.vue
index d357577..05fd45b 100644
--- a/src/views/ecg/checktype/CheckTypeForm.vue
+++ b/src/views/ecg/checktype/CheckTypeForm.vue
@@ -4,7 +4,7 @@
ref="formRef"
:model="formData"
:rules="formRules"
- label-width="100px"
+ label-width="140px"
v-loading="formLoading"
>
<el-form-item label="妫�鏌ョ被鍨嬪悕" prop="name">
@@ -26,10 +26,10 @@
<el-form-item label="鍙彿鍒�" prop="callingColumn">
<el-input v-model="formData.callingColumn" placeholder="璇疯緭鍏ュ彨鍙峰垪" />
</el-form-item>
- <el-form-item label="鏄惁鏄剧ず鎮h�呮潯鐮�" prop="displayBarcode">
+ <el-form-item label="鏄剧ず鎮h�呮潯鐮�" prop="displayBarcode">
<el-input v-model="formData.displayBarcode" placeholder="璇疯緭鍏ユ槸鍚︽樉绀烘偅鑰呮潯鐮�" />
</el-form-item>
- <el-form-item label="鏄惁闇�瑕佺‘璐�" prop="expenseRecognition">
+ <el-form-item label="闇�瑕佺‘璐�" prop="expenseRecognition">
<el-input v-model="formData.expenseRecognition" placeholder="璇疯緭鍏ユ槸鍚﹂渶瑕佺‘璐�" />
</el-form-item>
<el-form-item label="鏃舵棰勭害瑙勫畾浜烘暟" prop="timeslotBookNum">
@@ -39,7 +39,9 @@
<el-input v-model="formData.timeslotReservedNum" placeholder="璇疯緭鍏ユ瘡鏃舵棰勭暀浜烘暟" />
</el-form-item>
<el-form-item label="浜插拰鐨勬鏌ョ被鍨�" prop="affinityCheckTypes">
- <el-input v-model="formData.affinityCheckTypes" placeholder="璇疯緭鍏ヤ翰鍜岀殑妫�鏌ョ被鍨�" />
+ <el-checkbox-group v-model="formData.affinityCheckTypes">
+ <el-checkbox v-for="checkTypeVO in checkTypeStore.getCheckTypeOptions()" :value="checkTypeVO.value" :key="checkTypeVO.value">{{checkTypeVO.label}}</el-checkbox>
+ </el-checkbox-group>
</el-form-item>
</el-form>
<template #footer>
@@ -49,14 +51,16 @@
</Dialog>
</template>
<script setup lang="ts">
-import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { CheckTypeApi, CheckTypeVO } from '@/api/ecg/checktype'
+import {useCheckTypeStore} from "@/store/modules/checkType";
/** 妫�鏌ョ被鍨� 琛ㄥ崟 */
defineOptions({ name: 'CheckTypeForm' })
const { t } = useI18n() // 鍥介檯鍖�
const message = useMessage() // 娑堟伅寮圭獥
+
+const checkTypeStore = useCheckTypeStore();
const dialogVisible = ref(false) // 寮圭獥鐨勬槸鍚﹀睍绀�
const dialogTitle = ref('') // 寮圭獥鐨勬爣棰�
@@ -67,13 +71,13 @@
name: undefined,
value: undefined,
readyNum: undefined,
- needDevReady: [],
+ needDevReady: undefined,
callingColumn: undefined,
displayBarcode: undefined,
expenseRecognition: undefined,
timeslotBookNum: undefined,
timeslotReservedNum: undefined,
- affinityCheckTypes: undefined
+ affinityCheckTypes: []
})
const formRules = reactive({
})
@@ -128,13 +132,13 @@
name: undefined,
value: undefined,
readyNum: undefined,
- needDevReady: [],
+ needDevReady: undefined,
callingColumn: undefined,
displayBarcode: undefined,
expenseRecognition: undefined,
timeslotBookNum: undefined,
timeslotReservedNum: undefined,
- affinityCheckTypes: undefined
+ affinityCheckTypes: []
}
formRef.value?.resetFields()
}
diff --git a/src/views/ecg/checktype/index.vue b/src/views/ecg/checktype/index.vue
index 7f9f934..ae47f34 100644
--- a/src/views/ecg/checktype/index.vue
+++ b/src/views/ecg/checktype/index.vue
@@ -148,7 +148,13 @@
<el-table-column label="鏄惁闇�瑕佺‘璐�" align="center" prop="expenseRecognition" />
<el-table-column label="鏃舵棰勭害瑙勫畾浜烘暟" align="center" prop="timeslotBookNum" />
<el-table-column label="姣忔椂娈甸鐣欎汉鏁�" align="center" prop="timeslotReservedNum" />
- <el-table-column label="浜插拰鐨勬鏌ョ被鍨�" align="center" prop="affinityCheckTypes" />
+ <el-table-column label="浜插拰鐨勬鏌ョ被鍨�" align="center" prop="affinityCheckTypes" >
+ <template #default="scope">
+ <div v-for="(checkType, subIndex) in scope.row.affinityCheckTypes" :key="subIndex">
+ {{checkTypeStore.getCheckTypeName(checkType)}}
+ </div>
+ </template>
+ </el-table-column>
<el-table-column label="鎿嶄綔" align="center" min-width="120px">
<template #default="scope">
<el-button
@@ -184,11 +190,11 @@
</template>
<script setup lang="ts">
-import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { CheckTypeApi, CheckTypeVO } from '@/api/ecg/checktype'
import CheckTypeForm from './CheckTypeForm.vue'
+import {useCheckTypeStore} from "@/store/modules/checkType";
/** 妫�鏌ョ被鍨� 鍒楄〃 */
defineOptions({ name: 'CheckType' })
@@ -196,6 +202,8 @@
const message = useMessage() // 娑堟伅寮圭獥
const { t } = useI18n() // 鍥介檯鍖�
+const checkTypeStore = useCheckTypeStore();
+
const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
const list = ref<CheckTypeVO[]>([]) // 鍒楄〃鐨勬暟鎹�
const total = ref(0) // 鍒楄〃鐨勬�婚〉鏁�
--
Gitblit v1.9.3