Compare commits

...

2 Commits

Author SHA1 Message Date
LiJianZhao 8d1da786ca Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
# Conflicts:
#	src/assets/config/apiConfig.ts
2025-05-08 11:47:52 +08:00
LiJianZhao 1e1e2e21cf dev 2025-05-08 11:47:33 +08:00
6 changed files with 90 additions and 106 deletions

View File

@ -12,4 +12,11 @@ export enum apiConfig{
"RegistrationDetail" ="medical/record/getDetailByRegisId",//详情
"RegistrationList" ="registration/getListByType",//患者列表
/**
*
*/
"OrganizationMemberSave"="organization/member/save",//添加 编辑成员信息
"organizationMemberSearch"="organization/member/search",//搜索成员
"OrganizationSectionAllList"="organization/section/allList",//获取所有科室列表
"OrganizationSectionListByMemberId"="organization/section/listByMemberId",//获取当前成员所属科室列表
}

View File

@ -55,9 +55,10 @@
<el-select
v-model="edit_data.organizationDoctorId"
placeholder="请选择医生"
@change="getSectionList"
>
<el-option
v-for="item in props.doctorList"
v-for="item in doctorList"
:key="item.id"
:label="item.name"
:value="item.id"
@ -151,7 +152,7 @@
<div class="bottom-right">
<el-button type="primary" @click="save">保存</el-button>
<el-button @click="close">取消</el-button>
<el-button v-if="id&&edit_data.status==1" type="danger" @click="deleteDetail">退号</el-button>
<el-button v-if="edit_data.status==1" type="danger" @click="deleteDetail">退号</el-button>
</div>
</div>
</template>
@ -159,7 +160,7 @@
</template>
<script setup lang="ts">
import {nextTick, onMounted, ref} from 'vue'
import {nextTick, onMounted, ref, watch} from 'vue'
import {post} from '@/utils/request.ts'
import CardDefault from '@/components/registration/CardDefault.vue'
import {ElMessage, ElMessageBox} from "element-plus";
@ -168,6 +169,7 @@ import psnCertTypes from "@/assets/config/directory/psnCertTypes.json"
import {getKey} from "@/utils/discrotyUtil.ts";
import insutypes from "@/assets/config/directory/insutypes.json"
import depts from "@/assets/config/directory/depts.json";
import {apiConfig} from "@/assets/config/apiConfig.ts";
//
@ -176,21 +178,6 @@ interface Doctor {
name: string; //
}
// Props
const props = defineProps({
id: {
type: Number,
default: ''
},
doctorList: {
type: Array as () => Doctor[], //
default: () => []
},
doctorId: {
type: String,
default: ''
}
})
const certTypeList = ref<any>(Object.entries(psnCertTypes).map(([id, name]) => ({id, name})));
const edit_data = ref<any>({})
const rules = ref<any>({
@ -240,7 +227,7 @@ const save = () => {
}
form.value.validate((v: any) => {
if (v) {
if (id.value) {
if (edit_data.value.id) {
post('registration/edit', {
data: data, mdtrtCertNo: socialCard.value.mdtrtCertNo,
mdtrtCertType: socialCard.value.mdtrtCertType
@ -264,28 +251,36 @@ const save = () => {
}
const deleteDetail = () => {
post('registration/delete', {id: id.value}).then(() => {
post('registration/delete', {id: edit_data.value.id}).then(() => {
ElMessage.success('删除成功')
close()
})
}
const doctorList = ref<any>([])
const getDoctorList = () => {
let query = {
role: 1
}
post('organization/member/search', {query: query}).then((res: any) => {
doctorList.value = res
})
}
const socialCard: any = ref({
data: null,
payInfo: {},
lastUse: null
})
const id = ref<any>(null)
const init = () => {
const init = (doctorId: any,id: any) => {
isShow.value = true
list()
edit_data.value.organizationDoctorId = props.doctorId
id.value = props.id
if (id.value) {
post('registration/getById', {id: id.value}).then((res: any) => {
edit_data.value.organizationDoctorId = doctorId
if (id) {
post('registration/getById', {id: id}).then((res: any) => {
edit_data.value = res
})
}
getSectionList()
getDoctorList()
}
const isShowCard = ref<any>(true)
const tableData = ref<any>([])
@ -300,7 +295,6 @@ const socialCardUpdate = (e: any) => {
edit_data.value.certNo = e.data.baseinfo.certno
edit_data.value.age = Math.floor(e.data.baseinfo.age)
tableData.value = e.data.insuinfo
edit_data.value.organizationDoctorId = props.doctorId
}
loading.value = false
}
@ -330,8 +324,9 @@ const hide = () => {
showBtn.value = false
}
const sectionList = ref<any>([])
const list = () => {
post('organization/section/allList').then((res: any) => {
const getSectionList = () => {
debugger
post(apiConfig.OrganizationSectionListByMemberId,{memberId:edit_data.value.organizationDoctorId}).then((res: any) => {
sectionList.value = res
})
}

View File

@ -40,10 +40,10 @@
placeholder="选择性别"
>
<el-option
v-for="item in ['男', '女']"
:key="item"
:label="item"
:value="item"
v-for="item in ganderOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
@ -82,8 +82,9 @@
<el-descriptions-item label="科室">
<el-form-item>
<el-select
v-model="memberInfo.sectionId"
v-model="sectionIds"
placeholder="选择科室"
multiple
>
<el-option
v-for="item in sectionList"
@ -118,7 +119,7 @@
<div class="bottom">
<el-button type="primary" @click="save()">保存</el-button>
<el-button @click="exit">取消</el-button>
<el-button v-if="props.id" type="danger" @click="deleteDetail">删除</el-button>
<el-button v-if="memberInfo.id" type="danger" @click="deleteDetail">删除</el-button>
</div>
</template>
</Mask>
@ -131,13 +132,18 @@ import {loadConfig} from "@/utils/config.ts";
import UpLoad from "@/components/UpLoad.vue";
import {ElMessage} from 'element-plus'
import Mask from "@/components/common/Mask.vue";
import {apiConfig} from "@/assets/config/apiConfig.ts";
const ganderOptions = [
{
label: '男',
value: '1'
},
{
label: '女',
value: '2'
}
const props = defineProps({
id: {
type: String,
default: ''
},
})
]
const roleList = [
{
value: 1,
@ -203,41 +209,38 @@ const emit = defineEmits(['close'])
const exit = () => {
memberInfo.value = {}
userInfo.value = {}
sectionIds.value = []
isShow.value = false
emit('close')
}
const sectionIds = ref<any>([])
const ruleFormRef = ref<any>('')
const save = () => {
let form = {
memberInfo: memberInfo.value,
userInfo: userInfo.value,
sectionIds: sectionIds.value
}
ruleFormRef.value.validate((valid: any) => {
if (valid) {
if (props.id) {
post("organization/member/edit", {data: form}).then(() => {
exit()
ElMessage.success('已修改')
})
} else {
post("organization/member/add", {data: form}).then(() => {
exit()
ElMessage.success('已添加')
})
}
post(apiConfig.OrganizationMemberSave, {data: form}).then(() => {
exit()
ElMessage.success('已修改')
})
}
})
}
const uploadRef = ref<any>('')
const getById = () => {
const getById = (id:any) => {
memberInfo.value = {}
userInfo.value = {}
post("organization/member/getById", {id: props.id}).then((res: any) => {
post("organization/member/getById", {id: id}).then((res: any) => {
memberInfo.value = res.memberInfo
if (res.userInfo) {
userInfo.value = res.userInfo
}
sectionIds.value = res.sectionIds
if (memberInfo.value.electronicSignature) {
uploadRef.value?.getImageUrl(memberInfo.value.electronicSignature)
}
@ -257,15 +260,15 @@ const list = () => {
})
}
const deleteDetail = () => {
post("organization/member/delete", {id: props.id}).then(() => {
post("organization/member/delete", {id: memberInfo.value.id}).then(() => {
exit()
ElMessage.error('已删除');
})
}
const init = () => {
const init = (id: any) => {
isShow.value = true
if (props.id) {
getById()
if (id) {
getById(id)
}
}
defineExpose({init})

View File

@ -1,4 +1,4 @@
<template>
<template xmlns="http://www.w3.org/1999/html">
<div class="container">
<div class="left">
<chargeQueue @clickItem="clickItem" ref="chargeQueueRef"></ChargeQueue>
@ -26,14 +26,19 @@
</div>
<div class="doctor">
医生
<el-cascader
<el-select
v-model="formData.doctorId"
:options="sectionDoctorOption"
:props="props"
@change="handleChange"
clearable
size="large"
/>
size="large">
<el-option
v-for="item in doctorList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
@ -89,6 +94,7 @@ import {getKey} from "@/utils/discrotyUtil.ts";
import antys from "@/assets/config/directory/antys.json"
import RecordsLog from "@/components/charge/RecordsLog.vue";
import PatientCard from "@/components/charge/PatientCard.vue";
import {apiConfig} from "@/assets/config/apiConfig.ts";
const socialCard = ref<any>({payInfo: {}})
const formData = ref<any>({
@ -192,38 +198,13 @@ const handleChange = (value: any) => {
}
const cardTypeList = ref<any>(Object.entries(psnCertTypes).map(([id, name]) => ({id, name})))
const sectionList = ref<any>([])
const doctorList = ref<any>([])
const sectionDoctorOption = ref<any>('')
const list = () => {
post('organization/section/allList').then((res: any) => {
sectionList.value = res
post('organization/member/search', {query: {role: 1}}).then((res: any) => {
post(apiConfig.organizationMemberSearch, {query: {role: 1}}).then((res: any) => {
doctorList.value = res
nextTick(() => {
generateOptions()
})
})
})
}
const generateOptions = () => {
if (!sectionList.value || !doctorList.value) return [];
sectionDoctorOption.value = sectionList.value.map((section: any) => {
console.log(section)
//
const doctors = doctorList.value.filter((doc: any) => doc.sectionId === section.id);
console.log(doctors)
return {
value: section.id,
label: section.name,
children: doctors.map((doc: any) => ({
value: doc.id,
label: doc.name,
})),
};
});
};
</script>
<style scoped lang="scss">

View File

@ -19,7 +19,7 @@
<li v-for="(item, index) in roleList" :key="index"
@click="openDialog(item,index)" :class="{active:isShowNum==index}" >
<span class="name">{{ item.name }}</span>
<span class="section_name">{{ item.sectionName }}</span>
<span class="section_name">{{ item.sectionNames }}</span>
<span class="btn">挂号</span>
</li>
</ul>
@ -63,7 +63,7 @@
</Panel>
</div>
</div>
<Edit ref="editRef" :id="id" :doctor-id="doctorId" :doctorList="roleList" @close="getPatientList"></Edit>
<Edit ref="editRef" @close="getPatientList"></Edit>
</div>
</template>
<script setup lang="ts">
@ -76,6 +76,7 @@ import {post} from "@/utils/request";
import {formatDate, getToday, formatDateArray} from "@/utils/dateUtils.ts";
import Calendar from "@/components/common/Calendar.vue";
import Panel from "@/components/common/Panel.vue";
import {apiConfig} from "@/assets/config/apiConfig.ts";
const isShowNum = ref(-1)
const roleList = ref<any>([])
@ -91,7 +92,7 @@ const initDoctor = () => {
keyword: keyword.value,
role: 1
}
post('organization/member/search', {query: query}).then((res: any) => {
post(apiConfig.organizationMemberSearch, {query: query}).then((res: any) => {
roleList.value = res
})
}
@ -121,19 +122,17 @@ const changePage = (page: any) => {
getPatientList()
}
const id = ref<any>('')
const doctorId = ref<any>('')
const rowClick = (row: any) => {
id.value = row.id
nextTick(() => {
editRef.value?.init()
editRef.value?.init(row.organizationDoctorId,row.id)
})
}
const editRef = ref<any>('')
const openDialog = (item: any,index: any) => {
isShowNum.value=index
doctorId.value = item.id
nextTick(() => {
editRef.value?.init()
editRef.value?.init(item.id,null)
})
}
const close = () => {

View File

@ -27,7 +27,7 @@
<div class="title-btn">
<el-button type="primary" @click="init()">查询</el-button>
<el-button type="primary" @click="resetSearch">重置</el-button>
<el-button type="primary" :icon="Plus" @click="openDialog">新增</el-button>
<el-button type="primary" :icon="Plus" @click="openDialog(null)">新增</el-button>
</div>
</div>
@ -72,7 +72,7 @@
/>
</div>
</div>
<MemberEdit :id="id" ref="memberEditRef" @close="init()"></MemberEdit>
<MemberEdit ref="memberEditRef" @close="init()"></MemberEdit>
</div>
</template>
<script setup lang="ts">
@ -81,18 +81,17 @@ import MemberEdit from "@/components/settings/MemberEdit.vue";
import {post} from "@/utils/request.ts";
import {formatDate} from "@/utils/dateUtils.ts";
import {Plus} from "@element-plus/icons-vue";
import {apiConfig} from "@/assets/config/apiConfig.ts";
const id = ref<any>("")
const isShow = ref(false)
const tableData = ref<any>([]);
const memberEditRef = ref<any>(null)
const rowClick = (row: any) => {
id.value = String(row.memberInfo.id)
openDialog()
openDialog(row.memberInfo.id)
}
const openDialog= () => {
const openDialog= (id:any) => {
nextTick(() => {
memberEditRef.value?.init()
memberEditRef.value?.init(id)
})
}
const roleList = [
@ -138,7 +137,7 @@ const init = (() => {
})
const sectionList = ref<any>([]);
const list = () => {
post('organization/section/allList').then((res: any) => {
post(apiConfig.OrganizationSectionAllList).then((res: any) => {
sectionList.value = res
})
}