|
@@ -1,4 +1,5 @@
|
|
<template>
|
|
<template>
|
|
|
|
+ <!--集装箱-->
|
|
<basic-container>
|
|
<basic-container>
|
|
<avue-crud :option="option"
|
|
<avue-crud :option="option"
|
|
:table-loading="loading"
|
|
:table-loading="loading"
|
|
@@ -17,6 +18,8 @@
|
|
@current-change="currentChange"
|
|
@current-change="currentChange"
|
|
@size-change="sizeChange"
|
|
@size-change="sizeChange"
|
|
@refresh-change="refreshChange"
|
|
@refresh-change="refreshChange"
|
|
|
|
+ @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 291)"
|
|
|
|
+ @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 291)"
|
|
@on-load="onLoad">
|
|
@on-load="onLoad">
|
|
<template slot="menuLeft">
|
|
<template slot="menuLeft">
|
|
<el-button type="danger"
|
|
<el-button type="danger"
|
|
@@ -46,7 +49,8 @@
|
|
total: 0
|
|
total: 0
|
|
},
|
|
},
|
|
selectionList: [],
|
|
selectionList: [],
|
|
- option: {
|
|
|
|
|
|
+ option:{},
|
|
|
|
+ optionBack: {
|
|
height:'auto',
|
|
height:'auto',
|
|
calcHeight: 30,
|
|
calcHeight: 30,
|
|
tip: false,
|
|
tip: false,
|
|
@@ -342,6 +346,9 @@
|
|
return ids.join(",");
|
|
return ids.join(",");
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ async created() {
|
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(291), this.optionBack);
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
rowSave(row, done, loading) {
|
|
rowSave(row, done, loading) {
|
|
bcntrtypesSubmit(row).then(() => {
|
|
bcntrtypesSubmit(row).then(() => {
|
|
@@ -451,7 +458,31 @@
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.selectionClear();
|
|
this.selectionClear();
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ //自定义列保存
|
|
|
|
+ async saveColumnTwo(ref, option, optionBack, code) {
|
|
|
|
+ /**
|
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
|
+ */
|
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
|
+ if (inSave) {
|
|
|
|
+ this.$message.success("保存成功");
|
|
|
|
+ //关闭窗口
|
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //自定义列重置
|
|
|
|
+ async resetColumnTwo(ref, option, optionBack, code) {
|
|
|
|
+ this[option] = this[optionBack];
|
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
|
+ if (inSave) {
|
|
|
|
+ this.$message.success("重置成功");
|
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|