代码生成器支持直接使用字典
修复查询涉及sql关键字时sql语句报错问题
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user