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