update 添加websocket功能推送员工报警信息
This commit is contained in:
@@ -30,7 +30,6 @@ export function useStatistics() {
|
||||
const { key } = item;
|
||||
item.value = data[key];
|
||||
});
|
||||
console.log('fffffff', statistics.value);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import bus from '/@/utils/bus.ts';
|
||||
import PublicTitle from '../publicTitle.vue';
|
||||
import { list } from './left.api';
|
||||
import { timeTab, useSpin, useStatistics } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||
@@ -46,6 +47,8 @@
|
||||
return;
|
||||
}
|
||||
setStatistics(result[0]);
|
||||
let { alerdyreceive = '' } = result[0];
|
||||
bus.emit('alerdyreceive', alerdyreceive);
|
||||
} catch {
|
||||
setSpin(!spinning.value);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<a-spin :spinning="spinning" class="spin"></a-spin>
|
||||
<div class="physical-item" v-for="(item, i) in hospitalList" :key="i" :class="[i < 3 ? 'b1' : 'b2']">
|
||||
<div class="ct">
|
||||
<div class="value">{{ countData[item.key] || '' }}</div>
|
||||
<div class="value">{{ countData[item.key] || '/' }}</div>
|
||||
<div class="label">{{ item.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -55,7 +55,6 @@
|
||||
return;
|
||||
}
|
||||
countData.value = result[0] || {};
|
||||
console.log('result', result);
|
||||
} catch {
|
||||
setSpin(!spinning.value);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<span>发生地点:</span>
|
||||
<span>{{ userInfo.address }}</span>
|
||||
<span>{{ userInfo?.address }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -71,9 +71,9 @@
|
||||
realName: '',
|
||||
orgName1: '',
|
||||
phone: '',
|
||||
eventType_dictText: '体温异常',
|
||||
warnTime: '2023-11-23 16:23',
|
||||
address: '陕西省西安市',
|
||||
eventType_dictText: '',
|
||||
warnTime: '',
|
||||
address: '',
|
||||
});
|
||||
|
||||
const dataSource = ref([
|
||||
@@ -126,7 +126,7 @@
|
||||
scrollList.value = result.records;
|
||||
}
|
||||
|
||||
console.log('dd', result);
|
||||
// console.log('dd', result);
|
||||
}
|
||||
|
||||
function sendPosition(item) {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</div>
|
||||
<div class="center-footer">
|
||||
<div class="count-item" @click="test">
|
||||
<div class="num">1054</div>
|
||||
<div class="num">{{ footerData?.alerdyreceive || '/' }}</div>
|
||||
<div class="text">累计受理</div>
|
||||
</div>
|
||||
<div class="count-item">
|
||||
@@ -135,14 +135,22 @@
|
||||
// console.log('--->data', result);
|
||||
}
|
||||
|
||||
const footerData = ref({
|
||||
alerdyreceive: '',
|
||||
});
|
||||
onMounted(() => {
|
||||
console.log('reload');
|
||||
initMap();
|
||||
getMapData(tabList[0].type);
|
||||
Map.map.on('moveend', setLevel);
|
||||
Map.map.on('zoomend', setLevel);
|
||||
$bus.on('sendPosition', ({ lon, lat }) => {
|
||||
Map.createMarker({ lon, lat });
|
||||
$bus.on('sendPosition', (item) => {
|
||||
Map.createMarker(item);
|
||||
});
|
||||
$bus.on('alerdyreceive', (val) => {
|
||||
footerData.value = {
|
||||
alerdyreceive: val,
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user