diff --git a/ruoyi-ui/src/views/flowable/oa-project-flow.vue b/ruoyi-ui/src/views/flowable/oa-project-flow.vue
index dd66e16..d3938fc 100644
--- a/ruoyi-ui/src/views/flowable/oa-project-flow.vue
+++ b/ruoyi-ui/src/views/flowable/oa-project-flow.vue
@@ -118,6 +118,7 @@ export default {
solution: '',
},
oaProjectFlowId: '',
+ oaProjectFlowKey: 'process_l9kpb443',
projectList: [],
// 表单校验
rules: {}
@@ -131,12 +132,12 @@ export default {
},
/** 启动流程 */
startFlow(){
- definitionStart(this.oaProjectFlowId).then(res =>{
+ definitionStart(this.oaProjectFlowId, JSON.stringify(this.form)).then(res => {
this.msgSuccess(res.msg);
})
}, /** 获取最新流程id */
getLatestIdByKey(){
- getLatestIdByKey("oa_project_flow").then(res => {
+ getLatestIdByKey(this.oaProjectFlowKey).then(res => {
this.oaProjectFlowId = res.data;
});
},
@@ -216,26 +217,6 @@ export default {
// });
this.$router.push({path: '/tool/build/index', query: {formId: row.formId}})
},
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.formId != null) {
- updateForm(this.form).then(response => {
- this.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addForm(this.form).then(response => {
- this.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
/** 删除按钮操作 */
handleDelete(row) {
const formIds = row.formId || this.ids;
diff --git a/ruoyi-ui/src/views/flowable/task/record/index.vue b/ruoyi-ui/src/views/flowable/task/record/index.vue
index 90ace8c..58903d1 100644
--- a/ruoyi-ui/src/views/flowable/task/record/index.vue
+++ b/ruoyi-ui/src/views/flowable/task/record/index.vue
@@ -9,7 +9,54 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 点击上传
+ 只能上传jpg/png文件,且不超过500kb
+
+
+
+
+ 点击上传
+ 只能上传jpg/png文件,且不超过500kb
+
+
+
审批
@@ -22,9 +69,56 @@
-
+
@@ -84,12 +178,12 @@
-
-
- 流程图
-
-
-
+
+
+
+
+
+
@@ -203,6 +297,7 @@ import {treeselect} from "@/api/system/dept";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Treeselect from "@riophae/vue-treeselect";
import {listUser} from "@/api/system/user";
+import {optionProject} from "@/api/system/project";
export default {
name: "Record",
@@ -260,6 +355,14 @@ export default {
variables: [], // 流程变量数据
variablesData: {}, // 流程变量数据
variableOpen: false, // 是否加载流程变量数据
+ // 表单参数
+ form: {
+ projectId: 0,
+ workRecord: '',
+ issue: '',
+ solution: '',
+ },
+ projectList: [],
returnTaskList: [], // 回退列表数据
finished: 'false',
completeTitle: null,
@@ -289,6 +392,7 @@ export default {
this.getNextFlowNode(this.taskForm.taskId)
this.taskForm.deployId = null
}
+ this.optionList();
this.getFlowRecordList( this.taskForm.procInsId, this.taskForm.deployId);
this.finished = this.$route.query && this.$route.query.finished
},
@@ -382,10 +486,14 @@ export default {
flowRecord(params).then(res => {
this.flowRecordList = res.data.flowList;
// 流程过程中不存在初始化表单 直接读取的流程变量中存储的表单值
- if (res.data.formData) {
- this.formConf = res.data.formData;
+ // if (res.data.formData) {
+ this.form = res.data.form;
+ console.log("res.data.form;", res.data.form)
+ console.log("this.form ", this.form)
+ if (this.taskForm.executionId === undefined) {
this.formConfOpen = true
}
+ // }
}).catch(res => {
this.goBack();
})
@@ -404,11 +512,19 @@ export default {
// 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示
getProcessVariables(taskId).then(res => {
// this.variables = res.data.variables;
- this.variablesData = res.data.variables;
+ this.form = res.data;
this.variableOpen = true
});
}
},
+ /** 查询项目列表 */
+ optionList() {
+ this.loading = true;
+ optionProject().then(response => {
+ this.projectList = response.data;
+ this.loading = false;
+ });
+ },
/** 根据当前任务或者流程设计配置的下一步节点 */
getNextFlowNode(taskId) {
// 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况