fix
This commit is contained in:
4
Caddyfile
Normal file
4
Caddyfile
Normal file
@ -0,0 +1,4 @@
|
||||
:2173 {
|
||||
root * D:\Documents\GitHub\ruoyi-ui\dist
|
||||
file_server
|
||||
}
|
@ -21,6 +21,7 @@
|
||||
:bpmn-modeler="modeler"
|
||||
:prefix="controlForm.prefix"
|
||||
class="process-panel"
|
||||
ref="bmpnProcessPenalRef"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -34,6 +35,7 @@ import "@/plugins/package/theme/index.scss";
|
||||
import CustomContentPadProvider from "@/plugins/package/designer/plugins/content-pad";
|
||||
import CustomPaletteProvider from "@/plugins/package/designer/plugins/palette";
|
||||
import { ref } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
|
||||
const props = defineProps({
|
||||
bpmnXml: {
|
||||
@ -47,6 +49,7 @@ const props = defineProps({
|
||||
});
|
||||
const { bpmnXml, designerForm } = toRefs(props);
|
||||
let element;
|
||||
let msgInstance;
|
||||
const modeler = ref(null);
|
||||
const height = ref(document.documentElement.clientHeight - 94.5 + "px;");
|
||||
const xmlString = ref(bpmnXml.value);
|
||||
@ -64,52 +67,67 @@ const data = reactive({
|
||||
},
|
||||
});
|
||||
const { controlForm } = toRefs(data);
|
||||
|
||||
const bmpnProcessPenalRef = ref();
|
||||
function elementClick(elementArgv) {
|
||||
element = elementArgv;
|
||||
// if(elementArgv)
|
||||
debugger;
|
||||
goToFormSelect();
|
||||
}
|
||||
function initModeler(modelerArgv) {
|
||||
setTimeout(() => {
|
||||
modeler.value = modelerArgv;
|
||||
}, 10);
|
||||
}
|
||||
function handlerEvent(eventName, element) {}
|
||||
function handlerEvent(eventName) {
|
||||
if (eventName === "connection-added") {
|
||||
goToFormSelect();
|
||||
}
|
||||
}
|
||||
|
||||
function goToFormSelect() {
|
||||
if (!window.bpmnInstances) return;
|
||||
const formKeyExist =
|
||||
!!window.bpmnInstances.elementRegistry.find(
|
||||
(el) => el.type == "bpmn:StartEvent"
|
||||
)?.businessObject?.formKey ?? false;
|
||||
|
||||
if (!formKeyExist) {
|
||||
// msgInstance?.close();
|
||||
ElMessageBox.alert("请为开始节点选择表单", "未选择表单", {
|
||||
confirmButtonText: "去选择",
|
||||
callback: () => {
|
||||
const startEle = window.bpmnInstances.elementRegistry.find(
|
||||
(el) => el.type == "bpmn:StartEvent"
|
||||
);
|
||||
const EventBus = window.bpmnInstances.eventBus;
|
||||
if (element.type != "bpmn:StartEvent") {
|
||||
startEle && EventBus.fire("element.click", { element: startEle });
|
||||
}
|
||||
},
|
||||
});
|
||||
// return;
|
||||
// msgInstance = ElMessage.warning({
|
||||
// message: "请为开始节点选择表单",
|
||||
// showClose: true,
|
||||
// duration: 0,
|
||||
// onClose: () => {
|
||||
// const startEle = window.bpmnInstances.elementRegistry.find(
|
||||
// (el) => el.type == "bpmn:StartEvent"
|
||||
// );
|
||||
// const EventBus = window.bpmnInstances.eventBus;
|
||||
// if (element.type != "bpmn:StartEvent") {
|
||||
// startEle && EventBus.fire("element.click", { element: startEle });
|
||||
// }
|
||||
// // startEle && bmpnProcessPenalRef.value.initFormOnChanged(startEle);
|
||||
// },
|
||||
// });
|
||||
}
|
||||
}
|
||||
function onSaveProcess(saveData) {
|
||||
emit("save", saveData);
|
||||
}
|
||||
</script>
|
||||
<!--
|
||||
|
||||
<script>
|
||||
// import Vue from 'vue';
|
||||
import { BpmnProcessDesigner, BmpnProcessPenal } from "@/plugins/package/index";
|
||||
// 自定义元素选中时的弹出菜单(修改 默认任务 为 用户任务)
|
||||
import CustomContentPadProvider from "@/plugins/package/designer/plugins/content-pad";
|
||||
// 自定义左侧菜单(修改 默认任务 为 用户任务)
|
||||
import CustomPaletteProvider from "@/plugins/package/designer/plugins/palette";
|
||||
import vuePlugin from "@/plugins/package/highlight";
|
||||
// import "highlight.js/styles/atom-one-dark-reasonable.css";
|
||||
// Vue.use(vuePlugin);
|
||||
|
||||
export default {
|
||||
name: "ProcessDesigner",
|
||||
|
||||
components: {
|
||||
BpmnProcessDesigner,
|
||||
BmpnProcessPenal,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
-->
|
||||
|
||||
<style lang="scss">
|
||||
body {
|
||||
|
@ -221,14 +221,6 @@
|
||||
:code="previewResult"
|
||||
style="height: 60vh"
|
||||
/>
|
||||
<!-- <pre>
|
||||
<code>
|
||||
{{ previewResult }}
|
||||
</code>
|
||||
</pre> -->
|
||||
<!-- <div
|
||||
v-html="highlightjs.highlight('xml', { code: previewResult }).value"
|
||||
></div> -->
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -262,7 +254,6 @@ const bpmnCanvasRef = ref();
|
||||
const refFile = ref();
|
||||
const props = defineProps({
|
||||
modelValue: String, // xml 字符串
|
||||
// value: String,
|
||||
processId: String,
|
||||
processName: String,
|
||||
translations: Object, // 自定义的翻译文件
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="process-panel__container" :style="{ width: `${this.width}px` }">
|
||||
<div class="process-panel__container" :style="{ width: `${width}px` }">
|
||||
<el-collapse v-model="activeTab">
|
||||
<el-collapse-item name="base">
|
||||
<template #title>
|
||||
@ -240,4 +240,8 @@ watch(elementId, (val) => {
|
||||
activeTab.value = "base";
|
||||
});
|
||||
initModels();
|
||||
|
||||
defineExpose({
|
||||
initFormOnChanged,
|
||||
});
|
||||
</script>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<el-radio label="ROLES">角色</el-radio>
|
||||
<el-radio label="DEPTS">部门</el-radio>
|
||||
<el-radio label="INITIATOR">发起人</el-radio>
|
||||
<el-radio label="immediate_supervisor">发起人部门领导</el-radio>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -540,6 +541,9 @@ function changeDataType(val) {
|
||||
} else if (val === "INITIATOR") {
|
||||
userTaskForm.assignee = "${initiator}";
|
||||
userTaskForm.text = "流程发起人";
|
||||
} else if (val === "immediate_supervisor") {
|
||||
userTaskForm.assignee = "${immediate_supervisor}";
|
||||
userTaskForm.text = "流程发起人部门领导";
|
||||
}
|
||||
updateElementTask();
|
||||
if (
|
||||
|
@ -116,11 +116,18 @@
|
||||
prop="categoryName"
|
||||
:formatter="categoryFormat"
|
||||
/>
|
||||
<el-table-column label="流程版本" align="center">
|
||||
<el-table-column label="部署版本" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag size="default">v{{ row.version }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模型版本" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="success" size="default"
|
||||
>v{{ row.modelVersion }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="success" v-if="!row.suspended">激活</el-tag>
|
||||
@ -209,11 +216,18 @@
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程版本" align="center">
|
||||
<el-table-column label="部署版本" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag size="default">v{{ row.version }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模型版本" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="success" size="default"
|
||||
>v{{ row.modelVersion }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="success" v-if="!row.suspended">激活</el-tag>
|
||||
|
@ -46,7 +46,7 @@
|
||||
icon="download"
|
||||
size="small"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['workflow:process:export']"
|
||||
v-hasPermi="['flowable:process:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
@ -366,10 +366,8 @@ const userList = ref(null);
|
||||
|
||||
const total = ref(0);
|
||||
// 遮罩层
|
||||
const loading = ref(true);
|
||||
|
||||
const currentUserId = ref(null);
|
||||
const variables = ref([]); // 流程变量数
|
||||
const taskFormOpen = ref(false);
|
||||
const processFormList = ref([]); // 流程变量数
|
||||
const formOpen = ref(false); // 是否加载流程变量数
|
||||
@ -377,13 +375,9 @@ const returnTaskList = ref([]); // 回退列表数
|
||||
const finished = ref("false");
|
||||
const returnTitle = ref(null);
|
||||
const returnOpen = ref(false);
|
||||
const rejectOpen = ref(false);
|
||||
const rejectTitle = ref(null);
|
||||
const copyUser = ref([]);
|
||||
const nextUser = ref([]);
|
||||
const userMultipleSelection = ref([]);
|
||||
const userDialogTitle = ref("");
|
||||
const userOpen = ref(false);
|
||||
|
||||
const commentType = computed(() => {
|
||||
return (val) => {
|
||||
@ -567,18 +561,6 @@ function handleClose(type, tag) {
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 流程变量赋值 */
|
||||
function handleCheckChange(val) {
|
||||
if (val instanceof Array) {
|
||||
taskForm.value.values = {
|
||||
approval: val.join(","),
|
||||
};
|
||||
} else {
|
||||
taskForm.value.values = {
|
||||
approval: val,
|
||||
};
|
||||
}
|
||||
}
|
||||
function getProcessDetails(procInsId, deployId, taskId) {
|
||||
const params = {
|
||||
procInsId: procInsId,
|
||||
@ -696,28 +678,6 @@ function goBack() {
|
||||
tab.closePage(route);
|
||||
router.back();
|
||||
}
|
||||
/** 接收子组件传的值 */
|
||||
function getData(data) {
|
||||
if (data) {
|
||||
const variables = [];
|
||||
data.fields.forEach((item) => {
|
||||
let variableData = {};
|
||||
variableData.label = item.__config__.label;
|
||||
// 表单值为多个选项时
|
||||
if (item.__config__.defaultValue instanceof Array) {
|
||||
const array = [];
|
||||
item.__config__.defaultValue.forEach((val) => {
|
||||
array.push(val);
|
||||
});
|
||||
variableData.val = array;
|
||||
} else {
|
||||
variableData.val = item.__config__.defaultValue;
|
||||
}
|
||||
variables.push(variableData);
|
||||
});
|
||||
variables.value = variables;
|
||||
}
|
||||
}
|
||||
function submitUserData() {
|
||||
let type = userData.value.type;
|
||||
if (type === "copy" || type === "next") {
|
||||
|
@ -50,7 +50,7 @@
|
||||
size="small"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['workflow:process:remove']"
|
||||
v-hasPermi="['flowable:process:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
@ -180,7 +180,7 @@
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="pointer"
|
||||
@click="userOpen = true"
|
||||
@click="selectPrincipal"
|
||||
>选择负责人</el-button
|
||||
>
|
||||
<!-- <el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" /> -->
|
||||
@ -457,8 +457,11 @@ function handleCurrentChange(currentRow) {
|
||||
form.value.leaderName = currentRow.nickName;
|
||||
userOpen.value = false;
|
||||
}
|
||||
// function getLeaderName(leaderId) {}
|
||||
function selectPrincipal() {
|
||||
userOpen.value = true;
|
||||
getDeptTreeData();
|
||||
getUserList();
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
|
Reference in New Issue
Block a user