1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
| <template>
| <a-modal
| :title="title"
| :width="1300"
| :visible="visible"
| @cancel="onCancel"
| :confirmLoading="confirmLoading"
| :footer="null"
| switchFullscreen
| >
| <div style="height:100%;">
| <iframe
| id="iframe"
| :src="modelerUrl"
| frameborder="0"
| width="100%"
| height="650px"
| scrolling="auto"
| />
|
| </div>
| </a-modal>
| </template>
|
| <script>
| import { getToken } from '@/utils/auth'
| import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
| import Vue from 'vue'
|
| export default {
| name: 'ActivitiModel',
| components: {},
| data() {
| return {
| id: '',
| modelerLoading: true,
| title: '流程设计',
| visible: false,
| models: {},
| confirmLoading: false,
| modelerUrl: ''
|
| }
| },
| computed: {
| token() {
| return this.$store.getters.token
| },
| apiUrl() {
| let apiBaseUrl = process.env.VUE_APP_API_BASE_URL
| return apiBaseUrl // 后台部署的api服务
| }
| },
| created() {
| },
| mounted() {
| // 传递值
| window.getMyVue = this
| window.getMyVue.tenantId = Vue.ls.get(TENANT_ID)
| },
| methods: {
| onCancel() {
| this.visible = false
| this.$emit('ok')
| },
| openModel(row) {
| console.log('window.getMyVue.tenantId ', window.getMyVue)
| this.visible = true
| this.modelerId = row.id
| this.models = row
| this.modelerUrl = `/static/modeler.html?modelId=` + row.id
| }
|
| }
| }
| // 关闭流程设计弹窗
| top.modelClose = function () {
| window.getMyVue.visible = false
| // this.$emit('ok')
| }
| </script>
|
| <style>
|
| .ant-modal-body{
| padding:20;
| }
|
| </style>
|
|