Merge remote-tracking branch 'origin/master'

This commit is contained in:
ye1023
2026-06-12 18:15:30 +08:00
19 changed files with 1467 additions and 41 deletions
@@ -13,7 +13,7 @@
/**
* 流程审批中选择用户用 - 只管选择,不管回显
*/
import { ref, toRaw, computed } from 'vue';
import { ref, toRaw, computed, watch } from 'vue';
import BpmSelectUserModal from './BpmSelectUserModal.vue';
import { useModal } from '/@/components/Modal';
@@ -27,15 +27,32 @@
type: String,
default: '',
},
value: {
type: Array,
default: () => [],
},
},
emits: ['change'],
setup(_p, { emit }) {
setup(props, { emit }) {
let selectedUserList = [];
const options = ref([]);
const selectValue = ref([]);
const [registerModal, { openModal }] = useModal();
const lastSelectedRows = ref([]);
watch(
() => props.value,
(val) => {
const list = (Array.isArray(val) ? val : []).filter((u) => u?.username);
if (!list.length) return;
selectValue.value = list.map((u) => u.username);
options.value = list.map((u) => ({ value: u.username }));
selectedUserList = list;
lastSelectedRows.value = list;
},
{ immediate: true }
);
function openSelect() {
let arr = getModalData();
openModal(true, {
@@ -83,7 +83,7 @@
<!-- 抄送 -->
<a-list-item style="line-height: 32px" v-show="checkedCc">
<span>抄送给</span>
<bpm-select-user style="display: inline-block" placeholder="请选择抄送人" @change="handleSelectCcUser"></bpm-select-user>
<bpm-select-user style="display: inline-block" placeholder="请选择抄送人" :value="defaultCc" @change="handleSelectCcUser"></bpm-select-user>
</a-list-item>
</a-list>
@@ -187,7 +187,11 @@
defaultReason: {
type: String,
default: '',
}
},
defaultCc: {
type: Array,
default: () => [],
},
},
emits: ['success'],
setup(props, { emit }) {
@@ -288,6 +292,20 @@
ccPersonList.value = [];
}
watch(
() => props.defaultCc,
(val) => {
const list = (Array.isArray(val) ? val : []).filter((u) => u?.username);
if (!list.length) return;
checkedCc.value = true;
const usernames = list.map((u) => u.username);
const realnames = list.map((u) => u.realname);
model.ccUserIds = usernames.join(',');
model.ccUserRealNames = realnames.join(',');
},
{ immediate: true }
);
function changeReasonSelection(value) {
model.reason = value;
}
@@ -21,6 +21,7 @@
:allowReject="allowReject"
:beforeHandle="beforeHandle"
:defaultReason="defaultReason"
:defaultCc="defaultCc"
:currentTaskName="currentNode.taskName">
</my-handle-content>
@@ -66,6 +67,10 @@
type: String,
default: '',
},
defaultCc: {
type: Array,
default: () => [],
},
showSelnextUser: {
type: Boolean,
default: true,