diff --git a/web/src/views/server/process.vue b/web/src/views/server/process.vue
index 7997c5c..a477fb8 100644
--- a/web/src/views/server/process.vue
+++ b/web/src/views/server/process.vue
@@ -175,7 +175,9 @@
style="width: 100%"
filterable
multiple
+ @change="serverChange"
>
+
([])
const dialogVisible = ref(false)
const processDialogVisible = ref(false)
const processExecLoading = ref(false)
@@ -418,6 +420,12 @@ function handlePageChange(val = 1) {
pagination.value.page = val
}
+function serverChange(_serverIds: number[]) {
+ if (_serverIds.includes(0)) {
+ serverIds.value = _serverIds = serverOption.value.map((_) => _.id)
+ }
+}
+
function submit() {
form.value?.validate((valid) => {
if (valid) {
@@ -442,10 +450,11 @@ function add() {
.request()
.then(() => {
getList()
+ dialogVisible.value = false
ElMessage.success('Success')
})
.finally(() => {
- formProps.value.disabled = dialogVisible.value = false
+ formProps.value.disabled = false
})
}
@@ -458,10 +467,11 @@ function edit() {
.request()
.then(() => {
getList()
+ dialogVisible.value = false
ElMessage.success('Success')
})
.finally(() => {
- formProps.value.disabled = dialogVisible.value = false
+ formProps.value.disabled = false
})
}
diff --git a/web/src/views/server/script.vue b/web/src/views/server/script.vue
index 3643281..69ca40e 100644
--- a/web/src/views/server/script.vue
+++ b/web/src/views/server/script.vue
@@ -12,7 +12,7 @@
clearable
@change="serverChange"
>
-
+
{
let execRes = true
+ let firstTag!: ServerTag
for (const serverRes of response.data) {
Object.assign(serverTags.value[serverRes.serverId], {
isRun: true,
@@ -410,7 +411,11 @@ function handleRun() {
if (execRes && serverRes.execRes == false) {
execRes = false
}
+ if (!firstTag) {
+ firstTag = serverTags.value[serverRes.serverId]
+ }
}
+ showExecRes(firstTag)
if (execRes) {
ElMessage.success('Success')
} else {