Просмотр исходного кода

单标签和标签组保存去掉前往别名维护按钮

Luolei 6 лет назад
Родитель
Сommit
a32650991c

+ 60 - 60
src/components/icss/AddIndeptLabel.vue

@@ -163,7 +163,7 @@
         this.showSaveDialog(param);
       },
       showSaveDialog(param) {
-        /*this.showConfirmDialog('是否保存该标签?', () => {
+        this.showConfirmDialog('是否保存该标签?', () => {
           api.saveOrUpdate(param).then((res) => {
             if (res.data.code === '0') {
               this.warning(res.data.msg || '保存成功', 'success');
@@ -174,65 +174,65 @@
           }).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');
-                this.$router.push("/admin/LT-YXSJWH-DLLXBQWH");
-              } 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');
+      //           this.$router.push("/admin/LT-YXSJWH-DLLXBQWH");
+      //         } else {
+      //           this.warning(res.data.msg)
+      //         }
+      //       }).catch((err) => {
+      //         this.warning(err);
+      //       })
+      //     }
+      //   })
       },
       showConfirmDialog(msg, resolve) {
         this.$alert(msg, '提示', {

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

@@ -220,7 +220,7 @@ export default {
       this.showDelDialog(param)
     },
     showDelDialog(param) {
-      /*this.showConfirmDialog('是否保存该标签组?', () => {
+      this.showConfirmDialog('是否保存该标签组?', () => {
         api.saveOrUpdate(param).then((res) => {
           if (res.data.code === '0') {
             this.warning(res.data.msg || '保存成功', 'success','1000')
@@ -235,69 +235,69 @@ export default {
         }).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);
-          })
-        }
-      })
+      });
+      // 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) {
       this.$alert(msg, '提示', {

+ 3 - 3
src/components/icss/PubTagGroup.vue

@@ -143,7 +143,7 @@
         <span class="changeTips">改变性别后,标签明细将会恢复到默认状态</span>
         <el-select
           v-model="form.region7"
-          :disabled="!!editData.id || !form.region1 || form.region2 == 11 || form.region1 == 5||form.region1 == 6||form.region1 == 7||form.region1 == 8||form.region1 == 9||form.region1 == 10"
+          :disabled="!!editData.id || !form.region1 || form.region2 == 11 || form.region1 == 6||form.region1 == 7||form.region1 == 8||form.region1 == 9||form.region1 == 10"
           @change="(e)=>readyChangeSelect(e,3)"
         >
           <el-option
@@ -197,7 +197,7 @@
       >
         <el-input
           v-model.number="form.region8"
-          :disabled="!form.region1 || form.region2 == 11 || form.region1 == 5||form.region1 == 6||form.region1 == 7||form.region1 == 8||form.region1 == 9||form.region1 == 10"
+          :disabled="!form.region1 || form.region2 == 11 || form.region1 == 6||form.region1 == 7||form.region1 == 8||form.region1 == 9||form.region1 == 10"
           ref="valage1"
           type="number"
           @input="sendData"
@@ -209,7 +209,7 @@
       >
         <el-input
           v-model.number="form.region9"
-          :disabled="!form.region1 || form.region2 == 11 || form.region1 == 5||form.region1 == 6||form.region1 == 7||form.region1 == 8||form.region1 == 9||form.region1 == 10"
+          :disabled="!form.region1 || form.region2 == 11 || form.region1 == 6||form.region1 == 7||form.region1 == 8||form.region1 == 9||form.region1 == 10"
           type="number"
           ref="valage2"
           @input="sendData"