|
|
@@ -1,5 +1,13 @@
|
|
|
<template>
|
|
|
- <xc-table :local-data="data" :height="40">
|
|
|
+ 指定入院
|
|
|
+ <el-date-picker
|
|
|
+ type="date"
|
|
|
+ :clearable="false"
|
|
|
+ style="width: 120px"
|
|
|
+ v-model="date"/>
|
|
|
+ 时间患者
|
|
|
+ <el-button @click="confirmToModifyTheAdmissionTime">确定</el-button>
|
|
|
+ <xc-table :local-data="data" :height="100">
|
|
|
<el-table-column label="质控名称" prop="name"/>
|
|
|
<el-table-column label="时效(小时)" prop="prescription"/>
|
|
|
<el-table-column label="描述" prop="promptStatement"/>
|
|
|
@@ -27,7 +35,7 @@
|
|
|
title="病历时效限制">
|
|
|
<el-form :label-width="120">
|
|
|
<el-form-item label="入参数据元:">
|
|
|
- <el-select v-model="ruleForm.sql" @change="selectChange" ref="selectRef">
|
|
|
+ <el-select v-model="ruleForm.sql" ref="selectRef">
|
|
|
<el-option v-for="item in ruleDataElement"
|
|
|
:label="item.name"
|
|
|
:value="item.sql_sentence"
|
|
|
@@ -88,7 +96,6 @@
|
|
|
import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
|
|
|
import {nextTick, onMounted, Ref, ref} from "vue";
|
|
|
import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
|
|
|
-
|
|
|
import {
|
|
|
getEmrTree,
|
|
|
} from "@/api/zhu-yuan-yi-sheng/emr-patient";
|
|
|
@@ -98,14 +105,18 @@ import {
|
|
|
getRuleList,
|
|
|
switchQualityControl,
|
|
|
deleteRuleById,
|
|
|
- modifyQualityControl
|
|
|
+ modifyQualityControl,
|
|
|
+ modifyTheAdmissionQualityControlTime,
|
|
|
+ getAdmissDate
|
|
|
} from '@/api/zhu-yuan-yi-sheng/emr-control-rule'
|
|
|
import {ElMessageBox} from "element-plus";
|
|
|
+import {formatDate} from "@/utils/date";
|
|
|
|
|
|
const data: Ref<Array<any>> = ref([])
|
|
|
const dialog: Ref<boolean> = ref(false)
|
|
|
const emrTree = ref([])
|
|
|
const ruleDataElement: Ref<Array<any>> = ref([])
|
|
|
+const date: Ref<Date> = ref()
|
|
|
|
|
|
const defaultProps = {
|
|
|
children: 'children',
|
|
|
@@ -115,8 +126,8 @@ const defaultProps = {
|
|
|
|
|
|
interface ruleFormClass {
|
|
|
id: string
|
|
|
- medicalRecordCode: Array<string>,
|
|
|
- type: number,
|
|
|
+ medicalRecordCode: Array<string>
|
|
|
+ type: number
|
|
|
offOrOnRule: number
|
|
|
promptStatement: string
|
|
|
name: string
|
|
|
@@ -136,9 +147,6 @@ const ruleForm: Ref<ruleFormClass> = ref({
|
|
|
})
|
|
|
|
|
|
const selectRef = ref(null)
|
|
|
-const selectChange = async () => {
|
|
|
- await nextTick()
|
|
|
-}
|
|
|
|
|
|
const cancel = () => {
|
|
|
ruleForm.value = <ruleFormClass>{
|
|
|
@@ -175,11 +183,12 @@ const onOff = async (id, val) => {
|
|
|
}
|
|
|
|
|
|
const deleteQualityControl = (val) => {
|
|
|
+
|
|
|
ElMessageBox.confirm('是否要删除该质控!', '提示', {
|
|
|
type: 'warning'
|
|
|
- }).then((res) => {
|
|
|
+ }).then(() => {
|
|
|
deleteRuleById(val)
|
|
|
- }).catch((e) => {
|
|
|
+ }).catch(() => {
|
|
|
})
|
|
|
|
|
|
}
|
|
|
@@ -191,10 +200,19 @@ const clickModifyButton = (val) => {
|
|
|
|
|
|
const queryRule = () => {
|
|
|
getRuleList().then((res) => {
|
|
|
- data.value = res
|
|
|
+ data.value = res as any
|
|
|
+ })
|
|
|
+ getAdmissDate().then((res) => {
|
|
|
+ date.value = res as Date
|
|
|
})
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+const confirmToModifyTheAdmissionTime = () => {
|
|
|
+ modifyTheAdmissionQualityControlTime(formatDate(date.value))
|
|
|
}
|
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
getEmrTree('hosp').then((res) => {
|
|
|
emrTree.value = res.all[0].children
|
|
|
@@ -202,7 +220,7 @@ onMounted(() => {
|
|
|
})
|
|
|
queryRule()
|
|
|
getAvailableObjects().then((res) => {
|
|
|
- ruleDataElement.value = res
|
|
|
+ ruleDataElement.value = res as any
|
|
|
console.log(res)
|
|
|
})
|
|
|
|