Browse Source

流程外部合同表单

chenc 3 years ago
parent
commit
0c4414ede0

+ 60 - 0
src/share/modal/MyIframe.vue

@@ -0,0 +1,60 @@
+<template>
+  <!-- 表单编辑器 -->
+  <a-drawer
+    title="编辑器"
+    width="100%"
+    style="top:0%;height: 100%;"
+    :visible="editorVisible"
+    @close="editFromClose"
+  >
+    <iframe
+      :src="editorJumpUrlMy"
+      width="100%"
+      height="800"
+      frameborder="0"
+      scrolling="auto"
+      id="iframename"
+      name="iframename"
+    ></iframe>
+    <div
+      :style="{
+          position: 'absolute',
+          right: 0,
+          bottom: 0,
+          width: '100%',
+          borderTop: '1px solid #e9e9e9',
+          padding: '10px 16px',
+          background: '#fff',
+          textAlign: 'right',
+          zIndex: 1,
+        }"
+    >
+      <a-button :style="{ marginRight: '8px' }" @click="editFromClose">关闭</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+export default {
+  name: 'MyIframe',
+  props: {
+      // editorJumpUrl:{
+      //     type:String,
+      //     required: false
+      // }
+    },
+  data() {
+    return {
+      editorVisible: false,
+      editorJumpUrlMy:''
+    }
+  },
+  methods: {
+    //编辑表单弹框关闭按钮
+    editFromClose() {
+      this.editorVisible = false
+      this.editorJumpUrlMy = ''
+    }
+  }
+}
+</script>

+ 69 - 0
src/share/modal/automaticLogonIframe.vue

@@ -0,0 +1,69 @@
+<template>
+  <!-- 表单编辑器 -->
+  <div >
+    <a-drawer
+      title="编辑器"
+      width="100%"
+      style="top:0%;height: 100%;"
+      :visible="editorVisible"
+      @close="editFromClose"
+    >
+      <iframe
+        :src="editorJumpUrlMy"
+        width="100%"
+        height="800"
+        frameborder="0"
+        scrolling="auto"
+        id="iframename"
+        name="iframename"
+      ></iframe>
+      <div
+        :style="{
+          position: 'absolute',
+          right: 0,
+          bottom: 0,
+          width: '100%',
+          borderTop: '1px solid #e9e9e9',
+          padding: '10px 16px',
+          background: '#fff',
+          textAlign: 'right',
+          zIndex: 1,
+        }"
+      >
+        <a-button :style="{ marginRight: '8px' }" @click="editFromClose">关闭</a-button>
+      </div>
+    </a-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    // editorJumpUrl:{
+    //     type:String,
+    //     required: false
+    // }
+  },
+  data() {
+    return {
+      editorVisible: true,
+      editorJumpUrlMy: ''
+    }
+  },
+  created() {
+    var username = this.$store.getters.userInfo.username //用户名
+    //   var id=r.tableId;//项目管理合同数据id
+    //打开MyIframe弹框
+    //   this.$refs.MyIframe.editorVisible=true;
+    //并传入地址参数
+    this.editorJumpUrlMy = 'http://localhost:4200/#/contract-process-view?username=' + username + '&id='
+  },
+  methods: {
+    //编辑表单弹框关闭按钮
+    editFromClose() {
+      this.editorVisible = false
+      this.editorJumpUrlMy = ''
+    }
+  }
+}
+</script>

+ 9 - 2
src/views/activiti/todoManage.vue

@@ -180,6 +180,7 @@
         <a-button type="primary" :loading="submitLoading" @click="handelSubmit">提交</a-button>
       </div>
     </a-modal>
+    <my-iframe ref="MyIframe" :editorJumpUrl="editorJumpUrl"></my-iframe>
   </div>
 </template>
 
@@ -187,12 +188,14 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
 import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
+import MyIframe from '../../share/modal/MyIframe'
 export default {
   name: "todo-manage",
   mixins:[activitiMixin,JeecgListMixin],
-  components:{JSelectUserByDep},
+  components:{JSelectUserByDep,MyIframe},
   data() {
     return {
+      editorJumpUrl:'',//申请详情跳转外部项目的地址
       openSearch: true,
       openTip: true,
       loading: true, // 表单加载状态
@@ -396,7 +399,11 @@ export default {
       }
       r.operationType="1";//代办
       if(r.routeName.indexOf("外部表单")!=-1){//其他项目的表单流程
-          alert("调用其他项目页面")
+          var id=r.tableId;//项目管理合同数据id
+          //打开MyIframe弹框
+          this.$refs.MyIframe.editorVisible=true;
+          //并传入地址参数
+          this.$refs.MyIframe.editorJumpUrlMy='http://localhost:4200/#/contract-process-view?id='+id;
       }else if(r.routeName.indexOf("自定义")!=-1){//自定义的表单流程
         this.lcModa.disabled = true;
         this.lcModa.title = '查看流程业务信息:'+r.processName;