Commit a65fd2a1 authored by 刘予佳's avatar 刘予佳

只读改造

parent 04610b16
......@@ -18,9 +18,9 @@
"
:label-width="item.labelWidth ? `${item.labelWidth}px` : ''"
:prop="item.prop"
:rules="item.rules"
:class="isEmpty"
>
<!-- :rules="item.rules" -->
<div class="flex">
<div>
<!-- <el-upload-self
......@@ -304,10 +304,10 @@
></el-date-picker>-->
</template>
</div>
<span
<!-- <span
v-if="item.importantField && !vwForm.detail"
class="important_field"
>{{ item.importantFieldDesc || "*" }}</span>
>{{ item.importantFieldDesc || "*" }}</span>-->
</div>
</el-form-item>
</el-col>
......
......@@ -155,7 +155,7 @@ export default {
},
},
watch: {
formEdit: {
formEdit:{
handler() {
this.initfields(this.formEdit)
},
......@@ -307,20 +307,21 @@ export default {
this.loading = false
this.$nextTick(() => {
// 子组件数据初始化完成后
setTimeout(() => {
// setTimeout(() => {
this.initfields(this.formEdit)
}, 0)
// }, 0)
if (this.$refs.form && this.$refs.form.clearValidate) {
this.$refs.form.clearValidate()
}
this.$forceUpdate();
})
},
// 绑定部分值(此时表单已渲染)
initfields(obj) {
for (let k in obj) {
if (this.form.hasOwnProperty(k)) {
// if (this.form.hasOwnProperty(k)) {
this.form[k] = obj[k]
}
// }
}
},
},
......
......@@ -2,7 +2,7 @@
<!-- 随访调查录入 -->
<div>
<!-- <ConfigForms form-type="2" formClass="follow-form"></ConfigForms> -->
<read-form ref="form" :options="followupForm"></read-form>
<read-form ref="form" :options="followupForm" :formEdit="formEdit"></read-form>
</div>
</template>
......@@ -228,6 +228,10 @@ export default {
}]
},
]
},
formEdit:{
name:"djksh",
contact_phone:"12345678"
}
}
},
......
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