Procházet zdrojové kódy

:recycle: Refactoring code. 流程部署失败逻辑提示

冷冷 před 5 roky
rodič
revize
a0c5852868
1 změnil soubory, kde provedl 3 přidání a 20 odebrání
  1. 3 20
      src/views/activiti/index.vue

+ 3 - 20
src/views/activiti/index.vue

@@ -110,7 +110,6 @@
         this.$refs.crud.rowDel(row, index)
       },
       handleDeploy: function (row) {
-        var _this = this
         this.$confirm('是否确认部署ID为"' + row.id + '"的模型?', '警告', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -119,16 +118,10 @@
           return deploy(row.id)
         }).then(() => {
           this.getList(this.page)
-          _this.$message({
-            showClose: true,
-            message: '部署成功',
-            type: 'success'
-          })
-        }).catch(function () {
+          this.$message.success('部署成功')
         })
       },
       rowDel: function (row) {
-        var _this = this
         this.$confirm('是否确认删除ID为"' + row.id + '"的模型?', '警告', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -137,12 +130,7 @@
           return delObj(row.id)
         }).then(() => {
           this.getList(this.page)
-          _this.$message({
-            showClose: true,
-            message: '删除成功',
-            type: 'success'
-          })
-        }).catch(function () {
+          this.$message.success('删除成功')
         })
       },
       /**
@@ -153,12 +141,7 @@
        **/
       handleSave: function (row, done) {
         addObj(row).then(() => {
-          this.tableData.push(Object.assign({}, row))
-          this.$message({
-            showClose: true,
-            message: '添加成功',
-            type: 'success'
-          })
+          this.$message.success('添加成功')
           done()
           this.getList(this.page)
         })