Commit 2f28bccf authored by 周远喜's avatar 周远喜

okdata grid

parent 59bbf396
...@@ -277,23 +277,19 @@ export default { ...@@ -277,23 +277,19 @@ export default {
} else { } else {
this.easySearch(); this.easySearch();
} }
// console.warn("this.$refs.main.clientX",this.$refs.main.offsetTop,this.$refs.main.offsetHeight)
if (this.height === 0) { if (this.height === 0) {
this.$nextTick(() => { this.$nextTick(() => {
this.tableHeight = this.$refs.main.offsetHeight; this.tableHeight = this.$refs.main.offsetHeight;
if (this.tableHeight < 300) { if (this.tableHeight < 300) {
this.tableHeight = window.screen.availHeight -this.$refs.main.offsetTop-200; this.tableHeight = window.screen.availHeight -this.$refs.main.offsetTop-200;
} }
// console.warn("this.$refs.main.VVV",this.tableHeight)
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
console.warn(123)
this.tableHeight = this.$refs.main.offsetHeight; this.tableHeight = this.$refs.main.offsetHeight;
if (this.tableHeight < 300) { if (this.tableHeight < 300) {
this.tableHeight = window.screen.availHeight -this.$refs.main.offsetTop-150; this.tableHeight = window.screen.availHeight -this.$refs.main.offsetTop-150;
} }
console.warn("this.$refs.main.tableHeight",this.tableHeight)
})(); })();
}; };
}); });
...@@ -302,7 +298,6 @@ export default { ...@@ -302,7 +298,6 @@ export default {
} }
//注册拖拽事件。 //注册拖拽事件。
this.$dragging.$on("dragend", e => { this.$dragging.$on("dragend", e => {
// console.log("dragend",e);
this.saveUserconfig(); this.saveUserconfig();
}); });
}, },
...@@ -328,7 +323,6 @@ export default { ...@@ -328,7 +323,6 @@ export default {
if (this.userConfig) { if (this.userConfig) {
var curColumns = []; var curColumns = [];
var config = JSON.parse(this.userConfig.content); var config = JSON.parse(this.userConfig.content);
// console.warn("2:列比对",config)
if (config.length == this.columnsCur.length) { if (config.length == this.columnsCur.length) {
config.map(u => { config.map(u => {
var item = this.columnsCur.filter(c => { var item = this.columnsCur.filter(c => {
...@@ -339,7 +333,6 @@ export default { ...@@ -339,7 +333,6 @@ export default {
curColumns.push(item[0]); curColumns.push(item[0]);
} }
}); });
// console.warn("3:初始化列")
this.columnsCur = curColumns; this.columnsCur = curColumns;
} }
} }
...@@ -369,7 +362,6 @@ export default { ...@@ -369,7 +362,6 @@ export default {
if (r.success) { if (r.success) {
if (r.result.length == 1) { if (r.result.length == 1) {
this.userConfig = r.result[0]; this.userConfig = r.result[0];
// console.warn("1:加载用户配置")
this.columnInit(); this.columnInit();
} }
if (!this.configLoad) { if (!this.configLoad) {
......
...@@ -268,7 +268,7 @@ export default { ...@@ -268,7 +268,7 @@ export default {
}) })
}, },
remove(id) { remove(id) {
Api.delete({ id: this.curId }).then((r) => { Api.delete({ id: id}).then((r) => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$refs.grid.load()
this.deletelModal = false this.deletelModal = false
......
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