Commit 0561516b authored by 郭铭瑶's avatar 郭铭瑶 🤘

工作站页面隐藏勾边按钮

parent 1d762a1f
...@@ -75,6 +75,7 @@ export default defineComponent({ ...@@ -75,6 +75,7 @@ export default defineComponent({
name: 'MapBtns', name: 'MapBtns',
emits: ['full', 'change', 'zoom'], emits: ['full', 'change', 'zoom'],
setup(_, ctx) { setup(_, ctx) {
const curViewType = computed(() => store.state.curView.type)
const btns = computed(() => { const btns = computed(() => {
const mapType = const mapType =
store.state.curMapType === '2D' store.state.curMapType === '2D'
...@@ -82,17 +83,20 @@ export default defineComponent({ ...@@ -82,17 +83,20 @@ export default defineComponent({
: { key: '2D', icon: d2, title: '开启2D地图' } : { key: '2D', icon: d2, title: '开启2D地图' }
const list = [ const list = [
// { key: 'search', icon: btn1 }, // { key: 'search', icon: btn1 },
{ key: 'dragable', icon: btn8, title: '开启/关闭拖拽功能' },
{ key: 'in', icon: zoomIn, title: '放大地图' }, { key: 'in', icon: zoomIn, title: '放大地图' },
{ key: 'out', icon: zoomOut, title: '缩小地图' }, { key: 'out', icon: zoomOut, title: '缩小地图' },
{ key: 'full', icon: btn2, title: '全屏' }, { key: 'full', icon: btn2, title: '全屏' },
{ key: 'points', icon: btn6, title: '显示/隐藏小区点' }, { key: 'points', icon: btn6, title: '显示/隐藏小区点' },
{ key: 'polyline', icon: btn7 },
{ key: 'dragable', icon: btn8, title: '开启/关闭拖拽功能' },
// { key: '', icon: btn4 }, // { key: '', icon: btn4 },
// { key: '', icon: btn5 }, // { key: '', icon: btn5 },
// { key: '', icon: btn6 }, // { key: '', icon: btn6 },
] ]
return [mapType, ...list]
const polyline = { key: 'polyline', icon: btn7 }
return curViewType.value === 'street'
? [mapType, ...list, polyline]
: [mapType, ...list]
}) })
const fullScreen = ref(false) const fullScreen = ref(false)
const searchModal = ref(false) const searchModal = ref(false)
...@@ -131,7 +135,7 @@ export default defineComponent({ ...@@ -131,7 +135,7 @@ export default defineComponent({
const searchKey = ref('') const searchKey = ref('')
const caseList = computed(() => store.state.caseList) const caseList = computed(() => store.state.caseList)
const options = computed(() => { const options = computed(() => {
if (store.state.curView.type === 'street') { if (curViewType.value === 'street') {
return [ return [
{ label: '第一工作站', value: 'workArea1' }, { label: '第一工作站', value: 'workArea1' },
{ label: '第二工作站', value: 'workArea2' }, { label: '第二工作站', value: 'workArea2' },
...@@ -148,7 +152,7 @@ export default defineComponent({ ...@@ -148,7 +152,7 @@ export default defineComponent({
checkboxValues.value = e checkboxValues.value = e
} }
watch( watch(
[() => store.state.curView.type, () => store.state.curMapType], [() => curViewType.value, () => store.state.curMapType],
() => (checkboxValues.value = []) () => (checkboxValues.value = [])
) )
return { return {
...@@ -162,6 +166,7 @@ export default defineComponent({ ...@@ -162,6 +166,7 @@ export default defineComponent({
options, options,
checkboxValues, checkboxValues,
handleChange, handleChange,
curViewType,
} }
}, },
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment