|
|
@@ -46,7 +46,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="scoreCriterion" label="考评方法" header-align="center" align="left">
|
|
|
+ <el-table-column prop="scoreCriterion" label="考评方法" header-align="center" align="left" width="160">
|
|
|
<template v-slot="{row}">
|
|
|
<span>{{ row.scoreCriterion }}</span>
|
|
|
</template>
|
|
|
@@ -66,10 +66,19 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="操作" header-align="center" align="center" width="180">
|
|
|
+ <el-table-column label="操作" header-align="center" align="center" width="205">
|
|
|
<template v-slot="{row,$index}">
|
|
|
<el-button v-if="conditions.year === curYear && conditions.month === curMonth && isPermitted" type="primary" size="mini" @click="handleAssess(row,$index)">评价</el-button>
|
|
|
<el-button size="mini" type="info" @click="handleViewRecord(row)">评价记录</el-button>
|
|
|
+ <el-dropdown v-if="conditions.year === curYear && conditions.month === curMonth && isPermitted && row.isAssessed > 0" class="el-dropdown-link" @command="(command)=>handlerCommand(command, row, $index)">
|
|
|
+ <el-button size="mini" type="warning">
|
|
|
+ 更多<i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="editAssess">编辑</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="deleteAssess">删除</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -83,7 +92,7 @@
|
|
|
import PointAssess from '@/views/hos/components/PointAssess'
|
|
|
import AssessRecord from '@/views/hos/components/AssessRecord'
|
|
|
import commonMethodMixin from '@/mixin/commonMethodMixin'
|
|
|
-import { getAssessByList, getAssessById } from '@/api/hos/hosAssessApi'
|
|
|
+import { getAssessByList, getAssessById, deleteAssessById } from '@/api/hos/hosAssessApi'
|
|
|
import { storyCopy } from '@/api/hos/hosAssessMonthRecordApi'
|
|
|
import { getMonthScoreOfStory } from '@/api/hos/hosStatisApi'
|
|
|
export default {
|
|
|
@@ -238,7 +247,7 @@ export default {
|
|
|
}, [])
|
|
|
},
|
|
|
|
|
|
- // 结果评估
|
|
|
+ // 评价记录
|
|
|
handleViewRecord(row) {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs['AssessRecord'].handler(row)
|
|
|
@@ -249,7 +258,41 @@ export default {
|
|
|
handleAssess(row, index) {
|
|
|
this.handleAssessRows = { row, index }
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs['PointAssess'].handler(row)
|
|
|
+ this.$refs['PointAssess'].showAddModel(row)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 修改
|
|
|
+ handleAssessEdit(row, index) {
|
|
|
+ this.handleAssessRows = { row, index }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs['PointAssess'].showEditModel(row)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 删除
|
|
|
+ handleAssessDelete(row, index) {
|
|
|
+ this.$confirm(`此操作将删除此项评价记录, 是否继续?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.handleAssessRows = { row, index }
|
|
|
+ const { storyId, targetId, itemId, pointId } = row
|
|
|
+ deleteAssessById(storyId, targetId, itemId, pointId).then((resp) => {
|
|
|
+ const { code, msg } = resp
|
|
|
+ if (code === 0) {
|
|
|
+ this.getData()
|
|
|
+ this.getMonthScore()
|
|
|
+ this.$message.success(msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(msg)
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({ type: 'info', message: '已取消删除' })
|
|
|
})
|
|
|
},
|
|
|
|
|
|
@@ -281,6 +324,19 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // Command Handling
|
|
|
+ handlerCommand(command, data, index) {
|
|
|
+ switch (command) {
|
|
|
+ case 'editAssess':
|
|
|
+ this.handleAssessEdit(data, index)
|
|
|
+ break
|
|
|
+
|
|
|
+ case 'deleteAssess':
|
|
|
+ this.handleAssessDelete(data, index)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
formSuccess() {
|
|
|
this.updateRow()
|
|
|
this.$emit('actionUpdate')
|
|
|
@@ -398,5 +454,14 @@ export default {
|
|
|
color: red;
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
+
|
|
|
+ .el-button--mini {
|
|
|
+ padding: 7px;
|
|
|
+ margin: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dropdown {
|
|
|
+ margin: 1px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|