Browse Source

window组件 新增展开面板控制

master
DIAMOND 1 year ago
parent
commit
6e99a53ee4
  1. 25
      src/components/earthMap/components/Window.vue
  2. 12
      src/components/earthMap/toolbar/AddModelWin.vue

25
src/components/earthMap/components/Window.vue

@ -46,7 +46,7 @@ export default defineComponent({
type: Boolean,
default: true,
},
showcloseButton:{
showcloseButton: {
type: Boolean,
default: true,
},
@ -90,8 +90,15 @@ export default defineComponent({
type: Function,
default: null,
},
/**
* @description 是否展开
*/
expand: {
type: Boolean,
default: true
}
},
emits:['cancel','ok','contextMenu','showclick'],
emits: ['cancel', 'ok', 'contextMenu', 'showclick'],
setup(props, ctx) {
const { proxy }: any = getCurrentInstance();
let langs = ref({
@ -104,7 +111,8 @@ export default defineComponent({
cancel: "Cancel"
}
})
let collapsed = ref(false);
// let collapsed = ref(false);
let collapsed = ref(!props.expand); //
let width_ = ref(0);
let height_ = ref(0);
let left_ = ref(0);
@ -128,8 +136,19 @@ export default defineComponent({
return props.confirmtext;
});
watch(
() => props.expand,
(value) => {
//
// console.log(value);
collapsed.value = !value;
}
);
onMounted(() => {
// console.log("props",props)
// console.log(earth.czm.viewer.container)
// console.log("window.$uia", window.$uia);
// console.log("window.", window);

12
src/components/earthMap/toolbar/AddModelWin.vue

@ -1,7 +1,7 @@
<template>
<div class="create-model-modal" v-if="winVisible">
<Window :title="title" @cancel="cancel" @ok="ok" :width="width" :minWidth="600" :height="height" :left="left"
:top="top" :floatright="false" :footervisible="true" v-show="!creating">
:top="top" :floatright="false" :footervisible="true" v-show="!creating" :expand="expand">
<div style="display: flex" class="custom-item" v-if="!isUpdateModel">
<label class="custom-label">模型类型:</label>
<div class="custom-item-box">
@ -283,10 +283,11 @@ export default defineComponent({
const { createMessage } = useMessage();
// const $mitt = mitt();
const userStore = useUserStore();
let expand = ref(true); //
let radarColor = ref({ rgba: { r: 0, g: 255, b: 0, a: 0.5 } });
let radarRange = ref(0);
let radarRadius = ref(0);
//线
let radarShifting = ref(0);
//使
@ -461,14 +462,16 @@ export default defineComponent({
try {
if (selectModel.value.value === 'jkd') {
// console.log("jkd");
expand.value = true;//
currentModel.value = addModel();
// console.log(" currentModel.value", currentModel.value);
} else if (selectModel.value.value === 'qy') {
expand.value = false;//
currentModel.value = addArea();
// currentModel.value = addPolyline();
// console.log(" currentModel.value", currentModel.value);
} else {
expand.value = true;//
currentModel.value = addPin();
}
} catch (e) {
@ -659,7 +662,7 @@ export default defineComponent({
bindModelProps(model);
minimumPixelSize.value = 80;
//
modelState('creating');
// modelState('creating');
// model.flyTo()
return model;
}
@ -1520,6 +1523,7 @@ export default defineComponent({
getRadarScan,
pinIconUpload,
uploadFileCount,
expand,
};
},
});

Loading…
Cancel
Save