mirror of https://github.com/certd/certd
chore:
parent
498cf34999
commit
fef1305e41
|
@ -126,14 +126,12 @@ function clear() {
|
|||
}
|
||||
|
||||
async function emitValue(value: any) {
|
||||
const target = optionsDictRef.dataMap[value];
|
||||
if (value !== 0 && pipeline?.value && target && pipeline.value.userId !== target.userId) {
|
||||
if (value !== 0 && pipeline?.value && target && pipeline.value.userId !== target.value.userId) {
|
||||
message.error("对不起,您不能修改他人流水线的通知");
|
||||
return;
|
||||
}
|
||||
emit("change", value);
|
||||
emit("update:modelValue", value);
|
||||
emit("selectedChange", target);
|
||||
}
|
||||
|
||||
watch(
|
||||
|
@ -143,6 +141,7 @@ watch(
|
|||
async (value) => {
|
||||
await optionsDictRef.loadDict();
|
||||
target.value = optionsDictRef.dataMap[value];
|
||||
emit("selectedChange", target.value);
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
|
|
|
@ -107,10 +107,15 @@ export default function (certPlugins: any[], formWrapperRef: any): CreateCrudOpt
|
|||
title: "失败通知",
|
||||
type: "text",
|
||||
form: {
|
||||
value: true,
|
||||
value: 0,
|
||||
component: {
|
||||
name: "a-switch",
|
||||
vModel: "checked"
|
||||
name: NotificationSelector,
|
||||
vModel: "modelValue",
|
||||
on: {
|
||||
selectedChange({ $event, form }) {
|
||||
form.notificationTarget = $event;
|
||||
}
|
||||
}
|
||||
},
|
||||
order: 101,
|
||||
helper: "任务执行失败实时提醒"
|
||||
|
|
|
@ -102,12 +102,12 @@ export default function ({ crudExpose, context: { certdFormRef, groupDictRef, se
|
|||
triggers.push({ title: "定时触发", type: "timer", props: { cron: form.triggerCron } });
|
||||
}
|
||||
const notifications = [];
|
||||
if (form.notification) {
|
||||
if (form.notification != null) {
|
||||
notifications.push({
|
||||
type: "custom",
|
||||
when: ["error", "turnToSuccess"],
|
||||
notificationId: 0,
|
||||
title: "使用默认通知"
|
||||
notificationId: form.notification,
|
||||
title: form.notificationTarget?.name || "自定义通知"
|
||||
});
|
||||
}
|
||||
let pipeline = {
|
||||
|
|
Loading…
Reference in New Issue