1213问题修改
This commit is contained in:
2025-12-13 19:00:02 +08:00
parent 5589f92e72
commit faa0fa991c
6 changed files with 117 additions and 20 deletions
+5 -3
View File
@@ -13,14 +13,16 @@ export enum ServerDetailType {
export function useStatistics() { export function useStatistics() {
const statistics = ref([ const statistics = ref([
{ {
name: '最新呼入电话', name: '本周呼入电话',
value: '', value: '',
key: 'gross', key: 'gross',
dateType: '0',
}, },
{ {
name: '最新受理电话', name: '本周受理电话',
value: '', value: '',
key: 'alerdyreceive', key: 'gross', // 20251213临时处理方案
dateType: '0',
}, },
{ {
name: '突发重大伤病应急', name: '突发重大伤病应急',
+2 -2
View File
@@ -3,12 +3,12 @@ import { defineStore } from 'pinia';
export const useDetailStore = defineStore({ export const useDetailStore = defineStore({
id: 'detail-store', id: 'detail-store',
state: () => ({ state: () => ({
alerdyreceive: '', lastSevenTotal: '',
totalacceptance: '', totalacceptance: '',
}), }),
actions: { actions: {
setAlerdyreceive(info) { setAlerdyreceive(info) {
this.alerdyreceive = info; this.lastSevenTotal = info;
}, },
setTotalacceptance(info) { setTotalacceptance(info) {
this.totalacceptance = info; this.totalacceptance = info;
+33 -3
View File
@@ -34,6 +34,7 @@
:showHospitalList="showHospitalList" :showHospitalList="showHospitalList"
:hospitalList="hospitalList" :hospitalList="hospitalList"
@clear-hospital-list="clearHospitalList" @clear-hospital-list="clearHospitalList"
@handle-last-seven="handleLastSeven"
:show-rest-b="showRestB" :show-rest-b="showRestB"
:user-data="userData" :user-data="userData"
@handle-detail="handleCenterMapClick" @handle-detail="handleCenterMapClick"
@@ -82,6 +83,8 @@
:column="indexColumn" :column="indexColumn"
:firstForm="firstFormOne" :firstForm="firstFormOne"
:need-dept="needDept" :need-dept="needDept"
:need-date-picker="needDatePicker"
:date-time-arr="dateTimeArr"
:twoROnly="twoROnly" :twoROnly="twoROnly"
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
@@ -173,6 +176,8 @@
const apiParams = ref(); const apiParams = ref();
const modalApi = ref(); const modalApi = ref();
const needDept = ref(false); const needDept = ref(false);
const needDatePicker = ref(false);
const dateTimeArr = ref();
const twoROnly = ref(); const twoROnly = ref();
const showRestB = ref(false); const showRestB = ref(false);
const dateInfo = ref<object>({}); const dateInfo = ref<object>({});
@@ -203,6 +208,7 @@
document.title = centerInfo.screenTitle || '健康服务中心'; document.title = centerInfo.screenTitle || '健康服务中心';
if (sessionStorage.getItem('socketData')) { if (sessionStorage.getItem('socketData')) {
console.log(JSON.parse(sessionStorage.getItem('socketData')));
confirmHelp(JSON.parse(sessionStorage.getItem('socketData'))); confirmHelp(JSON.parse(sessionStorage.getItem('socketData')));
sessionStorage.removeItem('socketData'); sessionStorage.removeItem('socketData');
} }
@@ -281,7 +287,9 @@
} }
function handleOneLeftClick(item: any) { function handleOneLeftClick(item: any) {
const { name, key } = item; const { name, key, dateType } = item;
let startDate;
let endDate;
//呼入电话 //呼入电话
//受理电话 //受理电话
if (key == 'alerdyreceive' || key == 'gross') { if (key == 'alerdyreceive' || key == 'gross') {
@@ -291,9 +299,28 @@
indexColumn.value = columns[0]; indexColumn.value = columns[0];
modalApi.value = oneLApi; modalApi.value = oneLApi;
needDept.value = false; needDept.value = false;
needDatePicker.value = true;
console.log(dateType, 123);
if (dateType == '0') {
startDate = dayjs().startOf('week').format('YYYY-MM-DD');
endDate = dayjs().endOf('week').format('YYYY-MM-DD');
} else if (dateType == '1') {
endDate = dayjs().format('YYYY-MM-DD');
startDate = dayjs().subtract(7, 'day').format('YYYY-MM-DD');
} else {
startDate = '';
endDate = '';
}
if (dateType == '2') {
dateTimeArr.value = [];
} else {
dateTimeArr.value = [startDate, endDate];
}
apiParams.value = { apiParams.value = {
phoneType: key == 'gross' ? 0 : 1, phoneType: key == 'gross' ? 0 : 1,
centerId: centerId.value, centerId: centerId.value,
startDate: startDate,
endDate: endDate,
}; };
twoROnly.value = ''; twoROnly.value = '';
nextTick(() => { nextTick(() => {
@@ -309,6 +336,7 @@
twoROnly.value = ''; twoROnly.value = '';
modalApi.value = twoLModalApi; modalApi.value = twoLModalApi;
needDept.value = true; needDept.value = true;
needDatePicker.value = false;
nextTick(() => { nextTick(() => {
indexModalRef.value.openDialog(); indexModalRef.value.openDialog();
}); });
@@ -450,7 +478,7 @@
showMapBottom.value = false; showMapBottom.value = false;
Map.driveLine && Map.driveLine.clear(); Map.driveLine && Map.driveLine.clear();
try { try {
const res = await careUserApi({ userId: data?.userId }); const res = await careUserApi({ userId: data?.userId, workNo: data?.employeeNum });
data['careLiaisonName'] = res?.result?.careLiaisonName; data['careLiaisonName'] = res?.result?.careLiaisonName;
data['careLiaisonPhone'] = res?.result?.careLiaisonPhone; data['careLiaisonPhone'] = res?.result?.careLiaisonPhone;
data['lifeguardName'] = res?.result?.lifeguardName; data['lifeguardName'] = res?.result?.lifeguardName;
@@ -614,7 +642,9 @@
hospitalList.value = []; hospitalList.value = [];
showHospitalList.value = false; showHospitalList.value = false;
} }
function handleLastSeven(item) {
handleOneLeftClick(item);
}
onUnmounted(() => { onUnmounted(() => {
if (qhInterval.value) clearInterval(qhInterval.value); if (qhInterval.value) clearInterval(qhInterval.value);
if (cInterval.value) clearInterval(cInterval.value); if (cInterval.value) clearInterval(cInterval.value);
+15 -7
View File
@@ -54,13 +54,13 @@
</div> </div>
</div> </div>
<div class="center-footer" v-if="showFooter"> <div class="center-footer" v-if="showFooter">
<div class="count-item"> <div class="count-item" style="cursor: pointer" @click="handleClickLastSeven(useDetail?.lastSevenTotal, '近七天累计受理', '1')">
<div class="num">{{ useDetail?.alerdyreceive || '0' }}</div> <div class="num">{{ useDetail?.lastSevenTotal || '0' }}</div>
<div class="text">累计受理</div> <div class="text">近七天累计受理</div>
</div> </div>
<div class="count-item"> <div class="count-item" style="cursor: pointer" @click="handleClickLastSeven(useDetail?.totalacceptance, '累计受理', '2')">
<div class="num">{{ useDetail?.totalacceptance || '0' }}</div> <div class="num">{{ useDetail?.totalacceptance || '0' }}</div>
<div class="text">累计处置</div> <div class="text">累计受理</div>
</div> </div>
</div> </div>
@@ -139,7 +139,7 @@
const panelTitle = ref(); const panelTitle = ref();
const level = ref(0); const level = ref(0);
const routeList = ref<any[]>([]); const routeList = ref<any[]>([]);
const emits = defineEmits(['clearHospitalList', 'showRestB', 'handleDetail']); const emits = defineEmits(['clearHospitalList', 'showRestB', 'handleDetail', 'handleLastSeven']);
let placeSearch: any = null; let placeSearch: any = null;
let sListen: any = null; let sListen: any = null;
let eListen: any = null; let eListen: any = null;
@@ -207,7 +207,15 @@
sListen = startAuto.on('select', startSelect); sListen = startAuto.on('select', startSelect);
eListen = endAuto.on('select', endSelect); eListen = endAuto.on('select', endSelect);
} }
function handleClickLastSeven(value, name, type) {
const obj = {
name,
value,
key: 'gross',
dateType: type,
};
emits('handleLastSeven', obj);
}
function startSelect(e: any) { function startSelect(e: any) {
placeSearch.search(e.poi.name, function (status: any, result: any) { placeSearch.search(e.poi.name, function (status: any, result: any) {
if (status === 'complete' && result.poiList.pois.length > 0) { if (status === 'complete' && result.poiList.pois.length > 0) {
+58 -1
View File
@@ -13,6 +13,9 @@
:options="item?.options" :options="item?.options"
/> />
</a-form-item> </a-form-item>
<a-form-item label="时间" v-if="needDatePicker">
<a-range-picker ref="datePicker" v-model:value="formRecord.dateTime" :bordered="false" />
</a-form-item>
<a-form-item label="单位" v-if="needDept"> <a-form-item label="单位" v-if="needDept">
<a-select placeholder="选择单位" @change="changeSecond" v-model:value="orgCode1" :options="option1" /> <a-select placeholder="选择单位" @change="changeSecond" v-model:value="orgCode1" :options="option1" />
</a-form-item> </a-form-item>
@@ -96,6 +99,18 @@
needDept: { needDept: {
type: Boolean, type: Boolean,
}, },
needDatePicker: {
type: Boolean,
default: () => false,
},
datePickerType: {
type: String,
default: '0',
},
dateTimeArr: {
type: Array,
default: () => [],
},
}); });
const loading = ref<boolean>(false); const loading = ref<boolean>(false);
const formState = ref(); const formState = ref();
@@ -107,10 +122,29 @@
const orgCode2 = ref(''); const orgCode2 = ref('');
const formRecord = ref({}); const formRecord = ref({});
const dataActity = ref(1); const dataActity = ref(1);
const datePickerValue = ref();
const startDate = ref();
const endDate = ref();
onMounted(() => { onMounted(() => {
getSecondDepart(); getSecondDepart();
}); });
watch(
() => props.dateTimeArr,
(newVal, oldVal) => {
console.log(newVal, oldVal);
if (newVal && newVal.length) {
datePickerValue.value = newVal;
startDate.value = dayjs(newVal[0]);
endDate.value = dayjs(newVal[1]);
formRecord.value.dateTime = [dayjs(newVal[0]), dayjs(newVal[1])];
} else {
datePickerValue.value = [];
startDate.value = '';
endDate.value = '';
formRecord.value.dateTime = [];
}
}
);
function getSecondDepart() { function getSecondDepart() {
allSecondaryDepartsApi({}) allSecondaryDepartsApi({})
.then((res: any) => { .then((res: any) => {
@@ -176,6 +210,7 @@
...formState.value, ...formState.value,
...formRecord.value, ...formRecord.value,
}; };
console.log(formState.value);
} }
function changeSecond() { function changeSecond() {
@@ -284,6 +319,8 @@
formState.value = { formState.value = {
...formState.value, ...formState.value,
...formRecord.value, ...formRecord.value,
startDate: startDate.value ? dayjs(startDate.value).format('YYYY-MM-DD') : '',
endDate: endDate.value ? dayjs(endDate.value).format('YYYY-MM-DD') : '',
salvageUserDepart: orgCode2.value ? orgCode2.value : orgCode1.value ? orgCode1.value : '', salvageUserDepart: orgCode2.value ? orgCode2.value : orgCode1.value ? orgCode1.value : '',
}; };
} catch (e) { } catch (e) {
@@ -312,7 +349,11 @@
...formRecord.value, ...formRecord.value,
salvageUserDepart: '', salvageUserDepart: '',
...props.apiParams, ...props.apiParams,
startDate: '',
endDate: '',
}; };
startDate.value = '';
endDate.value = '';
} }
defineExpose({ defineExpose({
openDialog, openDialog,
@@ -341,6 +382,22 @@
border: 1px solid transparent !important; border: 1px solid transparent !important;
border-radius: 4px !important; border-radius: 4px !important;
} }
:deep(.ant-picker) {
width: 250px;
color: #fff !important;
background-color: #082147 !important;
border: 1px solid transparent !important;
border-radius: 4px !important;
display: flex;
align-items: center;
height: 30px;
}
:deep(.ant-picker-input > input) {
color: #fff !important;
}
:deep(.anticon) {
height: auto !important;
}
:deep(.ant-form) { :deep(.ant-form) {
width: 100%; width: 100%;
display: flex; display: flex;
+3 -3
View File
@@ -92,10 +92,10 @@
} }
function setValue(result) { function setValue(result) {
let { alerdyreceive = '', totalacceptance = '' } = result; let { lastSevenTotal = '', totalacceptance = '' } = result;
setStatistics(result); setStatistics(result);
if (alerdyreceive || totalacceptance) { if (lastSevenTotal || totalacceptance) {
useDetail.setAlerdyreceive(alerdyreceive); useDetail.setAlerdyreceive(lastSevenTotal);
useDetail.setTotalacceptance(totalacceptance); useDetail.setTotalacceptance(totalacceptance);
} }
} }