<template>
    <div>
        <el-table :data="list" border style="width: 100%">
            <el-table-column prop="classTitle" label="考核纬度"></el-table-column>
            <el-table-column prop="assessTitle" label="考核项目"></el-table-column>
            <el-table-column prop="dutyTitle" label="具体职责"></el-table-column>
            <el-table-column prop="extraPoints" label="加分">
              <template slot-scope="scope">
                {{scope.row.extraPoints/10}}
              </template>
            </el-table-column>
            <el-table-column prop="extraPointstext" label="加分说明">
              <template slot-scope="scope">
                {{scope.row.extraPointstext}}
              </template>
            </el-table-column>
            <el-table-column prop="deductPoints" label="扣分">
              <template slot-scope="scope">
                {{scope.row.deductPoints/10}}
              </template>
            </el-table-column>
            <el-table-column prop="deductPointstext" label="扣分说明">
              <template slot-scope="scope">
                {{scope.row.deductPointstext}}
              </template>
            </el-table-column>
            <el-table-column label="得分">
              <template slot-scope="scope">
                {{scope.row.score/10}}
              </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
import { lookdepartmentassessinfo } from '@/api/dutys'
    export default {
         data() {
      return {
        from:{
            id:""
        },
        list:[],
      }
      
    },
    created() {
        console.log('this.$route.query')
        console.log(this.$route.query)
        this.from.id=this.$route.query.id
        this.getApprovalList()
    },
    methods: {
        async getApprovalList(){
            const res = await lookdepartmentassessinfo(this.from)
            this.list=JSON.parse(JSON.stringify(res.data.dutyListMap))
            console.log(JSON.parse(JSON.stringify(res.data.dutyListMap)))
            
        },
    },
}
</script>

<style lang="scss" scoped>

</style>