Browse Source

Merge branch 'master' of http://139.196.39.194:9021/chenc/cd-work-flow-web

jbb 2 years ago
parent
commit
8236b9d08e

+ 17 - 3
src/components/page/GlobalLayout.vue

@@ -138,8 +138,6 @@ export default {
         this.menus = this.permissionMenuList
         // 根据后台配置菜单,重新排序加载路由信息
         // console.log('----加载菜单逻辑----')
-        console.log(this.mainRouters)
-        console.log(this.permissionMenuList)
         // console.log('----navTheme------' + this.navTheme)
     // --update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
     },
@@ -174,9 +172,25 @@ export default {
                     this.findMenuBykey(i.children, key)
                 }
             }
+        },
+        // 发起流程申请
+        startApply(param){
+            this.$router.push({
+                path:"/process-center/applyouter",
+                query:param
+            })
+
         }
     // update-end-author:taoyan date:20190430 for:动态路由title显示配置的菜单title而不是其对应路由的title
-    }
+    },
+    mounted(){
+      // 监控iframe发起流程
+        window.addEventListener('message',({data})=>{
+            if (data.msg == "startApply"){
+                this.startApply(data.data);
+            }
+        })
+    },
 }
 </script>
 

+ 1 - 1
src/views/process-center/applyListByTableName.vue

@@ -259,7 +259,7 @@
       v-model="lcModa.visible"
       :footer="null"
       :maskClosable="false"
-      width="80%"
+      width="100%"
     >
       <component
         :disabled="lcModa.disabled"

+ 6 - 3
src/views/process-center/applyListOuter.vue

@@ -1,5 +1,5 @@
 <template>
-    <iframe :src="src" id="mainframe"  width="100%" :height="height" style="border:0"/>
+    <iframe :src="src" :id="frameId"  width="100%" :height="height" style="border:0"/>
 </template>
 <script>
 import { getAction } from '@/api/manage'
@@ -15,12 +15,15 @@ export default {
             queryParam:{
                 text:"",
             },
+            frameId:"",
         }
     },
     created(){
         this.height = (document.body.scrollHeight-190)+"px";
-        var index = this.$route.path.lastIndexOf("/");
-        this.queryParam.text = this.$route.path.substr(index+1);
+        //var index = this.$route.path.lastIndexOf("/");
+        console.log(this.$route.query)
+        this.queryParam.text =this.$route.query.type;//this.$route.path.substr(index+1);
+        this.frameId = "/process-center/applyListOuter/"+this.queryParam.text;
         this.loadSrc();
         
     },