|
@@ -13,6 +13,8 @@
|
|
|
@size-change="sizeChange"
|
|
|
@refresh-change="refreshChange"
|
|
|
@on-load="onLoad"
|
|
|
+ @saveColumn="saveColumn"
|
|
|
+ @resetColumn="resetColumn"
|
|
|
:table-loading="loading"
|
|
|
>
|
|
|
<template slot="moudleNameSearch">
|
|
@@ -99,8 +101,8 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- this.option = option
|
|
|
+ async created() {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(73), option);
|
|
|
let i = 0;
|
|
|
this.option.column.forEach(item => {
|
|
|
if (item.search) i++
|
|
@@ -179,6 +181,29 @@ export default {
|
|
|
this.onLoad(this.page, {parentId: 0});
|
|
|
})
|
|
|
},
|
|
|
+ async saveColumn() {
|
|
|
+ const inSave = await this.saveColumnData(
|
|
|
+ this.getColumnName(73),
|
|
|
+ this.option
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async resetColumn() {
|
|
|
+ this.option = option;
|
|
|
+ const inSave = await this.delColumnData(
|
|
|
+ this.getColumnName(73),
|
|
|
+ option
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|