Selaa lähdekoodia

新增sop权限跳转问题

三七 5 päivää sitten
vanhempi
commit
aae734951b

+ 1 - 1
src/router/index.js

@@ -174,7 +174,7 @@ export const constantRoutes = [
     hidden: true,
     children: [
       {
-        path: 'addSop/:corpId',
+        path: 'addSop/:corpId/:type(\\d+)',
         component: (resolve) => require(['@/views/qw/sop/addSop'], resolve),
         name: 'addSop',
         meta: { title: '新增SOP任务', activeMenu: '/qw/sop'}

+ 19 - 3
src/views/qw/sop/addSop.vue

@@ -624,12 +624,15 @@ export default {
         startTime: [{required: true, message: "开始时间不能为空", trigger: "submit"}],
         tempId: [{required: true, message: "模板不能为空", trigger: "submit"}],
         openCommentStatus:[{ required: true, message: '开启评论/弹幕不能为空', trigger: 'change' }]
-      }
+      },
+      //1 总 2 我的 3 部门
+      formType: null,
     };
   },
   created() {
 
     this.form.corpId = this.$route.params && this.$route.params.corpId;
+    this.formType = this.$route.params && this.$route.params.type;
 
     this.queryTagParams.corpId = this.$route.params && this.$route.params.corpId;
 
@@ -1069,7 +1072,14 @@ export default {
               this.msgSuccess("修改成功");
               this.$store.dispatch("tagsView/delView", this.$route);
               // this.$router.replace('/qw/conversion/sop')
-              window.location.replace('/qw/conversion/sop')
+              if (this.formType==1){
+                window.location.replace('/qw/conversion/sop')
+              }else if (this.formType==2){
+                window.location.replace('/qw/conversion/mySop')
+              }else if (this.formType==3){
+                window.location.replace('/qw/conversion/deptSop')
+              }
+
               this.reset();
             });
           } else {
@@ -1077,7 +1087,13 @@ export default {
               this.msgSuccess("新增成功");
               this.$store.dispatch("tagsView/delView", this.$route);
               // this.$router.replace('/qw/conversion/sop')
-              window.location.replace('/qw/conversion/sop')
+              if (this.formType==1){
+                window.location.replace('/qw/conversion/sop')
+              }else if (this.formType==2){
+                window.location.replace('/qw/conversion/mySop')
+              }else if (this.formType==3){
+                window.location.replace('/qw/conversion/deptSop')
+              }
               this.reset();
             });
           }

+ 1 - 1
src/views/qw/sop/deptSop.vue

@@ -1517,7 +1517,7 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
-      this.$router.push('/qw/sop/addSop/' + this.queryParams.corpId)
+      this.$router.push('/qw/sop/addSop/' + this.queryParams.corpId+"/"+3)
       // this.open = true;
       // this.setting=[]
       // this.userSelectList=[]

+ 1 - 1
src/views/qw/sop/mySop.vue

@@ -1516,7 +1516,7 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
-      this.$router.push('/qw/sop/addSop/' + this.queryParams.corpId)
+      this.$router.push('/qw/sop/addSop/' + this.queryParams.corpId+"/"+2)
       // this.open = true;
       // this.setting=[]
       // this.userSelectList=[]

+ 2 - 1
src/views/qw/sop/sop.vue

@@ -1111,6 +1111,7 @@ export default {
     }
   },
   methods: {
+
     /**
      * SOP任务营期一键群发
      */
@@ -1518,7 +1519,7 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
-      this.$router.push('/qw/sop/addSop/' + this.queryParams.corpId)
+      this.$router.push('/qw/sop/addSop/' + this.queryParams.corpId+"/"+1)
       // this.open = true;
       // this.setting=[]
       // this.userSelectList=[]