data() {
return {
loading: true,
layout: {disabled:false},
dialogSwitch: false,
diaType: 'checkDataAdministration',
formInfo: {
entityId:'',
surveyType:''
},
formInfoRules: {
},
filterInfo: {
surveyType:''
},
page: {
total: 0
},
tableData: [],
tableOption: {
column: [
{
label: '测量日期',
prop: 'surveyDate',
},
{
label: '测量类型',
prop: 'surveyType',
}
],
highlightCurrentRow: true,
selection: true,
index: true
}
};
},
测量类型需要根据字母显示对应的文字:A→所有 AK→自动化 MK→人工
<el-table-column prop="exam_status" label="考试状态" align="center">
<template slot-scope="scope">
<p v-show="scope.row.exam_status == '1'" style="color:#05d525">未开始</p>
<p v-show="scope.row.exam_status == '2'" style="color: #f83d10;">考试中</p>
<p v-show="scope.row.exam_status == '3'">已结束</p>
</template>
</el-table-column>
data:{
return {
surveyTypeArr:{
"A":"所有",
"AK":"自动化",
"MK":"人工"
}
}
}
<el-table-column prop="surveyType" label="考试状态" align="center">
<template slot-scope="scope">
<p>{{surveyTypeArr[scopr.row.surveyType]}}</p>
</template>
</el-table-column>