irc_web/.svn/pristine/ec/ecb51fe34f8863fe7650f9f9ffc...

168 lines
4.5 KiB
Plaintext

<template>
<el-table
v-loading="loading"
:data="taskList"
>
<el-table-column
prop="BlindName"
label="访视名称"
show-overflow-tooltip
width="150"
/>
<!-- 评估结果 -->
<el-table-column
label="访视点计数"
align="center"
prop=""
>
<template>
<el-table-column
v-for="(qs,index) in evaluationQsList"
:key="index"
prop=""
:label="qs"
show-overflow-tooltip
width="150"
>
<template slot-scope="scope">
<div v-if="scope.row.BeforeQuestionList.length>index && scope.row.BeforeQuestionList[index].Answer">
<span v-if="scope.row.BeforeQuestionList[index].DictionaryCode">
{{ $fd(scope.row.BeforeQuestionList[index].DictionaryCode,parseInt(scope.row.BeforeQuestionList[index].Answer)) }}
</span>
<span v-else-if="scope.row.BeforeQuestionList[index].QuestionType === 22">{{scope.row.BeforeQuestionList[index].Answer === '-1' ? '未知' : scope.row.BeforeQuestionList[index].Answer}}</span>
<span v-else>{{ scope.row.BeforeQuestionList[index].Answer }}</span>
</div>
</template>
</el-table-column>
</template>
</el-table-column>
<!-- 是否同意访视结果 -->
<el-table-column
v-for="(qs,index) in agreeOrNotList"
:key="index"
prop=""
label="是否同意访视点计数"
show-overflow-tooltip
width="170"
>
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.AgreeOrNot[0].Answer) === 1" type="primary">
{{ $fd('ReadingYesOrNo',parseInt(scope.row.AgreeOrNot[0].Answer)) }}
</el-tag>
<el-tag v-else-if="parseInt(scope.row.AgreeOrNot[0].Answer) === 0" type="danger"> {{ $fd('ReadingYesOrNo',parseInt(scope.row.AgreeOrNot[0].Answer)) }}</el-tag>
<span v-else />
</template>
</el-table-column>
<!-- 评估结果 -->
<el-table-column
label="评估结果"
align="center"
prop=""
>
<template>
<el-table-column
v-for="(qs,index) in adjustedQsList"
:key="index"
prop=""
:label="qs"
show-overflow-tooltip
width="150"
>
<template slot-scope="scope">
<!-- {{ scope.row.AfterQuestionList.length>index?scope.row.AfterQuestionList[index].Answer:'' }} -->
<div v-if="scope.row.AfterQuestionList.length>index && scope.row.AfterQuestionList[index].Answer">
<span v-if="scope.row.AfterQuestionList[index].GlobalAnswerType === 3">
{{ getAssessType(scope.row.AfterQuestionList[index].Answer) }}
</span>
<span v-else-if="scope.row.AfterQuestionList[index].DictionaryCode">
{{ $fd(scope.row.AfterQuestionList[index].DictionaryCode,parseInt(scope.row.AfterQuestionList[index].Answer)) }}
</span>
<span v-else>{{ scope.row.AfterQuestionList[index].Answer }}</span>
</div>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column
:label="$t('common:action:action')"
width="200"
>
<template slot-scope="scope">
<el-button
circle
title="查看详情"
icon="el-icon-view"
@click="handleView(scope.row)"
/>
<!-- v-if="readingTaskState < 2 && scope.row.AgreeOrNot[0].Answer==='0'" -->
<el-button
v-if="readingTaskState < 2"
circle
title="调整"
icon="el-icon-edit"
@click="handleEdit(scope.row)"
/>
</template>
</el-table-column>
</el-table>
</template>
<script>
export default {
props: {
loading: {
type: Boolean,
default() {
return false
}
},
readingTaskState: {
type: Number,
default() {
return 0
}
},
agreeOrNotList: {
type: Array,
default() {
return []
}
},
taskList: {
type: Array,
default() {
return []
}
},
adjustedQsList: {
type: Array,
default() {
return []
}
},
evaluationQsList: {
type: Array,
default() {
return []
}
}
},
methods: {
handleEdit(row) {
this.$emit('handleEdit', row)
},
handleView(row) {
this.$emit('handleView', row)
}
}
}
</script>
<style scoped>
</style>