字典新增批量查询

This commit is contained in:
不做码农
2021-12-12 21:03:28 +08:00
parent 4d373da260
commit ac22a0e922
12 changed files with 145 additions and 23 deletions

View File

@@ -148,12 +148,21 @@ $end
// 列表数据查询
this.getList();
$set(index = 0)
var dictParams = [
$foreach(item in genTable.Columns)
$if((item.HtmlType == "radio" || item.HtmlType == "select" || item.HtmlType == "checkbox") && item.DictType != "")
this.getDicts("${item.DictType}").then((response) => {
this.${item.ColumnName}Options = response.data;
})
{ dictType: "${item.DictType}", columnName: "${item.ColumnName}Options" },
$set(index = index + 1)
$end
$end
];
$if(index > 0)
this.getMoreDicts(dictParams).then((response) => {
response.data.forEach((element) => {
this[element.columnName] = element.list;
});
});
$end
},
methods: {
@@ -165,7 +174,6 @@ $if(item.HtmlType == "datetime" && item.IsQuery == true)
this.queryParams["end${item.CsharpField}"] = this.addDateRange2(this.dateRange${item.CsharpField}, 1);
$end
$end
console.log(JSON.stringify(this.queryParams));
this.loading = true;
list${genTable.BusinessName}(this.queryParams).then(res => {
if (res.code == 200) {