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'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -63,14 +63,14 @@
|
||||
import { getHistoryProcessImage, getHistoryRecord } from '@/api/workflow/processInstance';
|
||||
import { ref } from 'vue';
|
||||
const props = defineProps({
|
||||
width: {
|
||||
type: String,
|
||||
default: '70%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
}
|
||||
width: {
|
||||
type: String,
|
||||
default: '70%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
}
|
||||
});
|
||||
const loading = ref(false);
|
||||
const src = ref('');
|
||||
@ -85,61 +85,63 @@ const graphicX = ref<number | string>(0);
|
||||
const graphicY = ref<number | string>(0);
|
||||
//初始化查询审批记录
|
||||
const init = async (processInstanceId: string) => {
|
||||
visible.value = true;
|
||||
loading.value = true;
|
||||
historyList.value = [];
|
||||
graphicInfoVos.value = [];
|
||||
src.value = getHistoryProcessImage(processInstanceId);
|
||||
getHistoryRecord(processInstanceId).then((response) => {
|
||||
historyList.value = response.data.historyRecordList;
|
||||
graphicInfoVos.value = response.data.graphicInfoVos;
|
||||
nodeListInfo.value = response.data.nodeListInfo;
|
||||
deleteReason.value = response.data.deleteReason;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
visible.value = true;
|
||||
loading.value = true;
|
||||
historyList.value = [];
|
||||
graphicInfoVos.value = [];
|
||||
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;
|
||||
nodeListInfo.value = response.data.nodeListInfo;
|
||||
deleteReason.value = response.data.deleteReason;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
//悬浮事件
|
||||
const handleMouseOver = async (graphic: any) => {
|
||||
graphicX.value = graphic.x + graphic.width + 10;
|
||||
graphicY.value = graphic.y - graphic.height + -10;
|
||||
nodeInfo.value = {};
|
||||
if (nodeListInfo.value && nodeListInfo.value.length > 0) {
|
||||
let info = nodeListInfo.value.find((e: any) => e.taskDefinitionKey == graphic.nodeId);
|
||||
if (info) {
|
||||
nodeInfo.value = {
|
||||
nickName: info.nickName,
|
||||
status: info.status,
|
||||
startTime: info.startTime,
|
||||
endTime: info.endTime,
|
||||
runDuration: info.runDuration
|
||||
};
|
||||
popupVisible.value = true;
|
||||
}
|
||||
graphicX.value = graphic.x + graphic.width + 10;
|
||||
graphicY.value = graphic.y - graphic.height + -10;
|
||||
nodeInfo.value = {};
|
||||
if (nodeListInfo.value && nodeListInfo.value.length > 0) {
|
||||
let info = nodeListInfo.value.find((e: any) => e.taskDefinitionKey == graphic.nodeId);
|
||||
if (info) {
|
||||
nodeInfo.value = {
|
||||
nickName: info.nickName,
|
||||
status: info.status,
|
||||
startTime: info.startTime,
|
||||
endTime: info.endTime,
|
||||
runDuration: info.runDuration
|
||||
};
|
||||
popupVisible.value = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
//关闭
|
||||
const handleMouseLeave = async () => {
|
||||
popupVisible.value = false;
|
||||
}
|
||||
popupVisible.value = false;
|
||||
};
|
||||
/**
|
||||
* 对外暴露子组建方法
|
||||
*/
|
||||
defineExpose({
|
||||
defineExpose({
|
||||
init
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.triangle {
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.triangle::after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
top: 8em;
|
||||
right: 215px;
|
||||
border: 15px solid;
|
||||
border-color: transparent #fff transparent transparent;
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
top: 8em;
|
||||
right: 215px;
|
||||
border: 15px solid;
|
||||
border-color: transparent #fff transparent transparent;
|
||||
}
|
||||
</style>
|
||||
|
@ -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