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"
|
:bpmn-modeler="modeler"
|
||||||
:prefix="controlForm.prefix"
|
:prefix="controlForm.prefix"
|
||||||
class="process-panel"
|
class="process-panel"
|
||||||
|
ref="bmpnProcessPenalRef"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -34,6 +35,7 @@ import "@/plugins/package/theme/index.scss";
|
|||||||
import CustomContentPadProvider from "@/plugins/package/designer/plugins/content-pad";
|
import CustomContentPadProvider from "@/plugins/package/designer/plugins/content-pad";
|
||||||
import CustomPaletteProvider from "@/plugins/package/designer/plugins/palette";
|
import CustomPaletteProvider from "@/plugins/package/designer/plugins/palette";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bpmnXml: {
|
bpmnXml: {
|
||||||
@ -47,6 +49,7 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
const { bpmnXml, designerForm } = toRefs(props);
|
const { bpmnXml, designerForm } = toRefs(props);
|
||||||
let element;
|
let element;
|
||||||
|
let msgInstance;
|
||||||
const modeler = ref(null);
|
const modeler = ref(null);
|
||||||
const height = ref(document.documentElement.clientHeight - 94.5 + "px;");
|
const height = ref(document.documentElement.clientHeight - 94.5 + "px;");
|
||||||
const xmlString = ref(bpmnXml.value);
|
const xmlString = ref(bpmnXml.value);
|
||||||
@ -64,52 +67,67 @@ const data = reactive({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
const { controlForm } = toRefs(data);
|
const { controlForm } = toRefs(data);
|
||||||
|
const bmpnProcessPenalRef = ref();
|
||||||
function elementClick(elementArgv) {
|
function elementClick(elementArgv) {
|
||||||
element = elementArgv;
|
element = elementArgv;
|
||||||
|
// if(elementArgv)
|
||||||
|
debugger;
|
||||||
|
goToFormSelect();
|
||||||
}
|
}
|
||||||
function initModeler(modelerArgv) {
|
function initModeler(modelerArgv) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
modeler.value = modelerArgv;
|
modeler.value = modelerArgv;
|
||||||
}, 10);
|
}, 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) {
|
function onSaveProcess(saveData) {
|
||||||
emit("save", saveData);
|
emit("save", saveData);
|
||||||
}
|
}
|
||||||
</script>
|
</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">
|
<style lang="scss">
|
||||||
body {
|
body {
|
||||||
|
@ -221,14 +221,6 @@
|
|||||||
:code="previewResult"
|
:code="previewResult"
|
||||||
style="height: 60vh"
|
style="height: 60vh"
|
||||||
/>
|
/>
|
||||||
<!-- <pre>
|
|
||||||
<code>
|
|
||||||
{{ previewResult }}
|
|
||||||
</code>
|
|
||||||
</pre> -->
|
|
||||||
<!-- <div
|
|
||||||
v-html="highlightjs.highlight('xml', { code: previewResult }).value"
|
|
||||||
></div> -->
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -262,7 +254,6 @@ const bpmnCanvasRef = ref();
|
|||||||
const refFile = ref();
|
const refFile = ref();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: String, // xml 字符串
|
modelValue: String, // xml 字符串
|
||||||
// value: String,
|
|
||||||
processId: String,
|
processId: String,
|
||||||
processName: String,
|
processName: String,
|
||||||
translations: Object, // 自定义的翻译文件
|
translations: Object, // 自定义的翻译文件
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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 v-model="activeTab">
|
||||||
<el-collapse-item name="base">
|
<el-collapse-item name="base">
|
||||||
<template #title>
|
<template #title>
|
||||||
@ -240,4 +240,8 @@ watch(elementId, (val) => {
|
|||||||
activeTab.value = "base";
|
activeTab.value = "base";
|
||||||
});
|
});
|
||||||
initModels();
|
initModels();
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
initFormOnChanged,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<el-radio label="ROLES">角色</el-radio>
|
<el-radio label="ROLES">角色</el-radio>
|
||||||
<el-radio label="DEPTS">部门</el-radio>
|
<el-radio label="DEPTS">部门</el-radio>
|
||||||
<el-radio label="INITIATOR">发起人</el-radio>
|
<el-radio label="INITIATOR">发起人</el-radio>
|
||||||
|
<el-radio label="immediate_supervisor">发起人部门领导</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -540,6 +541,9 @@ function changeDataType(val) {
|
|||||||
} else if (val === "INITIATOR") {
|
} else if (val === "INITIATOR") {
|
||||||
userTaskForm.assignee = "${initiator}";
|
userTaskForm.assignee = "${initiator}";
|
||||||
userTaskForm.text = "流程发起人";
|
userTaskForm.text = "流程发起人";
|
||||||
|
} else if (val === "immediate_supervisor") {
|
||||||
|
userTaskForm.assignee = "${immediate_supervisor}";
|
||||||
|
userTaskForm.text = "流程发起人部门领导";
|
||||||
}
|
}
|
||||||
updateElementTask();
|
updateElementTask();
|
||||||
if (
|
if (
|
||||||
|
@ -116,11 +116,18 @@
|
|||||||
prop="categoryName"
|
prop="categoryName"
|
||||||
:formatter="categoryFormat"
|
:formatter="categoryFormat"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="流程版本" align="center">
|
<el-table-column label="部署版本" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag size="default">v{{ row.version }}</el-tag>
|
<el-tag size="default">v{{ row.version }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column label="状态" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag type="success" v-if="!row.suspended">激活</el-tag>
|
<el-tag type="success" v-if="!row.suspended">激活</el-tag>
|
||||||
@ -209,11 +216,18 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="流程版本" align="center">
|
<el-table-column label="部署版本" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag size="default">v{{ row.version }}</el-tag>
|
<el-tag size="default">v{{ row.version }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column label="状态" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag type="success" v-if="!row.suspended">激活</el-tag>
|
<el-tag type="success" v-if="!row.suspended">激活</el-tag>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
icon="download"
|
icon="download"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['workflow:process:export']"
|
v-hasPermi="['flowable:process:export']"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -366,10 +366,8 @@ const userList = ref(null);
|
|||||||
|
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
const loading = ref(true);
|
|
||||||
|
|
||||||
const currentUserId = ref(null);
|
const currentUserId = ref(null);
|
||||||
const variables = ref([]); // 流程变量数
|
|
||||||
const taskFormOpen = ref(false);
|
const taskFormOpen = ref(false);
|
||||||
const processFormList = ref([]); // 流程变量数
|
const processFormList = ref([]); // 流程变量数
|
||||||
const formOpen = ref(false); // 是否加载流程变量数
|
const formOpen = ref(false); // 是否加载流程变量数
|
||||||
@ -377,13 +375,9 @@ const returnTaskList = ref([]); // 回退列表数
|
|||||||
const finished = ref("false");
|
const finished = ref("false");
|
||||||
const returnTitle = ref(null);
|
const returnTitle = ref(null);
|
||||||
const returnOpen = ref(false);
|
const returnOpen = ref(false);
|
||||||
const rejectOpen = ref(false);
|
|
||||||
const rejectTitle = ref(null);
|
|
||||||
const copyUser = ref([]);
|
const copyUser = ref([]);
|
||||||
const nextUser = ref([]);
|
const nextUser = ref([]);
|
||||||
const userMultipleSelection = ref([]);
|
const userMultipleSelection = ref([]);
|
||||||
const userDialogTitle = ref("");
|
|
||||||
const userOpen = ref(false);
|
|
||||||
|
|
||||||
const commentType = computed(() => {
|
const commentType = computed(() => {
|
||||||
return (val) => {
|
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) {
|
function getProcessDetails(procInsId, deployId, taskId) {
|
||||||
const params = {
|
const params = {
|
||||||
procInsId: procInsId,
|
procInsId: procInsId,
|
||||||
@ -696,28 +678,6 @@ function goBack() {
|
|||||||
tab.closePage(route);
|
tab.closePage(route);
|
||||||
router.back();
|
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() {
|
function submitUserData() {
|
||||||
let type = userData.value.type;
|
let type = userData.value.type;
|
||||||
if (type === "copy" || type === "next") {
|
if (type === "copy" || type === "next") {
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['workflow:process:remove']"
|
v-hasPermi="['flowable:process:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -180,7 +180,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
icon="pointer"
|
icon="pointer"
|
||||||
@click="userOpen = true"
|
@click="selectPrincipal"
|
||||||
>选择负责人</el-button
|
>选择负责人</el-button
|
||||||
>
|
>
|
||||||
<!-- <el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" /> -->
|
<!-- <el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" /> -->
|
||||||
@ -457,8 +457,11 @@ function handleCurrentChange(currentRow) {
|
|||||||
form.value.leaderName = currentRow.nickName;
|
form.value.leaderName = currentRow.nickName;
|
||||||
userOpen.value = false;
|
userOpen.value = false;
|
||||||
}
|
}
|
||||||
// function getLeaderName(leaderId) {}
|
function selectPrincipal() {
|
||||||
getDeptTreeData();
|
userOpen.value = true;
|
||||||
|
getDeptTreeData();
|
||||||
|
getUserList();
|
||||||
|
}
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
function cancel() {
|
function cancel() {
|
||||||
open.value = false;
|
open.value = false;
|
||||||
|
Reference in New Issue
Block a user