@@ -133,6 +133,31 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 驳回目标节点选择,仅在"是否允许驳回"开启时显示 -->
|
||||
<div v-if="buttonStatus.rejectStatus === '1'" style="padding: 0 10px; margin-bottom: 10px;">
|
||||
<div style="margin-bottom: 8px; font-size: 14px; color: #4b4a4a; font-weight: 500;">
|
||||
可驳回的目标节点:
|
||||
</div>
|
||||
<div style="background: #fafafa; border: 1px solid #d9d9d9; border-radius: 6px; padding: 12px;">
|
||||
<div v-if="allProcessNodes.length === 0" style="color: #999; text-align: center; padding: 10px;">
|
||||
暂无可选节点
|
||||
</div>
|
||||
<a-checkbox-group v-model:value="checkedTargetNodeCodes" v-else>
|
||||
<div v-for="node in allProcessNodes" :key="node.processNodeCode"
|
||||
style="margin-bottom: 6px;">
|
||||
<a-checkbox
|
||||
:value="node.processNodeCode"
|
||||
:disabled="node.processNodeCode === processInfo.processNodeCode">
|
||||
{{ node.processNodeName }}
|
||||
<span style="color: #999; font-size: 12px;">({{ node.processNodeCode }})</span>
|
||||
<span v-if="node.processNodeCode === processInfo.processNodeCode"
|
||||
style="color: #ff4d4f; font-size: 12px;"> [当前节点]</span>
|
||||
</a-checkbox>
|
||||
</div>
|
||||
</a-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-spin>
|
||||
@@ -154,7 +179,7 @@
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
import { useAuthField, useAuthButton } from './useNodeAuthEasyModal';
|
||||
import { saveOrUpdate, batchSavePermission } from '../processNode/process.node.api';
|
||||
import { saveOrUpdate, batchSavePermission, saveRejectTargets } from '../processNode/process.node.api';
|
||||
import NodeAuthEasyForSelect from './NodeAuthEasyForSelect.vue'
|
||||
import NodeAuthEasyForInput from './NodeAuthEasyForInput.vue'
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
@@ -193,7 +218,10 @@
|
||||
|
||||
const { formTypeArray, activeFormType, activeTableName, myFormList, handleChangeFormType, queryBizFormType, queryLastAuthData, authDataList } = useAuthField(spinningLoading, processInfo);
|
||||
|
||||
const { buttonStatus, initButtonStatus, handleChangeFormEditStatus } = useAuthButton(activeFormType, activeTableName);
|
||||
const { buttonStatus, initButtonStatus, handleChangeFormEditStatus, rejectTargetList, allProcessNodes } = useAuthButton(activeFormType, activeTableName);
|
||||
|
||||
// 驳回目标节点勾选状态
|
||||
const checkedTargetNodeCodes = ref([]);
|
||||
|
||||
//useModalInner
|
||||
const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
||||
@@ -204,7 +232,9 @@
|
||||
processInfo.processNodeCode = processNodeCode;
|
||||
activeTableName.value = '';
|
||||
/**--------------按钮----------------*/
|
||||
initButtonStatus(data);
|
||||
await initButtonStatus(data);
|
||||
// 回填已配置的驳回目标节点勾选状态
|
||||
checkedTargetNodeCodes.value = rejectTargetList.value.map(r => r.targetNodeCode);
|
||||
|
||||
/**--------------字段----------------*/
|
||||
//1.查询已经存在的权限数据 ruleName ruleCode formType ruleType status
|
||||
@@ -235,7 +265,6 @@
|
||||
|
||||
let allIsOk = true;
|
||||
const nodeUpdateResult = await defHttp.put({ url: '/act/process/extActProcessNode/edit', params: node }, { isTransformResponse: false });
|
||||
spinningLoading.value = false;
|
||||
// console.log('nodeUpdateResult', nodeUpdateResult)
|
||||
if(nodeUpdateResult.success){
|
||||
//保存成功
|
||||
@@ -245,12 +274,35 @@
|
||||
createMessage.warning(nodeUpdateResult.message);
|
||||
}
|
||||
|
||||
// 保存驳回目标节点配置
|
||||
if (buttonStatus.rejectStatus === '1') {
|
||||
const rejectTargets = checkedTargetNodeCodes.value.map(targetCode => {
|
||||
const nodeInfo = allProcessNodes.value.find(n => n.processNodeCode === targetCode);
|
||||
return {
|
||||
processId: processInfo.processId,
|
||||
sourceNodeCode: processInfo.processNodeCode,
|
||||
targetNodeCode: targetCode,
|
||||
targetNodeName: nodeInfo ? nodeInfo.processNodeName : '',
|
||||
};
|
||||
});
|
||||
try {
|
||||
await saveRejectTargets(
|
||||
{ processId: processInfo.processId, sourceNodeCode: processInfo.processNodeCode },
|
||||
rejectTargets
|
||||
);
|
||||
} catch {
|
||||
allIsOk = false;
|
||||
createMessage.warning('驳回目标节点保存失败');
|
||||
}
|
||||
}
|
||||
|
||||
//节点字段
|
||||
let data = [];
|
||||
if (activeFormType.value === '3') {
|
||||
//update-begin-author:liusq---date:2024-06-17--for: TV360X-990 代码生成的权限设置的小问题
|
||||
data = await customerTableRef.value.getData();
|
||||
if (!data) {
|
||||
spinningLoading.value = false;
|
||||
return;
|
||||
}
|
||||
//update-end-author:liusq---date:2024-06-17--for: TV360X-990 代码生成的权限设置的小问题
|
||||
@@ -272,6 +324,7 @@
|
||||
createMessage.warning(authUpdateResult.message);
|
||||
}
|
||||
}
|
||||
spinningLoading.value = false;
|
||||
if(allIsOk==true){
|
||||
createMessage.success('操作成功!');
|
||||
}
|
||||
@@ -352,6 +405,8 @@
|
||||
activeKey,
|
||||
buttonStatus,
|
||||
authDataList,
|
||||
checkedTargetNodeCodes,
|
||||
allProcessNodes,
|
||||
|
||||
spinningLoading,
|
||||
formTypeArray,
|
||||
|
||||
Reference in New Issue
Block a user