1.根据新疆反馈,修改相关问题
This commit is contained in:
2025-12-17 11:16:06 +08:00
parent 53195cc5c2
commit ded845793a
7 changed files with 202 additions and 105 deletions
+38 -3
View File
@@ -1,6 +1,6 @@
<!--健康监测工具-->
<template>
<Dialog v-bind="$attrs" :openVis="visible" width="30%" class="emergency-dialog" :title="title" @close="closeDialog" :maskClosable="false">
<Dialog v-bind="$attrs" :openVis="visible" width="30%" class="emergency-dialog" :title="dialogTitle" @close="closeDialog" :maskClosable="false">
<template #container>
<div class="police-con" :class="[themeType]">
<div class="sub-text">
@@ -37,7 +37,7 @@
<script setup lang="ts">
import Dialog from '/@/components/dialog/Dialog.vue';
import { useDialog } from '/@/views/components/dialogHooks.ts';
import { watch, ref, Ref } from 'vue';
import { watch, ref, Ref, nextTick } from 'vue';
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { nearResourcesApi } from '/@/views/indexSun/indexSun.api.ts';
@@ -47,6 +47,7 @@
const helpLoading = ref<boolean>(false);
const emit = defineEmits(['confirmHelp']);
const { themeType } = useTheme();
const dialogTitle = ref<string>('');
interface UserInfo {
realName?: string;
@@ -65,10 +66,44 @@
userInfo.value = nVal;
}
);
const optionList = [
{
label: '120',
value: '0',
},
{
label: '应急求助',
value: '1',
},
{
label: '云坐席',
value: '2',
},
{
label: '终端报警',
value: '3',
},
];
const { visible, title, closeDialog, openDialog } = useDialog({ title: '应急求助' });
function getName() {
for (let i = 0; i < optionList.length; i++) {
if (props.record?.popType == optionList[i].value) {
return optionList[i].label;
}
}
return '应急求助';
}
function openD() {
openDialog();
nextTick(() => {
dialogTitle.value = getName();
});
}
defineExpose({
openDialog,
openDialog: openD,
});
//确认帮助
+87 -91
View File
@@ -368,92 +368,6 @@
});
}
function openEmergencyOpen() {
setSocketData1({
userId: '1942871719583739905',
phone: '15129287781',
realName: '连龙刚',
lon: 108.94734,
lat: 34.218951,
sex: 2,
age: 37,
orgCode: 'A01A01A02',
orgName: '硬件部',
departCode: 'A01A01',
departName: '软硬件开发部',
type: '0',
centerId: '1940693902422519809',
popType: 1,
queue: null,
noticeId: null,
careLiaisonName: '周飞飞',
careLiaisonPhone: '18800001111',
lifeguardName: '李林林',
lifeguardPhone: '15511110000',
});
emergencyDialogRef.value.openDialog();
}
function employeeDialogOpen() {
setSocketData({
watchNo: 'A5GTQ24920002519',
eventType: 'a_key_alarm',
eventType_dictText: '一键告警',
bindUserId: '1942871719583739905',
bindDate: '2025-07-23',
createBy: 'apiusername',
createDate: '2025-09-25 15:01:11',
dataValue: '',
address: null,
lon: 0,
lat: 0,
dataDate: '2025-09-25',
warnTime: '2025-09-25 15:00:03',
gpsErrorMsg: '定位超时',
lonGd: null,
latGd: null,
addressGd: null,
sendFlag: '0',
largeScreenFlag: '0',
orgCode: 'A01A01A02',
orgName: '硬件部',
realName: '连龙刚',
phone: '15129287781',
hospitalList: [
{
name: '跃满油田作业区',
lon: 82.9955,
lat: 40.787056,
},
{
name: '跃满油田作业区',
lon: 82.9955,
lat: 40.787056,
},
{
name: '采油一厂稠油小屋',
lon: 84.881775,
lat: 44.987652,
},
],
centerId: '1940693902422519809',
popType: 3,
keyUser: '0',
avatar: null,
sex: 2,
age: 37,
workNo: '2025001',
deptName: '软硬件开发部',
audioUrl: null,
});
employeeDialogRef.value.openDialog();
}
// setTimeout(() => {
// employeeDialogOpen();
// openEmergencyOpen();
// yunZOpen();
// }, 5000);
// 健康监测工具报警
let socketUrl = handleSocketUrl(basicPath, getCenterInfo?.id);
const { socketData, setSocketData, closeSocket } = useSocket(socketUrl);
@@ -500,11 +414,7 @@
userData.value = data;
if (!data.lon || !data.lat) {
centerMapRef.value.newResetMap();
if (indexModalTitle.value === '今日应急' && data?.emergencyType == 2) {
showMapBottom.value = false;
} else {
showMapBottom.value = true;
}
showMapBottom.value = data?.emergencyType != 2;
return;
}
Map.removeOverlayGroup();
@@ -773,6 +683,92 @@
indexModalRef.value.openDialog();
});
}
function openEmergencyOpen() {
setSocketData1({
userId: '1942871719583739905',
phone: '15129287781',
realName: '连龙刚',
lon: 108.94734,
lat: 34.218951,
sex: 2,
age: 37,
orgCode: 'A01A01A02',
orgName: '硬件部',
departCode: 'A01A01',
departName: '软硬件开发部',
type: '0',
centerId: '1940693902422519809',
popType: 3,
queue: null,
noticeId: null,
careLiaisonName: '周飞飞',
careLiaisonPhone: '18800001111',
lifeguardName: '李林林',
lifeguardPhone: '15511110000',
});
emergencyDialogRef.value.openDialog();
}
function employeeDialogOpen() {
setSocketData({
watchNo: 'A5GTQ24920002519',
eventType: 'a_key_alarm',
eventType_dictText: '一键告警',
bindUserId: '1942871719583739905',
bindDate: '2025-07-23',
createBy: 'apiusername',
createDate: '2025-09-25 15:01:11',
dataValue: '',
address: null,
lon: 0,
lat: 0,
dataDate: '2025-09-25',
warnTime: '2025-09-25 15:00:03',
gpsErrorMsg: '定位超时',
lonGd: null,
latGd: null,
addressGd: null,
sendFlag: '0',
largeScreenFlag: '0',
orgCode: 'A01A01A02',
orgName: '硬件部',
realName: '连龙刚',
phone: '15129287781',
hospitalList: [
{
name: '跃满油田作业区',
lon: 82.9955,
lat: 40.787056,
},
{
name: '跃满油田作业区',
lon: 82.9955,
lat: 40.787056,
},
{
name: '采油一厂稠油小屋',
lon: 84.881775,
lat: 44.987652,
},
],
centerId: '1940693902422519809',
popType: 3,
keyUser: '0',
avatar: null,
sex: 2,
age: 37,
workNo: '2025001',
deptName: '软硬件开发部',
audioUrl: null,
});
employeeDialogRef.value.openDialog();
}
// setTimeout(() => {
// employeeDialogOpen();
// openEmergencyOpen();
// yunZOpen();
// }, 5000);
</script>
<style lang="less" scoped>
.sun-screen-box {
+1 -1
View File
@@ -260,7 +260,7 @@
.index-modal {
.form-btn {
margin-bottom: 8px;
padding-left: 100px;
padding-left: 10px;
}
}
+17 -5
View File
@@ -35,13 +35,25 @@
<div style="height: 210px; display: flex; align-items: center; justify-content: center; width: 100%">
<div style="height: 100%" class="content-chart">
<template v-if="[0, 1, 2, 3].includes(chooseType)">
<three-left-new-item @click-pie="clickPie" :org-code="selectValue" :type="selectValue1" :choose-type="chooseType" />
<three-left-new-item
@click-pie="clickPie"
:b-key="props.bKey"
:org-code="selectValue"
:type="selectValue1"
:choose-type="chooseType"
/>
</template>
<template v-if="[4].includes(chooseType)">
<sleep-item :orgCode="selectValue" :type="selectValue1" style="height: 100%" />
<sleep-item :orgCode="selectValue" :b-key="props.bKey" :type="selectValue1" style="height: 100%" />
</template>
<template v-if="[5].includes(chooseType)">
<step-item @click-pie="clickPie" :orgCode="selectValue" :type="selectValue1" style="height: 100%" />
<step-item
@click-pie="clickPie"
:b-key="props.bKey"
:orgCode="selectValue"
:type="selectValue1"
style="height: 100%"
/>
</template>
</div>
</div>
@@ -53,7 +65,7 @@
<script setup lang="ts">
import { ref, onMounted, watch, reactive, onBeforeUnmount, nextTick } from 'vue';
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 { useUserStore } from '/@/store/modules/user.ts';
import ThreeLeftNewItem from '/@/views/indexSun/threeLeftNewItem/threeLeftNewItem.vue';
@@ -141,7 +153,7 @@
if (selectOptions.value.length === 1) {
getAllDepart();
}
setTimer();
// setTimer();
});
// watch(props, () => {
// selectValue.value = '';
@@ -21,10 +21,14 @@
orgCode: String,
type: String,
themeType: String,
bKey: {
type: String,
default: () => '',
},
});
const sleepChart = ref<HTMLElement>();
watch(
props,
() => props,
() => {
init();
},
@@ -48,7 +52,7 @@
setValue(result);
}
} catch {
const result = JSON.parse(getSession(PAGE2_RIGHT1));
const result = JSON.parse(getSession(PAGE2_RIGHT1) || '{}');
setValue(result);
}
}
@@ -19,6 +19,10 @@
orgCode: String,
type: String,
themeType: String,
bKey: {
type: String,
default: () => '',
},
});
const { setSession, getSession } = useSession();
const { PAGE2_RIGHT2 } = caching;
@@ -84,13 +84,59 @@
type: Number,
default: () => 0,
},
bKey: {
type: String,
default: () => '',
},
});
onMounted(() => {
init();
});
watch(props, () => {
init();
});
watch(
() => props.orgCode,
() => {
init();
}
);
watch(
() => props.bKey,
() => {
init();
}
);
watch(
() => props.type,
() => {
init();
}
);
watch(
() => props.themeType,
() => {
init();
}
);
watch(
() => props.refreshState,
() => {
init();
}
);
watch(
() => props.chooseType,
() => {
initByLocal();
}
);
async function initByLocal() {
if (localStorage.getItem('monitorDataOne')) {
dataList.value = JSON.parse(localStorage.getItem('monitorDataOne') || '{}');
} else {
await init();
}
}
const emit = defineEmits(['clickPie']);