From 0e9013c8c8617b34f96e302962de33a3404abfa1 Mon Sep 17 00:00:00 2001 From: cxc Date: Wed, 21 Dec 2022 14:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/flowable/category.js | 15 + src/components/Editor/index.vue | 9 +- .../penal/flow-condition/FlowCondition.vue | 279 ++++--- .../penal/listeners/UserTaskListeners.vue | 325 ++++---- .../package/penal/task/ElementTask.vue | 116 ++- .../task/task-components/ReceiveTask.vue | 185 +++-- .../penal/task/task-components/ScriptTask.vue | 131 +-- .../penal/task/task-components/UserTask.vue | 780 ++++++++++-------- .../package/theme/process-designer.scss | 8 +- src/utils/generator/config.js | 2 +- src/views/flowable/category/index.vue | 41 +- src/views/flowable/deploy/index.vue | 22 +- src/views/flowable/form/index.vue | 19 +- src/views/flowable/model/index.vue | 22 +- 14 files changed, 1083 insertions(+), 871 deletions(-) diff --git a/src/api/flowable/category.js b/src/api/flowable/category.js index cec6a71..8cafff0 100644 --- a/src/api/flowable/category.js +++ b/src/api/flowable/category.js @@ -6,15 +6,30 @@ export const listAllCategory = (query) => method: "get", params: query, }); + export const addCategory = (data) => request({ url: "/flowable/category", method: "post", data }); + export const delCategory = (ids) => request({ url: "/flowable/category", method: "delete", data: { ids } }); + +export const getCategory = (categoryId) => + request({ + url: `/flowable/category/${categoryId}`, + method: "get", + }); + +export const updateCategory = (data) => + request({ + url: `/flowable/category`, + method: "put", + data + }); diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index a413437..e879e2e 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -74,12 +74,10 @@ export default { setup(props, context) { // 编辑器实例,必须用 shallowRef const editorRef = shallowRef(); - // editorRef.value.on("blur", () => { - // console.log("blur"); - // }); // 内容 HTML const valueHtml = ref(""); + watch( () => props.modelValue, (val) => { @@ -92,9 +90,7 @@ export default { const toolbarConfig = { excludeKeys: [], }; - // onBlur: (editor) => { - // console.log("onBlur"); - // }, + const editorConfig = { placeholder: props.placeholder, readOnly: props.readOnly, @@ -141,7 +137,6 @@ export default { const emitBlur = () => { context.emit("blur", editorRef.value); - // editorRef.value.emit("blur"); }; return { diff --git a/src/plugins/package/penal/flow-condition/FlowCondition.vue b/src/plugins/package/penal/flow-condition/FlowCondition.vue index db6a107..7738193 100644 --- a/src/plugins/package/penal/flow-condition/FlowCondition.vue +++ b/src/plugins/package/penal/flow-condition/FlowCondition.vue @@ -1,6 +1,11 @@ @@ -359,8 +361,9 @@ function handleQuery() { getList(); } /** 重置按钮操作 */ +const queryFormRef = ref(); function resetQuery() { - resetForm("queryForm"); + queryFormRef.value && queryFormRef.value.resetFields(); handleQuery(); } // 多选框选中数据 @@ -414,6 +417,9 @@ function handleDelete(row) { .then(() => { loading.value = false; getList(); + if (publishQueryParams.value.processKey) { + getPublishList(); + } ElMessage.success("删除成功"); }) .finally(() => { diff --git a/src/views/flowable/form/index.vue b/src/views/flowable/form/index.vue index c564912..2f5d52d 100644 --- a/src/views/flowable/form/index.vue +++ b/src/views/flowable/form/index.vue @@ -133,7 +133,7 @@ - + @@ -202,6 +202,7 @@ const formConfOpen = ref(false); const formTitle = ref(""); // 是否显示弹出层 const open = ref(false); +const formRef = ref(); const data = reactive({ formConf: {}, // 默认表单数据 // 查询参数 @@ -285,7 +286,7 @@ function handleUpdate(row) { } /** 提交按钮 */ function submitForm() { - this.$refs["form"].validate((valid) => { + formRef.value.validate((valid) => { if (valid) { if (form.value.formId != null) { updateForm(form.value).then((response) => { @@ -295,9 +296,9 @@ function submitForm() { }); } else { addForm(form.value).then((response) => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); + ElMessage.success("新增成功"); + open.value = false; + getList(); }); } } @@ -325,16 +326,16 @@ function handleDelete(row) { } /** 导出按钮操作 */ function handleExport() { - let _this = this; - this.$confirm("是否确认导出所有流程表单数据项?", "警告", { + // let _this = this; + ElMessageBox.confirm("是否确认导出所有流程表单数据项?", "警告", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning", }).then(function () { - _this.download( + download( "/workflow/form/export", { - ..._this.queryParams, + ...queryParams.value, }, `form_${new Date().getTime()}.xlsx` ); diff --git a/src/views/flowable/model/index.vue b/src/views/flowable/model/index.vue index a8a3f7c..52bf466 100644 --- a/src/views/flowable/model/index.vue +++ b/src/views/flowable/model/index.vue @@ -2,7 +2,7 @@
- - item.modelId); - this.single = selection.length !== 1; - this.multiple = !selection.length; + ids.value = selection.map((item) => item.modelId); + single.value = selection.length !== 1; + multiple.value = !selection.length; } /** 部署流程 */ function handleDeploy(row) {