提交 c77f1804 authored 作者: kxjia's avatar kxjia

完善功能

上级 401f07d4
......@@ -289,8 +289,10 @@ alert(1111)
});
const setCurrentNodeById = async (nodeId: string) =>{
alert(nodeId)
const nodes = workflowNodes.value;
const index = nodes.findIndex(node => node.id === nodeId);
alert(index)
if (index !== -1) {
currentMultiFormIndex.value = index;
currentNode.value = nodes[index];
......
......@@ -62,6 +62,9 @@ interface Props {
getDropDownActions?: (record: any) => ActionItem[];
deleteApi?: (data: any) => Promise<any>;
batchDeleteApi?: (data: any) => Promise<any>;
delDeployment?: (data: any) => Promise<any>;
procInsIds?: string[];
}
const props = withDefaults(defineProps<Props>(), {
......@@ -113,6 +116,9 @@ function handleAdd() {
async function handleDelete(record: any) {
if (props.deleteApi) {
await props.deleteApi({ id: record.id });
if(props.delDeployment) {
await props.delDeployment(props.procInsIds?.[0]);
}
handleSuccess();
}
}
......@@ -120,6 +126,11 @@ async function handleDelete(record: any) {
async function batchHandleDelete() {
if (props.batchDeleteApi) {
await props.batchDeleteApi({ ids: selectedRowKeys.value });
if(props.delDeployment) {
(props.procInsIds || []).forEach(async (item) => {
await props.delDeployment?.(item);
});
}
handleSuccess();
}
}
......@@ -138,10 +149,14 @@ function tableActions(record: any) {
}
function dropDownActions(record: any) {
const actions: ActionItem[] = [];
// 如果父组件提供了自定义操作,合并到默认操作前面
if (props.getDropDownActions) {
return props.getDropDownActions(record);
return [...props.getDropDownActions(record), ...actions];
}
return [];
return actions;
}
defineExpose({
......
......@@ -10,6 +10,8 @@
:getDropDownActions="getDropDownAction"
:deleteApi="deleteOne"
:batchDeleteApi="batchDelete"
:delDeployment="delDeployment"
@add="handleAdd"
@register="handleRegister"
>
......@@ -35,6 +37,7 @@ import TaskAssigneeDrawer from '/@/views/common/TaskAssigneeDrawer.vue';
import FlowHistoryDrawer from '/@/views/common/FlowHistoryDrawer.vue';
import BaosongTaskDrawer from '/@/views/baosong/task/components/BaosongTaskDrawer.vue';
import DynamicList from '../components/DynamicList.vue';
import { delDeployment } from "/@/components/Process/api/finished";
const [refFlowHistoryDrawer, { openDrawer }] = useDrawer();
const [registerAssigneeDrawer, { openDrawer: openAssigneeDrawer }] = useDrawer();
......@@ -89,6 +92,10 @@ function handleDetail(record: Recordable) {
}
async function handleDelete(record: Recordable) {
alert(2222)
if(record.procInsId) {
await delDeployment(record.procInsId);
}
await deleteOne({ id: record.id }, handleSuccess);
}
......
......@@ -12,6 +12,7 @@
:deleteApi="deleteOne"
:batchDeleteApi="batchDelete"
:showBatch="false"
:showAdd="false"
@add="handleAdd"
@register="handleRegister"
>
......
......@@ -100,6 +100,9 @@ public class JwtUtil {
*/
public static String getUsername(String token) {
try {
if(token==null) {
return "";
}
DecodedJWT jwt = JWT.decode(token);
return jwt.getClaim("username").asString();
} catch (JWTDecodeException e) {
......
......@@ -68,14 +68,20 @@ public class JimuReportTokenService implements JmReportTokenServiceI {
try {
userInfo = sysBaseApi.getCacheUser(username);
} catch (Exception e) {
log.error("获取用户信息异常:"+ e.getMessage());
return map;
}
//设置账号名
map.put(SYS_USER_CODE, userInfo.getSysUserCode());
if(userInfo ==null) {
return map;
}
if(userInfo.getSysUserCode()!=null){
map.put(SYS_USER_CODE, userInfo.getSysUserCode());
}
//设置部门编码
map.put(SYS_ORG_CODE, userInfo.getSysOrgCode());
// 将所有信息存放至map 解析sql/api会根据map的键值解析
if(userInfo.getSysOrgCode()!=null){
map.put(SYS_ORG_CODE, userInfo.getSysOrgCode());
}
return map;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论