企标评价

This commit is contained in:
shenyanpei
2022-01-29 19:12:02 +08:00
parent 61b01adc52
commit 61ba03c74e
@@ -25,7 +25,7 @@
<div class="modular-header-btn"> <div class="modular-header-btn">
<el-button type="warning" icon="el-icon-edit" @click="qbBtn">企标评价</el-button> <el-button type="warning" icon="el-icon-edit" @click="qbBtn">企标评价</el-button>
<el-dialog title="企业标准评价" :visible.sync="businessCommentDialog" :width="(commentAverageScoreTag === '1' && commentActiveName !== 'dynamicComment')?'90%':'65%'" :close-on-click-modal="false"> <el-dialog title="企业标准评价" :visible.sync="businessCommentDialog" :width="(commentAverageScoreTag === '1' && commentActiveName !== 'dynamicComment')?'90%':'65%'" :close-on-click-modal="false">
<el-tabs v-model="commentActiveName" @tab-click="tabsClick"> <el-tabs v-model="commentActiveName" @tab-click="tabsClickBtn">
<el-tab-pane label="动态评价" name="dynamicComment"> <el-tab-pane label="动态评价" name="dynamicComment">
<el-table ref="businessCommentTable" :data="businessCommentTable.filter((v) => v.code !== '3U9lb')" border style="width: 100%; flex: auto;margin-bottom: 2%" <el-table ref="businessCommentTable" :data="businessCommentTable.filter((v) => v.code !== '3U9lb')" border style="width: 100%; flex: auto;margin-bottom: 2%"
class="comment-table" class="comment-table"
@@ -52,7 +52,7 @@
allow-half> allow-half>
</el-rate> </el-rate>
</el-col> </el-col>
<b style="margin-left: 5px;font-size: 12px;color: #ff9900">{{ scope.row.targetScore * 2 }}</b> <b style="margin-top: 5px;margin-left: -2%;color: #ff9900">{{ scope.row.targetScore * 2 }}</b>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column property="reason" label="简述理由"> <el-table-column property="reason" label="简述理由">
@@ -1585,15 +1585,98 @@ export default {
}) })
} }
},
tabsClickBtn(tab, event){
if (this.commentActiveName === 'dynamicComment'){
this.indexType = 'dynamic'
//查询评分表
const allData = {
lawId: this.$route.params.id,
userId: this.qualityFirstHistoryPeopleId,
evaluationType: this.indexType,
}
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , {
_this: this
}, res => {
this.qualityHistoryCommentTable = res.data
this.historyInfoLoading = false
}, e => {
this.historyInfoLoading = false
})
}
else if (this.commentActiveName === 'historyComment'){
this.historyInfoLoading = true
this.indexType = 'quality'
//查询评分表
const allData = {
lawId: this.$route.params.id,
userId: this.dynamicFirstHistoryPeopleId,
evaluationType: this.indexType
}
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , {
_this: this
}, res => {
this.dynamicHistoryCommentTable = res.data
this.historyCommentForm.revise = res.data[0].targetScore
this.historyCommentForm.reviseReason = res.data[0].commentReason
let averageScore = 0
res.data.forEach(item => {
if (item.valueType === 'number'){
averageScore += parseInt(item.targetScore)
}
})
averageScore = averageScore / 4
this.historyCommentForm.averageScore = averageScore
this.historyInfoLoading = false
}, e => {
this.historyInfoLoading = false
})
}
//查询动态评价总平均分和质量评价总平均分
let standId = this.$route.params.id
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getScore', {lawId:standId}, {
_this: this
}, res => {
this.qualityCommentScore = res.data.quality.toFixed(3)/2
this.dynamicCommentScore = res.data.dynamic.toFixed(3)/2
}, 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 => {
})
}, },
tabsClick(tab, event){ tabsClick(tab, event){
this.historyInfoLoading = true this.historyInfoLoading = true
if (this.commentAverageScoreTag === '1' || this.commentActiveName === 'historyComment'){ if (this.commentAverageScoreTag === '1'){
if (this.commentActiveName === 'dynamicComment') {
this.indexType = 'dynamic'
} else {
this.indexType = 'quality' this.indexType = 'quality'
}
//查询评分表 //查询评分表
const allData = { const allData = {
lawId: this.$route.params.id, lawId: this.$route.params.id,
@@ -2864,27 +2947,32 @@ export default {
}, },
qbBtn() { qbBtn() {
if (this.commentActiveName === 'historyComment'){ if (this.commentActiveName === 'dynamicComment'){
this.indexType = 'quality' this.indexType = 'dynamic'
//查询评分表 //查询评分表
const allData = { const allData = {
lawId: this.$route.params.id, lawId: this.$route.params.id,
userId: this.qualityFirstHistoryPeopleId, userId: this.qualityFirstHistoryPeopleId,
evaluationType: this.indexType, evaluationType: this.indexType,
processNode: this.qualityHistoryPeopleTable.length>0?this.qualityHistoryPeopleTable[0].processNode:null
} }
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , {
_this: this _this: this
}, res => { }, res => {
this.qualityHistoryCommentTable = res.data let averageScore = 0
res.data.forEach(item=>{
item.targetScore = Number(item.targetScore)/2
averageScore += item.targetScore
})
this.businessCommentForm.averageScore = averageScore/4
this.businessCommentTable = res.data
this.historyInfoLoading = false this.historyInfoLoading = false
}, e => { }, e => {
this.historyInfoLoading = false this.historyInfoLoading = false
}) })
} }
else if (this.commentActiveName === 'dynamicComment'){ else if (this.commentActiveName === 'historyComment'){
this.indexType = 'dynamic' this.indexType = 'quality'
//查询评分表 //查询评分表
const allData = { const allData = {
lawId: this.$route.params.id, lawId: this.$route.params.id,