Commit b2c3847b authored by 周昊's avatar 周昊

Merge branch 'develop' of http://git.censoft.com.cn/rongtong/rongtong-app into develop

parents 0b221a89 d6cb64da
......@@ -35579,6 +35579,11 @@
"swiper": "^3.4.2"
}
},
"vue-draggable-resizable": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/vue-draggable-resizable/-/vue-draggable-resizable-2.3.0.tgz",
"integrity": "sha512-77CLRj1TPwB30pwsjOf3pkd1UzYanCdKXbqhILJ0Oo5QQl50lvBfyQCXxMFzwWwTc3sbBbQH3FfWSV+BkoSElA=="
},
"vue-esign": {
"version": "1.0.5",
"resolved": "https://registry.npm.taobao.org/vue-esign/download/vue-esign-1.0.5.tgz",
......@@ -11,7 +11,7 @@
<div class="north">
<img src="../../assets/imgs/north.png" alt="" />
</div>
<grid-layout
<!-- <grid-layout
:layout.sync="layout"
:col-num="colNum"
:row-height="30"
......@@ -19,35 +19,35 @@
:use-css-transforms="true"
:prevent-collision="false"
:preventCollision="true"
> -->
<!-- @click.native="changeName(item)" -->
<!-- :static="item.static" -->
<vue-draggable-resizable
v-for="item in layout"
:x="(375 / 12) * item.x"
:y="item.y * 30"
:w="(375 / 12) * item.w"
:h="item.h * 30"
:i="item.i"
:key="item.i"
:draggable="item.isDraggable"
:resizable="item.isResizable"
@resized="resizedEvent"
@moved="movedEvent"
:style="{
backgroundColor: item.c,
border: item.type == 'thorough' ? 'none !important' : '',
}"
>
<grid-item
v-for="item in layout"
:static="item.static"
:x="item.x"
:y="item.y"
:w="item.w"
:h="item.h"
:i="item.i"
:key="item.i"
:isDraggable="item.isDraggable"
:isResizable="item.isResizable"
@resized="resizedEvent"
@moved="movedEvent"
@click.native="changeName(item)"
:style="{
backgroundColor: item.c,
border: item.type == 'thorough' ? 'none !important' : '',
}"
<span class="text" :class="item.w > item.h * 5 ? '' : 'rowText'">{{
item.name
}}</span>
<span class="remove" @click.stop="removeItem(item.i)" v-if="showHeader"
>x</span
>
<span class="text" :class="item.w > item.h * 5 ? '' : 'rowText'">{{
item.name
}}</span>
<span class="remove" @click.stop="removeItem(item.i)" v-if="showHeader"
>x</span
>
<!-- <span class="remove" @click="removeItem(item.i)" v-if="item.i && isEdit">x</span> -->
</grid-item>
</grid-layout>
<!-- <span class="remove" @click="removeItem(item.i)" v-if="item.i && isEdit">x</span> -->
</vue-draggable-resizable>
<!-- </grid-layout> -->
<div class="setBtns">
<van-button @click="addItem" type="info" size="mini" v-if="!isViews"
>添加房间</van-button
......@@ -164,17 +164,20 @@
</template>
<script>
import { GridLayout, GridItem } from "vue-grid-layout";
// import { GridLayout, GridItem } from "vue-grid-layout";
import screenfull from "screenfull";
import { Toast, Dialog } from "vant";
import { debounce } from "@/utils/common.js";
import { getFun, postFun } from "@/service/table.js";
import VueDraggableResizable from "vue-draggable-resizable";
import "vue-draggable-resizable/dist/VueDraggableResizable.css";
// 动态添加/删除
export default {
name: "riskView",
components: {
GridLayout,
GridItem,
// GridLayout,
// GridItem,
VueDraggableResizable,
},
data() {
return {
......@@ -636,7 +639,7 @@ export default {
y: this.layout.length + (this.colNum / 2 || 12),
w: 2,
h: 3,
i:this.copyRoom.isCopy ? this.copyRoom.id : i,
i: this.copyRoom.isCopy ? this.copyRoom.id : i,
id: this.copyRoom.isCopy ? this.copyRoom.id : i,
name: this.roomName,
c: "#e6e5e5",
......@@ -660,10 +663,10 @@ export default {
? "基础设施"
: "9999",
};
if(this.copyRoom.isCopy){
data.id = this.copyRoom.id
if (this.copyRoom.isCopy) {
data.id = this.copyRoom.id;
}
this.layoutData.push(data);
this.resetCopy();
// postFun("/ledger/room/save", data)
......
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