1.优化
This commit is contained in:
2025-07-09 17:33:51 +08:00
parent cd1b085499
commit cf129e6d23
18 changed files with 48 additions and 60 deletions
-1
View File
@@ -50,7 +50,6 @@
watch(
() => props.record,
(nVal) => {
console.log('健康报警');
userInfo.value = nVal;
}
);
+2
View File
@@ -4,6 +4,7 @@ export enum Api {
organizationTree = '',
getDictByCode = '/sys/dict/getDictItems',
getDictByCode2 = '/sys/api/getDictItems',
mapList = '/health-watch/watch/watchDevice/selectDeptMapList',
}
// 组织机构tree
@@ -11,3 +12,4 @@ export const getOrganizationTree = () => get(Api.organizationTree);
export const getDictByCode = (params) => get(Api.getDictByCode + `/${params.code}`);
export const getDictByCode2 = (params) => Dictget(Api.getDictByCode2, params);
export const mapListApi = (params) => get(Api.mapList, params);
+23 -18
View File
@@ -35,14 +35,15 @@
</template>
<script setup lang="ts">
import { RollbackOutlined } from '@ant-design/icons-vue';
import { nextTick, onMounted, ref } from 'vue';
import { onMounted, ref } from 'vue';
import OneR from '/@/components/secondaryScreen/screen-right/oneR.vue';
import TwoR from '/@/components/secondaryScreen/screen-right/twoR.vue';
import ThreeR from '/@/components/secondaryScreen/screen-right/threeR.vue';
import SecondMap from '/@/components/secondaryScreen/secondMap/secondMap.vue';
import screenLeft from '/@/components/secondaryScreen/screen-left/screenLeft.vue';
import { Map } from '/@/assets/mapUtils/map';
import router from '/@/router';
import { useDepart, useTimeType } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
import { useTimeType } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
import { startTime, useTopTime } from '/@/utils/utils.ts';
import { useUserStore } from '/@/store/modules/user.ts';
import { useRefresh } from '/@/hooks/autoRefresh';
@@ -50,9 +51,9 @@
import { onUnmounted } from 'vue';
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { ThemeType } from '/@/utils/settings.ts';
import { allSecondaryDepartsApi } from '/@/views/indexSun/indexSun.api.ts';
import { mapListApi } from '/@/views/index.api.ts';
const option1 = ref([{ label: '全部', value: '' }]);
const option1 = ref([{ label: '新疆油田', value: 'A01' }]);
const { refreshState } = useRefresh(DEFAULT_TIME);
const store = useUserStore();
@@ -61,29 +62,21 @@
store.setThemeType(ThemeType.dark);
});
const { themeType } = useTheme();
const useStore = useUserStore();
const orgCode = ref();
const { option, fieldNames, setOrgCode } = useDepart();
const orgCode = ref('');
onMounted(() => {
const userInfo = useStore.getUserInfo;
let orgCodes = userInfo?.secondDepart?.orgCode;
if (orgCodes) {
nextTick(() => {
// orgCode.value = orgCodes;
orgCode.value = userInfo?.secondDepart?.orgCode;
setOrgCode(orgCodes);
});
}
orgCode.value = 'A01';
init();
document.addEventListener('visibilitychange', checkTabState);
getSecondDepart();
});
function getSecondDepart() {
allSecondaryDepartsApi({})
mapListApi({})
.then((res: any) => {
if (res.code === 200) {
let newArr: any[] = [];
const op: any[] = res?.result
? res.result.map((it: any) => {
newArr.push({ ...it, type: '6' });
return {
label: it.departName,
value: it.orgCode,
@@ -91,7 +84,19 @@
})
: [];
option1.value = option1.value.concat(op);
Map.createOverlay(newArr, {
content: (val) => {
return `<div style="
width: 21px;
height: 44px;
position: absolute;
left: -20px;
top: -20px;" title="${val?.departName}">
</div>`;
},
});
} else {
Map.removeOverlayGroup();
}
})
.catch((err) => {
@@ -231,7 +236,7 @@
}
.type-select {
width: 140px;
width: 200px;
margin-right: 10px;
:deep(.ant-select-selection-item) {
-2
View File
@@ -382,7 +382,6 @@
});
function handleThreeRClick(type) {
const textArr = ['心血管异常人员列表', '脑血管异常人员列表', '冠状CT异常人员列表'];
console.log(type);
indexModalTitle.value = textArr[type - 1];
indexColumn.value = threeRModalColumns;
modalApi.value = threeRModalApi;
@@ -421,7 +420,6 @@
});
}
function handleCenterMapClick(res) {
console.log(res, 'centerres');
indexColumn.value = centerMapColumns;
firstFormOne.value = centerMapFromList;
const params = {
+6 -10
View File
@@ -200,12 +200,12 @@
Map.map.on('moveend', logMapinfo);
return;
}
if (TabType.zhiShengJi == item.type) {
Map.createAircraft(aircraft);
return;
} else {
getMapData(item.type, { type: item.type });
}
// if (TabType.zhiShengJi == item.type) {
// Map.createAircraft(aircraft);
// return;
// } else {
// getMapData(item.type, { type: item.type });
// }
}
function watchInfoChangeTab(item: any) {
@@ -238,14 +238,12 @@
// console.log('绘制驾车路线完成');
searchFlag.value = false;
} else {
console.log('获取驾车数据失败:', result);
searchFlag.value = false;
}
});
AMap.Event.addListener(driving, 'complete', (res) => {
const data = JSON.parse(JSON.stringify(res));
searchFlag.value = false;
console.log('查询结果', data);
if (data.info == 'OK') {
const { routes } = data;
setTitle(routes[0]);
@@ -263,7 +261,6 @@
async function getMapData(type, params = { type: '' }) {
try {
console.log(type, params, 'asghujis');
const { code, result } = await mapApiSwitch(type, params);
if (code == 200) {
if (Array.isArray(result) && result.length > 0) {
@@ -339,7 +336,6 @@
}
function drawMarker(data: any) {
console.log(data);
const { lon, lat } = data;
if (!lon || !lat) {
Map.clearMarker();
-1
View File
@@ -130,7 +130,6 @@
}
function handleDataChange(type) {
console.log(formState.value, formRecord.value);
if (type == dataActity.value) return;
dataActity.value = type;
getField();
+2 -3
View File
@@ -154,8 +154,8 @@ export function infoContent1(res) {
return `
<div class="modal-box modal-box-normal">
<div class="modal-item">
<span class="item-one">单位</span>
<span class="item-two">${res.orgName ? res.orgName : '--'}</span>
<span class="item-one">${res.type === '1' ? '医院名称' : '救护车名称'}</span>
<span class="item-two">${res.name ? res.name : '--'}</span>
</div>
<div class="modal-item">
<span class="item-one">地点:</span>
@@ -538,7 +538,6 @@ export const centerMapColumns = [
dataIndex: 'checkType',
key: 'checkType',
customRender: ({ text }) => {
console.log(text, checkData);
const dddd = checkData.filter((item) => item.value == text);
return dddd[0].label;
},