Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -14,6 +14,7 @@ edit → 基础信息是否可编辑(1=可编辑, 缺省=
|
||||
|
||||
showProcessHandle → 流程办理区域
|
||||
├── showSubApproveUser → 是否办结 + 部门经办人选人
|
||||
├── showIsNeedLeaderApprove → 是否需要所领导审批 + 分管所领导选人
|
||||
└── showSelnextUser → 指定下一步操作人(默认隐藏,=1 显示)
|
||||
|
||||
showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
@@ -76,12 +77,13 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showFeedbackInfo** `1` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1
|
||||
* 可驳回
|
||||
---
|
||||
|
||||
### 节点: <党群负责人审批>
|
||||
@@ -90,12 +92,13 @@ showFeedbackInfo → 反馈信息区域(表格 + 表头)
|
||||
* **edit** `0` —— 基础信息只读
|
||||
* **showProcessHandle** `1` —— 流程办理区域
|
||||
* **showSubApproveUser** `0` —— 是否办结 + 部门经办人
|
||||
* **showIsNeedLeaderApprove** `1` —— 是否需要所领导审批 + 分管所领导选人
|
||||
* **showFeedbackInfo** `0` —— 反馈信息区域
|
||||
* **showAddFeedback** `0` —— 新增反馈按钮
|
||||
* **showEditFeedback** `0` —— 编辑/删除操作列
|
||||
* **showDeptFeedback** `0` —— 按部门过滤反馈
|
||||
* **showJiJianFields** `0` —— 纪检字段列
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1
|
||||
* dqinspecttask/components/DqInspectTaskBPMForm?showProcessHandle=1&showIsNeedLeaderApprove=1&showSelnextUser=1
|
||||
---
|
||||
|
||||
### 节点: <分管所领导审批>
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="分管所领导" name="chargeLeaderId">
|
||||
<j-select-user v-model:value="mainForm.chargeLeaderId" :disabled="mainDisabled" allow-clear />
|
||||
<a-input v-if="mainDisabled" :value="mainForm.chargeLeaderId" disabled />
|
||||
<j-select-user v-else v-model:value="mainForm.chargeLeaderId" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
@@ -217,6 +218,23 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-form v-if="showIsNeedLeaderApprove" class="process-variable-form" labelAlign="left" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否需要所领导审批" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<a-radio-group v-model:value="isNeedLeaderApprove" :disabled="savingIsNeedLeaderApprove">
|
||||
<a-radio :value="0">否(不需要)</a-radio>
|
||||
<a-radio :value="1">是(需要所领导审批)</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col v-if="showIsNeedLeaderApproveSelector" :span="12">
|
||||
<a-form-item label="分管所领导" :labelCol="wideLabelCol" :wrapperCol="wideWrapperCol">
|
||||
<j-select-user v-model:value="leaderApproveUser" :disabled="savingIsNeedLeaderApprove" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<TaskHandleInnerContent
|
||||
:form-data="formData"
|
||||
:claim="claim"
|
||||
@@ -278,6 +296,9 @@
|
||||
const isEnd = ref(0);
|
||||
const problemTreeData = ref<any[]>([]);
|
||||
const loadingProblemOptions = ref(false);
|
||||
const isNeedLeaderApprove = ref(0);
|
||||
const leaderApproveUser = ref('');
|
||||
const savingIsNeedLeaderApprove = ref(false);
|
||||
|
||||
const mainForm = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
@@ -365,7 +386,11 @@
|
||||
const showSubApproveUser = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showSubApproveUser ?? '') === '1'
|
||||
);
|
||||
const showIsNeedLeaderApprove = computed(
|
||||
() => String(props.formData?.extendUrlParams?.showIsNeedLeaderApprove ?? '') === '1'
|
||||
);
|
||||
const showSubApproveUserSelector = computed(() => showSubApproveUser.value && String(isEnd.value) !== '1');
|
||||
const showIsNeedLeaderApproveSelector = computed(() => showIsNeedLeaderApprove.value && String(isNeedLeaderApprove.value) === '1');
|
||||
|
||||
const processInfo = computed(() => ({
|
||||
taskId: props.formData?.taskId,
|
||||
@@ -400,6 +425,14 @@
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.formData?.vars?.isNeedLeaderApprove,
|
||||
(value) => {
|
||||
isNeedLeaderApprove.value = String(value ?? '0') === '1' ? 1 : 0;
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
async function loadProblemTree() {
|
||||
loadingProblemOptions.value = true;
|
||||
try {
|
||||
@@ -419,6 +452,7 @@
|
||||
await loadProblemTree();
|
||||
const data = await defHttp.get({ url: queryByIdUrl, params: { id: dataId } });
|
||||
setMainForm(data || {});
|
||||
leaderApproveUser.value = mainForm.chargeLeaderId || '';
|
||||
await loadFeedbackList();
|
||||
} finally {
|
||||
loading.value = false;
|
||||
@@ -497,7 +531,12 @@
|
||||
if (!mainSaved) return false;
|
||||
}
|
||||
if (showSubApproveUser.value) {
|
||||
return saveSubApproveUserVariable({ showSuccessMessage: false });
|
||||
const result = await saveSubApproveUserVariable({ showSuccessMessage: false });
|
||||
if (!result) return false;
|
||||
}
|
||||
if (showIsNeedLeaderApprove.value) {
|
||||
const result = await saveIsNeedLeaderApproveVariable({ showSuccessMessage: false });
|
||||
if (!result) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -579,6 +618,44 @@
|
||||
.join(',');
|
||||
}
|
||||
|
||||
async function saveIsNeedLeaderApproveVariable(options: { showSuccessMessage?: boolean } = {}) {
|
||||
const { showSuccessMessage = true } = options;
|
||||
const processInstanceId = processInfo.value.processInstanceId;
|
||||
const isNeedLeaderApproveValue = String(isNeedLeaderApprove.value);
|
||||
const leaderUsernameValue = normalizeUsernameList(leaderApproveUser.value);
|
||||
if (!processInstanceId) {
|
||||
createMessage.warning('流程实例ID不能为空');
|
||||
return false;
|
||||
}
|
||||
if (isNeedLeaderApproveValue === '1' && !leaderUsernameValue) {
|
||||
createMessage.warning('请选择分管所领导');
|
||||
return false;
|
||||
}
|
||||
|
||||
savingIsNeedLeaderApprove.value = true;
|
||||
try {
|
||||
const result = await saveProcessVariable('is_need_leader_approve', isNeedLeaderApproveValue);
|
||||
if (!result?.success) {
|
||||
createMessage.warning(result.message || '保存失败');
|
||||
return false;
|
||||
}
|
||||
if (isNeedLeaderApproveValue === '1') {
|
||||
const leaderResult = await saveProcessVariable('leader_approve_user', leaderUsernameValue);
|
||||
if (!leaderResult?.success) {
|
||||
createMessage.warning(leaderResult.message || '保存失败');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (showSuccessMessage) createMessage.success('保存成功');
|
||||
return true;
|
||||
} catch {
|
||||
createMessage.warning('保存失败');
|
||||
return false;
|
||||
} finally {
|
||||
savingIsNeedLeaderApprove.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function handleProcessSuccess() {
|
||||
emit('success');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user