You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xy-frontend/src/views/realTimeMonitor/components/cableButton.vue

64 lines
1.5 KiB
Vue

<template>
<div class="buttonBox">
<!-- 线缆显示 -->
<el-dropdown class="dropgps" trigger="click" @command="handleCommandLine">
<el-button type="primary">
线缆显示<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu
slot="dropdown"
class="gpsdropStyle"
:append-to-body="false"
>
<el-dropdown-item command="open">开启</el-dropdown-item>
<el-dropdown-item command="close">关闭</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
<script>
export default {
components: {},
data() {
return {};
},
watch: {
termId: {
handler(newVal, oldVal) {},
deep: true,
immediate: true,
},
cmdId: {
handler(newVal, oldVal) {},
deep: true,
immediate: true,
},
},
computed: {
termId() {
return this.$store.state.termId;
},
cmdId() {
return this.$store.state.cmdId;
},
},
methods: {
//线缆显示
handleCommandLine(command) {
switch (command) {
case "open": //开启
console.log("开启");
//console.log(this.$parent.$parent.$refs.carouselpic.a());
this.$parent.$parent.$refs.carouselpic.openLine();
break;
case "close": //关闭
console.log("关闭");
// this.$refs.carouselpic.handelClear();
this.$parent.$parent.$refs.carouselpic.closeLine();
break;
}
},
},
};
</script>