瀏覽代碼

问题修改

SunZehao 1 年之前
父節點
當前提交
ca5a6428a7
共有 1 個文件被更改,包括 22 次插入13 次删除
  1. 22 13
      src/components/assessment/evaluationDeptStartFrom.vue

+ 22 - 13
src/components/assessment/evaluationDeptStartFrom.vue

@@ -301,7 +301,7 @@ export default {
             if (this.receiptMsg.stage === '流程已结束') {
                 show = false
             } else {
-                if (row.dataPermission !== '-1') {
+                if (row.dataPermission === '-1') {
                     show = false
                 }
             }
@@ -314,18 +314,26 @@ export default {
                 type: 'warning'
             }).then(() => {
                 let that = this
-                let params = {
-                    id: row.id,
-                    deptId: that.userMes.deptId
+                if (!row.id) {
+                    that.quantifiedList.forEach((it, index) =>{
+                        if (it === row) {
+                        that.quantifiedList.splice(index, 1)
+                        }
+                    })
+                } else {
+                    let params = {
+                        id: row.id,
+                        deptId: that.userMes.deptId
+                    }
+                    apiGetevaluationdeptplandelete(params).then(datas =>{
+                        that.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        });
+                        that.getevaluStartList()
+                        that.changeDateSelect = []
+                    })
                 }
-                apiGetevaluationdeptplandelete(params).then(datas =>{
-                    that.$message({
-                        type: 'success',
-                        message: '删除成功!'
-                    });
-                    that.getevaluStartList()
-                    that.changeDateSelect = []
-                })
             })
         },
         //获取详情
@@ -375,7 +383,8 @@ export default {
                 targetValue: '',
                 baseScore: 0,
                 evaluationCriteria: '',
-                auditStatus: '-1'
+                auditStatus: '-1',
+                dataPermission: '1'
             }
             this.quantifiedList.unshift(obj)
         },