yxk-20260611-自动生成审批意见
督办部门负责人审批节点自动生成审批意见
This commit is contained in:
+24
-1
@@ -108,7 +108,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, reactive, computed, toRaw, unref, watchEffect } from 'vue';
|
||||
import { ref, reactive, computed, toRaw, unref, watch, watchEffect } from 'vue';
|
||||
import { initDictOptions } from '/@/utils/dict';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { taskComplaint, taskComplete, beforeAddSignTask, afterAddSignTask, addMultiInstance} from "../task.handle.api";
|
||||
@@ -176,6 +176,10 @@
|
||||
beforeHandle: {
|
||||
type: Function,
|
||||
default: undefined,
|
||||
},
|
||||
defaultReason: {
|
||||
type: String,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
emits: ['success'],
|
||||
@@ -216,6 +220,7 @@
|
||||
ccUserRealNames: '',
|
||||
fileList: '',
|
||||
});
|
||||
const lastAutoReason = ref('');
|
||||
//审批人用户是否多选
|
||||
const multiSelectUser = computed(() => {
|
||||
return unref(selectUserType) == 'change-user' ? false : true;
|
||||
@@ -224,6 +229,24 @@
|
||||
watchEffect(() => {
|
||||
props.turnbackTaskId && (model.rejectModelNode = props.turnbackTaskId);
|
||||
});
|
||||
// 默认处理意见只在空值或仍为上一条自动意见时刷新,避免覆盖用户手动输入。
|
||||
watch(
|
||||
() => props.defaultReason,
|
||||
(value) => {
|
||||
const nextReason = value || '';
|
||||
const canApplyDefaultReason = !model.reason || model.reason === lastAutoReason.value;
|
||||
if (nextReason && canApplyDefaultReason) {
|
||||
model.reason = nextReason;
|
||||
lastAutoReason.value = nextReason;
|
||||
return;
|
||||
}
|
||||
if (!nextReason && model.reason === lastAutoReason.value) {
|
||||
model.reason = '';
|
||||
}
|
||||
lastAutoReason.value = nextReason;
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
// 选择下一步操作人
|
||||
const checkedNext = ref(false);
|
||||
const nextPersonList = ref([]);
|
||||
|
||||
+5
@@ -20,6 +20,7 @@
|
||||
:allowCounterSignAddUser="allowCounterSignAddUser"
|
||||
:allowReject="allowReject"
|
||||
:beforeHandle="beforeHandle"
|
||||
:defaultReason="defaultReason"
|
||||
:currentTaskName="currentNode.taskName">
|
||||
</my-handle-content>
|
||||
|
||||
@@ -61,6 +62,10 @@
|
||||
type: Function,
|
||||
default: undefined
|
||||
},
|
||||
defaultReason: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
showSelnextUser: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
||||
Reference in New Issue
Block a user