<el-form
:rules="RuleformDataSave"
:model="formDataSave"
slot="dialog-form"
ref="formDataSave"
label-width="25%"
size="mini"
>
<el-form-item
label="方案名称"
prop="scenarioName"
>
<el-table
v-if="formDataSave.IsRelevance==1"
:data="formDataSave.formDataTable"
border
header-align="center"
>
<el-table-column
prop="fiveClass"
label="五级分类"
align="center"
/>
<el-table-column
label="调研频率"
align="center"
>
<template slot="header">
<p class="headerP">
<span
class="sp"
style="color: red; font-size: 12px"
>*</span> 调研频率
</p>
</template>
<template slot-scope="scope">
<el-form-item
:prop="`formDataTable.${scope.$index}.frequencyTable`"
class="tabFormItem"
:rules="RuleformDataSave.frequencyTable"
>
<el-select
v-model="scope.row.frequencyTable"
filterable
>
<el-option
v-for="item in periodList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</template>
</el-table-column>
</el-table>
<el-form-item
v-if="formDataSave.IsRelevance!=1"
label="调研频率"
prop="frequency"
>
<el-select
v-model="formDataSave.frequency"
style="width:56%"
>
<el-option
v-for="item in periodList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<script>
data () {
return {
formDataSave: {
formDataTable: [],
FormPeriodList: [],'
},
RuleformDataSave: {
scenarioName: { required: true, message: '方案名称不能重复', trigger: ['change', 'blur'] },
IsRelevance: { required: true, message: '请选择', trigger: 'change' },
frequencyTable: [{ required: true, message: '请选择五级分类', trigger: 'blur' }]
}
}
},
</script>