diff --git a/src/utils/common.js b/src/utils/common.js index 44c19c3..2558e3f 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -85,7 +85,7 @@ export function handleInput (form) { } export function handleBlur (form) { - this[form.split('.')[0]][form.split('.')[1]] = this[form.split('.')[0]][form.split('.')[1]] || '0' + this[form.split('.')[0]][form.split('.')[1]] = Number(this[form.split('.')[0]][form.split('.')[1]]) || '0' } export function messageSuccess (params) { diff --git a/src/views/kpi/assessment/goals/index.vue b/src/views/kpi/assessment/goals/index.vue index 6049cd8..2a4dcce 100644 --- a/src/views/kpi/assessment/goals/index.vue +++ b/src/views/kpi/assessment/goals/index.vue @@ -286,16 +286,27 @@ export default { methods: { // 删除任务 handleDeleteTask (parent, item) { - if (item.id) { - parent.taskDtos.map(i => { - if (i === item) { - i.isDelete = 1 - } + this.$confirm('此操作不可撤回, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (item.id) { + parent.taskDtos.map(i => { + if (i === item) { + i.isDelete = 1 + } + }) + } else { + parent.taskDtos = parent.taskDtos.filter(i => i !== item) + } + this.$forceUpdate() + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' }) - } else { - parent.taskDtos = parent.taskDtos.filter(i => i !== item) - } - this.$forceUpdate() + }) }, // 取消添加任务 handleCancelTask () { @@ -524,13 +535,24 @@ export default { this.showIndicators = true }, handleDelateWeidu (item, index, type) { - if (item.id) { - item.isDelete = 1 + this.$confirm('此操作不可撤回, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + if (item.id) { + item.isDelete = 1 + this.$forceUpdate() + return + } + this.obj.recortModelDtos[type].detailDtos = this.obj.recortModelDtos[type].detailDtos.filter(i => i !== item) this.$forceUpdate() - return - } - this.obj.recortModelDtos[type].detailDtos = this.obj.recortModelDtos[type].detailDtos.filter(i => i !== item) - this.$forceUpdate() + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }) + }) }, async handleGetTbale (id = this.$route.query.id) { @@ -644,7 +666,7 @@ export default { } } &-bottom { - font-size: 12px; + font-size: 14px; display: flex; color:#999999; align-items: center;