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