代码生成器支持直接使用字典

修复查询涉及sql关键字时sql语句报错问题
This commit is contained in:
QM303176530
2020-07-18 14:39:03 +08:00
parent de1d090c31
commit 41c4b8f0a5
3 changed files with 213 additions and 152 deletions
+9
View File
@@ -1,3 +1,4 @@
import { getDict } from "@/utils/dictionary";
export default {
data() {
return {
@@ -9,6 +10,14 @@ export default {
}
},
methods: {
filterDict(value,type){
const rowLabel = this[type+"Options"]&&this[type+"Options"].filter(item=>item.value == value)
return rowLabel&&rowLabel[0]&&rowLabel[0].label
},
async getDict(type){
const dicts = await getDict(type)
this[type+"Options"] = dicts
},
handleSizeChange(val) {
this.pageSize = val
this.getTableData()