cloud-web-corejs 1.1.0-dev.6 → 1.1.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/VabUpload/view.vue +27 -26
- package/src/components/excelImport/index.vue +156 -156
- package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
- package/src/components/mobile/wf/content.vue +110 -67
- package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
- package/src/components/mobile/wf/selectUserDialog.vue +122 -0
- package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
- package/src/components/mobile/wf/urgingDialog.vue +26 -3
- package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
- package/src/components/xform/form-designer/designer.js +36 -52
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +2 -2
- package/src/components/xform/form-designer/indexMixin.js +25 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -860
- package/src/components/xform/form-designer/toolbar-panel/index.vue +874 -874
- package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +15 -2
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +53 -1
- package/src/components/xform/form-render/container-item/list-h5-item.vue +154 -27
- package/src/components/xform/form-render/indexMixin.js +23 -3
- package/src/components/xform/styles/h5.scss +775 -588
- package/src/directive/append-to-body/index.js +48 -0
- package/src/index.js +4 -0
- package/src/layout/components/Sidebar/default.vue +1655 -1655
- package/src/router/index.js +48 -48
- package/src/utils/vab.js +1283 -1283
- package/src/views/bd/setting/form_template/edit.vue +378 -356
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
- package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
- package/src/views/bd/setting/form_template/list.vue +304 -303
- package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
- package/src/views/bd/setting/form_template/mixins/list.js +748 -721
- package/src/views/user/file_view_ins/list.vue +970 -970
- package/src/views/user/form/vform/designer.vue +823 -821
- package/src/views/user/home/default.vue +1117 -1117
- package/src/views/user/home/index.vue +103 -103
- package/src/views/user/notify_message/dialog.vue +139 -139
- package/src/views/user/outLink/form_view.vue +202 -202
- package/src/views/user/outLink/index.vue +110 -110
- package/src/views/user/wf/iframe/index.vue +51 -51
- package/src/views/user/wf/iframe/index2.vue +64 -64
- package/src/views/user/wf/wf_manage/list2.vue +871 -871
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -134
|
@@ -1,202 +1,202 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :id="$route.query.isMobile!=='true'?'containt':''">
|
|
3
|
-
<component v-if="showWfContent && wfContent" :is="wfContent" visible-key="showWfContent" :outParam.sync="outParam"
|
|
4
|
-
:_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true"
|
|
5
|
-
:parent-target="_self"
|
|
6
|
-
@reload="$reloadHandle" v-bind="queryParam"></component>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
import indexUtil from "@base/utils/index.js"
|
|
12
|
-
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent"
|
|
13
|
-
import {
|
|
14
|
-
setReportGlobalParam
|
|
15
|
-
} from "@base/components/xform/utils/util";
|
|
16
|
-
|
|
17
|
-
export default {
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
reportCode: null,
|
|
21
|
-
showWfContent: true,
|
|
22
|
-
wfContent: null,
|
|
23
|
-
outParam: null,
|
|
24
|
-
dataId: null,
|
|
25
|
-
defaultShowWfContent: null,
|
|
26
|
-
queryParam: {}
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
created() {
|
|
30
|
-
this.login();
|
|
31
|
-
},
|
|
32
|
-
mounted() {
|
|
33
|
-
history.pushState(null, null, document.URL);
|
|
34
|
-
window.addEventListener('popstate', this.handlePopState); // 在Vue组件的mounted钩子中添加事件监听
|
|
35
|
-
},
|
|
36
|
-
beforeDestroy() {
|
|
37
|
-
window.removeEventListener('popstate', this.handlePopState); // 在beforeDestroy钩子中移除事件监听
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
initGlobalReqData() {
|
|
41
|
-
let fd = this.$route.query.fd;
|
|
42
|
-
if (fd) {
|
|
43
|
-
setReportGlobalParam(fd);
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
async initData() {
|
|
47
|
-
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
|
48
|
-
let queryParam = this.$baseLodash.cloneDeep(this.$route.query);
|
|
49
|
-
let murl = this.$route.query.urlmobile;
|
|
50
|
-
let purl = murl && isMobile ? murl : this.$route.query.url;
|
|
51
|
-
let dataId = this.$route.query.dataId;
|
|
52
|
-
if (purl == '/index') {
|
|
53
|
-
location.hash = '/home';
|
|
54
|
-
location.reload();
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
/*let param = this.$route.query.param;
|
|
58
|
-
if (param) {
|
|
59
|
-
this.outParam = JSON.parse(param)
|
|
60
|
-
}*/
|
|
61
|
-
this.dataId = dataId;
|
|
62
|
-
if (this.$route.query.showWfContent == 'true') {
|
|
63
|
-
this.defaultShowWfContent = true;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
delete queryParam.urlmobile;
|
|
67
|
-
delete queryParam.url;
|
|
68
|
-
|
|
69
|
-
if (purl.indexOf('.html') >= 0) {
|
|
70
|
-
let eUrl = purl;
|
|
71
|
-
let pstr = Object.keys(queryParam).map(key => {
|
|
72
|
-
return key + "=" + queryParam[key]
|
|
73
|
-
}).join("&")
|
|
74
|
-
|
|
75
|
-
if (pstr) {
|
|
76
|
-
if (purl.indexOf('.html?') >= 0) {
|
|
77
|
-
eUrl = eUrl + '&' + pstr
|
|
78
|
-
} else {
|
|
79
|
-
eUrl = eUrl + '?' + pstr
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
location.href = eUrl;
|
|
84
|
-
return
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
delete queryParam.dataId;
|
|
88
|
-
delete queryParam.showWfContent;
|
|
89
|
-
delete queryParam.access_token;
|
|
90
|
-
delete queryParam.tp;
|
|
91
|
-
delete queryParam.thirdparty_info;
|
|
92
|
-
delete queryParam.i18nLang;
|
|
93
|
-
|
|
94
|
-
let url = purl + '.vue';
|
|
95
|
-
this.queryParam = queryParam;
|
|
96
|
-
this.showWfContent = true;
|
|
97
|
-
this.initUserInfo(async () => {
|
|
98
|
-
await this.initI18n();
|
|
99
|
-
const res = await loadViewComponentAsync(url);
|
|
100
|
-
if (res.kind === "remote") {
|
|
101
|
-
this.$message({ message: "该单据归属子应用 " + res.owner + ",请从对应入口打开", type: "warning" });
|
|
102
|
-
}
|
|
103
|
-
this.wfContent = res.component;
|
|
104
|
-
})
|
|
105
|
-
},
|
|
106
|
-
initUserInfo(callback) {
|
|
107
|
-
this.$store
|
|
108
|
-
.dispatch('user/getInfo2')
|
|
109
|
-
.then(() => {
|
|
110
|
-
callback && callback();
|
|
111
|
-
});
|
|
112
|
-
},
|
|
113
|
-
getI18nLang() {
|
|
114
|
-
let i18nLang = this.$route.query.i18nLang || "zh";
|
|
115
|
-
return i18nLang;
|
|
116
|
-
},
|
|
117
|
-
initI18n() {
|
|
118
|
-
let lang = this.getI18nLang();
|
|
119
|
-
this.$i18n.locale = lang // 设置给本地的i18n插件
|
|
120
|
-
localStorage.setItem("i18n-lang", lang);
|
|
121
|
-
return indexUtil.initI18nMessage("business", lang, true);
|
|
122
|
-
},
|
|
123
|
-
login() {
|
|
124
|
-
let token = this.$route.query.access_token;
|
|
125
|
-
let url = this.$route.query.url;
|
|
126
|
-
let hasToken = this.$route.query.hasToken;
|
|
127
|
-
let tp = this.$route.query.tp || this.$route.query.thirdparty_info;
|
|
128
|
-
if (url) {
|
|
129
|
-
if (token) {
|
|
130
|
-
this.initByToken(token);
|
|
131
|
-
} else if (tp) {
|
|
132
|
-
this.thirdpartyLogin(tp);
|
|
133
|
-
} else if (hasToken == "true") {
|
|
134
|
-
this.$nextTick(() => {
|
|
135
|
-
this.initData();
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
this.initGlobalReqData();
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
initByToken(token) {
|
|
142
|
-
if (!token) return;
|
|
143
|
-
this.$store
|
|
144
|
-
.dispatch('user/addToken', {
|
|
145
|
-
token
|
|
146
|
-
})
|
|
147
|
-
.then(() => {
|
|
148
|
-
this.$nextTick(() => {
|
|
149
|
-
this.initData();
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
},
|
|
153
|
-
thirdpartyLogin(tp) {
|
|
154
|
-
let lang = this.getI18nLang();
|
|
155
|
-
this.$http({
|
|
156
|
-
url: USER_PREFIX + `/thirdparty_auth/login`,
|
|
157
|
-
method: `post`,
|
|
158
|
-
data: {
|
|
159
|
-
tp: tp,
|
|
160
|
-
language: lang
|
|
161
|
-
},
|
|
162
|
-
isLoading: true,
|
|
163
|
-
modalStrictly: true,
|
|
164
|
-
useToken: false,
|
|
165
|
-
success: res => {
|
|
166
|
-
let thirdpartyToken = res.objx;
|
|
167
|
-
this.initByToken(thirdpartyToken);
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
},
|
|
171
|
-
handlePopState(event) {
|
|
172
|
-
// 阻止回退
|
|
173
|
-
history.go(1);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
</script>
|
|
178
|
-
|
|
179
|
-
<style lang="scss" scoped>
|
|
180
|
-
::v-deep .tab-box > .el-tabs__content {
|
|
181
|
-
|
|
182
|
-
.designer-view {
|
|
183
|
-
height: calc(100vh - 33px)
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.grid-height,
|
|
187
|
-
.designer-view .el-form.render-form {
|
|
188
|
-
height: calc(100vh - 41px)
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
::v-deep #containt .detail-wrap {
|
|
193
|
-
.d-header {
|
|
194
|
-
margin: -8px -12px 0;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.d-cont {
|
|
198
|
-
margin: 0 -12px;
|
|
199
|
-
height: calc(100vh - 73px)
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div :id="$route.query.isMobile!=='true'?'containt':''">
|
|
3
|
+
<component v-if="showWfContent && wfContent" :is="wfContent" visible-key="showWfContent" :outParam.sync="outParam"
|
|
4
|
+
:_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true"
|
|
5
|
+
:parent-target="_self"
|
|
6
|
+
@reload="$reloadHandle" v-bind="queryParam"></component>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import indexUtil from "@base/utils/index.js"
|
|
12
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent"
|
|
13
|
+
import {
|
|
14
|
+
setReportGlobalParam
|
|
15
|
+
} from "@base/components/xform/utils/util";
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
reportCode: null,
|
|
21
|
+
showWfContent: true,
|
|
22
|
+
wfContent: null,
|
|
23
|
+
outParam: null,
|
|
24
|
+
dataId: null,
|
|
25
|
+
defaultShowWfContent: null,
|
|
26
|
+
queryParam: {}
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
created() {
|
|
30
|
+
this.login();
|
|
31
|
+
},
|
|
32
|
+
mounted() {
|
|
33
|
+
history.pushState(null, null, document.URL);
|
|
34
|
+
window.addEventListener('popstate', this.handlePopState); // 在Vue组件的mounted钩子中添加事件监听
|
|
35
|
+
},
|
|
36
|
+
beforeDestroy() {
|
|
37
|
+
window.removeEventListener('popstate', this.handlePopState); // 在beforeDestroy钩子中移除事件监听
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
initGlobalReqData() {
|
|
41
|
+
let fd = this.$route.query.fd;
|
|
42
|
+
if (fd) {
|
|
43
|
+
setReportGlobalParam(fd);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
async initData() {
|
|
47
|
+
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
|
48
|
+
let queryParam = this.$baseLodash.cloneDeep(this.$route.query);
|
|
49
|
+
let murl = this.$route.query.urlmobile;
|
|
50
|
+
let purl = murl && isMobile ? murl : this.$route.query.url;
|
|
51
|
+
let dataId = this.$route.query.dataId;
|
|
52
|
+
if (purl == '/index') {
|
|
53
|
+
location.hash = '/home';
|
|
54
|
+
location.reload();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
/*let param = this.$route.query.param;
|
|
58
|
+
if (param) {
|
|
59
|
+
this.outParam = JSON.parse(param)
|
|
60
|
+
}*/
|
|
61
|
+
this.dataId = dataId;
|
|
62
|
+
if (this.$route.query.showWfContent == 'true') {
|
|
63
|
+
this.defaultShowWfContent = true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
delete queryParam.urlmobile;
|
|
67
|
+
delete queryParam.url;
|
|
68
|
+
|
|
69
|
+
if (purl.indexOf('.html') >= 0) {
|
|
70
|
+
let eUrl = purl;
|
|
71
|
+
let pstr = Object.keys(queryParam).map(key => {
|
|
72
|
+
return key + "=" + queryParam[key]
|
|
73
|
+
}).join("&")
|
|
74
|
+
|
|
75
|
+
if (pstr) {
|
|
76
|
+
if (purl.indexOf('.html?') >= 0) {
|
|
77
|
+
eUrl = eUrl + '&' + pstr
|
|
78
|
+
} else {
|
|
79
|
+
eUrl = eUrl + '?' + pstr
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
location.href = eUrl;
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
delete queryParam.dataId;
|
|
88
|
+
delete queryParam.showWfContent;
|
|
89
|
+
delete queryParam.access_token;
|
|
90
|
+
delete queryParam.tp;
|
|
91
|
+
delete queryParam.thirdparty_info;
|
|
92
|
+
delete queryParam.i18nLang;
|
|
93
|
+
|
|
94
|
+
let url = purl + '.vue';
|
|
95
|
+
this.queryParam = queryParam;
|
|
96
|
+
this.showWfContent = true;
|
|
97
|
+
this.initUserInfo(async () => {
|
|
98
|
+
await this.initI18n();
|
|
99
|
+
const res = await loadViewComponentAsync(url);
|
|
100
|
+
if (res.kind === "remote") {
|
|
101
|
+
this.$message({ message: "该单据归属子应用 " + res.owner + ",请从对应入口打开", type: "warning" });
|
|
102
|
+
}
|
|
103
|
+
this.wfContent = res.component;
|
|
104
|
+
})
|
|
105
|
+
},
|
|
106
|
+
initUserInfo(callback) {
|
|
107
|
+
this.$store
|
|
108
|
+
.dispatch('user/getInfo2')
|
|
109
|
+
.then(() => {
|
|
110
|
+
callback && callback();
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
getI18nLang() {
|
|
114
|
+
let i18nLang = this.$route.query.i18nLang || "zh";
|
|
115
|
+
return i18nLang;
|
|
116
|
+
},
|
|
117
|
+
initI18n() {
|
|
118
|
+
let lang = this.getI18nLang();
|
|
119
|
+
this.$i18n.locale = lang // 设置给本地的i18n插件
|
|
120
|
+
localStorage.setItem("i18n-lang", lang);
|
|
121
|
+
return indexUtil.initI18nMessage("business", lang, true);
|
|
122
|
+
},
|
|
123
|
+
login() {
|
|
124
|
+
let token = this.$route.query.access_token;
|
|
125
|
+
let url = this.$route.query.url;
|
|
126
|
+
let hasToken = this.$route.query.hasToken;
|
|
127
|
+
let tp = this.$route.query.tp || this.$route.query.thirdparty_info;
|
|
128
|
+
if (url) {
|
|
129
|
+
if (token) {
|
|
130
|
+
this.initByToken(token);
|
|
131
|
+
} else if (tp) {
|
|
132
|
+
this.thirdpartyLogin(tp);
|
|
133
|
+
} else if (hasToken == "true") {
|
|
134
|
+
this.$nextTick(() => {
|
|
135
|
+
this.initData();
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
this.initGlobalReqData();
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
initByToken(token) {
|
|
142
|
+
if (!token) return;
|
|
143
|
+
this.$store
|
|
144
|
+
.dispatch('user/addToken', {
|
|
145
|
+
token
|
|
146
|
+
})
|
|
147
|
+
.then(() => {
|
|
148
|
+
this.$nextTick(() => {
|
|
149
|
+
this.initData();
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
thirdpartyLogin(tp) {
|
|
154
|
+
let lang = this.getI18nLang();
|
|
155
|
+
this.$http({
|
|
156
|
+
url: USER_PREFIX + `/thirdparty_auth/login`,
|
|
157
|
+
method: `post`,
|
|
158
|
+
data: {
|
|
159
|
+
tp: tp,
|
|
160
|
+
language: lang
|
|
161
|
+
},
|
|
162
|
+
isLoading: true,
|
|
163
|
+
modalStrictly: true,
|
|
164
|
+
useToken: false,
|
|
165
|
+
success: res => {
|
|
166
|
+
let thirdpartyToken = res.objx;
|
|
167
|
+
this.initByToken(thirdpartyToken);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
handlePopState(event) {
|
|
172
|
+
// 阻止回退
|
|
173
|
+
history.go(1);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
</script>
|
|
178
|
+
|
|
179
|
+
<style lang="scss" scoped>
|
|
180
|
+
::v-deep .tab-box > .el-tabs__content {
|
|
181
|
+
|
|
182
|
+
.designer-view {
|
|
183
|
+
height: calc(100vh - 33px)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.grid-height,
|
|
187
|
+
.designer-view .el-form.render-form {
|
|
188
|
+
height: calc(100vh - 41px)
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
::v-deep #containt .detail-wrap {
|
|
193
|
+
.d-header {
|
|
194
|
+
margin: -8px -12px 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.d-cont {
|
|
198
|
+
margin: 0 -12px;
|
|
199
|
+
height: calc(100vh - 73px)
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
</style>
|
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div id="containt" style="margin-bottom: -4px" v-if="type == 1">
|
|
4
|
-
<iframe
|
|
5
|
-
v-if="url"
|
|
6
|
-
:src="url"
|
|
7
|
-
style="width: 100%; height: calc(100vh - 40px)"
|
|
8
|
-
></iframe>
|
|
9
|
-
</div>
|
|
10
|
-
<component :is="content" v-if="type == 2 && content"></component>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
import { getToken } from "@base/utils/auth";
|
|
16
|
-
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
name: "outLink",
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
url: null,
|
|
23
|
-
content: null,
|
|
24
|
-
type: 0,
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
async mounted() {
|
|
28
|
-
let url = this.$route.query.url;
|
|
29
|
-
let route = this.$route.query.route;
|
|
30
|
-
if (route) {
|
|
31
|
-
const res = await loadViewComponentAsync(route);
|
|
32
|
-
if (res.kind === "remote") {
|
|
33
|
-
this.$message({ message: "该页面归属子应用 " + res.owner + ",请从对应入口打开", type: "warning" });
|
|
34
|
-
}
|
|
35
|
-
this.content = res.component;
|
|
36
|
-
this.type = 2;
|
|
37
|
-
} else {
|
|
38
|
-
let params = this.getCustomReqUrlAndCleanUrl(url);
|
|
39
|
-
let reqUrl = params.custom_req_url;
|
|
40
|
-
if (reqUrl) {
|
|
41
|
-
this.$http({
|
|
42
|
-
url: reqUrl,
|
|
43
|
-
method: `post`,
|
|
44
|
-
data: { thirdUrl: params.newUrl },
|
|
45
|
-
isLoading: true,
|
|
46
|
-
// modalStrictly: true,
|
|
47
|
-
success: (res) => {
|
|
48
|
-
this.url = res.objx;
|
|
49
|
-
this.type = 1;
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
} else if (url.indexOf("dw=true") >= 0) {
|
|
53
|
-
this.$http({
|
|
54
|
-
url: USER_PREFIX + `/dw_auth/getDwAsc`,
|
|
55
|
-
method: `post`,
|
|
56
|
-
data: {},
|
|
57
|
-
isLoading: true,
|
|
58
|
-
// modalStrictly: true,
|
|
59
|
-
success: (res) => {
|
|
60
|
-
this.url =
|
|
61
|
-
url.replace("dw=true", "dw=" + res.objx.dw) + "¶m=" + res.objx.param;
|
|
62
|
-
this.type = 1;
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
} else if (url.indexOf("token=platform_token") >= 0) {
|
|
66
|
-
this.$http({
|
|
67
|
-
url: YX_PREFIX + `/fundPlatform/getToken`,
|
|
68
|
-
method: `post`,
|
|
69
|
-
data: {},
|
|
70
|
-
isLoading: true,
|
|
71
|
-
success: (res) => {
|
|
72
|
-
this.url = url.replace("token=platform_token", "token=" + res.objx);
|
|
73
|
-
this.type = 1;
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
} else if (url.indexOf("token=true") >= 0) {
|
|
77
|
-
let token = getToken();
|
|
78
|
-
this.url = url.replace("token=true", "token=" + token);
|
|
79
|
-
this.type = 1;
|
|
80
|
-
} else {
|
|
81
|
-
this.url = url;
|
|
82
|
-
this.type = 1;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
methods: {
|
|
87
|
-
getCustomReqUrlAndCleanUrl(url) {
|
|
88
|
-
// 直接使用正则表达式匹配
|
|
89
|
-
const match = url.match(/[?&]custom_req_url=([^&?#]+)/);
|
|
90
|
-
if (match) {
|
|
91
|
-
const customReqUrl = decodeURIComponent(match[1]);
|
|
92
|
-
// 移除匹配到的参数部分
|
|
93
|
-
const newUrl = url.replace(match[0], match[0].startsWith("?") ? "?" : "");
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
custom_req_url: customReqUrl,
|
|
97
|
-
newUrl: newUrl.replace(/\?$/, "").replace(/\?&/, "?"),
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return {
|
|
102
|
-
custom_req_url: "",
|
|
103
|
-
newUrl: url,
|
|
104
|
-
};
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
</script>
|
|
109
|
-
|
|
110
|
-
<style></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div id="containt" style="margin-bottom: -4px" v-if="type == 1">
|
|
4
|
+
<iframe
|
|
5
|
+
v-if="url"
|
|
6
|
+
:src="url"
|
|
7
|
+
style="width: 100%; height: calc(100vh - 40px)"
|
|
8
|
+
></iframe>
|
|
9
|
+
</div>
|
|
10
|
+
<component :is="content" v-if="type == 2 && content"></component>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import { getToken } from "@base/utils/auth";
|
|
16
|
+
import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: "outLink",
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
url: null,
|
|
23
|
+
content: null,
|
|
24
|
+
type: 0,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
async mounted() {
|
|
28
|
+
let url = this.$route.query.url;
|
|
29
|
+
let route = this.$route.query.route;
|
|
30
|
+
if (route) {
|
|
31
|
+
const res = await loadViewComponentAsync(route);
|
|
32
|
+
if (res.kind === "remote") {
|
|
33
|
+
this.$message({ message: "该页面归属子应用 " + res.owner + ",请从对应入口打开", type: "warning" });
|
|
34
|
+
}
|
|
35
|
+
this.content = res.component;
|
|
36
|
+
this.type = 2;
|
|
37
|
+
} else {
|
|
38
|
+
let params = this.getCustomReqUrlAndCleanUrl(url);
|
|
39
|
+
let reqUrl = params.custom_req_url;
|
|
40
|
+
if (reqUrl) {
|
|
41
|
+
this.$http({
|
|
42
|
+
url: reqUrl,
|
|
43
|
+
method: `post`,
|
|
44
|
+
data: { thirdUrl: params.newUrl },
|
|
45
|
+
isLoading: true,
|
|
46
|
+
// modalStrictly: true,
|
|
47
|
+
success: (res) => {
|
|
48
|
+
this.url = res.objx;
|
|
49
|
+
this.type = 1;
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
} else if (url.indexOf("dw=true") >= 0) {
|
|
53
|
+
this.$http({
|
|
54
|
+
url: USER_PREFIX + `/dw_auth/getDwAsc`,
|
|
55
|
+
method: `post`,
|
|
56
|
+
data: {},
|
|
57
|
+
isLoading: true,
|
|
58
|
+
// modalStrictly: true,
|
|
59
|
+
success: (res) => {
|
|
60
|
+
this.url =
|
|
61
|
+
url.replace("dw=true", "dw=" + res.objx.dw) + "¶m=" + res.objx.param;
|
|
62
|
+
this.type = 1;
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
} else if (url.indexOf("token=platform_token") >= 0) {
|
|
66
|
+
this.$http({
|
|
67
|
+
url: YX_PREFIX + `/fundPlatform/getToken`,
|
|
68
|
+
method: `post`,
|
|
69
|
+
data: {},
|
|
70
|
+
isLoading: true,
|
|
71
|
+
success: (res) => {
|
|
72
|
+
this.url = url.replace("token=platform_token", "token=" + res.objx);
|
|
73
|
+
this.type = 1;
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
} else if (url.indexOf("token=true") >= 0) {
|
|
77
|
+
let token = getToken();
|
|
78
|
+
this.url = url.replace("token=true", "token=" + token);
|
|
79
|
+
this.type = 1;
|
|
80
|
+
} else {
|
|
81
|
+
this.url = url;
|
|
82
|
+
this.type = 1;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
getCustomReqUrlAndCleanUrl(url) {
|
|
88
|
+
// 直接使用正则表达式匹配
|
|
89
|
+
const match = url.match(/[?&]custom_req_url=([^&?#]+)/);
|
|
90
|
+
if (match) {
|
|
91
|
+
const customReqUrl = decodeURIComponent(match[1]);
|
|
92
|
+
// 移除匹配到的参数部分
|
|
93
|
+
const newUrl = url.replace(match[0], match[0].startsWith("?") ? "?" : "");
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
custom_req_url: customReqUrl,
|
|
97
|
+
newUrl: newUrl.replace(/\?$/, "").replace(/\?&/, "?"),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
custom_req_url: "",
|
|
103
|
+
newUrl: url,
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<style></style>
|