mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
v1.9 优化营业报表页面查询条件 无法输入bug
This commit is contained in:
parent
887fa33a79
commit
0606c3d8a6
@ -7,8 +7,12 @@
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col v-for="(conditionItem, conditionIndex) in item.conditions" :key="conditionIndex" :span="6">
|
||||
<el-input v-model.trim="conditionItem.value" :type="conditionItem.type"
|
||||
:placeholder="conditionItem.holdpace" clearable />
|
||||
<div class="el-input">
|
||||
<input class="el-input__inner"
|
||||
v-model.trim="conditionItem.value"
|
||||
:type="conditionItem.type"
|
||||
:placeholder="conditionItem.holdpace" />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button type="primary" @click="_queryReportTableMethod(item)">
|
||||
@ -157,6 +161,12 @@ export default {
|
||||
}
|
||||
const { data } = await listReportCustomComponentCondition(params)
|
||||
component.conditions = data
|
||||
// 确保每个条件项都包含响应式的 value 字段,避免 v-model 绑定后不显示
|
||||
component.conditions.forEach(cond => {
|
||||
if (!Object.prototype.hasOwnProperty.call(cond, 'value')) {
|
||||
this.$set(cond, 'value', '')
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('Failed to load conditions:', error)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user