Commit 31fc42fa authored by “yiyousong”'s avatar “yiyousong”

perf: 优化应用数据搜索

parent 923fda5d
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
<div class="search-box"> <div class="search-box">
<a-input-group compact> <a-input-group compact>
<a-select style="min-width: 100px" v-model="fieldCode"> <a-select style="min-width: 100px" v-model="fieldCode">
<a-select-option value=""> 全部 </a-select-option>
<a-select-option <a-select-option
v-for="v in appTemplate" v-for="v in appTemplate"
:key="v.id" :key="v.id"
...@@ -214,6 +213,9 @@ export default { ...@@ -214,6 +213,9 @@ export default {
this.appTemplate = data.sort((a, b) => { this.appTemplate = data.sort((a, b) => {
return a.fieldOrderNo - b.fieldOrderNo; return a.fieldOrderNo - b.fieldOrderNo;
}); });
if (this.appTemplate.length) {
this.fieldCode = this.appTemplate[0].fieldCode;
}
} }
}, },
// 获取数据列表 // 获取数据列表
...@@ -224,7 +226,7 @@ export default { ...@@ -224,7 +226,7 @@ export default {
size: this.size, size: this.size,
appId: this.appId, appId: this.appId,
fieldCode: this.fieldCode, fieldCode: this.fieldCode,
fieldValue: this.searchVal, fieldValue: `%${this.searchVal}%`,
}); });
this.loading = false; this.loading = false;
if (res.data.code === 1) { if (res.data.code === 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment