|
|
|
@ -193,12 +193,13 @@ export default {
|
|
|
|
this.title = newVal;
|
|
|
|
this.title = newVal;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
modelData: function(newVal){
|
|
|
|
modelData: function(newVal){
|
|
|
|
|
|
|
|
// console.log(newVal)
|
|
|
|
if(newVal.id){
|
|
|
|
if(newVal.id){
|
|
|
|
this.mdata=newVal
|
|
|
|
this.mdata=newVal
|
|
|
|
this.leftType=newVal.leftType
|
|
|
|
this.leftType=newVal.leftType
|
|
|
|
this.rightType=newVal.rightType
|
|
|
|
this.rightType=newVal.rightType
|
|
|
|
console.log('更新了')
|
|
|
|
// console.log('触发了watch,重新赋值')
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
this.$nextTick(()=>{ //this.$nextTick解决不能在表单渲染之前赋值的报错问题
|
|
|
|
this.form.setFieldsValue({ //setFieldsValue 表示对form表单重新设置值
|
|
|
|
this.form.setFieldsValue({ //setFieldsValue 表示对form表单重新设置值
|
|
|
|
name:newVal.name,
|
|
|
|
name:newVal.name,
|
|
|
|
plcId:newVal.plcId,
|
|
|
|
plcId:newVal.plcId,
|
|
|
|
|