|
@@ -0,0 +1,100 @@
|
|
|
+<template>
|
|
|
+ <div class="main">
|
|
|
+ <img src="@/assets/bgView/opcbg.png" width="1920px" alt="">
|
|
|
+ <div class="icon" style="left:20px">
|
|
|
+ <a-button type="primary" icon="appstore" size="large" @click="visibleLeft=true"/>
|
|
|
+ </div>
|
|
|
+ <div class="icon" style="right:20px">
|
|
|
+ <a-button type="primary" icon="setting" size="large" @click="visibleRight=true" />
|
|
|
+ </div>
|
|
|
+ <VueDragResize
|
|
|
+ :isActive="isActive"
|
|
|
+ :w="60"
|
|
|
+ :h="20"
|
|
|
+ :minh="20"
|
|
|
+ :x="50"
|
|
|
+ :y="100"
|
|
|
+ :isDraggable="true"
|
|
|
+ :isResizable="true"
|
|
|
+ :stickSize="5"
|
|
|
+ @dragstop="resize">
|
|
|
+ <a-tooltip>
|
|
|
+ <template slot="title">
|
|
|
+ BJ202207151
|
|
|
+ </template>
|
|
|
+ <div class="info">BJ202207151</div>
|
|
|
+ </a-tooltip>
|
|
|
+ </VueDragResize>
|
|
|
+ <a-drawer
|
|
|
+ title="选择车间"
|
|
|
+ placement="left"
|
|
|
+ :closable="false"
|
|
|
+ :visible="visibleLeft"
|
|
|
+ @close="onCloseLeft"
|
|
|
+ >
|
|
|
+ <p>Some contents...</p>
|
|
|
+ <p>Some contents...</p>
|
|
|
+ <p>Some contents...</p>
|
|
|
+ </a-drawer>
|
|
|
+ <a-drawer
|
|
|
+ title="点位配置"
|
|
|
+ placement="right"
|
|
|
+ :closable="false"
|
|
|
+ :visible="visibleRight"
|
|
|
+ @close="onCloseRight"
|
|
|
+ >
|
|
|
+ <p>Some contents...</p>
|
|
|
+ <p>Some contents...</p>
|
|
|
+ <p>Some contents...</p>
|
|
|
+ </a-drawer>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import VueDragResize from 'vue-drag-resize'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'Opc',
|
|
|
+ components: {
|
|
|
+ VueDragResize
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ visibleLeft: false,
|
|
|
+ visibleRight: false,
|
|
|
+ isActive: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ resize (newRect) {
|
|
|
+ this.isActive = false
|
|
|
+ console.log(newRect)
|
|
|
+ },
|
|
|
+ onCloseLeft () {
|
|
|
+ this.visibleLeft = false
|
|
|
+ },
|
|
|
+ onCloseRight () {
|
|
|
+ this.visibleRight = false
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.main{
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.info{
|
|
|
+ font-size: 12px;
|
|
|
+ transform: scale(0.5);
|
|
|
+}
|
|
|
+.icon{
|
|
|
+ font-size: 30px;
|
|
|
+ color: #fff;
|
|
|
+ position: absolute;
|
|
|
+ top:20px;
|
|
|
+
|
|
|
+}
|
|
|
+</style>
|