在单个el-form-item根据条件判断是否必填
<el-form-item
label="设备"
prop="recordingMeterId"
:rules="requiredFlag? { required: true, message: '设备不能为空' } : {}"
>
<el-select
v-model="newForm.recordingMeterId"
clearable
style="width: 240px"
>
<el-option
v-for="item in recordernOptions"
:value="item.id"
:label="item.name"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>