..
This commit is contained in:
@@ -3,7 +3,6 @@ package com.budwk.app.flow.controller;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.vo.LabelValueVO;
|
||||
@@ -18,8 +17,8 @@ import com.budwk.app.flow.entity.ProcessDefine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessEventTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.flow.vo.HighLightVO;
|
||||
import com.budwk.app.flow.vo.ProcessInstanceVO;
|
||||
import com.budwk.app.flow.vo.ProcessTaskVO;
|
||||
@@ -49,6 +48,8 @@ public class FlowCommonController {
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
@At("/approval/form")
|
||||
@SaCheckLogin
|
||||
@@ -235,46 +236,47 @@ public class FlowCommonController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result executeTask(@Param("data") String param) {
|
||||
Dict args = Json.fromJson(Dict.class, param);
|
||||
Long processTaskId = args.getLong(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
String operator = SecurityUtil.getUserId();
|
||||
args.remove(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
Integer submitType = args.getInt(FlowConst.SUBMIT_TYPE);
|
||||
if (submitType == null) {
|
||||
submitType = ProcessSubmitTypeEnum.AGREE.getCode();
|
||||
}
|
||||
args.put(FlowConst.SUBMIT_TYPE, submitType);
|
||||
|
||||
// 设置办理人信息到表单参数
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "userName", SecurityUtil.getUserUsername());
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "loginName", SecurityUtil.getUserLoginname());
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "unitId", SecurityUtil.getUnitId());
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "unitName", SecurityUtil.getUnitId());
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "unionId", SecurityUtil.getUnionId());
|
||||
|
||||
if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.ROLLBACK.getCode())) {
|
||||
// 退回上一个节点
|
||||
flowEngine.executeAndJumpTask(processTaskId, operator, args, null);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.REJECT.getCode())) {
|
||||
// 拒绝,跳转到结束节点
|
||||
flowEngine.executeAndJumpToEnd(processTaskId, operator, args);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.JUMP.getCode())) {
|
||||
// 跳转到指定节点
|
||||
String taskName = args.getStr(FlowConst.TASK_NAME);
|
||||
flowEngine.executeAndJumpTask(processTaskId, operator, args, taskName);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.ROLLBACK_TO_OPERATOR.getCode())) {
|
||||
// 退回发起人
|
||||
flowEngine.executeAndJumpToFirstTaskNode(processTaskId, operator, args);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.COUNTERSIGN_DISAGREE.getCode())) {
|
||||
// 会签不同意,追加不同意标识
|
||||
args.put(FlowConst.COUNTERSIGN_DISAGREE_FLAG, 1);
|
||||
flowEngine.executeProcessTask(processTaskId, operator, args);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.RE_APPLY.getCode())) {
|
||||
// 重新提交
|
||||
flowEngine.executeProcessTask(processTaskId, operator, args);
|
||||
} else {
|
||||
// 默认执行
|
||||
flowEngine.executeProcessTask(processTaskId, operator, args);
|
||||
}
|
||||
// Long processTaskId = args.getLong(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
// String operator = SecurityUtil.getUserId();
|
||||
// args.remove(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
// Integer submitType = args.getInt(FlowConst.SUBMIT_TYPE);
|
||||
// if (submitType == null) {
|
||||
// submitType = ProcessSubmitTypeEnum.AGREE.getCode();
|
||||
// }
|
||||
// args.put(FlowConst.SUBMIT_TYPE, submitType);
|
||||
//
|
||||
// // 设置办理人信息到表单参数
|
||||
// args.put(FlowConst.TASK_FORM_DATA_PREFIX + "userName", SecurityUtil.getUserUsername());
|
||||
// args.put(FlowConst.TASK_FORM_DATA_PREFIX + "loginName", SecurityUtil.getUserLoginname());
|
||||
// args.put(FlowConst.TASK_FORM_DATA_PREFIX + "unitId", SecurityUtil.getUnitId());
|
||||
// args.put(FlowConst.TASK_FORM_DATA_PREFIX + "unitName", SecurityUtil.getUnitId());
|
||||
// args.put(FlowConst.TASK_FORM_DATA_PREFIX + "unionId", SecurityUtil.getUnionId());
|
||||
//
|
||||
// if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.ROLLBACK.getCode())) {
|
||||
// // 退回上一个节点
|
||||
// flowEngine.executeAndJumpTask(processTaskId, operator, args, null);
|
||||
// } else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.REJECT.getCode())) {
|
||||
// // 拒绝,跳转到结束节点
|
||||
// flowEngine.executeAndJumpToEnd(processTaskId, operator, args);
|
||||
// } else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.JUMP.getCode())) {
|
||||
// // 跳转到指定节点
|
||||
// String taskName = args.getStr(FlowConst.TASK_NAME);
|
||||
// flowEngine.executeAndJumpTask(processTaskId, operator, args, taskName);
|
||||
// } else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.ROLLBACK_TO_OPERATOR.getCode())) {
|
||||
// // 退回发起人
|
||||
// flowEngine.executeAndJumpToFirstTaskNode(processTaskId, operator, args);
|
||||
// } else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.COUNTERSIGN_DISAGREE.getCode())) {
|
||||
// // 会签不同意,追加不同意标识
|
||||
// args.put(FlowConst.COUNTERSIGN_DISAGREE_FLAG, 1);
|
||||
// flowEngine.executeProcessTask(processTaskId, operator, args);
|
||||
// } else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.RE_APPLY.getCode())) {
|
||||
// // 重新提交
|
||||
// flowEngine.executeProcessTask(processTaskId, operator, args);
|
||||
// } else {
|
||||
// // 默认执行
|
||||
// flowEngine.executeProcessTask(processTaskId, operator, args);
|
||||
// }
|
||||
flowCommonService.executeTask(args);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.budwk.app.flow.service;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.budwk.app.flow.constant.FlowConst;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean
|
||||
public class FlowCommonService {
|
||||
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
|
||||
/**
|
||||
* 执行任务
|
||||
* @param args
|
||||
*/
|
||||
public void executeTask(Dict args){
|
||||
Long processTaskId = args.getLong(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
String operator = SecurityUtil.getUserId();
|
||||
args.remove(FlowConst.PROCESS_TASK_ID_KEY);
|
||||
Integer submitType = args.getInt(FlowConst.SUBMIT_TYPE);
|
||||
if (submitType == null) {
|
||||
submitType = ProcessSubmitTypeEnum.AGREE.getCode();
|
||||
}
|
||||
args.put(FlowConst.SUBMIT_TYPE, submitType);
|
||||
|
||||
// 设置办理人信息到表单参数
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "userName", SecurityUtil.getUserUsername());
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "loginName", SecurityUtil.getUserLoginname());
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "unitId", SecurityUtil.getUnitId());
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "unitName", SecurityUtil.getUnitId());
|
||||
args.put(FlowConst.TASK_FORM_DATA_PREFIX + "unionId", SecurityUtil.getUnionId());
|
||||
|
||||
if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.ROLLBACK.getCode())) {
|
||||
// 退回上一个节点
|
||||
flowEngine.executeAndJumpTask(processTaskId, operator, args, null);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.REJECT.getCode())) {
|
||||
// 拒绝,跳转到结束节点
|
||||
flowEngine.executeAndJumpToEnd(processTaskId, operator, args);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.JUMP.getCode())) {
|
||||
// 跳转到指定节点
|
||||
String taskName = args.getStr(FlowConst.TASK_NAME);
|
||||
flowEngine.executeAndJumpTask(processTaskId, operator, args, taskName);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.ROLLBACK_TO_OPERATOR.getCode())) {
|
||||
// 退回发起人
|
||||
flowEngine.executeAndJumpToFirstTaskNode(processTaskId, operator, args);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.COUNTERSIGN_DISAGREE.getCode())) {
|
||||
// 会签不同意,追加不同意标识
|
||||
args.put(FlowConst.COUNTERSIGN_DISAGREE_FLAG, 1);
|
||||
flowEngine.executeProcessTask(processTaskId, operator, args);
|
||||
} else if (ObjectUtil.equals(submitType, ProcessSubmitTypeEnum.RE_APPLY.getCode())) {
|
||||
// 重新提交
|
||||
flowEngine.executeProcessTask(processTaskId, operator, args);
|
||||
} else {
|
||||
// 默认执行
|
||||
flowEngine.executeProcessTask(processTaskId, operator, args);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -57,7 +57,7 @@ public class SuggestionBoxMineController {
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
@@ -67,7 +67,7 @@ public class SuggestionBoxMineController {
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariale,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId
|
||||
FROM
|
||||
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.budwk.app.zhgh.democratic.suggestionBox.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.suggestionBox.service.SuggestionBoxService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/suggestionBox/query")
|
||||
@Ok("json:full")
|
||||
@Api("意见箱-查询统计")
|
||||
public class SuggestionBoxQueryController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private SuggestionBoxService suggestionBoxService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/suggestionBox/query/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result pageData(Integer pageNumber, Integer pageSize) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.id,
|
||||
info.title,
|
||||
info.userName,
|
||||
info.loginName,
|
||||
info.unitName,
|
||||
info.unionName,
|
||||
info.submitTime,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId
|
||||
FROM
|
||||
suggestion_box info
|
||||
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
|
||||
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
|
||||
cnd.desc("info.submitTime");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = suggestionBoxService.listPageMap(pageNumber, pageSize, sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("删除")
|
||||
public Result delete(@Param("id") String id) {
|
||||
suggestionBoxService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+19
@@ -8,11 +8,14 @@ import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
@@ -31,6 +34,8 @@ public class SuggestionBoxWriteController {
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/democratic/suggestionBox/write/index.html")
|
||||
@@ -67,6 +72,20 @@ public class SuggestionBoxWriteController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result submitAgain(@Param("data") SuggestionBox suggestionBox, @Param("taskId") Long taskId) {
|
||||
dao.insertOrUpdate(suggestionBox);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class SuggestionXghController {
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariale,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
|
||||
+1
-6
@@ -7,12 +7,7 @@ layout("/layouts/platform.html"){
|
||||
<div id="app" v-cloak>
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row type="flex" justify="space-between" align="center">
|
||||
<h3 style="color: var(--color-primary)">撰写提案</h3>
|
||||
<el-button @click="noticeDialogVisible = true" type="text">提案撰写须知</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
<snaker-start slot="header" label="撰写提案" define_key="JDHTA"></snaker-start>
|
||||
<template>
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="addForm">
|
||||
<el-row :gutter="20" type="flex">
|
||||
|
||||
@@ -21,8 +21,8 @@ const SUGGESTION_INFO = {
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="标题">
|
||||
<el-input v-model="pageForm.title" placeholder="标题" clearable></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="title" label="投稿标题"></el-table-column>
|
||||
<el-table-column prop="loginName" label="投稿人工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="投稿人姓名"></el-table-column>
|
||||
<el-table-column prop="unitName" label="投稿人单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="投稿人工会"></el-table-column>
|
||||
<!-- <el-table-column prop="submitTime" label="投稿时间"></el-table-column>-->
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #edit>
|
||||
<suggestion-info ref="suggestionInfoRef">
|
||||
</suggestion-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"suggestion-info": SUGGESTION_INFO
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.$refs.suggestionInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
window.location.href = '/platform/suggestionBox/write?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/suggestionBox/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -74,8 +74,7 @@ layout("/layouts/platform.html"){
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/suggestionBox/write/submit', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
@@ -91,11 +90,9 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/executeTask', {
|
||||
data: JSON.stringify({
|
||||
processTaskId: GetQueryString("taskId"),
|
||||
submitType: 5
|
||||
})
|
||||
this.$axios.post('/platform/suggestionBox/write/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
|
||||
Reference in New Issue
Block a user