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>
|
</div>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col v-for="(conditionItem, conditionIndex) in item.conditions" :key="conditionIndex" :span="6">
|
<el-col v-for="(conditionItem, conditionIndex) in item.conditions" :key="conditionIndex" :span="6">
|
||||||
<el-input v-model.trim="conditionItem.value" :type="conditionItem.type"
|
<div class="el-input">
|
||||||
:placeholder="conditionItem.holdpace" clearable />
|
<input class="el-input__inner"
|
||||||
|
v-model.trim="conditionItem.value"
|
||||||
|
:type="conditionItem.type"
|
||||||
|
:placeholder="conditionItem.holdpace" />
|
||||||
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-button type="primary" @click="_queryReportTableMethod(item)">
|
<el-button type="primary" @click="_queryReportTableMethod(item)">
|
||||||
@ -157,6 +161,12 @@ export default {
|
|||||||
}
|
}
|
||||||
const { data } = await listReportCustomComponentCondition(params)
|
const { data } = await listReportCustomComponentCondition(params)
|
||||||
component.conditions = data
|
component.conditions = data
|
||||||
|
// 确保每个条件项都包含响应式的 value 字段,避免 v-model 绑定后不显示
|
||||||
|
component.conditions.forEach(cond => {
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(cond, 'value')) {
|
||||||
|
this.$set(cond, 'value', '')
|
||||||
|
}
|
||||||
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to load conditions:', error)
|
console.error('Failed to load conditions:', error)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user