feat: There is no way the, bug #52396

This commit is contained in:
super_liu
2022-04-02 14:39:56 +08:00
parent e5777d93b7
commit 1059b3c8c2
@@ -4,7 +4,7 @@
<!--title 标题--> <!--title 标题-->
<div class="details-header"> <div class="details-header">
<span>{{sarStandardsInfoEO.standCode}} {{sarStandardsInfoEO.standName}} 企标详情</span> <span>{{sarStandardsInfoEO.standCode}} {{sarStandardsInfoEO.standName}} 企标详情</span>
<b style="float:right;font-size: 25px;color: #ff9900">{{ ((qualityCommentScore*2*0.9)+(dynamicCommentScore*2*0.1)).toFixed(3) }}</b> <b style="float:right;font-size: 25px;color: #ff9900">{{ ((qualityCommentScore*2*0.9)+(dynamicCommentScore*2*0.1)).toFixed(1) }}</b>
<!-- 之前的先注掉--> <!-- 之前的先注掉-->
<!-- <span>{{sarStandardsInfoEO.standCode}}-{{sarStandardsInfoEO.standYear}} {{sarStandardsInfoEO.standName}} 企标详情</span>--> <!-- <span>{{sarStandardsInfoEO.standCode}}-{{sarStandardsInfoEO.standYear}} {{sarStandardsInfoEO.standName}} 企标详情</span>-->
</div> </div>
@@ -27,7 +27,7 @@
<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="tabsClickBtn"> <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" 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"
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px', :header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"> fontWeight: 'bold', height: '48px'}">
@@ -294,7 +294,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">
<span v-if="scope.row.commentReason">{{scope.row.commentReason}}</span> <span v-if="scope.row.commentReason">{{scope.row.commentReason ? (scope.row.commentReason === '-'? '':scope.row.commentReason) : scope.row.commentReason}}</span>
<span v-else style="color: #c0c4cc">该用户没有填写评分理由</span> <span v-else style="color: #c0c4cc">该用户没有填写评分理由</span>
</template> </template>
</el-table-column> </el-table-column>
@@ -1612,7 +1612,7 @@ export default {
this.dynamicHistoryCommentTable = res.data this.dynamicHistoryCommentTable = res.data
this.historyCommentForm.revise = res.data[0].targetScore this.historyCommentForm.revise = res.data[0].targetScore
this.historyCommentForm.reviseReason = res.data[0].commentReason this.historyCommentForm.reviseReason = res.data[0].commentReason ? (res.data[0].commentReason === '-'? '':res.data[0].commentReason) : res.data[0].commentReason
let averageScore = 0 let averageScore = 0
res.data.forEach(item => { res.data.forEach(item => {
@@ -1630,90 +1630,92 @@ export default {
}, },
tabsClickBtn(tab, event){ tabsClickBtn(tab, event){
// if (this.commentActiveName === 'dynamicComment'){ if (this.commentActiveName === 'dynamicComment'){
// this.indexType = 'dynamic' 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,
// } }
// 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 this.qualityHistoryCommentTable = res.data
// this.historyInfoLoading = false this.historyInfoLoading = false
//
// }, e => { }, e => {
// this.historyInfoLoading = false this.historyInfoLoading = false
// }) })
// } }else if (this.commentActiveName === 'historyComment'){
// else if (this.commentActiveName === 'historyComment'){ this.commentAverageScoreTag = '1'
// this.historyInfoLoading = true this.tabsClick()
// this.indexType = 'quality' this.dynamicHistoryCommentTable = []
// //查询评分表 this.historyInfoLoading = true
// const allData = { this.indexType = 'quality'
// lawId: this.$route.params.id, //查询评分表
// userId: this.dynamicFirstHistoryPeopleId, const allData = {
// evaluationType: this.indexType lawId: this.$route.params.id,
// } userId: this.dynamicFirstHistoryPeopleId,
// this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , { evaluationType: this.indexType
// _this: this }
// }, res => { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , {
// this.dynamicHistoryCommentTable = res.data _this: this
// this.historyCommentForm.revise = res.data[0].targetScore }, res => {
// this.historyCommentForm.reviseReason = res.data[0].commentReason this.dynamicHistoryCommentTable = res.data
// this.historyCommentForm.revise = res.data[0].targetScore
// let averageScore = 0 this.historyCommentForm.reviseReason = res.data[0].commentReason
// res.data.forEach(item => {
// if (item.valueType === 'number'){ let averageScore = 0
// averageScore += parseInt(item.targetScore) res.data.forEach(item => {
// } if (item.valueType === 'number'){
// }) averageScore += parseInt(item.targetScore)
// averageScore = averageScore / 4 }
// this.historyCommentForm.averageScore = averageScore })
// this.historyInfoLoading = false averageScore = averageScore / 4
// }, e => { this.historyCommentForm.averageScore = averageScore
// this.historyInfoLoading = false this.historyInfoLoading = false
// }) }, e => {
// } this.historyInfoLoading = false
// })
// //查询动态评价总平均分和质量评价总平均分 }
// let standId = this.$route.params.id
// this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getScore', {lawId:standId}, { //查询动态评价总平均分和质量评价总平均分
// _this: this let standId = this.$route.params.id
// }, res => { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getScore', {lawId:standId}, {
// this.qualityCommentScore = res.data.quality.toFixed(3)/2 _this: this
// this.dynamicCommentScore = res.data.dynamic.toFixed(3)/2 }, res => {
// this.qualityCommentScore = res.data.quality.toFixed(3)/2
// }, e => { this.dynamicCommentScore = res.data.dynamic.toFixed(3)/2
// })
// }, e => {
// // 刷新质量评价评分人表格和动态评价评分人表格 })
// const qualityRequest = {
// lawId: standId, // 刷新质量评价评分人表格和动态评价评分人表格
// evaluationType: 'quality' const qualityRequest = {
// } lawId: standId,
// this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getHistory', qualityRequest, { evaluationType: 'quality'
// _this: this }
// }, res => { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getHistory', qualityRequest, {
// this.qualityHistoryPeopleTable = res.data.records _this: this
// this.qualityFirstHistoryPeopleId = res.data.records[0].userId }, res => {
// this.qualityHistoryPeopleTable = res.data.records
// }, e => { this.qualityFirstHistoryPeopleId = res.data.records[0].userId
// })
// const dynamicRequest = { }, e => {
// lawId: standId, })
// evaluationType: 'dynamic' const dynamicRequest = {
// } lawId: standId,
// this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getHistory', dynamicRequest, { evaluationType: 'dynamic'
// _this: this }
// }, res => { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getHistory', dynamicRequest, {
// this.dynamicHistoryPeopleTable = res.data.records _this: this
// this.dynamicFirstHistoryPeopleId = res.data.records[0].userId }, res => {
// this.dynamicHistoryPeopleTable = res.data.records
// }, e => { this.dynamicFirstHistoryPeopleId = res.data.records[0].userId
// })
}, e => {
})
}, },
tabsClick(tab, event){ tabsClick(tab, event){
@@ -1739,6 +1741,7 @@ export default {
} }
else if (this.commentAverageScoreTag === '2'){ else if (this.commentAverageScoreTag === '2'){
this.indexType = 'dynamic' this.indexType = 'dynamic'
this.dynamicHistoryCommentTable = []
//查询评分表 //查询评分表
const allData = { const allData = {
lawId: this.$route.params.id, lawId: this.$route.params.id,
@@ -1748,19 +1751,23 @@ export default {
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , {
_this: this _this: this
}, res => { }, res => {
this.dynamicHistoryCommentTable = res.data if(res.data && res.data.length > 0){
this.historyCommentForm.revise = res.data[0].targetScore this.dynamicHistoryCommentTable = res.data
this.historyCommentForm.reviseReason = res.data[0].commentReason this.historyCommentForm.revise = res.data[0].targetScore
this.historyCommentForm.reviseReason = res.data[0].commentReason
let averageScore = 0 let averageScore = 0
res.data.forEach(item => { res.data.forEach(item => {
if (item.valueType === 'number'){ if (item.valueType === 'number'){
averageScore += parseInt(item.targetScore) averageScore += parseInt(item.targetScore)
} }
}) })
averageScore = averageScore / 4 averageScore = averageScore / 4
this.historyCommentForm.averageScore = averageScore this.historyCommentForm.averageScore = averageScore
this.historyInfoLoading = false }else {
this.historyCommentForm.averageScore = 0
}
this.historyInfoLoading = false
}, e => { }, e => {
this.historyInfoLoading = false this.historyInfoLoading = false
}) })
@@ -3029,18 +3036,8 @@ export default {
this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , { this.$http.get('sarEnterpriseStandardEvaluation/quality-evaluation/getEvaluationForm', allData , {
_this: this _this: this
}, res => { }, res => {
if(res.data && res.data.length > 0){
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
this.$forceUpdate() this.$forceUpdate()
}
}, e => { }, e => {
this.historyInfoLoading = false this.historyInfoLoading = false
}) })
@@ -3141,9 +3138,11 @@ export default {
this.$http.get('sarEnterpriseStandardEvaluation/evaluation-index/getEvaluationIndex', {indexType:this.indexType}, { this.$http.get('sarEnterpriseStandardEvaluation/evaluation-index/getEvaluationIndex', {indexType:this.indexType}, {
_this: this _this: this
}, res => { }, res => {
this.businessCommentTable = res.data
console.log(this.businessCommentTable) if(res.data){
this.$forceUpdate() this.businessCommentTable = res.data
this.$forceUpdate()
}
}, e => { }, e => {
}) })
this.sarStandardsInfoEO.id = this.$route.params.id this.sarStandardsInfoEO.id = this.$route.params.id