<template>
<div class="app-container">
<span>考核时间:{{rulesDetailList.createTime}}</span>
<span>考核成绩:{{rulesDetailList.eventScore}}</span>
<span>考核人员:{{rulesDetailList.eventUserName}}</span>
<span>考核人员-1 需要使用v-for:{{createTime}}</span>
<span>考核人员-2 需要使用v-for:{{score}}</span>
</div>
</template>
<script>
import { selectDetailRules } from "@/api/rules/rules";
export default {
data() {
return {
rulesDetailList:{},
params:'',
createTime:[],
score:[]
};
},
created() {
this.getParams();
this.getList();
},
methods: {
getParams(){
this.params = this.$route.query.id
},
getList() {
this.loading = true;
selectDetailRules(this.params).then(response => {
this.rulesDetailList = response.data;
console.log(this.rulesDetailList.eventRuleTypes.length)
for (let i = 0; i < this.rulesDetailList.eventRuleTypes.length; i++) {
this.createTime.push(this.rulesDetailList.eventRuleTypes[i].createTime);
this.score.push(this.rulesDetailList.eventRuleTypes[i].score)
}
this.loading = false;
});
}
}
};
</script>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleDetail(scope.row)"
>详情</el-button>
handleDetail(row) {
this.$router.push({
path:'/indexTest',
query: {id: row.id }
})
},