From dd09ea9ab90c89bf5ef78236d02a33bafdcad591 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 18 三月 2025 17:18:03 +0800
Subject: [PATCH] 新增走航融合模块网格融合功能(待完成)
---
src/components/common/CheckButton.vue | 68 ++++++++++++++++++++++++++++++++++
src/views/underwaymix/UnderwayMixMode.vue | 33 +++++++++++++++-
src/components.d.ts | 1
src/views/underwaymix/underwayMixProxy.js | 9 ++++
4 files changed, 108 insertions(+), 3 deletions(-)
diff --git a/src/components.d.ts b/src/components.d.ts
index 4e0dac8..6255bc1 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -11,6 +11,7 @@
BaseMap: typeof import('./components/map/BaseMap.vue')['default']
CardButton: typeof import('./components/CardButton.vue')['default']
CardDialog: typeof import('./components/CardDialog.vue')['default']
+ CheckButton: typeof import('./components/common/CheckButton.vue')['default']
ConfigManage: typeof import('./components/map/ConfigManage.vue')['default']
CoreHeader: typeof import('./components/core/CoreHeader.vue')['default']
CoreMenu: typeof import('./components/core/CoreMenu.vue')['default']
diff --git a/src/components/common/CheckButton.vue b/src/components/common/CheckButton.vue
new file mode 100644
index 0000000..b7e06bb
--- /dev/null
+++ b/src/components/common/CheckButton.vue
@@ -0,0 +1,68 @@
+<template>
+ <!-- <el-button type="primary" class="el-button-custom" size="small">
+
+ {{ checkValue ? activeText : inactiveText }}
+ </el-button> -->
+ <el-checkbox
+ v-model="checkValue"
+ @change="handleChange"
+ border
+ size="small"
+ >{{ activeText }}</el-checkbox
+ >
+</template>
+<script setup>
+import { ref, onMounted, onUnmounted, watch } from 'vue';
+
+const props = defineProps({
+ defaultValue: {
+ type: Boolean
+ },
+ activeText: {
+ type: String,
+ default: '寮�'
+ },
+ inactiveText: {
+ type: String,
+ default: '鍏�'
+ }
+});
+
+const emits = defineEmits(['change']);
+
+const checkValue = ref(false);
+
+watch(
+ () => props.defaultValue,
+ (nV, oV) => {
+ if (nV != oV) {
+ checkValue.value = nV;
+ }
+ },
+ { immediate: true }
+);
+
+function handleChange(value) {
+ emits('change', value);
+}
+</script>
+<style scoped>
+.el-checkbox {
+ --el-checkbox-text-color: white;
+ --main-color: #23dad1;
+ --el-checkbox-checked-text-color: var(--main-color);
+ --el-checkbox-checked-input-border-color: var(--main-color);
+ --el-checkbox-checked-bg-color: var(--main-color);
+ --el-checkbox-input-border-color-hover: var(--main-color);
+
+ --el-checkbox-disabled-checked-input-fill: var(--main-color);
+ --el-checkbox-disabled-checked-input-border-color: var(--main-color);
+ --el-checkbox-disabled-checked-icon-color: white;
+ margin-right: 6px;
+ /* height: initial; */
+}
+
+.el-checkbox__input.is-disabled + span.el-checkbox__label {
+ color: var(--el-color-primary);
+}
+</style>
diff --git a/src/views/underwaymix/UnderwayMixMode.vue b/src/views/underwaymix/UnderwayMixMode.vue
index bad7c78..7ed2e43 100644
--- a/src/views/underwaymix/UnderwayMixMode.vue
+++ b/src/views/underwaymix/UnderwayMixMode.vue
@@ -16,7 +16,7 @@
@change="handleChange"
placeholder="閫夋嫨浠诲姟"
size="small"
- class="w-250"
+ style="width: 160px"
:loading="fusionLoading"
>
<el-option
@@ -42,16 +42,41 @@
</el-form-item>
</el-form>
</el-row>
- <div class="m-t-8">缃戞牸瑕佺礌</div>
+ <div class="m-t-8">鎿嶄綔</div>
<el-row class="m-t-8">
<el-button
+ type="primary"
+ class="el-button-custom"
+ size="small"
+ @click="handleRankClick"
+ >
+ {{ mixActive ? '鍙栨秷' : '鏄剧ず鎺掑悕' }}
+ </el-button>
+ <CheckButton
+ active-text="鍙栨秷铻嶅悎"
+ inactive-text="闅愯棌铻嶅悎"
+ :default-value="false"
+ @change="handleMixClick"
+ >
+ </CheckButton>
+ </el-row>
+ <div class="m-t-8">缃戞牸瑕佺礌</div>
+ <el-row class="m-t-8">
+ <CheckButton
+ active-text="鏄剧ず缃戞牸"
+ inactive-text="闅愯棌缃戞牸"
+ :default-value="true"
+ @change="handleGridClick"
+ >
+ </CheckButton>
+ <!-- <el-button
type="primary"
class="el-button-custom"
size="small"
@click="handleGridClick"
>
{{ gridVisible ? '闅愯棌铻嶅悎' : '鏄剧ず铻嶅悎' }}
- </el-button>
+ </el-button> -->
<el-button
type="primary"
class="el-button-custom"
@@ -252,6 +277,8 @@
});
}
+function handleMixClick(params) {}
+
function handleGridClick() {
gridVisible.value = !gridVisible.value;
selectedfusionData.value.forEach((i) => {
diff --git a/src/views/underwaymix/underwayMixProxy.js b/src/views/underwaymix/underwayMixProxy.js
new file mode 100644
index 0000000..0ce0a7c
--- /dev/null
+++ b/src/views/underwaymix/underwayMixProxy.js
@@ -0,0 +1,9 @@
+/**
+ * 铻嶅悎澶氭璧拌埅閲嶅彔鐨勭綉鏍�
+ * @param {SatelliteGrid} satelliteGrid
+ */
+function mixUnderWayGrid(satelliteGrid) {
+ satelliteGrid;
+}
+
+export default { mixUnderWayGrid };
--
Gitblit v1.9.3