企标评价的评价功能
This commit is contained in:
@@ -23,9 +23,9 @@
|
||||
<div class="modular-header" style="height: 50px;">
|
||||
<div class="modular-header-btn">
|
||||
<el-button type="warning" icon="el-icon-edit" @click="businessCommentDialog = true">企标评价</el-button>
|
||||
<el-dialog title="企业标准动态评价表" :visible.sync="businessCommentDialog" width="80%">
|
||||
<el-table ref="businessCommentTable" :data="businessCommentTable" border style="width: 100%; flex: auto;margin-bottom: 2%"
|
||||
class="drag-table"
|
||||
<el-dialog title="企业标准动态评价表" :visible.sync="businessCommentDialog" width="54%" :close-on-click-modal="false">
|
||||
<el-table ref="businessCommentTable" :data="businessCommentTable.filter((v) => v.code !== '3U9lb')" border style="width: 100%; flex: auto;margin-bottom: 2%"
|
||||
class="comment-table"
|
||||
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}">
|
||||
<el-table-column
|
||||
@@ -34,43 +34,72 @@
|
||||
width="55"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column property="commentTarget" label="评价指标" width="300">
|
||||
</el-table-column>
|
||||
<el-table-column prop="targetScore" label="指标分值" width="160">
|
||||
<el-table-column prop="threeIndexTitle" label="评价指标" width="300">
|
||||
<!--commentTarget-->
|
||||
<template slot-scope="scope">
|
||||
<el-rate
|
||||
v-model="scope.row.targetScore"
|
||||
@change="targetScoreChange"
|
||||
allow-half>
|
||||
</el-rate>
|
||||
<span>{{scope.row.threeIndexTitle}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="averageScore" label="动态评价分值">
|
||||
<el-table-column prop="targetScore" label="指标分值" width="165">
|
||||
<template slot-scope="scope">
|
||||
<el-col :span="20">
|
||||
<el-rate
|
||||
v-model="value"
|
||||
disabled
|
||||
show-score
|
||||
text-color="#ff9900"
|
||||
score-template="{value}">
|
||||
v-model="scope.row.targetScore"
|
||||
@change="targetScoreChange(scope.row)"
|
||||
allow-half>
|
||||
</el-rate>
|
||||
<el-input v-model="scope.row.averageScore" style="margin: 10px 0;" />
|
||||
</el-col>
|
||||
<b style="margin-left: 5px;font-size: 12px;">{{ scope.row.targetScore * 2 }}</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="reason" label="简述理由">
|
||||
<template slot-scope="scope">
|
||||
<el-input clearable size="mini" placeholder="请简述评分理由" @change="commentReasonChange(scope.row)" v-model="scope.row.commentReason" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="address" label="简述理由"></el-table-column>
|
||||
</el-table>
|
||||
<el-form :model="businessCommentForm">
|
||||
<el-form-item label="动态评价分值">
|
||||
<el-col :span="4">
|
||||
<el-rate
|
||||
v-model="businessCommentForm.averageScore"
|
||||
disabled
|
||||
style="margin-top: 12px"
|
||||
text-color="#ff9900">
|
||||
</el-rate>
|
||||
</el-col>
|
||||
<b style="margin-top: 5px">{{ businessCommentForm.averageScore * 2 }}</b>
|
||||
</el-form-item>
|
||||
<el-form-item label="对标准的意见和建议,是否需要修订">
|
||||
<template>
|
||||
<el-radio v-model="revise" label="1">是</el-radio>
|
||||
<el-radio v-model="revise" label="0">否</el-radio>
|
||||
<el-input v-show="revise === '1'"
|
||||
<el-radio v-model="businessCommentForm.revise" label="1">是</el-radio>
|
||||
<el-radio v-model="businessCommentForm.revise" label="0">否</el-radio>
|
||||
<el-input v-show="businessCommentForm.revise === '1'"
|
||||
v-model="businessCommentForm.reviseReason"
|
||||
placeholder="请填写修订理由"
|
||||
type="textarea"
|
||||
:rows="2"></el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="padding-left: 80%">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
size="mini"
|
||||
:loading="commentSubmitLoading"
|
||||
icon="el-icon-check"
|
||||
@click="commentSubmit"
|
||||
>提交
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-close"
|
||||
class="common-button-default"
|
||||
@click="businessCommentDialog = false"
|
||||
>取消
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-button v-if="sarStandardsInfoEO.collectId" @click="collectClick(sarStandardsInfoEO.collectId)" title="取消收藏" class="collection-btn" icon="el-icon-star-on" :loading="isSubmit"></el-button>
|
||||
<el-button v-else @click="collectClick()" title="收藏" class="collection-btn" icon="el-icon-star-off" :loading="isSubmit"></el-button>
|
||||
@@ -1037,19 +1066,26 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
targetScore: '',
|
||||
indexType: 'dynamic',
|
||||
commentReason: '', // 评价理由
|
||||
commentReason1: '', // 评价理由
|
||||
commentReason2: '', // 评价理由
|
||||
commentReason3: '', // 评价理由
|
||||
commentReason4: '', // 评价理由
|
||||
commentSubmitLoading: false,
|
||||
targetScore: '', // 指标分值
|
||||
targetScore1: '',
|
||||
targetScore2: '',
|
||||
targetScore3: '',
|
||||
targetScore4: '',
|
||||
businessCommentDialog: false,
|
||||
businessCommentForm: {},
|
||||
revise: '',
|
||||
businessCommentTable: [{
|
||||
commentTarget: '企业标准内容完整、要求合理(指标、流程等。)',
|
||||
}, {
|
||||
commentTarget: '企业标准便于实施应用',
|
||||
}, {
|
||||
commentTarget: '标准编写规范,内容清晰易理解',
|
||||
}, {
|
||||
commentTarget: '标准对我的实际工作很有帮助',
|
||||
}],
|
||||
businessCommentForm: {
|
||||
averageScore: '', // 平均分值
|
||||
revise: '',
|
||||
reviseReason: '', // 修订理由
|
||||
},
|
||||
businessCommentTable: [],
|
||||
commentTarget: '', // 评价指标
|
||||
activeNames: ['基础信息','过程稿件','实施日期'],
|
||||
activeState: true,
|
||||
visiblePlanCheck: false,
|
||||
@@ -1258,7 +1294,99 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
targetScoreChange(row){
|
||||
console.log('1234',row)
|
||||
if (this.targetScore1 === '') {
|
||||
this.targetScore1 = 0
|
||||
}
|
||||
if (this.targetScore2 === '') {
|
||||
this.targetScore2 = 0
|
||||
}
|
||||
if (this.targetScore3 === '') {
|
||||
this.targetScore3 = 0
|
||||
}
|
||||
if (this.targetScore4 === '') {
|
||||
this.targetScore4 = 0
|
||||
}
|
||||
switch (row.threeIndexTitle){
|
||||
case "企业标准内容完整、要求合理(指标、流程等。)":
|
||||
this.targetScore1 = 0
|
||||
this.targetScore1 = row.targetScore
|
||||
break
|
||||
case "企业标准便于实施应用":
|
||||
this.targetScore2 = 0
|
||||
this.targetScore2 = row.targetScore
|
||||
break
|
||||
case "标准编写规范,内容清晰易理解":
|
||||
this.targetScore3 = 0
|
||||
this.targetScore3 = row.targetScore
|
||||
break
|
||||
case "标准对我的实际工作很有帮助":
|
||||
this.targetScore4 = 0
|
||||
this.targetScore4 = row.targetScore
|
||||
break
|
||||
}
|
||||
this.businessCommentForm.averageScore = (this.targetScore1 + this.targetScore2 + this.targetScore3 +this.targetScore4)/4
|
||||
|
||||
|
||||
},
|
||||
commentReasonChange(row){
|
||||
if (row.threeIndexTitle === '企业标准内容完整、要求合理(指标、流程等。)'){
|
||||
this.commentReason1 = row.commentReason
|
||||
}
|
||||
if (row.threeIndexTitle === '企业标准便于实施应用'){
|
||||
this.commentReason2 = row.commentReason
|
||||
}
|
||||
if (row.threeIndexTitle === '标准编写规范,内容清晰易理解'){
|
||||
this.commentReason3 = row.commentReason
|
||||
}
|
||||
if (row.threeIndexTitle === '标准对我的实际工作很有帮助'){
|
||||
this.commentReason4 = row.commentReason
|
||||
}
|
||||
|
||||
},
|
||||
commentSubmit(){
|
||||
//验证必填
|
||||
let submitFlag = true
|
||||
if (this.targetScore1 === '' || this.targetScore1 === 0 ||
|
||||
this.targetScore2 === '' || this.targetScore2 === 0 ||
|
||||
this.targetScore3 === '' || this.targetScore3 === 0 ||
|
||||
this.targetScore4 === '' || this.targetScore4 === 0) {
|
||||
submitFlag = false
|
||||
this.$message.warning('请评价指标分值')
|
||||
}else if (
|
||||
(this.commentReason1 === '' && this.targetScore1 < 3) ||
|
||||
(this.commentReason2 === '' && this.targetScore2 < 3) ||
|
||||
(this.commentReason3 === '' && this.targetScore3 < 3) ||
|
||||
(this.commentReason4 === '' && this.targetScore4 < 3)
|
||||
) {
|
||||
submitFlag = false
|
||||
this.$message.warning('请简述低分理由')
|
||||
} else if (this.businessCommentForm.revise === ''){
|
||||
submitFlag = false
|
||||
this.$message.warning('请选择是否需要修订')
|
||||
}else if (this.businessCommentForm.revise === '1' && this.businessCommentForm.reviseReason === ''){
|
||||
submitFlag = false
|
||||
this.$message.warning('请填写修订理由')
|
||||
}
|
||||
if (submitFlag === true) {
|
||||
this.$message.success('通过')
|
||||
|
||||
const allData = {
|
||||
tableData: this.businessCommentTable,
|
||||
formData: JSON.stringify(this.businessCommentForm),
|
||||
standId: this.sarStandardsInfoEO.id,
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}
|
||||
|
||||
console.log(allData)
|
||||
this.$http.postData('sarEnterpriseStandardEvaluation/quality-evaluation/submitEvaluationForm', allData, {
|
||||
_this: this
|
||||
}, res => {
|
||||
console.log(res)
|
||||
}, e => {
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
child1Func(child1){
|
||||
const list = []
|
||||
@@ -2255,6 +2383,14 @@ export default {
|
||||
// }
|
||||
},
|
||||
async mounted () {
|
||||
this.$http.get('sarEnterpriseStandardEvaluation/evaluation-index/getEvaluationIndex', {indexType:this.indexType}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
console.log('2371',res)
|
||||
this.businessCommentTable = res.data
|
||||
console.log(this.businessCommentTable)
|
||||
}, e => {
|
||||
})
|
||||
this.sarStandardsInfoEO.id = this.$route.params.id
|
||||
this.getOrgTreeSource()
|
||||
this.standItemEO.standId = this.$route.params.id
|
||||
|
||||
Reference in New Issue
Block a user