|
@@ -13,6 +13,7 @@
|
|
@search-criteria-switch="searchCriteriaSwitch"
|
|
@search-criteria-switch="searchCriteriaSwitch"
|
|
@resetColumn="resetColumn"
|
|
@resetColumn="resetColumn"
|
|
@saveColumn="saveColumn"
|
|
@saveColumn="saveColumn"
|
|
|
|
+ @refresh-change="refreshChange"
|
|
>
|
|
>
|
|
<template slot="cname" slot-scope="{row,index}">
|
|
<template slot="cname" slot-scope="{row,index}">
|
|
{{row.goodsName}}
|
|
{{row.goodsName}}
|
|
@@ -46,7 +47,8 @@ export default {
|
|
total: 0,
|
|
total: 0,
|
|
pageSizes: [10, 50, 100, 200, 300]
|
|
pageSizes: [10, 50, 100, 200, 300]
|
|
},
|
|
},
|
|
- option: {
|
|
|
|
|
|
+ option:{},
|
|
|
|
+ optionList: {
|
|
align: 'center',
|
|
align: 'center',
|
|
stripe: true,
|
|
stripe: true,
|
|
index: true,
|
|
index: true,
|
|
@@ -173,7 +175,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
|
|
+ async created() {
|
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(200), this.optionList);
|
|
|
|
+ this.key++
|
|
let i = 0;
|
|
let i = 0;
|
|
this.option.column.forEach(item => {
|
|
this.option.column.forEach(item => {
|
|
if (item.search) i++
|
|
if (item.search) i++
|
|
@@ -230,7 +234,7 @@ export default {
|
|
* 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
* 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
* 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
* 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
*/
|
|
*/
|
|
- const inSave = await this.saveColumnData(this.getColumnName(85.7), this.option);
|
|
|
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(200), this.option);
|
|
if (inSave) {
|
|
if (inSave) {
|
|
this.$message.success("保存成功");
|
|
this.$message.success("保存成功");
|
|
//关闭窗口
|
|
//关闭窗口
|
|
@@ -240,12 +244,15 @@ export default {
|
|
//自定义列重置
|
|
//自定义列重置
|
|
async resetColumn() {
|
|
async resetColumn() {
|
|
this.option = this.optionList;
|
|
this.option = this.optionList;
|
|
- const inSave = await this.delColumnData(this.getColumnName(85.7), this.optionList);
|
|
|
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(200), this.optionList);
|
|
if (inSave) {
|
|
if (inSave) {
|
|
this.$message.success("重置成功");
|
|
this.$message.success("重置成功");
|
|
this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ refreshChange() {
|
|
|
|
+ this.onLoad(this.page, this.search);
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|