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