pull/361/head
xiaojunnuo 2025-03-25 09:19:32 +08:00
parent 81a8d6c3bf
commit 96a39ef9c3
1 changed files with 24 additions and 24 deletions

View File

@ -82,9 +82,9 @@
key: 'title', key: 'title',
component: { component: {
name: 'a-input', name: 'a-input',
vModel: 'value' vModel: 'value',
}, },
rules: [{ required: true, message: '此项必填' }] rules: [{ required: true, message: '此项必填' }],
}" }"
:get-context-fn="getScopeFunc" :get-context-fn="getScopeFunc"
/> />
@ -126,8 +126,8 @@ export default {
props: { props: {
editMode: { editMode: {
type: Boolean, type: Boolean,
default: true default: true,
} },
}, },
emits: ["update"], emits: ["update"],
setup(props: any, context: any) { setup(props: any, context: any) {
@ -154,9 +154,9 @@ export default {
{ {
type: "string", type: "string",
required: true, required: true,
message: "请输入名称" message: "请输入名称",
} },
] ],
}); });
const stepTypeSelected = (item: any) => { const stepTypeSelected = (item: any) => {
@ -209,7 +209,7 @@ export default {
type: undefined, type: undefined,
_isAdd: true, _isAdd: true,
input: {}, input: {},
status: null status: null,
}; };
_.merge(step, stepDef); _.merge(step, stepDef);
stepOpen(step, emit); stepOpen(step, emit);
@ -235,7 +235,7 @@ export default {
function getContext() { function getContext() {
return { return {
form: currentStep.value.input form: currentStep.value.input,
}; };
} }
const { doComputed } = useCompute(); const { doComputed } = useCompute();
@ -300,7 +300,7 @@ export default {
async onOk() { async onOk() {
callback.value("delete"); callback.value("delete");
stepDrawerClose(); stepDrawerClose();
} },
}); });
}; };
@ -314,24 +314,24 @@ export default {
const getScopeFunc = () => { const getScopeFunc = () => {
return { return {
form: currentStep.value form: currentStep.value,
}; };
}; };
const pluginSearch = ref({ const pluginSearch = ref({
keyword: "", keyword: "",
result: [] result: [],
}); });
const pluginGroupActive = ref("all"); const pluginGroupActive = ref("all");
const computedPluginGroups: any = computed(() => { const computedPluginGroups: any = computed(() => {
const groups = pluginGroups.groups; const groups = pluginGroups.groups;
if (pluginSearch.value.keyword) { if (pluginSearch.value.keyword) {
const keyword = pluginSearch.value.keyword.toLowerCase(); const keyword = pluginSearch.value.keyword.toLowerCase();
const list = groups.all.plugins.filter((plugin) => { const list = groups.all.plugins.filter(plugin => {
return plugin.title?.toLowerCase().includes(keyword) || plugin.desc?.toLowerCase().includes(keyword) || plugin.name?.toLowerCase().includes(keyword); return plugin.title?.toLowerCase().includes(keyword) || plugin.desc?.toLowerCase().includes(keyword) || plugin.name?.toLowerCase().includes(keyword);
}); });
return { return {
search: { key: "search", title: "搜索结果", plugins: list } search: { key: "search", title: "搜索结果", plugins: list },
}; };
} else { } else {
return groups; return groups;
@ -371,7 +371,7 @@ export default {
rules, rules,
getScopeFunc, getScopeFunc,
stepCopy, stepCopy,
fullscreen fullscreen,
}; };
} }
@ -382,22 +382,22 @@ export default {
name: "a-select", name: "a-select",
vModel: "value", vModel: "value",
options: [ options: [
{ value: 0, label: "正常运行(证书申请任务请选择它)" }, { value: 0, label: "正常运行(只有证书申请任务需要选择它)" },
{ value: 1, label: "成功后跳过(非证书任务请选择它)" } { value: 1, label: "成功后跳过(其他任务请选择它)" },
] ],
}, },
helper: { helper: {
render: () => { render: () => {
return ( return (
<div> <div>
<div>正常运行每次都运行证书任务需要每次都运行</div> <div>正常运行每次都运行证书任务需要每次都运行</div>
<div>成功后跳过在证书没变化时该任务成功一次之后跳过不重复部署</div> <div>成功后跳过该任务成功一次之后跳过不重复执行证书变化之后才会再次运行</div>
<div>保持默认即可如果你想要再次测试部署可以临时设置为正常运行</div> <div class="green">保持默认即可</div>
</div> </div>
); );
} },
}, },
rules: [{ required: true, message: "此项必填" }] rules: [{ required: true, message: "此项必填" }],
}); });
return { return {
@ -405,9 +405,9 @@ export default {
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 16 }, wrapperCol: { span: 16 },
runStrategyProps, runStrategyProps,
transformDesc transformDesc,
}; };
} },
}; };
</script> </script>