Bladeren bron

确认注释

Luolei 6 jaren geleden
bovenliggende
commit
ed3702d50b
1 gewijzigde bestanden met toevoegingen van 70 en 70 verwijderingen
  1. 70 70
      src/components/icss/NoiseTemplate.vue

+ 70 - 70
src/components/icss/NoiseTemplate.vue

@@ -222,84 +222,84 @@ export default {
       this.showDelDialog(param)
       this.showDelDialog(param)
     },
     },
     showDelDialog(param) {
     showDelDialog(param) {
-      // this.showConfirmDialog('是否保存该标签组?', () => {
-      //   api.saveOrUpdate(param).then((res) => {
-      //     if (res.data.code === '0') {
-      //       this.warning(res.data.msg || '保存成功', 'success','1000')
-      //       setTimeout(() => {
-      //         this.$router.push({
-      //           path:'/admin/LT-YXSJWH-BQZWH'
-      //         })
-      //       }, 1000);
-      //     } else {
-      //       this.warning(res.data.msg)
-      //     }
-      //   }).catch((err) => {
-      //     this.warning(err);
-      //   })
-      // });
-      const h = this.$createElement;
-      const {isEdit} = this.$route.params;
-      const addMsg = h('div',{style:'padding-bottom:10px'},[
-            h('p',{style:'font-size:15px;margin-bottom:10px'},'是否保存该标签组?')
-          ])
-      const modMsg = h('div',{style:'padding-bottom:10px'},[
-            h('p',{style:'font-size:15px;margin-bottom:10px'},'是否保存该标签组?'),
-            h('span',{style:'color:red;font-size:12px'},'若标签系统名称已经改变,请去别名维护中修改相关信息'),
-          ])
-      this.$msgbox({
-        title:'提示',
-        message:isEdit?modMsg:addMsg,
-        showCancelButton: true,
-        distinguishCancelAndClose:true,
-        confirmButtonText: '确认并前往别名维护',
-        cancelButtonText:'确认',
-        // type: 'warning',
-        cancelButtonClass:'toast-cancel'
-      }).then(()=>{
+      this.showConfirmDialog('是否保存该标签组?', () => {
         api.saveOrUpdate(param).then((res) => {
         api.saveOrUpdate(param).then((res) => {
           if (res.data.code === '0') {
           if (res.data.code === '0') {
-            this.warning(res.data.msg || '保存成功', 'success');
-            // 判断是否已有别名--有(修改),无(新增)
-            const item = {'questionId':param.questionWrapper.id,'questionName':param.questionWrapper.tagName};
-            api.similarNameDetl(item).then((res)=>{
-              if(res.data.code=='0'){
-                this.$router.push({
-                  name:'AddSimilarName',
-                  params: {id:param.questionWrapper.id,name:param.questionWrapper.tagName}
-                })
-              }else{
-                this.$router.push({
-                  name:'AddSimilarName',
-                  params: {}
-                })
-              }
-            })
+            this.warning(res.data.msg || '保存成功', 'success','1000')
+            setTimeout(() => {
+              this.$router.push({
+                path:'/admin/LT-YXSJWH-BQZWH'
+              })
+            }, 1000);
           } else {
           } else {
             this.warning(res.data.msg)
             this.warning(res.data.msg)
           }
           }
         }).catch((err) => {
         }).catch((err) => {
           this.warning(err);
           this.warning(err);
         })
         })
-      }).catch((action)=>{
-        // action :cancel--取消,close--关闭
-        if(action=='cancel'){
-          api.saveOrUpdate(param).then((res) => {
-            if (res.data.code === '0') {
-              this.warning(res.data.msg || '保存成功', 'success');
-              setTimeout(() => {
-                this.$router.push({
-                  path:'/admin/LT-YXSJWH-BQZWH'
-                })
-              }, 1000);
-            } else {
-              this.warning(res.data.msg)
-            }
-          }).catch((err) => {
-            this.warning(err);
-          })
-        }
-      })
+      });
+      // const h = this.$createElement;
+      // const {isEdit} = this.$route.params;
+      // const addMsg = h('div',{style:'padding-bottom:10px'},[
+      //       h('p',{style:'font-size:15px;margin-bottom:10px'},'是否保存该标签组?')
+      //     ])
+      // const modMsg = h('div',{style:'padding-bottom:10px'},[
+      //       h('p',{style:'font-size:15px;margin-bottom:10px'},'是否保存该标签组?'),
+      //       h('span',{style:'color:red;font-size:12px'},'若标签系统名称已经改变,请去别名维护中修改相关信息'),
+      //     ])
+      // this.$msgbox({
+      //   title:'提示',
+      //   message:isEdit?modMsg:addMsg,
+      //   showCancelButton: true,
+      //   distinguishCancelAndClose:true,
+      //   confirmButtonText: '确认并前往别名维护',
+      //   cancelButtonText:'确认',
+      //   // type: 'warning',
+      //   cancelButtonClass:'toast-cancel'
+      // }).then(()=>{
+      //   api.saveOrUpdate(param).then((res) => {
+      //     if (res.data.code === '0') {
+      //       this.warning(res.data.msg || '保存成功', 'success');
+      //       // 判断是否已有别名--有(修改),无(新增)
+      //       const item = {'questionId':param.questionWrapper.id,'questionName':param.questionWrapper.tagName};
+      //       api.similarNameDetl(item).then((res)=>{
+      //         if(res.data.code=='0'){
+      //           this.$router.push({
+      //             name:'AddSimilarName',
+      //             params: {id:param.questionWrapper.id,name:param.questionWrapper.tagName}
+      //           })
+      //         }else{
+      //           this.$router.push({
+      //             name:'AddSimilarName',
+      //             params: {}
+      //           })
+      //         }
+      //       })
+      //     } else {
+      //       this.warning(res.data.msg)
+      //     }
+      //   }).catch((err) => {
+      //     this.warning(err);
+      //   })
+      // }).catch((action)=>{
+      //   // action :cancel--取消,close--关闭
+      //   if(action=='cancel'){
+      //     api.saveOrUpdate(param).then((res) => {
+      //       if (res.data.code === '0') {
+      //         this.warning(res.data.msg || '保存成功', 'success');
+      //         setTimeout(() => {
+      //           this.$router.push({
+      //             path:'/admin/LT-YXSJWH-BQZWH'
+      //           })
+      //         }, 1000);
+      //       } else {
+      //         this.warning(res.data.msg)
+      //       }
+      //     }).catch((err) => {
+      //       this.warning(err);
+      //     })
+      //   }
+      // })
     },
     },
     showConfirmDialog(msg, resolve) {
     showConfirmDialog(msg, resolve) {
       this.$alert(msg, '提示', {
       this.$alert(msg, '提示', {