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