Compare commits
2 Commits
f9ee241ed2
...
19b2109c57
| Author | SHA1 | Date |
|---|---|---|
|
|
19b2109c57 | |
|
|
7f81405231 |
|
|
@ -123,7 +123,6 @@
|
||||||
</setting-item-box>
|
</setting-item-box>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</collapse-item>
|
</collapse-item>
|
||||||
|
|
||||||
<collapse-item name="地形设置" :expanded="true">
|
<collapse-item name="地形设置" :expanded="true">
|
||||||
|
|
@ -181,7 +180,7 @@ props.optionData.mapOptions.basemaps = [
|
||||||
"icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_img.png",
|
"icon": "https://data.mars3d.cn/img/thumbnail/basemap/tdt_img.png",
|
||||||
"type": "group",
|
"type": "group",
|
||||||
"layers": [
|
"layers": [
|
||||||
{
|
{
|
||||||
"name": "底图",
|
"name": "底图",
|
||||||
"type": "tdt",
|
"type": "tdt",
|
||||||
"layer": "img_d"
|
"layer": "img_d"
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ const handlerLoadFirePoint = (points:[])=>{
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查看详情
|
// 查看详情
|
||||||
const handlerFireDetail = (item) => {
|
const handlerFireDetail = (item) => {
|
||||||
|
|
||||||
// 显示弹窗
|
// 显示弹窗
|
||||||
eventHandlerHook(
|
eventHandlerHook(
|
||||||
|
|
@ -181,8 +181,6 @@ const handlerFireDetail = (item) => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 图标点击方法
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,20 @@ onMounted(()=>{
|
||||||
}
|
}
|
||||||
data.push(info);
|
data.push(info);
|
||||||
})
|
})
|
||||||
props.chartConfig.option.dataset.imgArr = [VITE_GLOB_API_URL+"/"+resData[0].image]
|
|
||||||
console.log("0000",)
|
// 图片处理
|
||||||
|
props.chartConfig.option.dataset.imgArr = [];
|
||||||
|
let tempImages = resData[0].image.split(",");
|
||||||
|
|
||||||
|
if(tempImages.length>0){
|
||||||
|
tempImages?.forEach((img,idx)=>{
|
||||||
|
props.chartConfig.option.dataset.imgArr.push(VITE_GLOB_API_URL+"/"+img)
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
props.chartConfig.option.dataset.imgArr = [VITE_GLOB_API_URL+"/"+resData[0].image]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
props.chartConfig.option.dataset.data = data;
|
props.chartConfig.option.dataset.data = data;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted } from 'vue'
|
import { onMounted,watch } from 'vue'
|
||||||
import { eventHandlerHook } from '@/hooks/eventHandler.hook';
|
import { eventHandlerHook } from '@/hooks/eventHandler.hook';
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
|
||||||
|
import { EventBus } from '@/utils/eventBus';
|
||||||
|
|
||||||
const chartEditStore = useChartEditStore();
|
const chartEditStore = useChartEditStore();
|
||||||
|
|
||||||
|
|
@ -26,7 +27,11 @@ const props = defineProps({
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const defaultClick = props.chartConfig.option.selectButton;
|
||||||
|
|
||||||
const changeButton = (type) => {
|
const changeButton = (type) => {
|
||||||
|
|
||||||
props.chartConfig.option.selectButton = type
|
props.chartConfig.option.selectButton = type
|
||||||
eventHandlerHook(
|
eventHandlerHook(
|
||||||
chartEditStore.getComponentList,
|
chartEditStore.getComponentList,
|
||||||
|
|
@ -35,6 +40,17 @@ const changeButton = (type) => {
|
||||||
type,
|
type,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 每次切换后展示默认选中按钮
|
||||||
|
watch(
|
||||||
|
()=> props.chartConfig.status.hide,
|
||||||
|
(newVal)=>{
|
||||||
|
if(newVal){
|
||||||
|
changeButton(defaultClick)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
const getClassName = (type) => {
|
const getClassName = (type) => {
|
||||||
let className = ''
|
let className = ''
|
||||||
switch(type){
|
switch(type){
|
||||||
|
|
@ -60,6 +76,7 @@ const getClassName = (type) => {
|
||||||
return className
|
return className
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const { list, selectButton } = props.chartConfig.option
|
const { list, selectButton } = props.chartConfig.option
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -24,16 +24,21 @@ const props = defineProps({
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const changeButton = (type) => {
|
const changeButton = (type) => {
|
||||||
|
|
||||||
props.chartConfig.option.selectButton = type
|
props.chartConfig.option.selectButton = type
|
||||||
|
|
||||||
eventHandlerHook(
|
eventHandlerHook(
|
||||||
chartEditStore.getComponentList,
|
chartEditStore.getComponentList,
|
||||||
props.chartConfig.events.interactConfigEvents[type],
|
props.chartConfig.events.interactConfigEvents[type],
|
||||||
'click',
|
'click',
|
||||||
type,
|
type,
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const { list, selectButton } = props.chartConfig.option
|
const { list, selectButton } = props.chartConfig.option
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
import { replaceSqlParams } from '@/utils/sqlHandler';
|
import { replaceSqlParams } from '@/utils/sqlHandler';
|
||||||
|
|
||||||
const chartEditStore = useChartEditStore();
|
const chartEditStore = useChartEditStore();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
chartConfig: {
|
chartConfig: {
|
||||||
type: Object as PropType<CreateComponentType>,
|
type: Object as PropType<CreateComponentType>,
|
||||||
|
|
@ -32,6 +33,8 @@
|
||||||
dataStyle: props.chartConfig.option.dataStyle,
|
dataStyle: props.chartConfig.option.dataStyle,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const primary_id = ref(null);
|
||||||
|
|
||||||
// 单击交互
|
// 单击交互
|
||||||
const clickBtn = (val) => {
|
const clickBtn = (val) => {
|
||||||
// 隐藏方法
|
// 隐藏方法
|
||||||
|
|
@ -41,6 +44,7 @@
|
||||||
'click',
|
'click',
|
||||||
val,
|
val,
|
||||||
);
|
);
|
||||||
|
|
||||||
useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any) => {
|
useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any) => {
|
||||||
// console.log('resData', resData);
|
// console.log('resData', resData);
|
||||||
});
|
});
|
||||||
|
|
@ -52,6 +56,7 @@
|
||||||
EventBus.on(props.chartConfig.id + 'dataupdate', (data) => {
|
EventBus.on(props.chartConfig.id + 'dataupdate', (data) => {
|
||||||
const keys = Object.keys(data);
|
const keys = Object.keys(data);
|
||||||
|
|
||||||
|
|
||||||
let interactConfigEvents = props.chartConfig.events.interactConfigEvents;
|
let interactConfigEvents = props.chartConfig.events.interactConfigEvents;
|
||||||
interactConfigEvents.forEach((item, index) => {
|
interactConfigEvents.forEach((item, index) => {
|
||||||
item?.movementList.forEach((m, mindex) => {
|
item?.movementList.forEach((m, mindex) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue