Merge branch 'develop' of https://gitea.gentronhealth.com/py/his into develop
This commit is contained in:
@@ -87,9 +87,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { nextTick, ref, onMounted, getCurrentInstance } from 'vue';
|
||||
import { getAdviceBaseInfo, getDeviceList } from './api';
|
||||
import { throttle } from 'lodash-es';
|
||||
import {getCurrentInstance, nextTick, onMounted, ref} from 'vue';
|
||||
import {getAdviceBaseInfo, getDeviceList} from './api';
|
||||
import {throttle} from 'lodash-es';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 使用系统统一的数据字典
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 病历相关接口
|
||||
/**
|
||||
* 获取患者列表
|
||||
@@ -795,3 +796,35 @@ export function getTestResult(queryParams) {
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检验申请单列表
|
||||
*/
|
||||
export function getInspectionApplicationList(queryParams) {
|
||||
return request({
|
||||
url: '/reg-doctorstation/request-form/get-inspection',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存检验申请单
|
||||
*/
|
||||
export function saveInspectionApplication(data) {
|
||||
return request({
|
||||
url: '/doctor-station/inspection/application',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检验申请单
|
||||
*/
|
||||
export function deleteInspectionApplication(id) {
|
||||
return request({
|
||||
url: '/doctor-station/inspection/application/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -93,7 +93,6 @@ import {
|
||||
saveTcmDiagnosis,
|
||||
updateTcmDiagnosis,
|
||||
} from '@/views/doctorstation/components/api';
|
||||
import { update } from 'lodash';
|
||||
|
||||
const props = defineProps({
|
||||
openAddDiagnosisDialog: {
|
||||
|
||||
@@ -176,25 +176,24 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import {getCurrentInstance} from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {
|
||||
getConditionDefinitionInfo,
|
||||
saveDiagnosis,
|
||||
diagnosisInit,
|
||||
deleteDiagnosisBind,
|
||||
getEncounterDiagnosis,
|
||||
getEmrDetail,
|
||||
getChronicDisease,
|
||||
getTcmDiagnosis,
|
||||
delEncounterDiagnosis,
|
||||
deleteDiagnosisBind,
|
||||
deleteTcmDiagnosis,
|
||||
diagnosisInit,
|
||||
getChronicDisease,
|
||||
getConditionDefinitionInfo,
|
||||
getEmrDetail,
|
||||
getEncounterDiagnosis,
|
||||
getTcmDiagnosis,
|
||||
isFoodDiseasesNew,
|
||||
saveDiagnosis,
|
||||
} from '../api';
|
||||
import diagnosisdialog from '../diagnosis/diagnosisdialog.vue';
|
||||
import AddDiagnosisDialog from './addDiagnosisDialog.vue';
|
||||
import diagnosislist from '../diagnosis/diagnosislist.vue';
|
||||
import { onMounted, onBeforeUnmount } from 'vue';
|
||||
// const diagnosisList = ref([]);
|
||||
const allowAdd = ref(false);
|
||||
const tree = ref([]);
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { getDiagnosisDefinitionList, saveDiagnosisBind } from '../api';
|
||||
import {computed} from 'vue';
|
||||
import {getDiagnosisDefinitionList, saveDiagnosisBind} from '../api';
|
||||
|
||||
const radio = ref(1);
|
||||
const props = defineProps({
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDiagnosisDefinitionList } from '../api';
|
||||
import {getDiagnosisDefinitionList} from '../api';
|
||||
|
||||
const props = defineProps({
|
||||
diagnosisSearchkey: {
|
||||
|
||||
@@ -150,12 +150,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { saveEmr, getEmrDetail, saveEmrTemplate } from '../api';
|
||||
import {getEmrDetail, saveEmr, saveEmrTemplate} from '../api';
|
||||
import emrTemplate from '../emr/emrtemplate.vue';
|
||||
import emrhistory from '../emr/emrhistory.vue';
|
||||
|
||||
import { ref, computed, watch, getCurrentInstance } from 'vue';
|
||||
import { formatDate as formatDateUtil } from '@/utils/index';
|
||||
import {computed, getCurrentInstance, ref, watch} from 'vue';
|
||||
import {formatDate as formatDateUtil} from '@/utils/index';
|
||||
|
||||
// Props
|
||||
const props = defineProps({
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { formatDate, formatDateymd } from '@/utils/index';
|
||||
import { getEmrHistoryList } from '../api';
|
||||
import {formatDate} from '@/utils/index';
|
||||
import {getEmrHistoryList} from '../api';
|
||||
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getEmrTemplateList, deleteEmrTemplate } from '../api';
|
||||
import {deleteEmrTemplate, getEmrTemplateList} from '../api';
|
||||
|
||||
const queryParams = ref({
|
||||
pageSize: 10,
|
||||
|
||||
@@ -427,25 +427,22 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
// import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import { reactive } from 'vue';
|
||||
import {reactive, ref} from 'vue';
|
||||
// import { useModal, useDict } from '@/hooks';
|
||||
import { parseTime, formatNumber } from '@/utils/his';
|
||||
import { queryYbCatalogue, getDiagnosisListEle } from './api';
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
import {formatNumber, parseTime} from '@/utils/his';
|
||||
import {
|
||||
prescriptionNoInit,
|
||||
savePrescriptionInfo,
|
||||
getOrgTree,
|
||||
updatePrescriptionInfo,
|
||||
getEncounterDiagnosis,
|
||||
deletePrescriptionInfo,
|
||||
getMedicationInfo,
|
||||
getChronicDisease,
|
||||
getDiagnosisListEle,
|
||||
getEncounterDiagnosis,
|
||||
getMedicationInfo,
|
||||
prescriptionNoInit,
|
||||
queryYbCatalogue,
|
||||
savePrescriptionInfo
|
||||
} from './api';
|
||||
import prescriptionMedicineList from './prescription/prescriptionMedicineList';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const radio = ref(1);
|
||||
const props = defineProps({
|
||||
|
||||
@@ -136,18 +136,15 @@
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
elepPrescriptionInit,
|
||||
getEncounterDiagnosis,
|
||||
getPrescriptionList,
|
||||
getOrgTree,
|
||||
getPrescriptionInfo,
|
||||
updatePrescriptionInfo,
|
||||
getMedicationInfo,
|
||||
deletePrescriptionInfo,
|
||||
elepPrescriptionInit,
|
||||
getMedicationInfo,
|
||||
getPrescriptionInfo,
|
||||
issuancePrescription,
|
||||
updatePrescriptionInfo,
|
||||
} from './api';
|
||||
import eprescriptiondialog from './eprescriptiondialog.vue';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import {getCurrentInstance} from 'vue';
|
||||
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
|
||||
@@ -184,13 +184,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getInit,
|
||||
getOrgList,
|
||||
wardList,
|
||||
getDiagnosisDefinitionList,
|
||||
handleHospitalization,
|
||||
} from './api.js';
|
||||
import {getDiagnosisDefinitionList, getInit, getOrgList, handleHospitalization, wardList,} from './api.js';
|
||||
|
||||
const submitForm = reactive({
|
||||
medTypeCode: '21',
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref, nextTick } from 'vue';
|
||||
import { getRecordByEncounterIdList, deleteRecord } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
import {defineEmits, ref, unref} from 'vue';
|
||||
import {deleteRecord, getRecordByEncounterIdList} from '../api';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import {patientInfo} from '../../store/patient.js';
|
||||
|
||||
const emits = defineEmits(['historyClick']);
|
||||
const props = defineProps({
|
||||
definitionId: {
|
||||
|
||||
@@ -26,11 +26,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getListByDefinitionId, deleteTemplate } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
import {defineEmits, ref, unref} from 'vue';
|
||||
import {deleteTemplate, getListByDefinitionId} from '../api';
|
||||
import {ElMessage} from 'element-plus';
|
||||
|
||||
const emits = defineEmits(['templateClick', 'edit']);
|
||||
const props = defineProps({
|
||||
definitionId: {
|
||||
|
||||
@@ -40,11 +40,10 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { addTemplate, updateTemplate } from '../api';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { components } from '@/template';
|
||||
import {onMounted, ref} from 'vue';
|
||||
import {addTemplate, updateTemplate} from '../api';
|
||||
import {ElMessage} from 'element-plus';
|
||||
|
||||
const emits = defineEmits(['submitOk']);
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
|
||||
@@ -94,15 +94,21 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
|
||||
import { saveOrUpdateRecord, addTemplate, getRecordByEncounterIdList, recordPrint } from './api';
|
||||
import { patientInfo } from '../store/patient.js';
|
||||
import {nextTick, onMounted, ref, watch} from 'vue';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import {getTreeList} from '@/views/basicmanage/caseTemplates/api';
|
||||
import {addTemplate, getRecordByEncounterIdList, recordPrint, saveOrUpdateRecord} from './api';
|
||||
import {patientInfo} from '../store/patient.js';
|
||||
import dayjs from 'dayjs';
|
||||
// 打印工具
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
import { getEncounterDiagnosis } from '../api';
|
||||
import {PRINT_TEMPLATE, simplePrint} from '@/utils/printUtils.js';
|
||||
import {getEncounterDiagnosis} from '../api';
|
||||
import History from './components/history';
|
||||
import Template from './components/template';
|
||||
import TemplateEdit from './components/templateEdit.vue';
|
||||
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([]);
|
||||
const props = defineProps({
|
||||
@@ -116,11 +122,6 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
const state = reactive({});
|
||||
import History from './components/history';
|
||||
import Template from './components/template';
|
||||
import TemplateEdit from './components/templateEdit.vue';
|
||||
|
||||
import useUserStore from '@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
// 定义响应式变量
|
||||
const templateData = ref([]);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -85,8 +85,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getList, receiveEncounter, leaveEncounter, completeEncounter } from './api';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import {completeEncounter, getList, leaveEncounter, receiveEncounter} from './api';
|
||||
import {formatDate, formatDateStr} from '@/utils/index';
|
||||
|
||||
const date = ref(formatDate(new Date()));
|
||||
const queryParams = ref({
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { ref, nextTick, onBeforeUnmount } from 'vue';
|
||||
import {ElMessage, ElMessageBox} from 'element-plus';
|
||||
import {nextTick, onBeforeUnmount, ref} from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getOrderGroup } from '../api';
|
||||
import {getOrderGroup} from '../api';
|
||||
|
||||
const props = defineProps({
|
||||
diagnosis: {
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAdviceHistoryInfo } from '../api';
|
||||
import { formatNumber } from '@/utils/his';
|
||||
import {getAdviceHistoryInfo} from '../api';
|
||||
import {formatNumber} from '@/utils/his';
|
||||
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
|
||||
@@ -141,9 +141,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
//高精度库
|
||||
import Decimal from 'decimal.js';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAllMedicationInfo,getAllMedicationUsualInfo} from '../api';
|
||||
import { watch } from 'vue';
|
||||
import { throttle } from 'lodash-es';
|
||||
import {getAllMedicationInfo, getAllMedicationUsualInfo} from '../api';
|
||||
import {watch} from 'vue';
|
||||
import {throttle} from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
|
||||
@@ -965,40 +965,34 @@
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getDiagnosisDefinitionList,
|
||||
savePrescription,
|
||||
getEncounterDiagnosis,
|
||||
getPrescriptionList,
|
||||
getOrgTree,
|
||||
savePrescriptionSign,
|
||||
singOut,
|
||||
saveEmr,
|
||||
getEmrDetail,
|
||||
updateGroupId,
|
||||
getContract,
|
||||
checkServicesHistory,
|
||||
getAdviceBaseInfo,
|
||||
getBindDevice,
|
||||
checkServicesHistory,
|
||||
getContract,
|
||||
getDiagnosisDefinitionList,
|
||||
getEmrDetail,
|
||||
getEncounterDiagnosis,
|
||||
getOrgTree,
|
||||
getPrescriptionList,
|
||||
saveEmr,
|
||||
savePrescription,
|
||||
savePrescriptionSign,
|
||||
singOut,
|
||||
updateGroupId,
|
||||
} from '../api';
|
||||
import { getAdjustPriceSwitchState } from '@/api/public';
|
||||
import adviceBaseList from '../advicebaselist';
|
||||
import { computed, getCurrentInstance, nextTick, ref, watch } from 'vue';
|
||||
import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import {advicePrint, getAdjustPriceSwitchState} from '@/api/public';
|
||||
import adviceBaseList from '../adviceBaseList.vue';
|
||||
import {computed, getCurrentInstance, nextTick, ref, watch} from 'vue';
|
||||
import {calculateQuantityByDays} from '@/utils/his';
|
||||
import OrderGroupDrawer from './orderGroupDrawer';
|
||||
import PrescriptionHistory from './prescriptionHistory';
|
||||
import OrderBindInfo from './orderBindInfo';
|
||||
import SkinTestInfo from './skinTestInfo';
|
||||
import Decimal from 'decimal.js';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { ArrowDown } from '@element-plus/icons-vue';
|
||||
import { advicePrint } from '@/api/public';
|
||||
import printUtils, {
|
||||
PRINT_TEMPLATE,
|
||||
getPrinterList,
|
||||
getCachedPrinter,
|
||||
savePrinterToCache,
|
||||
} from '@/utils/printUtils';
|
||||
import {ElMessage, ElMessageBox} from 'element-plus';
|
||||
import {ArrowDown} from '@element-plus/icons-vue';
|
||||
import printUtils, {getPrinterList, PRINT_TEMPLATE, savePrinterToCache,} from '@/utils/printUtils';
|
||||
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const total = ref(0);
|
||||
@@ -1112,7 +1106,7 @@ onMounted(() => {
|
||||
document.addEventListener('keydown', escKeyListener);
|
||||
// 初始化时自动创建第一个西药处方
|
||||
if (westernPrescriptions.value.length === 0) {
|
||||
handleAddWesternPrescription();
|
||||
handleAddPrescription();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getEncounterPatientPayment, refundPayment } from '../api';
|
||||
import { handleColor } from '@/utils/his';
|
||||
import {getEncounterPatientPayment, refundPayment} from '../api';
|
||||
import {handleColor} from '@/utils/his';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import { ref, nextTick, onBeforeUnmount } from 'vue';
|
||||
import {ElMessage, ElMessageBox} from 'element-plus';
|
||||
import {nextTick, onBeforeUnmount, ref} from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance, ref, watch } from 'vue';
|
||||
import { Refresh } from '@element-plus/icons-vue';
|
||||
import { getProofResult, getTestResult } from './api';
|
||||
import {getCurrentInstance, ref, watch} from 'vue';
|
||||
import {Refresh} from '@element-plus/icons-vue';
|
||||
import {getProofResult, getTestResult} from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
|
||||
@@ -134,15 +134,15 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, reactive } from 'vue';
|
||||
import {computed, reactive, ref} from 'vue';
|
||||
import {
|
||||
getReservationInfo,
|
||||
addReservationInfo,
|
||||
editReservationInfo,
|
||||
delReservationInfo,
|
||||
editReservationInfo,
|
||||
getReservationInfo,
|
||||
queryParticipantList,
|
||||
} from './api';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
|
||||
const showForm = ref(false);
|
||||
const selectedDate = ref(new Date());
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @Description:
|
||||
*/
|
||||
// import { IInPatient } from '@/model/IInPatient'
|
||||
import { ref } from 'vue';
|
||||
import {ref} from 'vue';
|
||||
|
||||
// 定义护士等级(没接口前mock)
|
||||
export const nursingLevel = ref('0');
|
||||
|
||||
@@ -411,28 +411,26 @@
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getDiagnosisDefinitionList,
|
||||
getEncounterDiagnosis,
|
||||
saveTcmAdvice,
|
||||
getTcmAdviceList,
|
||||
getOrgTree,
|
||||
signTcmAdvice,
|
||||
getTcmDiagnosis,
|
||||
signOutTcmAdvice,
|
||||
updateGroupId,
|
||||
getContract,
|
||||
getAdviceBaseInfo,
|
||||
getDiagnosisDefinitionList,
|
||||
getOrgTree,
|
||||
getTcmAdviceList,
|
||||
getTcmDiagnosis,
|
||||
savePrescription,
|
||||
saveTcmAdvice,
|
||||
signOutTcmAdvice,
|
||||
signTcmAdvice,
|
||||
} from '@/views/doctorstation/components/api';
|
||||
import tcmMedicineList from './tcmMedicineList';
|
||||
import { computed, getCurrentInstance, nextTick, watch } from 'vue';
|
||||
import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import {computed, getCurrentInstance, nextTick} from 'vue';
|
||||
import {formatNumber} from '@/utils/his';
|
||||
import Decimal from 'decimal.js';
|
||||
import tcmdiagnosisDialog from './tcmdiagnosisDialog';
|
||||
import { Delete, Minus } from '@element-plus/icons-vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import printUtils, { PRINT_TEMPLATE } from '@/utils/printUtils';
|
||||
import { advicePrint } from '@/api/public';
|
||||
import {Delete} from '@element-plus/icons-vue';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import printUtils, {PRINT_TEMPLATE} from '@/utils/printUtils';
|
||||
import {advicePrint} from '@/api/public';
|
||||
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { nextTick } from 'vue';
|
||||
import { getTcmMedicine } from '@/views/doctorstation/components/api';
|
||||
import { throttle } from 'lodash-es';
|
||||
import {nextTick} from 'vue';
|
||||
import {getTcmMedicine} from '@/views/doctorstation/components/api';
|
||||
import {throttle} from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
adviceQueryParams: {
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { getTcmCondition, getTcmSyndrome, saveTcmDiagnosis } from '@/views/doctorstation/components/api';
|
||||
import {ref} from 'vue';
|
||||
import {getTcmCondition, getTcmSyndrome} from '@/views/doctorstation/components/api';
|
||||
|
||||
const condition = ref('');
|
||||
const syndrome = ref('');
|
||||
|
||||
@@ -13,11 +13,11 @@ export function getDoctorPhraseList() {
|
||||
/**
|
||||
* 搜索医生常用语
|
||||
*/
|
||||
export function searchDoctorPhraseList(phraseName, phraseType, phraseCategory) {
|
||||
export function searchDoctorPhraseList(phraseName, phraseType) {
|
||||
return request({
|
||||
url: '/Doctor-phrase/search',
|
||||
method: 'get',
|
||||
params: { phraseName, phraseType, phraseCategory }
|
||||
params: { phraseName, phraseType }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<!-- 搜索栏 -->
|
||||
<div class="search-bar">
|
||||
<el-select v-model="searchScope" placeholder="范围" style="width: 120px;">
|
||||
<el-option label="个人" value="1"></el-option>
|
||||
<el-option label="科室" value="2"></el-option>
|
||||
<el-option label="全院" value="3"></el-option>
|
||||
<el-option label="个人" :value="1"></el-option>
|
||||
<el-option label="科室" :value="2"></el-option>
|
||||
<el-option label="全院" :value="3"></el-option>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="searchKeyword"
|
||||
@@ -14,6 +14,7 @@
|
||||
@keyup.enter="handleSearch"
|
||||
></el-input>
|
||||
<el-button style="margin-left: 10px;" @click="handleSearch"><el-icon><Search /></el-icon> 查询</el-button>
|
||||
<el-button style="margin-left: 10px;" @click="handleReset"><el-icon><Refresh /></el-icon> 重置</el-button>
|
||||
<el-button type="primary" style="margin-left: 10px;" @click="showAddDialog"><el-icon><Plus /></el-icon> 增加</el-button>
|
||||
</div>
|
||||
|
||||
@@ -36,7 +37,9 @@
|
||||
<el-input
|
||||
v-if="editingId === scope.row.id"
|
||||
v-model="editForm.phraseName"
|
||||
placeholder="请输入名称"
|
||||
placeholder="请输入名称(不超过50字)"
|
||||
maxlength="50"
|
||||
show-word-limit
|
||||
style="width: 100%"
|
||||
/>
|
||||
<span v-else>{{ scope.row.phraseName }}</span>
|
||||
@@ -137,7 +140,7 @@
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-sizes="[15, 30, 50]"
|
||||
:page-size="pageSize"
|
||||
layout="total, prev, pager, next, jumper, sizes"
|
||||
:total="total"
|
||||
@@ -153,7 +156,7 @@
|
||||
>
|
||||
<el-form ref="addFormRef" :model="addForm" :rules="rules" label-width="100px" class="add-form">
|
||||
<el-form-item label="名称" prop="phraseName" required>
|
||||
<el-input v-model="addForm.phraseName" placeholder="请输入常用语名称" style="width: 100%;"></el-input>
|
||||
<el-input v-model="addForm.phraseName" placeholder="请输入常用语名称(不超过50字)" maxlength="50" show-word-limit style="width: 100%;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" prop="phraseContent" required>
|
||||
<el-input
|
||||
@@ -199,22 +202,28 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { Search, Plus, Check, Close } from '@element-plus/icons-vue'
|
||||
import { getDoctorPhraseList, searchDoctorPhraseList, addDoctorPhrase, deleteDoctorPhrase, updateDoctorPhrase } from './api'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useDict } from '@/utils/dict'
|
||||
import {onMounted, ref} from 'vue'
|
||||
import {Check, Close, Plus, Refresh, Search} from '@element-plus/icons-vue'
|
||||
import {
|
||||
addDoctorPhrase,
|
||||
deleteDoctorPhrase,
|
||||
getDoctorPhraseList,
|
||||
searchDoctorPhraseList,
|
||||
updateDoctorPhrase
|
||||
} from './api'
|
||||
import {ElMessage, ElMessageBox} from 'element-plus'
|
||||
import {useDict} from '@/utils/dict'
|
||||
|
||||
// 搜索条件
|
||||
const searchScope = ref('个人')
|
||||
const searchKeyword = ref('')
|
||||
const searchScope = ref(null) // null表示未选择,数字类型:1=个人,2=科室,3=全院
|
||||
const searchKeyword = ref('')
|
||||
|
||||
// 表格数据
|
||||
const tableData = ref([])
|
||||
|
||||
// 分页
|
||||
const currentPage = ref(1)
|
||||
const pageSize = ref(10)
|
||||
const pageSize = ref(15)
|
||||
const total = ref(0)
|
||||
|
||||
// 新增模态框相关
|
||||
@@ -276,6 +285,33 @@ const getScopeName = (scope) => {
|
||||
return scopeMap[scope] || '未知范围'
|
||||
}
|
||||
|
||||
// 名称唯一性校验函数
|
||||
const validatePhraseName = (phraseName, excludeId = null) => {
|
||||
if (!phraseName || !phraseName.trim()) {
|
||||
return { valid: false, message: '请输入常用语名称' }
|
||||
}
|
||||
|
||||
// 检查字数限制
|
||||
if (phraseName.trim().length > 50) {
|
||||
return { valid: false, message: '常用语名称不能超过50字' }
|
||||
}
|
||||
|
||||
// 检查名称是否已存在
|
||||
const existingPhrase = allData.value.find(item => {
|
||||
// 排除自身(更新时)
|
||||
if (excludeId && item.id === excludeId) {
|
||||
return false
|
||||
}
|
||||
return item.phraseName === phraseName.trim()
|
||||
})
|
||||
|
||||
if (existingPhrase) {
|
||||
return { valid: false, message: '常用语名称已存在,请输入不同的名称' }
|
||||
}
|
||||
|
||||
return { valid: true, message: '' }
|
||||
}
|
||||
|
||||
// 所有数据(用于客户端分页)
|
||||
const allData = ref([])
|
||||
|
||||
@@ -302,6 +338,16 @@ const fetchDoctorPhraseList = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 重置功能
|
||||
const handleReset = () => {
|
||||
// 重置搜索条件
|
||||
searchScope.value = null
|
||||
searchKeyword.value = ''
|
||||
|
||||
// 重新加载所有数据
|
||||
fetchDoctorPhraseList()
|
||||
}
|
||||
|
||||
// 客户端分页处理
|
||||
const applyPagination = () => {
|
||||
const start = (currentPage.value - 1) * pageSize.value
|
||||
@@ -323,21 +369,13 @@ const handleCurrentChange = (val) => {
|
||||
// 搜索功能
|
||||
const handleSearch = async () => {
|
||||
try {
|
||||
// 根据搜索范围确定phraseType
|
||||
// 这里需要根据实际业务逻辑映射,暂时使用默认值
|
||||
const phraseType = 1
|
||||
// searchScope可能是null(未选择)、1=个人,2=科室,3=全院
|
||||
const searchScopeValue = searchScope.value
|
||||
const phraseType = searchScopeValue === null ? undefined : searchScopeValue
|
||||
|
||||
// 如果需要使用searchScope进行搜索,需要将字符串转换为对应的数字
|
||||
const scopeMap = {
|
||||
'个人': 1,
|
||||
'科室': 2,
|
||||
'全院': 3
|
||||
}
|
||||
const searchScopeValue = scopeMap[searchScope.value] || 1
|
||||
|
||||
// 调用搜索接口
|
||||
// 注意:根据后端API要求,这里的参数顺序可能需要调整
|
||||
const response = await searchDoctorPhraseList(searchKeyword.value, searchScopeValue, phraseType)
|
||||
// 调用搜索接口:phraseName, phraseType
|
||||
// 如果phraseType为undefined,则后端不会按范围过滤,查询所有数据
|
||||
const response = await searchDoctorPhraseList(searchKeyword.value, phraseType)
|
||||
|
||||
// 处理后端返回的数据结构:data.data
|
||||
if (response.code === 200 && response.data && response.data.data) {
|
||||
@@ -378,6 +416,13 @@ const handleAdd = async () => {
|
||||
// 验证表单
|
||||
await addFormRef.value.validate()
|
||||
|
||||
// 名称唯一性校验
|
||||
const nameValidation = validatePhraseName(addForm.value.phraseName)
|
||||
if (!nameValidation.valid) {
|
||||
ElMessage.error(nameValidation.message)
|
||||
return
|
||||
}
|
||||
|
||||
// 添加数据库要求的必填默认字段
|
||||
const formData = {
|
||||
...addForm.value,
|
||||
@@ -484,6 +529,13 @@ const handleSave = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
// 名称唯一性校验(排除当前记录)
|
||||
const nameValidation = validatePhraseName(editForm.value.phraseName, editingId.value)
|
||||
if (!nameValidation.valid) {
|
||||
ElMessage.error(nameValidation.message)
|
||||
return
|
||||
}
|
||||
|
||||
// 准备更新数据
|
||||
const updateData = {
|
||||
...editForm.value,
|
||||
|
||||
@@ -161,6 +161,9 @@
|
||||
<el-tab-pane label="中医" name="tcm">
|
||||
<tcmAdvice :patientInfo="patientInfo" ref="tcmRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="检验" name="inspection">
|
||||
<inspectionApplication :patientInfo="patientInfo" :activeTab="activeTab" ref="inspectionRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="电子处方" name="eprescription">
|
||||
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
|
||||
</el-tab-pane>
|
||||
@@ -196,14 +199,13 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import hospitalizationEmr from './components/hospitalizationEmr/index.vue';
|
||||
import Emr from './components/emr/emr.vue';
|
||||
import {
|
||||
getList,
|
||||
leaveEncounter,
|
||||
completeEncounter,
|
||||
getEnPrescriptionInfo,
|
||||
isHospitalization,
|
||||
getEncounterDiagnosis,
|
||||
getEnPrescriptionInfo,
|
||||
getList,
|
||||
isHospitalization,
|
||||
leaveEncounter,
|
||||
} from './components/api.js';
|
||||
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
||||
import RefundListDialog from './components/prescription/refundListDialog.vue';
|
||||
@@ -214,12 +216,12 @@ import PrescriptionInfo from './components/prescription/prescriptionInfo.vue';
|
||||
import eprescriptionlist from './components/eprescriptionlist.vue';
|
||||
import HospitalizationDialog from './components/hospitalizationDialog.vue';
|
||||
import tcmAdvice from './components/tcm/tcmAdvice.vue';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import inspectionApplication from './components/inspection/inspectionApplication.vue';
|
||||
import {formatDate, formatDateStr} from '@/utils/index';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { nextTick } from 'vue';
|
||||
import { onBeforeRouteLeave } from 'vue-router';
|
||||
import { updatePatientInfo } from './components/store/patient.js';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import {nextTick} from 'vue';
|
||||
import {updatePatientInfo} from './components/store/patient.js';
|
||||
import {ElMessage} from 'element-plus';
|
||||
|
||||
// // 监听路由离开事件
|
||||
// onBeforeRouteLeave((to, from, next) => {
|
||||
@@ -263,6 +265,7 @@ const registerTime = ref(formatDate(new Date()));
|
||||
const patientDrawerRef = ref();
|
||||
const prescriptionRef = ref();
|
||||
const tcmRef = ref();
|
||||
const inspectionRef = ref();
|
||||
const emrRef = ref();
|
||||
const diagnosisRef = ref();
|
||||
const waitCount = ref(0);
|
||||
@@ -396,6 +399,9 @@ function handleClick(tab) {
|
||||
case 'tcm':
|
||||
tcmRef.value.getDiagnosisInfo();
|
||||
break;
|
||||
case 'inspection':
|
||||
// 检验tab点击处理逻辑可以在这里添加
|
||||
break;
|
||||
case 'eprescription':
|
||||
eprescriptionRef.value.getList();
|
||||
break;
|
||||
@@ -453,6 +459,7 @@ function handleCardClick(item, index) {
|
||||
nextTick(() => {
|
||||
prescriptionRef.value.getListInfo();
|
||||
tcmRef.value.getListInfo();
|
||||
inspectionRef.value.getList();
|
||||
diagnosisRef.value.getList();
|
||||
eprescriptionRef.value.getList();
|
||||
// emrRef.value.getDetail(item.encounterId);
|
||||
|
||||
Reference in New Issue
Block a user