1.新疆大屏新需求
This commit is contained in:
2025-09-19 18:34:40 +08:00
parent 1714ff19f5
commit a97d9c64aa
41 changed files with 1121 additions and 217 deletions
+30 -14
View File
@@ -1,5 +1,4 @@
import { mapIcon1, mapIcon2, mapIcon3, mapIcon4, mapIcon5, mapIcon7 } from '/@/components/chinaMap/chinaHooks.ts';
import { watchIcon } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
import { mapIcon1, mapIcon11, mapIcon4, mapIcon41, mapIcon5, mapIcon51, watchIconR } from '/@/components/chinaMap/chinaHooks.ts';
import * as turf from '@turf/turf';
/**
@@ -18,29 +17,46 @@ export function createIcon({ icon, iconSize, imageSize }) {
/**
* @desc 根据类型创建Icon
* @type 1:油田医院,2:合作医院,3:医疗点
* @type 1:油田医院,2:健康小屋,4:AED
*/
export function typeToIcon(type: string, centerResource: boolean) {
const iconSize = [18, 44];
const imageSize = [18, 44];
export function typeToIcon(type: string) {
const iconSize = [28, 49];
const imageSize = [28, 49];
if (type == '1') {
return createIcon({ icon: mapIcon1, iconSize, imageSize });
}
if (type == '2') {
return createIcon({ icon: mapIcon5, iconSize, imageSize });
}
//关联医疗点
if (type == '3' && centerResource) {
return createIcon({ icon: mapIcon7, iconSize, imageSize });
if (type == '3') {
return createIcon({ icon: mapIcon5, iconSize, imageSize });
}
if (type == '4') {
return createIcon({ icon: mapIcon4, iconSize, imageSize });
}
if (type === 'user') {
return createIcon({ icon: watchIconR, iconSize, imageSize });
}
}
export function typeToIcon1(type: string) {
const iconSize = [21, 52];
const imageSize = [21, 52];
if (type == '1') {
return createIcon({ icon: mapIcon11, iconSize, imageSize });
}
if (type == '2') {
return createIcon({ icon: mapIcon51, iconSize, imageSize });
}
if (type == '3') {
return createIcon({ icon: mapIcon2, iconSize, imageSize });
return createIcon({ icon: mapIcon51, iconSize, imageSize });
}
if (type == '5' || type == '4') {
return createIcon({ icon: mapIcon3, iconSize, imageSize });
if (type == '4') {
return createIcon({ icon: mapIcon41, iconSize, imageSize });
}
if (type == '6') {
return createIcon({ icon: watchIcon, iconSize: [23, 51], imageSize: [23, 51] });
if (type === 'user') {
const iconS = [36, 88];
const imageS = [36, 88];
return createIcon({ icon: watchIconR, iconS, imageS });
}
}