添加画图接口token,优化画图接口
This commit is contained in:
parent
86670c99e4
commit
f0a304d6d7
@ -411,6 +411,11 @@ angular.module('flowableModeler').controller('SaveModelCtrl', [ '$rootScope', '$
|
||||
url: FLOWABLE.URL.putModel(modelMetaData.modelId)})
|
||||
|
||||
.success(function (data, status, headers, config) {
|
||||
if(data.code === 500){
|
||||
alert(data.msg)
|
||||
$scope.status.loading = false;
|
||||
return false
|
||||
}
|
||||
editorManager.handleEvents({
|
||||
type: ORYX.CONFIG.EVENT_SAVED
|
||||
});
|
||||
|
@ -15,27 +15,27 @@ var FLOWABLE = FLOWABLE || {};
|
||||
FLOWABLE.URL = {
|
||||
|
||||
getModel: function(modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json?version=' + Date.now();
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
getStencilSet: function() {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/editor?version=' + Date.now();
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/editor?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
getCmmnStencilSet: function() {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/cmmneditor?version=' + Date.now();
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/cmmneditor?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
getDmnStencilSet: function() {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/dmneditor?version=' + Date.now();
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/dmneditor?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
|
||||
putModel: function(modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json';
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json'+'?Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
validateModel: function(){
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/model/validate';
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/model/validate'+'?Authorization=Bearer '+window.parent.this.token;
|
||||
}
|
||||
};
|
@ -16,13 +16,13 @@
|
||||
'use strict';
|
||||
|
||||
var FLOWABLE = FLOWABLE || {};
|
||||
|
||||
var pathname = window.location.pathname.replace(/^(\/[^\/]*)(\/.*)?modeler\/?$/, '$1').replace(/\/$/, '');
|
||||
const baseURL = window.parent.this.apiUrl;
|
||||
|
||||
FLOWABLE.CONFIG = {
|
||||
'onPremise' : true,
|
||||
'contextRoot' : 'http://127.0.0.1:8080/workflow/model',
|
||||
'contextModelerRestRoot' : 'http://127.0.0.1:8080/workflow/model',
|
||||
'webContextRoot' : 'http://127.0.0.1:8080/workflow/model',
|
||||
'contextRoot' : baseURL+'/workflow/model',
|
||||
'contextModelerRestRoot' : baseURL+'/workflow/model',
|
||||
'webContextRoot' : baseURL+'/workflow/model',
|
||||
'datesLocalization' : false
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ FLOWABLE.APP_URL = {
|
||||
/* ACCOUNT URLS */
|
||||
|
||||
getAccountUrl: function () {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/account';
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/account?Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
getLogoutUrl: function () {
|
||||
@ -35,19 +35,19 @@ FLOWABLE.APP_URL = {
|
||||
},
|
||||
|
||||
getModelUrl: function (modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId+'?Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
getModelModelJsonUrl: function (modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/model-json';
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/model-json?Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
getModelBpmn20ExportUrl: function (modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/bpmn20?version=' + Date.now();
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/bpmn20?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
getCloneModelsUrl: function (modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/clone';
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/clone'+'?Authorization=Bearer '+window.parent.this.token;
|
||||
},
|
||||
|
||||
getModelHistoriesUrl: function (modelId) {
|
||||
|
@ -7,7 +7,9 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
const baseURL = import.meta.env.VITE_APP_BASE_API;
|
||||
import { getToken } from '@/utils/auth';
|
||||
export default {
|
||||
props: {
|
||||
modelId: String
|
||||
@ -21,14 +23,24 @@ export default {
|
||||
computed: {
|
||||
src() {
|
||||
return `/static/flowable-modeler/index.html#/editor/${this.modelId}`;
|
||||
},
|
||||
apiUrl() {
|
||||
return baseURL;
|
||||
},
|
||||
token() {
|
||||
return getToken();
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
//全局存入当前vue实例
|
||||
window.this = this;
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.$modal
|
||||
.confirm('请记得点击左上角保存按钮,确定关闭设计窗口?', '确认关闭')
|
||||
.then(() => {
|
||||
this.visible = false
|
||||
this.visible = false;
|
||||
// 刷新数据
|
||||
this.$parent.getList();
|
||||
})
|
||||
@ -39,7 +51,7 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
<style scoped>
|
||||
.iframe {
|
||||
width: 100%;
|
||||
height: calc(100vh - 120px);
|
||||
|
Loading…
x
Reference in New Issue
Block a user