<el-form-item label="模板名称" prop="templateName" class="widthFlex1_2">
<el-select v-model="jobCardForm.templateName"
placeholder="--请选择--" style="width: 100%" @change="selectGet"
>
<el-option
v-for="item in fourthGuidance"
:key="item.objid"
:label="item.lckmc"
:value="item.objid"
>
</el-option>
</el-select>
</el-form-item>
selectGet(id) {//id传过来的是value
let obj = {};
obj = this.fourthGuidance.filter((item) => {
//item.objid指的就是:value="item.objid" 遍历item 判定与id传过来的value相等,返回一个数组obj
return item.objid === id;
});
//数组obj[0]. 可以获取所需要的:item下的(object下的)objid,lckmc,objid
this.NewtemplateName = obj[0].lckmc;
console.log(" this.NewtemplateName", this.NewtemplateName);
},