* adjust the project preferences
@ -125,8 +125,14 @@ export function useForm() {
item.validate.required = false
item.span = 12
}
if (item.type === 'select') {
Object.assign(item, {
props: { style: 'width: 250px', clearable: true }
})
} else {
Object.assign(item, { props: { style: 'width: 250px' } })
return preferencesItems
@ -130,7 +130,11 @@ const NodeDetailModal = defineComponent({
const restructureNodeData = (data: INodeData) => {
if (!data?.id) {
Object.assign(data, projectPreferences.value)
for (let item in projectPreferences.value) {
if (projectPreferences.value[item] !== null && item in data) {
Object.assign(data, { item: projectPreferences.value[item] })
@ -240,6 +240,16 @@ export default defineComponent({
form.environmentCode = projectPreferences.value.environmentCode
if (projectPreferences.value?.alertGroups && variables?.alertGroups) {
if (
containValueInOptions(
variables.alertGroups,
projectPreferences.value.alertGroups
)
) {
form.warningGroupId = projectPreferences.value.alertGroups
const updateWorkerGroup = () => {