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

只读改造

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