Browse Source

Merge branch 'feature-v1.0.0' of ssh://gitlab.datameta.com:2224/project/water/data-board-2025 into feature-v1.0.0

feature-v1.0.0
chenhaojie 1 month ago
parent
commit
d80cbdb204
  1. 1
      src/views/Drawer/index.vue
  2. 1
      src/views/LeftPanel/index.vue
  3. 24
      src/views/Main/DailyPatrolCard/index.vue
  4. 23
      src/views/Main/MapSearch/index.vue
  5. 5
      src/views/Main/index.vue
  6. 1
      src/views/RegionSelect/index.vue
  7. 1
      src/views/RightPanel/index.vue

1
src/views/Drawer/index.vue

@ -21,5 +21,6 @@ defineOptions({
align-items: center;
padding: 24px;
gap: 16px;
pointer-events: all;
}
</style>

1
src/views/LeftPanel/index.vue

@ -21,5 +21,6 @@ defineOptions({
display: flex;
flex-direction: row;
gap: 12px;
pointer-events: none;
}
</style>

24
src/views/Main/DailyPatrolCard/index.vue

@ -4,10 +4,10 @@
<div class="echart-wrapper" ref="chartRef"></div>
<div class="appraise-progress">
<div class="tips">
<div>问题处理进度<span>23%</span></div>
<div>问题处理进度<span>{{progressCount}}%</span></div>
</div>
<div class="progress">
<div class="progress-bar" style="width: 23%"></div>
<div class="progress-bar" :style="{width: `${progressCount}%`}"></div>
</div>
</div>
</div>
@ -40,6 +40,7 @@ const handleResize = () => {
};
const dailyData: any = ref([]);
const dailyCount = ref(0);
const progressCount = ref(0)
const getChartData = async (time: any) => {
dailyCount.value = 0;
dailyData.value = [];
@ -220,10 +221,29 @@ const initChart = () => {
// Set options and render chart
chart.setOption(option);
};
const getProgressData = async (time: any) => {
progressCount.value = 0;
const pramas = {
// endTime: '',
// startTime: '',
...time,
group: 'K6_1'
};
const data: any = await chartStore.initStatisticChart(pramas);
if (data?.yaxis?.length) {
let newArr = data.yaxis.flatMap((v: any) => v.series);
newArr?.forEach((item: any) => {
if (item.name == '比例') {
progressCount.value = Number(item.sum) || 0;
}
});
}
};
watch(
() => props.timeRange,
(newVal) => {
getChartData(newVal);
getProgressData(newVal)
}
);
onMounted(() => {

23
src/views/Main/MapSearch/index.vue

@ -3,7 +3,7 @@
<span class="map-search-icon">
<iconpark-icon name="search" size="16" fill="#fff"></iconpark-icon>
</span>
<div v-click-outside="onClickOutside">
<el-popover
placement="bottom"
:width="280"
@ -57,14 +57,12 @@
</template>
</el-popover>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, computed } from "vue";
import { getReservoirList } from "@/api/map";
import { useProjectStore } from "@/store/modules/project";
import { ClickOutside as vClickOutside } from "element-plus";
import * as SyCim from "sy-cesium-sdk";
defineOptions({
name: "MapSearch",
@ -72,12 +70,24 @@ defineOptions({
const Cesium = SyCim.Cesium;
const projectStore = useProjectStore();
const popoverVisible = ref(false);
const hidePopover = (e: any) => {
if (e?.target?.className?.includes("map-search-result-title")) {
return;
}
popoverVisible.value = false;
};
const addEventListener = () => {
removeEventListener();
document.addEventListener("click", hidePopover, false);
};
const removeEventListener = () => {
document.removeEventListener("click", hidePopover);
};
const showPopover = () => {
popoverVisible.value = true;
addEventListener();
};
const onClickOutside = () => {
popoverVisible.value = false;
};
const searchValue = ref("");
const searchResultList = ref<any[]>([]);
const layerData = computed(() =>
@ -97,6 +107,7 @@ const changeInputValue = async (value: string) => {
const flyTo = (item: any) => {
const coordinates = item?.geometry?.coordinates;
if (!coordinates) return;
popoverVisible.value = false;
const center = SyCim.Parse.parsePosition(
`${coordinates[0]},${coordinates[1]},10`
).toCartesian3();

5
src/views/Main/index.vue

@ -100,12 +100,17 @@ onBeforeUnmount(() => {
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
pointer-events: none;
.top {
pointer-events: all;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
gap: 12px;
}
.bottom {
pointer-events: all;
}
}
</style>

1
src/views/RegionSelect/index.vue

@ -48,6 +48,7 @@ onMounted(() => {
height: 32px;
border-radius: 4px;
overflow: hidden;
pointer-events: all;
.title {
background: #36b29e;
height: 100%;

1
src/views/RightPanel/index.vue

@ -21,5 +21,6 @@ defineOptions({
display: flex;
flex-direction: row;
gap: 12px;
pointer-events: none;
}
</style>

Loading…
Cancel
Save