This commit is contained in:
zk
2023-12-11 13:25:13 +08:00
parent bc15167485
commit c9663bb3ba
7 changed files with 149 additions and 33 deletions
+27 -22
View File
@@ -19,7 +19,18 @@
</template>
</div>
<div class="body-d-middle">
<SecondMap />
<SecondMap>
<template #rightForm>
<a-select
placeholder="选择单位"
v-model:value="orgCode"
class="type-select"
:options="option"
:fieldNames="fieldNames"
></a-select>
<a-select placeholder="选择时间范围" v-model:value="type" class="type-select" :options="timeRangeOption"></a-select>
</template>
</SecondMap>
</div>
<div class="body-d-right">
<one-r />
@@ -36,12 +47,12 @@
import OneR from '/@/components/secondaryScreen/screen-right/oneR.vue';
import TwoR from '/@/components/secondaryScreen/screen-right/twoR.vue';
import ThreeR from '/@/components/secondaryScreen/screen-right/threeR.vue';
import SecondMap from '/@/components/secondaryScreen/secondMap/secondMap.vue';
import * as dayjs from 'dayjs';
import SecondMap from '/@/components/secondaryScreen/secondMap/secondMap';
import router from '/@/router';
import ItemD from '/@/components/item-d/item-d.vue';
import { useDepart, useTimeType } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
import { useTopTime } from '/@/utils/utils.ts';
const dayTimeO = ref();
const dayTimeT = ref();
const dataList = ref([
{
@@ -94,31 +105,19 @@
}, 1000);
}
function getTime() {
dayTimeO.value = dayjs().format('YYYY年MM月DD日 HH时mm分ss秒');
dayTimeT.value =
dayjs().diff(dayjs('2018-10-01'), 'day') +
'天' +
getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD') + ' 00:00:00'), 'hours')) +
'时' +
getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD HH') + ':00:00'), 'minutes')) +
'分' +
getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD HH:mm') + ':00'), 'seconds')) +
'秒';
}
init();
function getZero(num: any) {
if (num < 10) {
return '0' + num;
}
return num;
function getTime() {
const { timeRight } = useTopTime();
dayTimeT.value = timeRight;
}
function clickBack() {
router.go(-1);
}
init();
const { orgCode, option, fieldNames } = useDepart({});
const { type, timeRangeOption } = useTimeType('week');
</script>
<style lang="less" scoped>
.outer {
@@ -219,6 +218,12 @@
display: flex;
flex-direction: column;
}
.type-select {
width: 120px;
color: #008cff;
margin-right: 10px;
}
}
.bottom-d {