|
@@ -74,14 +74,17 @@
|
|
|
<el-table-column label="操作" width="300">
|
|
|
<template #default="scope">
|
|
|
<div style="display:flex;justify-content: left;">
|
|
|
- <div>
|
|
|
- <p class="indicitem" v-if="scope.row.stage === '流程未启动'" @click="agetdeptresponsibility(scope.row)">启动</p>
|
|
|
- <!-- <p class="indicitem" v-else @click="getDetail(scope.row)">详情</p> -->
|
|
|
+ <div style="display:flex;justify-content: left;">
|
|
|
+ <p class="indicitem" v-if="scope.row.stage === '数据已生成'" @click="agetdeptresponsibility(scope.row)">启动</p>
|
|
|
+ <p class="indicitem" v-if="scope.row.stage === '流程未启动' || scope.row.stage === '数据已生成'"
|
|
|
+ @click="getGenerateUnitQuarter(scope.row)">数据生成</p>
|
|
|
+ </div>
|
|
|
+ <div v-if="isAction" style="display:flex;justify-content: left;">
|
|
|
+ <p class="indicitem" v-if="scope.row.stage !== '流程已结束'" @click="calculateScore(scope.row)">计算得分</p>
|
|
|
+ <p class="indicitem" style="cursor: no-drop;color: #d9d9d9" v-if="isReportshow">生成报表</p>
|
|
|
+ <p class="indicitem" v-else @click="generateReport(scope.row)">生成报表</p>
|
|
|
+ <p class="indicitem" @click="handleReport(scope.row)">指标考核打分</p>
|
|
|
</div>
|
|
|
- <p class="indicitem" v-if="scope.row.stage !== '流程已结束'" @click="calculateScore(scope.row)">计算得分</p>
|
|
|
- <p class="indicitem" style="cursor: no-drop;color: #d9d9d9" v-if="isReportshow">生成报表</p>
|
|
|
- <p class="indicitem" v-else @click="generateReport(scope.row)">生成报表</p>
|
|
|
- <p class="indicitem" @click="handleReport(scope.row)">指标考核打分</p>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -247,6 +250,7 @@ export default {
|
|
|
rescode: '',
|
|
|
resDes: '',
|
|
|
isReportshow: false,
|
|
|
+ isAction: false,
|
|
|
winPix: window.devicePixelRatio,
|
|
|
innerWidth: window.innerWidth
|
|
|
}
|
|
@@ -347,8 +351,31 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getMessageData(row) {
|
|
|
+ let that = this
|
|
|
+ let params = {
|
|
|
+ evaluationIds: row.id
|
|
|
+ }
|
|
|
+ apiGetgenerateUnitYearEvaluation(params).then(datas =>{
|
|
|
+ if (datas && datas.data) {
|
|
|
+ if (!datas.success) {
|
|
|
+ that.$message({
|
|
|
+ message: datas.message,
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ that.$message({
|
|
|
+ message: '年度考评目标数据已生成',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.getevaluStartList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
agetdeptresponsibility(row) {
|
|
|
let that = this
|
|
|
+ that.isAction = false
|
|
|
let par = {
|
|
|
defKey: "jddwkplc",
|
|
|
businessKey: row.id,
|
|
@@ -356,22 +383,23 @@ export default {
|
|
|
opinion: "季度单位考评",
|
|
|
iamCode: window.localStorage.getItem('code')
|
|
|
}
|
|
|
- if (row.instId === null || row.instId === '') {
|
|
|
- apiGetdoAction(par).then(datas =>{
|
|
|
- if (datas && datas.data) {
|
|
|
- if (datas.data.isOk) {
|
|
|
- that.getGenerateUnitQuarter(row)
|
|
|
- } else {
|
|
|
- that.$message({
|
|
|
- message: datas.data.msg,
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- }
|
|
|
+ apiGetdoAction(par).then(datas =>{
|
|
|
+ if (datas && datas.data) {
|
|
|
+ if (datas.data.isOk) {
|
|
|
+ that.isAction = true
|
|
|
+ that.$message({
|
|
|
+ message: '季度单位考评已启动',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ that.getevaluStartList()
|
|
|
+ } else {
|
|
|
+ that.$message({
|
|
|
+ message: datas.data.msg,
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
- } else {
|
|
|
- that.getGenerateUnitQuarter(row)
|
|
|
- }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
getGenerateUnitQuarter(row) {
|
|
|
let that = this
|
|
@@ -387,7 +415,7 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
that.$message({
|
|
|
- message: '季度单位考评已启动',
|
|
|
+ message: '季度单位考评数据已生成',
|
|
|
type: 'success'
|
|
|
});
|
|
|
}
|