!103 feat(bpm): 列表行根据督办状态显示不同背景色

* feat(bpm): 列表行根据督办状态显示不同背景色
* fix(bpm): defaultCc 改为 provide/inject 传递,修复默认抄送不生效
This commit is contained in:
wsm
2026-07-16 07:11:01 +00:00
parent 20b0d4c1bc
commit 9c90223792
5 changed files with 43 additions and 11 deletions
@@ -218,6 +218,7 @@
const remarksDictOptions = ref([]);
const extraVars = inject('extraVars', ref({}));
const flowVars = inject('flowVars', ref({}));
const defaultCcUsers = inject('defaultCcUsers', ref([]));
function resolvePlaceholders(text) {
if (!text) return '';
@@ -325,18 +326,26 @@
}
}
function applyDefaultCcUsers(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);
ccUserIds.value = usernames.join(',');
model.ccUserIds = usernames.join(',');
model.ccUserRealNames = realnames.join(',');
}
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);
ccUserIds.value = usernames.join(',');
model.ccUserIds = usernames.join(',');
model.ccUserRealNames = realnames.join(',');
},
applyDefaultCcUsers,
{ immediate: true }
);
watch(
() => defaultCcUsers.value,
applyDefaultCcUsers,
{ immediate: true }
);