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() {
const statistics = ref([
{
name: '最新呼入电话',
name: '本周呼入电话',
value: '',
key: 'gross',
dateType: '0',
},
{
name: '最新受理电话',
name: '本周受理电话',
value: '',
key: 'alerdyreceive',
key: 'gross', // 20251213临时处理方案
dateType: '0',
},
{
name: '突发重大伤病应急',
+3 -3
View File
@@ -3,15 +3,15 @@ import { defineStore } from 'pinia';
export const useDetailStore = defineStore({
id: 'detail-store',
state: () => ({
alerdyreceive: '',
lastSevenTotal: '',
totalacceptance: '',
}),
actions: {
setAlerdyreceive(info) {
this.alerdyreceive = info;
this.lastSevenTotal = info;
},
setTotalacceptance(info) {
this.totalacceptance = info;
},
},
});
});
+33 -3
View File
@@ -34,6 +34,7 @@
:showHospitalList="showHospitalList"
:hospitalList="hospitalList"
@clear-hospital-list="clearHospitalList"
@handle-last-seven="handleLastSeven"
:show-rest-b="showRestB"
:user-data="userData"
@handle-detail="handleCenterMapClick"
@@ -82,6 +83,8 @@
:column="indexColumn"
:firstForm="firstFormOne"
:need-dept="needDept"
:need-date-picker="needDatePicker"
:date-time-arr="dateTimeArr"
:twoROnly="twoROnly"
>
<template #bodyCell="{ column, record }">
@@ -173,6 +176,8 @@
const apiParams = ref();
const modalApi = ref();
const needDept = ref(false);
const needDatePicker = ref(false);
const dateTimeArr = ref();
const twoROnly = ref();
const showRestB = ref(false);
const dateInfo = ref<object>({});
@@ -203,6 +208,7 @@
document.title = centerInfo.screenTitle || '健康服务中心';
if (sessionStorage.getItem('socketData')) {
console.log(JSON.parse(sessionStorage.getItem('socketData')));
confirmHelp(JSON.parse(sessionStorage.getItem('socketData')));
sessionStorage.removeItem('socketData');
}
@@ -281,7 +287,9 @@
}
function handleOneLeftClick(item: any) {
const { name, key } = item;
const { name, key, dateType } = item;
let startDate;
let endDate;
//呼入电话
//受理电话
if (key == 'alerdyreceive' || key == 'gross') {
@@ -291,9 +299,28 @@
indexColumn.value = columns[0];
modalApi.value = oneLApi;
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 = {
phoneType: key == 'gross' ? 0 : 1,
centerId: centerId.value,
startDate: startDate,
endDate: endDate,
};
twoROnly.value = '';
nextTick(() => {
@@ -309,6 +336,7 @@
twoROnly.value = '';
modalApi.value = twoLModalApi;
needDept.value = true;
needDatePicker.value = false;
nextTick(() => {
indexModalRef.value.openDialog();
});
@@ -450,7 +478,7 @@
showMapBottom.value = false;
Map.driveLine && Map.driveLine.clear();
try {
const res = await careUserApi({ userId: data?.userId });
const res = await careUserApi({ userId: data?.userId, workNo: data?.employeeNum });
data['careLiaisonName'] = res?.result?.careLiaisonName;
data['careLiaisonPhone'] = res?.result?.careLiaisonPhone;
data['lifeguardName'] = res?.result?.lifeguardName;
@@ -614,7 +642,9 @@
hospitalList.value = [];
showHospitalList.value = false;
}
function handleLastSeven(item) {
handleOneLeftClick(item);
}
onUnmounted(() => {
if (qhInterval.value) clearInterval(qhInterval.value);
if (cInterval.value) clearInterval(cInterval.value);
+15 -7
View File
@@ -54,13 +54,13 @@
</div>
</div>
<div class="center-footer" v-if="showFooter">
<div class="count-item">
<div class="num">{{ useDetail?.alerdyreceive || '0' }}</div>
<div class="text">累计受理</div>
<div class="count-item" style="cursor: pointer" @click="handleClickLastSeven(useDetail?.lastSevenTotal, '近七天累计受理', '1')">
<div class="num">{{ useDetail?.lastSevenTotal || '0' }}</div>
<div class="text">近七天累计受理</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="text">累计处置</div>
<div class="text">累计受理</div>
</div>
</div>
@@ -139,7 +139,7 @@
const panelTitle = ref();
const level = ref(0);
const routeList = ref<any[]>([]);
const emits = defineEmits(['clearHospitalList', 'showRestB', 'handleDetail']);
const emits = defineEmits(['clearHospitalList', 'showRestB', 'handleDetail', 'handleLastSeven']);
let placeSearch: any = null;
let sListen: any = null;
let eListen: any = null;
@@ -207,7 +207,15 @@
sListen = startAuto.on('select', startSelect);
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) {
placeSearch.search(e.poi.name, function (status: any, result: any) {
if (status === 'complete' && result.poiList.pois.length > 0) {
+58 -1
View File
@@ -13,6 +13,9 @@
:options="item?.options"
/>
</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-select placeholder="选择单位" @change="changeSecond" v-model:value="orgCode1" :options="option1" />
</a-form-item>
@@ -96,6 +99,18 @@
needDept: {
type: Boolean,
},
needDatePicker: {
type: Boolean,
default: () => false,
},
datePickerType: {
type: String,
default: '0',
},
dateTimeArr: {
type: Array,
default: () => [],
},
});
const loading = ref<boolean>(false);
const formState = ref();
@@ -107,10 +122,29 @@
const orgCode2 = ref('');
const formRecord = ref({});
const dataActity = ref(1);
const datePickerValue = ref();
const startDate = ref();
const endDate = ref();
onMounted(() => {
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() {
allSecondaryDepartsApi({})
.then((res: any) => {
@@ -176,6 +210,7 @@
...formState.value,
...formRecord.value,
};
console.log(formState.value);
}
function changeSecond() {
@@ -284,6 +319,8 @@
formState.value = {
...formState.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 : '',
};
} catch (e) {
@@ -312,7 +349,11 @@
...formRecord.value,
salvageUserDepart: '',
...props.apiParams,
startDate: '',
endDate: '',
};
startDate.value = '';
endDate.value = '';
}
defineExpose({
openDialog,
@@ -341,6 +382,22 @@
border: 1px solid transparent !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) {
width: 100%;
display: flex;
+3 -3
View File
@@ -92,10 +92,10 @@
}
function setValue(result) {
let { alerdyreceive = '', totalacceptance = '' } = result;
let { lastSevenTotal = '', totalacceptance = '' } = result;
setStatistics(result);
if (alerdyreceive || totalacceptance) {
useDetail.setAlerdyreceive(alerdyreceive);
if (lastSevenTotal || totalacceptance) {
useDetail.setAlerdyreceive(lastSevenTotal);
useDetail.setTotalacceptance(totalacceptance);
}
}