update 调整设计器请求头
This commit is contained in:
parent
375a21a300
commit
1367507baf
@ -15,27 +15,27 @@ var FLOWABLE = FLOWABLE || {};
|
||||
FLOWABLE.URL = {
|
||||
|
||||
getModel: function(modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json?version=' + Date.now();
|
||||
},
|
||||
|
||||
getStencilSet: function() {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/editor?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/editor?version=' + Date.now();
|
||||
},
|
||||
|
||||
getCmmnStencilSet: function() {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/cmmneditor?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/cmmneditor?version=' + Date.now();
|
||||
},
|
||||
|
||||
getDmnStencilSet: function() {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/dmneditor?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/stencil-sets/dmneditor?version=' + Date.now();
|
||||
},
|
||||
|
||||
|
||||
putModel: function(modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json'+'?Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/editor/json';
|
||||
},
|
||||
|
||||
validateModel: function(){
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/model/validate'+'?Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/model/validate';
|
||||
}
|
||||
};
|
@ -40,6 +40,8 @@ flowableModule.config(['$httpProvider', function($httpProvider) {
|
||||
$httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache, no-store, must-revalidate';
|
||||
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache';
|
||||
$httpProvider.defaults.headers.get['Expires'] = '0';
|
||||
$httpProvider.defaults.headers.get['Authorization'] = 'Bearer '+window.parent.this.token;
|
||||
$httpProvider.defaults.headers.get['clientid'] = window.parent.this.clientid;
|
||||
|
||||
$httpProvider.interceptors.push('NotPermittedInterceptor');
|
||||
|
||||
|
@ -21,7 +21,7 @@ FLOWABLE.APP_URL = {
|
||||
/* ACCOUNT URLS */
|
||||
|
||||
getAccountUrl: function () {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/account?Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/account';
|
||||
},
|
||||
|
||||
getLogoutUrl: function () {
|
||||
@ -35,19 +35,19 @@ FLOWABLE.APP_URL = {
|
||||
},
|
||||
|
||||
getModelUrl: function (modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId+'?Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId+'';
|
||||
},
|
||||
|
||||
getModelModelJsonUrl: function (modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/model-json?Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/model-json';
|
||||
},
|
||||
|
||||
getModelBpmn20ExportUrl: function (modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/bpmn20?version=' + Date.now()+'&Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/bpmn20?version=' + Date.now();
|
||||
},
|
||||
|
||||
getCloneModelsUrl: function (modelId) {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/clone'+'?Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/models/' + modelId + '/clone'+'';
|
||||
},
|
||||
|
||||
getModelHistoriesUrl: function (modelId) {
|
||||
@ -251,15 +251,15 @@ FLOWABLE.APP_URL = {
|
||||
/* OTHER URLS */
|
||||
|
||||
getEditorUsersUrl: function () {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/editor-users?Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/editor-users';
|
||||
},
|
||||
|
||||
getEditorGroupsUrl: function () {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/editor-groups?Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/editor-groups';
|
||||
},
|
||||
|
||||
getAboutInfoUrl: function () {
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/about-info?Authorization=Bearer '+window.parent.this.token;
|
||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/about-info';
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -32,7 +32,10 @@ export const getProcessInstanceFinishByPage = (query: object) => {
|
||||
* 通过流程实例id获取历史流程图
|
||||
*/
|
||||
export const getHistoryProcessImage = (processInstanceId: string) => {
|
||||
return baseUrl + `/workflow/processInstance/getHistoryProcessImage/${processInstanceId}` + '?Authorization=Bearer ' + getToken() + '&t' + Math.random()
|
||||
return request({
|
||||
url: `/workflow/processInstance/getHistoryProcessImage/${processInstanceId}` + '?t' + Math.random(),
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -89,7 +89,9 @@ const init = async (processInstanceId: string) => {
|
||||
loading.value = true;
|
||||
historyList.value = [];
|
||||
graphicInfoVos.value = [];
|
||||
src.value = getHistoryProcessImage(processInstanceId);
|
||||
getHistoryProcessImage(processInstanceId).then((res) => {
|
||||
src.value = 'data:image/png;base64,' + res.data
|
||||
});
|
||||
getHistoryRecord(processInstanceId).then((response) => {
|
||||
historyList.value = response.data.historyRecordList;
|
||||
graphicInfoVos.value = response.data.graphicInfoVos;
|
||||
@ -97,7 +99,7 @@ const init = async (processInstanceId: string) => {
|
||||
deleteReason.value = response.data.deleteReason;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
//悬浮事件
|
||||
const handleMouseOver = async (graphic: any) => {
|
||||
graphicX.value = graphic.x + graphic.width + 10;
|
||||
@ -116,11 +118,11 @@ const handleMouseOver = async (graphic: any) => {
|
||||
popupVisible.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
//关闭
|
||||
const handleMouseLeave = async () => {
|
||||
popupVisible.value = false;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 对外暴露子组建方法
|
||||
*/
|
||||
|
@ -28,7 +28,10 @@ export default {
|
||||
},
|
||||
token() {
|
||||
return getToken();
|
||||
}
|
||||
},
|
||||
clientid() {
|
||||
return import.meta.env.VITE_APP_CLIENT_ID;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//全局存入当前vue实例
|
||||
|
Loading…
x
Reference in New Issue
Block a user