init
This commit is contained in:
2025-06-27 17:42:38 +08:00
commit bd6402478b
5317 changed files with 785994 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
import { defHttp } from '/@/utils/http/axios';
import qs from 'qs';
enum Api {
getDepartDoctor = '/health-consultation/conHelper/getDepartDoctor',
getMedicalRecord = '/health-consultation/consultation/conSession/getMedicalRecord',
}
export const getDepartDoctorApi = (params) => defHttp.get({ url: Api.getDepartDoctor, params });
export const getMedicalRecordApi = (params) => defHttp.post({ url: `${Api.getMedicalRecord}?${qs.stringify(params)}`, params });
+99
View File
@@ -0,0 +1,99 @@
import { FormSchema } from '/@/components/Form';
export const listData = [
{
id: 'asssd1d213197ua',
name: '外科',
children: [
{
id: '12edasd2145r52341d',
aImg: 'temp/20230606/45e964377e42182ea052c75c82cefcc0_1_1686038684080.jpg',
name: '张医师',
pro: '外科',
zc: '主任医师',
hospital: '三甲第一人民医院',
times: '123',
status: '1',
},
{
id: '12edasd214qwe5r52341d',
aImg: 'temp/20230606/45e964377e42182ea052c75c82cefcc0_1_1686038684080.jpg',
name: '张医师1',
pro: '外科',
zc: '主任医师',
hospital: '三甲第一人民医院',
times: '123',
status: '2',
},
],
},
{
id: 'asssd1d213197ua',
name: '皮肤科',
children: [
{
id: '12edasd2145r52341d',
aImg: 'temp/20230606/45e964377e42182ea052c75c82cefcc0_1_1686038684080.jpg',
name: '王医师',
pro: '皮肤科',
zc: '主任医师',
hospital: '三甲第一人民医院',
times: '123',
status: '1',
},
{
id: '12edasd2145r5234asd1d',
aImg: 'temp/20230606/45e964377e42182ea052c75c82cefcc0_1_1686038684080.jpg',
name: '王医师1',
pro: '皮肤科',
zc: '主任医师',
hospital: '三甲第一人民医院',
times: '123',
status: '2',
},
],
},
];
export const basicInfoInfoForm: FormSchema[] = [
{
label: '姓名',
field: 'name',
component: 'Input',
},
{
label: '性别',
field: 'gender_dictText',
component: 'Input',
},
{
label: '出生日期',
field: 'birthday',
component: 'Input',
},
{
label: '身高',
field: 'height',
component: 'Input',
componentProps: ({}) => {
return {
suffix: 'CM',
};
},
},
{
label: '体重',
field: 'weight',
component: 'Input',
componentProps: ({}) => {
return {
suffix: 'KG',
};
},
},
{
label: '住址',
field: 'address',
component: 'Input',
},
];
+437
View File
@@ -0,0 +1,437 @@
<template>
<div class="outer-helper">
<div class="left-d">
<a-spin
class="iframe"
style="display: flex; align-items: center; justify-content: center"
tip="加载中..."
v-if="loadingVisible"
:spinning="loadingVisible"
/>
<iframe
v-show="!loadingVisible"
id="iframeRef"
ref="iframeRef"
class="iframe"
:src="`${imAddressSrc}isSpecialized=expert&${qs.stringify(sigInfo)}&sessionId=${route.query?.imId}&checkedExpert=${
route.query?.checkedExpert
}`"
></iframe>
</div>
<div class="right-d">
<div style="height: 80px; padding: 0 10px; background-color: #ffffff">
<div style="padding: 5px 0; font-weight: bold; font-size: 18px">
平台专家
<span style="color: rgba(0, 0, 0, 0.45); font-weight: bold; cursor: pointer" @click="handleRedo">
<RedoOutlined :spin="loadingDoctor" />
</span>
</div>
<div>
<a-input v-model:value="searchName" style="border-radius: 10px" placeholder="请输入专家或科室名称" />
</div>
</div>
<div style="height: calc(100% - 80px); padding: 10px; overflow: auto; background-color: #f0f2f5">
<template v-if="loadingDoctor">
<div style="display: flex; align-items: center; justify-content: center; height: 100%">
<a-spin
class="iframe"
style="display: flex; align-items: center; justify-content: center"
tip="加载中..."
:spinning="loadingDoctor"
/>
</div>
</template>
<template v-else>
<template v-if="listInfo.length > 0">
<a-collapse
style="border: none; background-color: #f0f2f5"
v-model:activeKey="activeKey"
@change="changeActivekey"
expandIconPosition="right"
accordion
>
<a-collapse-panel
style="margin-bottom: 10px; border-radius: 10px"
v-for="(item, index) in listInfo"
:key="index"
:header="item.name"
>
<div class="item-d-o" :key="'listData' + index">
<div class="item-d" v-for="(it, count) in item?.children" :key="'listDataC' + count">
<div>
<Image
style="width: 40px; height: 40px"
v-if="it.aimg"
:width="200"
:height="200"
:src="getFileAccessHttpUrl(it.aimg)"
:preview="false"
:fallback="doctor"
/>
<img
v-else
style="width: 40px; height: 40px; border-radius: 10px"
src="../../../assets/images/doctor-img.webp"
alt=""
/>
</div>
<div>
<!-- <div>{{ `${it.name}-${it.pro}-${it.zc_dictText}` }}</div>-->
<div>{{ getDoctorList(it.name, it.pro, it.zc_dictText) }}</div>
<div>{{ `${it.hospital}-本月已咨询${it.times}` }}</div>
</div>
<div :style="{ fontSize: '12px', display: 'flex', alignItems: it.status === '1' ? 'center' : 'flex-start' }">
<img
v-if="it.status === '1'"
style="width: 50px; height: 30px"
src="../../../assets/images/push.png"
alt=""
@click="clickPushImg(it)"
/>
<span v-else style="color: red">暂停服务</span>
</div>
</div>
</div>
</a-collapse-panel>
</a-collapse>
</template>
<template v-else>
<div style="display: flex; align-items: center; justify-content: center; height: 100%">
<a-empty />
</div>
</template>
</template>
<!-- <div class="onload-more" style="cursor: pointer" @click="onLoadMore()">-->
<!-- <span>-->
<!-- <a-spin v-if="loadMoreStatus === 1" />-->
<!-- {{ onLoadMoreText() }}-->
<!-- </span>-->
<!-- </div>-->
</div>
</div>
<!-- 表单区域 -->
<PersonalFile @register="medicalRecordsModal" />
</div>
</template>
<script setup lang="ts">
import doctor from '/@/assets/images/doctor-img.webp';
import qs from 'qs';
import { ref, unref, watch, h } from 'vue';
import { listData } from '/@/views/emergency/helper/helper.data';
import { userSigAndroidApi } from '/@/views/emergency/communication/components/commApi';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { getDepartDoctorApi } from '/@/views/emergency/helper/helper.api';
import { useGlobSetting } from '/@/hooks/setting';
import { getToken } from '/@/utils/auth';
import { Image, notification } from 'ant-design-vue';
import { imAddressSrc } from '/@/utils/imAddressSrc';
import { useRoute } from 'vue-router';
import PersonalFile from '../helperHistory/components/personalFile.vue';
import { useModal } from '/@/components/Modal';
import { getDoctorList } from '/@/utils';
import { InfoCircleOutlined, RedoOutlined } from '@ant-design/icons-vue';
import { useDesign } from '/@/hooks/web/useDesign';
const loadMoreStatus = ref<Number>(0); // 加载状态 0 点击加载更多,1加载中,2加载完毕,3无更多数据
const sigInfo = ref<Object>({
userSig: '',
sdkAppId: '',
userId: '',
urlF: '',
});
const ListDataForm = ref({
listData: [],
current: 1,
pageSize: 10,
total: 1,
});
const { prefixCls } = useDesign('multiple-tabs-content');
const activeKey = ref<Number>(0);
const listInfo = ref<any[]>([]);
const listInfoInit = ref<any[]>([]);
const loadingVisible = ref<Boolean>(true); // loading
const loadingDoctor = ref<Boolean>(true); // 查询医生loading
const visible = ref<Boolean>(false); // loading
const searchName = ref<String>(''); // visible
let archives = ref<Object>({
titleName: '',
recordsName: '',
medicalDescribe: '',
image: '',
imageList: [],
haveTime_dictText: '',
desire: '',
lookOffice: '',
map: {},
}); // visible
const route = useRoute();
const closeLoading = () => {
loadingVisible.value = false;
};
window.onmessage = async (msg) => {
const result = JSON.parse(msg.data);
switch (result.code) {
case 'closeLoading':
closeLoading();
break;
case 'showConsultation':
await openDialog(result.archivesId, result.archivesName);
break;
case 'newMessage':
showNewMessage();
break;
}
};
const [medicalRecordsModal, { openModal }] = useModal();
function showNewMessage() {
notification.open({
message: '提示',
description: '您有新的消息',
icon: () => h(InfoCircleOutlined, { style: 'color: #108ee9' }),
});
}
async function openDialog(id, name) {
await openModal(true, {
record: { memberName: name, medicalRecordsId: id },
isUpdate: false,
showFooter: false,
});
// await getMedicalRecordApi({ id: id })
// .then((res) => {
// // nextTick(() => {
// res.lookOffice = res.lookOffice || '无';
// res['imageList'] = res.image.split(',').map((item) => ({
// width: 150,
// height: 150,
// src: getFileAccessHttpUrl(item),
// }));
// res['titleName'] = name;
// // archives.value = { ...archives.value, ...res };
//
// // });
// })
// .catch(() => {});
// visible.value = true;
}
watch(
() => searchName.value,
(nV: String) => {
activeKey.value = 0;
let data = JSON.parse(JSON.stringify(listInfoInit.value));
let child = [];
let result = data.filter((item) => {
child =
item.children && item.children.filter((it) => (it.name && it.name.indexOf(nV) !== -1) || (it.pro && it.pro.indexOf(nV) !== -1));
if (child && child.length > 0) {
item.children = child;
return item;
} else {
return item.name && item.name.indexOf(nV) !== -1;
}
});
listInfo.value = result;
}
);
const changeActivekey = () => {};
const onLoadMore = () => {
if (loadMoreStatus.value === 1 || loadMoreStatus.value === 3) return;
ListDataForm.value.current += 1;
// initListData();
};
const onLoadMoreText = () => {
let result = '点击加载更多';
switch (loadMoreStatus.value) {
case 0:
result = '点击加载更多';
break;
case 1:
result = '加载中';
break;
case 2:
result = '点击加载更多';
break;
case 3:
result = '无更多数据';
break;
}
return result;
};
const globSetting = useGlobSetting();
const apiUrl = globSetting.apiUrl;
const getSig = () => {
userSigAndroidApi({})
.then((res) => {
const { userSig, sdkAppId, userId } = res;
sigInfo.value = { userSig, sdkAppId, userId, urlF: apiUrl.replace('://', 'lol'), tokenF: getToken() };
})
.catch((e) => {
console.log(e);
});
};
const iframeRef = ref();
const clickPushImg = (item) => {
const { name, zc_dictText, hospital, pro, id, aimg } = item;
const result = {
code: 'custom',
data: {
businessID: 'business_card',
cardId: id,
doctorName: name,
organization: hospital,
departmentName: pro,
doctorTitle: zc_dictText,
doctorHeadImg: getFileAccessHttpUrl(aimg),
},
};
unref(iframeRef).contentWindow.postMessage(JSON.stringify(result), '*');
};
function handleRedo() {
initData();
}
const initData = () => {
loadingDoctor.value = true;
getDepartDoctorApi({})
.then((res) => {
let arr = res.filter((item) => {
if (item.children.length > 0) {
item.children = item.children.filter((it) => {
return it.status == '1';
});
return item;
}
});
listInfo.value = arr;
listInfoInit.value = arr;
})
.catch((e) => {
console.log(e);
})
.finally(() => {
loadingDoctor.value = false;
});
};
const handleCancel = () => {
visible.value = false;
};
getSig();
initData();
</script>
<style scoped lang="less">
.outer-helper {
overflow: hidden;
display: flex;
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 10px;
position: relative;
.left-d {
width: 70%;
}
.right-d {
border-left: 1px solid #f4f5f9;
width: calc(30% - 20px);
left: calc(70% + 10px);
}
}
.left-d,
.right-d {
height: calc(100% - 20px);
position: absolute;
overflow: auto;
}
.iframe {
height: 100%;
width: 100%;
}
:deep(.jeecg-layout-content) {
height: 100%;
overflow: hidden;
background-color: yellow;
}
.expert {
background-color: #466afb !important;
color: #ffffff !important;
}
.onload-more {
transform: scale(0.8);
text-align: center;
margin-bottom: 5px;
}
.item-d {
display: flex;
padding: 5px 10px;
background-color: #f0f2f5;
margin-bottom: 5px;
border-radius: 10px;
> :nth-child(1) {
width: 45px;
display: flex;
justify-content: center;
align-items: center;
}
> :nth-child(2) {
width: calc(100% - 105px);
font-size: 13px;
> :nth-child(n) {
padding: 0 3px 3px;
display: flex;
}
> :nth-child(2) {
color: #a1a1a1;
}
}
> :nth-child(3) {
width: 60px;
img {
cursor: pointer;
}
> :nth-child(n) {
padding: 0 0 3px;
display: flex;
justify-content: center;
}
}
}
.item-d-o {
background-color: #ffffff;
border-radius: 10px;
}
:deep(.ant-collapse-content > .ant-collapse-content-box) {
padding: 10px;
}
:deep(.ant-collapse-content) {
border-top: none;
}
:deep(.ant-collapse-header) {
background-color: #ffffff;
}
:deep(.ant-form-item-label) {
width: 100px;
}
:deep(.ant-image-img) {
width: 150px;
height: 150px;
}
:deep(.ant-image) {
display: inline !important;
margin: 0 10px 5px 0;
}
:deep(.ant-modal-header) {
font-size: 20px !important;
}
:deep(.ant-image) {
width: 40px !important;
height: 40px !important;
}
</style>