企标评价 - 修缮了一些bug,优化用户体验(如果他还找茬,那唯一的找茬点就是选人表格的默认选中人没有高亮显示(tnnd,我都默认显示第一个了,俩都是第一个,就看在我华强的面子上,不要找茬)

This commit is contained in:
yanyizhou
2021-12-10 15:27:38 +08:00
parent 0a94b206b6
commit adaa50b4c3
@@ -136,13 +136,15 @@
prop="historyPeopleName" prop="historyPeopleName"
align="center" align="center"
label="质量评价人" label="质量评价人"
width="130px" width="200px">
show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip class="item" effect="dark" :content="scope.row.processNode" placement="right">
<el-button type="default" <el-button type="default"
style="width: 100px;" size="mini" @click="historyPeopleChange(scope.row)"> style="width: 180px;" size="mini"
{{ scope.row.userName }} @click="historyPeopleChange(scope.row)">
{{ scope.row.userName + '-' + scope.row.processNode.substring(0,9) }}
</el-button> </el-button>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -232,7 +234,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item <el-form-item
:prop="'qualityHistoryCommentTable.'+scope.$index + '.targetScore'"> :prop="'qualityHistoryCommentTable.'+scope.$index + '.targetScore'">
<el-input v-model.number="scope.row.targetScore" placeholder="请填写分值" /> <el-input v-model.number="scope.row.targetScore" disabled placeholder="用户没有填写分值" />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@@ -254,7 +256,7 @@
<template slot-scope="scope" v-if="scope.row.valueType !== 'add'"> <template slot-scope="scope" v-if="scope.row.valueType !== 'add'">
<el-form-item <el-form-item
:prop="'qualityHistoryCommentTable.'+scope.$index + '.commentReason'"> :prop="'qualityHistoryCommentTable.'+scope.$index + '.commentReason'">
<el-input v-model="scope.row.commentReason" placeholder="请填写扣分理由" /> <el-input v-model="scope.row.commentReason" disabled placeholder="用户没有填写理由" />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@@ -293,7 +295,7 @@
</el-table-column> </el-table-column>
<el-table-column property="reason" label="简述理由"> <el-table-column property="reason" label="简述理由">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input clearable size="mini" placeholder="该用户没有填写评分理由" disabled v-model="scope.row.commentReason" /> <el-input clearable size="mini" placeholder="用户没有填写评分理由" disabled v-model="scope.row.commentReason" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -1294,19 +1296,20 @@ export default {
data () { data () {
return { return {
commentAverageScoreTag: '1', commentAverageScoreTag: '1',
firstHistoryPeopleId: '',//最新评价的人的id qualityFirstHistoryPeopleId: '',//质量评价最新评价的人的id
dynamicFirstHistoryPeopleId: '',//动态评价最新评价的人的id
historyInfoLoading: false,//历史评价信息的loading historyInfoLoading: false,//历史评价信息的loading
historyCommentForm: { historyCommentForm: {
averageScore: 0, // 平均分值 averageScore: 0, // 平均分值
revise: '', revise: '',
reviseReason: '', // 修订理由 reviseReason: '', // 修订理由
}, // 历史评价表单 }, // 历史评价表单
dynamicHistoryCommentTable: [], // 动态评价历史评价表格
qualityHistoryCommentTable: [], // 质量评价历史评价表格 qualityHistoryCommentTable: [], // 质量评价历史评价表格
dynamicHistoryPeopleTable: [], // 动态评价历史评价人表格 dynamicHistoryCommentTable: [], // 动态评价历史评价表格
qualityHistoryPeopleTable: [], // 质量评价历史评价人表格 qualityHistoryPeopleTable: [], // 质量评价历史评价人表格
dynamicCommentScore: 0,// 动态评价总平均分 dynamicHistoryPeopleTable: [], // 动态评价历史评价人表格
qualityCommentScore: 0,// 质量评价总平均分 qualityCommentScore: 0,// 质量评价总平均分
dynamicCommentScore: 0,// 动态评价总平均分
commentActiveName: 'dynamicComment', commentActiveName: 'dynamicComment',
indexType: 'dynamic', indexType: 'dynamic',
commentReason: '', // 评价理由 commentReason: '', // 评价理由
@@ -1537,13 +1540,19 @@ export default {
methods: { methods: {
historyPeopleChange(row){ historyPeopleChange(row){
this.historyInfoLoading = true this.historyInfoLoading = true
const allData = { const qualityAllData = {
lawId: this.$route.params.id,
userId: row.userId,
evaluationType: this.indexType,
processNode: row.processNode
}
const dynamicAllData = {
lawId: this.$route.params.id, lawId: this.$route.params.id,
userId: row.userId, userId: row.userId,
evaluationType: this.indexType evaluationType: this.indexType
} }
if (this.indexType === 'quality'){ if (this.indexType === 'quality'){
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', qualityAllData , {
_this: this _this: this
}, res => { }, res => {
this.qualityHistoryCommentTable = res.data this.qualityHistoryCommentTable = res.data
@@ -1553,7 +1562,7 @@ export default {
this.historyInfoLoading = false this.historyInfoLoading = false
}) })
}else if (this.indexType === 'dynamic'){ }else if (this.indexType === 'dynamic'){
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', dynamicAllData , {
_this: this _this: this
}, res => { }, res => {
this.dynamicHistoryCommentTable = res.data this.dynamicHistoryCommentTable = res.data
@@ -1583,8 +1592,9 @@ export default {
//查询评分表 //查询评分表
const allData = { const allData = {
lawId: this.$route.params.id, lawId: this.$route.params.id,
userId: this.firstHistoryPeopleId, userId: this.qualityFirstHistoryPeopleId,
evaluationType: this.indexType evaluationType: this.indexType,
processNode: this.qualityHistoryPeopleTable[0].processNode
} }
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , {
_this: this _this: this
@@ -1601,7 +1611,7 @@ export default {
//查询评分表 //查询评分表
const allData = { const allData = {
lawId: this.$route.params.id, lawId: this.$route.params.id,
userId: this.firstHistoryPeopleId, userId: this.dynamicFirstHistoryPeopleId,
evaluationType: this.indexType evaluationType: this.indexType
} }
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , {
@@ -1636,6 +1646,32 @@ export default {
}, e => { }, e => {
}) })
// 刷新质量评价评分人表格和动态评价评分人表格
const qualityRequest = {
lawId: standId,
evaluationType: 'quality'
}
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getHistory', qualityRequest, {
_this: this
}, res => {
this.qualityHistoryPeopleTable = res.data.records
this.qualityFirstHistoryPeopleId = res.data.records[0].userId
}, e => {
})
const dynamicRequest = {
lawId: standId,
evaluationType: 'dynamic'
}
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getHistory', dynamicRequest, {
_this: this
}, res => {
this.dynamicHistoryPeopleTable = res.data.records
this.dynamicFirstHistoryPeopleId = res.data.records[0].userId
}, e => {
})
}, },
targetScoreChange(row){ targetScoreChange(row){
if (this.targetScore1 === '') { if (this.targetScore1 === '') {
@@ -1729,12 +1765,16 @@ export default {
this.commentSubmitLoading = false this.commentSubmitLoading = false
//重新评分之后刷新历史评分人 //重新评分之后刷新历史评分人
let standId = this.$route.params.id let standId = this.$route.params.id
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getHistory', {lawId:standId}, { const dynamicRequest = {
lawId: standId,
evaluationType: 'dynamic'
}
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getHistory', dynamicRequest, {
_this: this _this: this
}, res => { }, res => {
this.dynamicHistoryPeopleTable = [] this.dynamicHistoryPeopleTable = []
this.dynamicHistoryPeopleTable = res.data.records this.dynamicHistoryPeopleTable = res.data.records
this.firstHistoryPeopleId = res.data.records[0].userId this.dynamicFirstHistoryPeopleId = res.data.records[0].userId
}, e => { }, e => {
}) })
@@ -2827,7 +2867,7 @@ export default {
_this: this _this: this
}, res => { }, res => {
this.qualityHistoryPeopleTable = res.data.records this.qualityHistoryPeopleTable = res.data.records
this.firstHistoryPeopleId = res.data.records[0].userId this.qualityFirstHistoryPeopleId = res.data.records[0].userId
}, e => { }, e => {
}) })
@@ -2839,7 +2879,7 @@ export default {
_this: this _this: this
}, res => { }, res => {
this.dynamicHistoryPeopleTable = res.data.records this.dynamicHistoryPeopleTable = res.data.records
this.firstHistoryPeopleId = res.data.records[0].userId this.dynamicFirstHistoryPeopleId = res.data.records[0].userId
}, e => { }, e => {
}) })