update
1.修改大屏逻辑,只有庆阳大屏查询当天数据,其余大屏查询所有数据 2.修改table模块,监听变化后,才更新列表
This commit is contained in:
@@ -95,12 +95,14 @@
|
||||
|
||||
watch(
|
||||
props,
|
||||
() => {
|
||||
nextTick(() => {
|
||||
pageSize.value = 10;
|
||||
current.value = 1;
|
||||
getRecords();
|
||||
});
|
||||
(v, o) => {
|
||||
if (JSON.stringify(v) !== JSON.stringify(o)) {
|
||||
nextTick(() => {
|
||||
pageSize.value = 10;
|
||||
current.value = 1;
|
||||
getRecords();
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
dayTimeT.value = timeRight;
|
||||
}
|
||||
|
||||
const setting = getSettings(DataType.yinChuan);
|
||||
const setting = getSettings(DataType.xian);
|
||||
onMounted(async () => {
|
||||
try {
|
||||
options.value = {
|
||||
|
||||
@@ -37,7 +37,13 @@
|
||||
</div>
|
||||
<div class="body-d-right body-d-right-s">
|
||||
<!--健康终端报警-->
|
||||
<TerminalAlarm :refreshState="refreshState" :setting="setting" :set-inter="true" @emit-view-detail="handleEmployeeDialog" />
|
||||
<TerminalAlarm
|
||||
:refreshState="refreshState"
|
||||
:setting="setting"
|
||||
:set-inter="true"
|
||||
:time-interval="getTimeInterval()"
|
||||
@emit-view-detail="handleEmployeeDialog"
|
||||
/>
|
||||
<!--员工队伍健康状况-->
|
||||
<EmployeeHealth theme="dark" :refreshState="refreshState" :setting="setting" />
|
||||
<!--体检数据-->
|
||||
@@ -53,7 +59,11 @@
|
||||
<!--呼入电话、受理电话-->
|
||||
<PhoneDialog ref="phoneDialogRef" :phoneType="phoneType" :setting="setting" :title="phoneDialogTitle" :useForm="true" />
|
||||
<!--健康终端查看详情-->
|
||||
<TerminalAlarmDialog ref="terminalAlarmDialogRef" :setting="setting" />
|
||||
<TerminalAlarmDialog
|
||||
ref="terminalAlarmDialogRef"
|
||||
:setting="setting"
|
||||
:time-interval="{ startDate: dayjs().format('YYYY-MM-DD'), endDate: dayjs().format('YYYY-MM-DD') }"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -79,6 +89,7 @@
|
||||
import { basicPath, emergencyPath, useSocket, yinChuanPath } from '/@/utils/socket.ts';
|
||||
import { handleSocketUrl } from '/@/views/centralScreen/components/centerMapHooks.ts';
|
||||
import LoginOutButton from '/@/views/components/loginOutButton.vue';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const userStore = useUserStore();
|
||||
let { simpleName, centerTel, screenTitle } = userStore.getCenterInfo || { simpleName: '', centerTel: '', screenTitle: '' };
|
||||
@@ -111,6 +122,10 @@
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function getTimeInterval() {
|
||||
return { startDate: dayjs().format('YYYY-MM-DD'), endDate: dayjs().format('YYYY-MM-DD') };
|
||||
}
|
||||
|
||||
const { getCenterInfo } = useUserStore();
|
||||
function getTime() {
|
||||
const { timeLeft, timeRight } = useTopTime(getCenterInfo?.commissioningTime);
|
||||
@@ -118,7 +133,7 @@
|
||||
dayTimeT.value = timeRight;
|
||||
}
|
||||
|
||||
const setting = getSettings(DataType.yinChuan);
|
||||
const setting = getSettings(DataType.xian);
|
||||
onMounted(async () => {
|
||||
try {
|
||||
screenPath.value = getCenterInfo?.screenPath;
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<PhoneDialog ref="phoneDialogRef" :phoneType="phoneType" :setting="setting" :title="phoneDialogTitle" :useForm="true" />
|
||||
<!--健康终端查看详情-->
|
||||
<TerminalAlarmDialog ref="terminalAlarmDialogRef" :setting="setting" />
|
||||
<emergency-data-dialog ref="emergencyDataDialog" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -81,6 +82,8 @@
|
||||
import { handleSocketUrl } from '/@/views/centralScreen/components/centerMapHooks.ts';
|
||||
import LoginOutButton from '/@/views/components/loginOutButton.vue';
|
||||
import EmergencyData from '/@/views/centralScreen/components/emergencyData/emergencyData.vue';
|
||||
import dayjs from 'dayjs';
|
||||
import EmergencyDataDialog from '/@/views/yinChuan/componetns/emergencyData/components/emergencyDataDialog.vue';
|
||||
|
||||
const userStore = useUserStore();
|
||||
let { simpleName, centerTel, screenTitle } = userStore.getCenterInfo || { simpleName: '', centerTel: '', screenTitle: '' };
|
||||
@@ -119,7 +122,7 @@
|
||||
dayTimeT.value = timeRight;
|
||||
}
|
||||
|
||||
const setting = getSettings(DataType.yinChuan);
|
||||
const setting = getSettings(DataType.xian);
|
||||
onMounted(async () => {
|
||||
try {
|
||||
options.value = {
|
||||
@@ -131,7 +134,6 @@
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
console.log([getCenterInfo?.longitude || 106.32, getCenterInfo?.latitude || 38.45]);
|
||||
init();
|
||||
document.title = title.value;
|
||||
openTestModal();
|
||||
|
||||
@@ -105,6 +105,10 @@
|
||||
type: Boolean,
|
||||
default: () => false,
|
||||
},
|
||||
timeInterval: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
const { themeType } = useTheme();
|
||||
const emit = defineEmits(['emit-view-detail']);
|
||||
@@ -175,15 +179,11 @@
|
||||
codeList = props.setting?.orgCode;
|
||||
}
|
||||
// 如果为庆阳应急中心,需要拼上当天的日期
|
||||
let p = {
|
||||
startDate: dayjs().format('YYYY-MM-DD'),
|
||||
endDate: dayjs().format('YYYY-MM-DD'),
|
||||
};
|
||||
const { code, result } = await getMonitorList({
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
orgCodeList: codeList,
|
||||
...(props.setInter ? p : {}),
|
||||
...(props.setInter ? props.timeInterval : {}),
|
||||
});
|
||||
if (code == 200) {
|
||||
setSession(RIGHT_KEY1_NEW, JSON.stringify(result.records));
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
wrapperCol: Object,
|
||||
setting: Object,
|
||||
phoneType: String,
|
||||
timeInterval: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
||||
const columns = [
|
||||
@@ -75,15 +79,19 @@
|
||||
];
|
||||
const userStore = useUserStore();
|
||||
|
||||
console.log(props.timeInterval);
|
||||
const formState = computed(() => ({
|
||||
dataType: props.setting.dataType,
|
||||
// orgCode: props.setting?.orgCode,
|
||||
orgCodeList: userStore.getCenterInfo?.serviceScope,
|
||||
...props.timeInterval,
|
||||
}));
|
||||
const { visible, closeDialog, openDialog } = useDialog({ title: props.title });
|
||||
const registerTable = ref();
|
||||
watch(props, () => {
|
||||
registerTable.value?.getRecords();
|
||||
watch(props, (v, o) => {
|
||||
if (JSON.stringify(v) !== JSON.stringify(o)) {
|
||||
registerTable.value?.getRecords();
|
||||
}
|
||||
});
|
||||
defineExpose({
|
||||
openDialog,
|
||||
|
||||
Reference in New Issue
Block a user