|
@@ -335,7 +335,7 @@ export default {
|
|
// this.data = newItems;
|
|
// this.data = newItems;
|
|
this.data[this.dragging] = dst;
|
|
this.data[this.dragging] = dst;
|
|
this.data[this.draggingE] = src;
|
|
this.data[this.draggingE] = src;
|
|
- let mindinfo = this.mindInfo(
|
|
|
|
|
|
+ let mindinfo = this.mindInfo2(
|
|
this.dragging,
|
|
this.dragging,
|
|
"move",
|
|
"move",
|
|
this.data[this.gIndex],
|
|
this.data[this.gIndex],
|
|
@@ -831,6 +831,15 @@ export default {
|
|
* 参数三 : content 行内容
|
|
* 参数三 : content 行内容
|
|
* 参数四 : next 下一行
|
|
* 参数四 : next 下一行
|
|
*/
|
|
*/
|
|
|
|
+ // messageInfo: {
|
|
|
|
+ // sendId: userid,
|
|
|
|
+ // moveIndex1: id, //第几个网格
|
|
|
|
+ // moveIndex2: moveIndex, //移动到的网格
|
|
|
|
+ // type: type, //类型
|
|
|
|
+ // data: content, //内容
|
|
|
|
+ // docId: roomid, //文档id
|
|
|
|
+ // // pageId: US.pageId, //当前页面id
|
|
|
|
+ // },
|
|
mindInfo(id, type, content, navid, userid, roomid, moveIndex) {
|
|
mindInfo(id, type, content, navid, userid, roomid, moveIndex) {
|
|
var _data = {
|
|
var _data = {
|
|
"us.mindNetwork": [
|
|
"us.mindNetwork": [
|
|
@@ -839,13 +848,42 @@ export default {
|
|
receiveId: roomid, //文件id
|
|
receiveId: roomid, //文件id
|
|
type: navid, //消息类型
|
|
type: navid, //消息类型
|
|
messageInfo: {
|
|
messageInfo: {
|
|
- sendId: userid,
|
|
|
|
- moveIndex1: id, //第几个网格
|
|
|
|
- moveIndex2: moveIndex, //移动到的网格
|
|
|
|
|
|
+ id: id, //操作ID
|
|
|
|
+ type: type, //类型
|
|
|
|
+ content: content, //内容
|
|
|
|
+ docId: roomid, //文档id
|
|
|
|
+ pageId: top.US.pageId, //当前页面id
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ };
|
|
|
|
+ return _data;
|
|
|
|
+ },
|
|
|
|
+ mindInfo2(id, type, content, navid, userid, roomid, moveIndex) {
|
|
|
|
+ var _data = {
|
|
|
|
+ "us.mindNetwork": [
|
|
|
|
+ {
|
|
|
|
+ sendId: userid, //发送人id
|
|
|
|
+ receiveId: roomid, //文件id
|
|
|
|
+ type: navid, //消息类型
|
|
|
|
+ messageInfo: {
|
|
|
|
+ id: id, //操作ID
|
|
|
|
+ type: type, //类型
|
|
|
|
+ content: content, //内容
|
|
|
|
+ docId: roomid, //文档id
|
|
|
|
+ pageId: top.US.pageId, //当前页面id
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ sendId: userid, //发送人id
|
|
|
|
+ receiveId: roomid, //文件id
|
|
|
|
+ type: navid, //消息类型
|
|
|
|
+ messageInfo: {
|
|
|
|
+ id: moveIndex, //操作ID
|
|
type: type, //类型
|
|
type: type, //类型
|
|
- data: content, //内容
|
|
|
|
|
|
+ content: content, //内容
|
|
docId: roomid, //文档id
|
|
docId: roomid, //文档id
|
|
- // pageId: US.pageId, //当前页面id
|
|
|
|
|
|
+ pageId: top.US.pageId, //当前页面id
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -919,25 +957,25 @@ export default {
|
|
e.data.type &&
|
|
e.data.type &&
|
|
e.data.type == "mindNetwork_update" &&
|
|
e.data.type == "mindNetwork_update" &&
|
|
e.data.info.docId == _this.RoomInfo.id &&
|
|
e.data.info.docId == _this.RoomInfo.id &&
|
|
- !(e.data.info.sendId == _this.userinfo.userid)
|
|
|
|
|
|
+ !(e.data.sendId == _this.userinfo.userid)
|
|
) {
|
|
) {
|
|
- _this.data[e.data.info.moveIndex1] = e.data.info.data;
|
|
|
|
|
|
+ _this.data[e.data.info.id] = e.data.info.data;
|
|
} else if (
|
|
} else if (
|
|
e.data.type &&
|
|
e.data.type &&
|
|
e.data.type == "mindNetwork_delete" &&
|
|
e.data.type == "mindNetwork_delete" &&
|
|
e.data.info.docId == _this.RoomInfo.id &&
|
|
e.data.info.docId == _this.RoomInfo.id &&
|
|
- !(e.data.info.sendId == _this.userinfo.userid)
|
|
|
|
|
|
+ !(e.data.sendId == _this.userinfo.userid)
|
|
) {
|
|
) {
|
|
- _this.data[e.data.info.moveIndex1] = "";
|
|
|
|
|
|
+ _this.data[e.data.info.id] = "";
|
|
} else if (
|
|
} else if (
|
|
e.data.type &&
|
|
e.data.type &&
|
|
e.data.type == "mindNetwork_move" &&
|
|
e.data.type == "mindNetwork_move" &&
|
|
e.data.info.docId == _this.RoomInfo.id &&
|
|
e.data.info.docId == _this.RoomInfo.id &&
|
|
- !(e.data.info.sendId == _this.userinfo.userid)
|
|
|
|
|
|
+ !(e.data.sendId == _this.userinfo.userid)
|
|
) {
|
|
) {
|
|
var newItems = [...JSON.parse(JSON.stringify(_this.data))]; //拷贝一份数据进行交换操作。
|
|
var newItems = [...JSON.parse(JSON.stringify(_this.data))]; //拷贝一份数据进行交换操作。
|
|
- _this.data[e.data.info.moveIndex1] = newItems[e.data.info.moveIndex2];
|
|
|
|
- _this.data[e.data.info.moveIndex2] = newItems[e.data.info.moveIndex1];
|
|
|
|
|
|
+ // _this.data[e.data.info.id] = newItems[e.data.info.moveIndex2];
|
|
|
|
+ // _this.data[e.data.info.moveIndex2] = newItems[e.data.info.moveIndex1];
|
|
}
|
|
}
|
|
_this.$forceUpdate();
|
|
_this.$forceUpdate();
|
|
});
|
|
});
|