update 调整设计器请求头
This commit is contained in:
parent
375a21a300
commit
1367507baf
@ -15,27 +15,27 @@ var FLOWABLE = FLOWABLE || {};
|
|||||||
FLOWABLE.URL = {
|
FLOWABLE.URL = {
|
||||||
|
|
||||||
getModel: function(modelId) {
|
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() {
|
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() {
|
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() {
|
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) {
|
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(){
|
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['Cache-Control'] = 'no-cache, no-store, must-revalidate';
|
||||||
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache';
|
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache';
|
||||||
$httpProvider.defaults.headers.get['Expires'] = '0';
|
$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');
|
$httpProvider.interceptors.push('NotPermittedInterceptor');
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ FLOWABLE.APP_URL = {
|
|||||||
/* ACCOUNT URLS */
|
/* ACCOUNT URLS */
|
||||||
|
|
||||||
getAccountUrl: function () {
|
getAccountUrl: function () {
|
||||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/account?Authorization=Bearer '+window.parent.this.token;
|
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/account';
|
||||||
},
|
},
|
||||||
|
|
||||||
getLogoutUrl: function () {
|
getLogoutUrl: function () {
|
||||||
@ -35,19 +35,19 @@ FLOWABLE.APP_URL = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getModelUrl: function (modelId) {
|
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) {
|
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) {
|
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) {
|
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) {
|
getModelHistoriesUrl: function (modelId) {
|
||||||
@ -251,15 +251,15 @@ FLOWABLE.APP_URL = {
|
|||||||
/* OTHER URLS */
|
/* OTHER URLS */
|
||||||
|
|
||||||
getEditorUsersUrl: function () {
|
getEditorUsersUrl: function () {
|
||||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/editor-users?Authorization=Bearer '+window.parent.this.token;
|
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/editor-users';
|
||||||
},
|
},
|
||||||
|
|
||||||
getEditorGroupsUrl: function () {
|
getEditorGroupsUrl: function () {
|
||||||
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/editor-groups?Authorization=Bearer '+window.parent.this.token;
|
return FLOWABLE.CONFIG.contextModelerRestRoot + '/rest/editor-groups';
|
||||||
},
|
},
|
||||||
|
|
||||||
getAboutInfoUrl: function () {
|
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获取历史流程图
|
* 通过流程实例id获取历史流程图
|
||||||
*/
|
*/
|
||||||
export const getHistoryProcessImage = (processInstanceId: string) => {
|
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 { getHistoryProcessImage, getHistoryRecord } from '@/api/workflow/processInstance';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
width: {
|
width: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '70%'
|
default: '70%'
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '100%'
|
default: '100%'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const src = ref('');
|
const src = ref('');
|
||||||
@ -85,61 +85,63 @@ const graphicX = ref<number | string>(0);
|
|||||||
const graphicY = ref<number | string>(0);
|
const graphicY = ref<number | string>(0);
|
||||||
//初始化查询审批记录
|
//初始化查询审批记录
|
||||||
const init = async (processInstanceId: string) => {
|
const init = async (processInstanceId: string) => {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
historyList.value = [];
|
historyList.value = [];
|
||||||
graphicInfoVos.value = [];
|
graphicInfoVos.value = [];
|
||||||
src.value = getHistoryProcessImage(processInstanceId);
|
getHistoryProcessImage(processInstanceId).then((res) => {
|
||||||
getHistoryRecord(processInstanceId).then((response) => {
|
src.value = 'data:image/png;base64,' + res.data
|
||||||
historyList.value = response.data.historyRecordList;
|
});
|
||||||
graphicInfoVos.value = response.data.graphicInfoVos;
|
getHistoryRecord(processInstanceId).then((response) => {
|
||||||
nodeListInfo.value = response.data.nodeListInfo;
|
historyList.value = response.data.historyRecordList;
|
||||||
deleteReason.value = response.data.deleteReason;
|
graphicInfoVos.value = response.data.graphicInfoVos;
|
||||||
loading.value = false;
|
nodeListInfo.value = response.data.nodeListInfo;
|
||||||
});
|
deleteReason.value = response.data.deleteReason;
|
||||||
}
|
loading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
//悬浮事件
|
//悬浮事件
|
||||||
const handleMouseOver = async (graphic: any) => {
|
const handleMouseOver = async (graphic: any) => {
|
||||||
graphicX.value = graphic.x + graphic.width + 10;
|
graphicX.value = graphic.x + graphic.width + 10;
|
||||||
graphicY.value = graphic.y - graphic.height + -10;
|
graphicY.value = graphic.y - graphic.height + -10;
|
||||||
nodeInfo.value = {};
|
nodeInfo.value = {};
|
||||||
if (nodeListInfo.value && nodeListInfo.value.length > 0) {
|
if (nodeListInfo.value && nodeListInfo.value.length > 0) {
|
||||||
let info = nodeListInfo.value.find((e: any) => e.taskDefinitionKey == graphic.nodeId);
|
let info = nodeListInfo.value.find((e: any) => e.taskDefinitionKey == graphic.nodeId);
|
||||||
if (info) {
|
if (info) {
|
||||||
nodeInfo.value = {
|
nodeInfo.value = {
|
||||||
nickName: info.nickName,
|
nickName: info.nickName,
|
||||||
status: info.status,
|
status: info.status,
|
||||||
startTime: info.startTime,
|
startTime: info.startTime,
|
||||||
endTime: info.endTime,
|
endTime: info.endTime,
|
||||||
runDuration: info.runDuration
|
runDuration: info.runDuration
|
||||||
};
|
};
|
||||||
popupVisible.value = true;
|
popupVisible.value = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
//关闭
|
//关闭
|
||||||
const handleMouseLeave = async () => {
|
const handleMouseLeave = async () => {
|
||||||
popupVisible.value = false;
|
popupVisible.value = false;
|
||||||
}
|
};
|
||||||
/**
|
/**
|
||||||
* 对外暴露子组建方法
|
* 对外暴露子组建方法
|
||||||
*/
|
*/
|
||||||
defineExpose({
|
defineExpose({
|
||||||
init
|
init
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.triangle {
|
.triangle {
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.triangle::after {
|
.triangle::after {
|
||||||
content: ' ';
|
content: ' ';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8em;
|
top: 8em;
|
||||||
right: 215px;
|
right: 215px;
|
||||||
border: 15px solid;
|
border: 15px solid;
|
||||||
border-color: transparent #fff transparent transparent;
|
border-color: transparent #fff transparent transparent;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -28,7 +28,10 @@ export default {
|
|||||||
},
|
},
|
||||||
token() {
|
token() {
|
||||||
return getToken();
|
return getToken();
|
||||||
}
|
},
|
||||||
|
clientid() {
|
||||||
|
return import.meta.env.VITE_APP_CLIENT_ID;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
//全局存入当前vue实例
|
//全局存入当前vue实例
|
||||||
|
Loading…
x
Reference in New Issue
Block a user