update: 大屏接口

This commit is contained in:
xf
2025-07-09 17:30:39 +08:00
parent 055e28b457
commit cd1b085499
5 changed files with 22 additions and 20 deletions
+7 -7
View File
@@ -39,18 +39,16 @@
</template> </template>
6+ 6+
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch } from 'vue'; import { onMounted, ref, watch } from 'vue';
import { useStatistics } from '/@/components/body-d-left/bodyLeftHooks.ts'; import { useStatistics } from '/@/components/body-d-left/bodyLeftHooks.ts';
import { statisticsNewApi } from '/@/views/indexSun/indexSun.api.ts'; import { statisticsNewApi } from '/@/views/indexSun/indexSun.api.ts';
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts'; import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
import { useDetailStore } from '/@/store/modules/detailData.ts'; import { useDetailStore } from '/@/store/modules/detailData.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const { getCenterInfo } = useUserStore();
const { LEFT_KEY1 } = caching; const { LEFT_KEY1 } = caching;
const props = defineProps({ const props = defineProps({
centerId: {
type: String,
default: () => '',
},
bKey: { bKey: {
type: Number, type: Number,
default: () => 0, default: () => 0,
@@ -72,11 +70,13 @@
getOneLeftInfo(); getOneLeftInfo();
} }
); );
onMounted(() => {
getOneLeftInfo();
});
async function getOneLeftInfo() { async function getOneLeftInfo() {
const params = { const params = {
condition: chooseType.value, condition: chooseType.value,
centerId: props.centerId, centerId: getCenterInfo?.id,
}; };
statisticsNewApi(params) statisticsNewApi(params)
.then((res) => { .then((res) => {
+4 -6
View File
@@ -35,16 +35,15 @@
import hospitalPng from '/@/assets/indexSun/hospital.png'; import hospitalPng from '/@/assets/indexSun/hospital.png';
import { threeLApi } from '/@/views/indexSun/indexSun.api.ts'; import { threeLApi } from '/@/views/indexSun/indexSun.api.ts';
import nomalPng from '/@/assets/indexSun/nomal.png'; import nomalPng from '/@/assets/indexSun/nomal.png';
import { useUserStore } from '/@/store/modules/user.ts';
const { getCenterInfo } = useUserStore();
const scrollList = ref<any[]>([]); const scrollList = ref<any[]>([]);
const props = defineProps({ const props = defineProps({
bKey: { bKey: {
type: Number, type: Number,
default: () => 0, default: () => 0,
}, },
centerId: {
type: String,
default: () => '',
},
}); });
onMounted(() => { onMounted(() => {
@@ -55,10 +54,9 @@
getList(); getList();
}); });
function getList() { function getList() {
threeLApi({ centerId: props.centerId }) threeLApi({ centerId: getCenterInfo?.id })
.then((res: any) => { .then((res: any) => {
if (res.code == 200) { if (res.code == 200) {
console.log(res.result);
scrollList.value = res.result; scrollList.value = res.result;
} }
}) })
+4 -1
View File
@@ -46,6 +46,9 @@
import { ref, onMounted, watch } from 'vue'; import { ref, onMounted, watch } from 'vue';
import nomalPng from '/@/assets/indexSun/nomal.png'; import nomalPng from '/@/assets/indexSun/nomal.png';
import { threeRApi } from '/@/views/indexSun/indexSun.api.ts'; import { threeRApi } from '/@/views/indexSun/indexSun.api.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const { getCenterInfo } = useUserStore();
const scrollList = ref(); const scrollList = ref();
const emit = defineEmits(['handleClick']); const emit = defineEmits(['handleClick']);
@@ -69,7 +72,7 @@
}); });
function getList() { function getList() {
threeRApi({ centerId: props.centerId }) threeRApi({ centerId: getCenterInfo?.id })
.then((res: any) => { .then((res: any) => {
if (res.code == 200) { if (res.code == 200) {
scrollList.value = res.result; scrollList.value = res.result;
+3 -5
View File
@@ -43,16 +43,14 @@
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { getClassCharts } from '/@/views/indexSun/indexSun.ts'; import { getClassCharts } from '/@/views/indexSun/indexSun.ts';
import { allSecondaryDepartsApi, twoLApi } from '/@/views/indexSun/indexSun.api.ts'; import { allSecondaryDepartsApi, twoLApi } from '/@/views/indexSun/indexSun.api.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const { getCenterInfo } = useUserStore();
const props = defineProps({ const props = defineProps({
bKey: { bKey: {
type: Number, type: Number,
default: () => 0, default: () => 0,
}, },
centerId: {
type: String,
default: () => '',
},
}); });
const chooseType = ref('0'); const chooseType = ref('0');
const selectValue = ref(''); const selectValue = ref('');
@@ -100,7 +98,7 @@
twoLApi({ twoLApi({
sex: chooseType.value, sex: chooseType.value,
depart: selectValue.value, depart: selectValue.value,
centerId: props.centerId, centerId: getCenterInfo?.id,
}) })
.then((res: any) => { .then((res: any) => {
if (res.code == 200) { if (res.code == 200) {
+4 -1
View File
@@ -128,6 +128,9 @@
import BloodPng from '/@/assets/indexSun/bloodClock.png'; import BloodPng from '/@/assets/indexSun/bloodClock.png';
import { onMounted, ref, watch } from 'vue'; import { onMounted, ref, watch } from 'vue';
import { twoRApi } from '/@/views/indexSun/indexSun.api.ts'; import { twoRApi } from '/@/views/indexSun/indexSun.api.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const { getCenterInfo } = useUserStore();
const twoRList = ref(); const twoRList = ref();
const emit = defineEmits(['handleClick']); const emit = defineEmits(['handleClick']);
@@ -150,7 +153,7 @@
}); });
function getList() { function getList() {
twoRApi({ centerId: props.centerId }) twoRApi({ centerId: getCenterInfo?.id })
.then((res: any) => { .then((res: any) => {
if (res.code == 200) { if (res.code == 200) {
localStorage.removeItem('twoRList'); localStorage.removeItem('twoRList');