有一个dialog的对话框,我想要在进入对话框的时候默认选中table的第一个
页面dialog部分:
:model="zzc"
:inline="true"
class="form-inline"
label-width="120px"
>
v-model="zzc.region"
placeholder="请选择"
style="width: 120px"
size="small"
/>
v-model="zzc.informDate"
type="date"
format="yyyy/MM/dd"
placeholder="选择日期"
style="width: 200px"
size="small"
/>
:data="zzc.processInfoList"
element-loading-text="Loading"
:height="480"
style="width: 100%"
:border="true"
fit
highlight-current-row
@current-change="handleCurrentRow"
>
{{ scope.row.procNumb }}
{{ scope.row.procName }}
v-model="scope.row.isReporting"
size="small"
/>
{{ scope.row.reportingTime }}
js调用:
dialogForm (row) {
console.log('row', row)
this.dialogFormVisible = true
getProdProcById(row.prodProcId).then(res => {
const _data = res.data
_data.map(item => {
item.informDate = new Date()
})
this.zzc = _data[0]
})
},
getProdProcById方法返回参数: