fix: 优化调度队列显示效果

This commit is contained in:
DLmaster361
2025-09-04 17:01:58 +08:00
parent 278800c077
commit 58bd4a1765
2 changed files with 69 additions and 65 deletions

View File

@@ -123,50 +123,64 @@
<!-- 队列开关配置 --> <!-- 队列开关配置 -->
<div class="config-section"> <div class="config-section">
<div class="queue-switches"> <a-row :gutter="24">
<div class="switch-item"> <a-col :span="6">
<div class="switch-label"> <div class="form-item-vertical">
<span class="switch-title">启动时运行</span> <div class="form-label-wrapper">
<span class="switch-description">程序启动时自动运行此队列</span> <span class="form-label">启动时运行</span>
<a-tooltip title="软件启动时自动运行此队列">
<QuestionCircleOutlined class="help-icon" />
</a-tooltip>
</div> </div>
<a-switch <a-select
v-model:checked="currentStartUpEnabled" v-model:value="currentStartUpEnabled"
@change="onQueueSwitchChange" @change="onQueueSwitchChange"
size="default" style="width: 100%"
/> size="large"
>
<a-select-option :value="true"></a-select-option>
<a-select-option :value="false"></a-select-option>
</a-select>
</div> </div>
<div class="switch-item"> </a-col>
<div class="switch-label"> <a-col :span="6">
<span class="switch-title">定时运行</span> <div class="form-item-vertical">
<span class="switch-description">按照设定的时间自动运行此队列</span> <div class="form-label-wrapper">
<span class="form-label">定时运行</span>
<a-tooltip title="在设定的时间自动运行此队列">
<QuestionCircleOutlined class="help-icon" />
</a-tooltip>
</div> </div>
<a-switch <a-select
v-model:checked="currentTimeEnabled" v-model:value="currentTimeEnabled"
@change="onQueueSwitchChange" @change="onQueueSwitchChange"
size="default" style="width: 100%"
/> size="large"
>
<a-select-option :value="true"></a-select-option>
<a-select-option :value="false"></a-select-option>
</a-select>
</div> </div>
</div> </a-col>
</div> <a-col :span="12">
<div class="form-item-vertical">
<!-- 完成后操作配置 --> <div class="form-label-wrapper">
<div class="config-section"> <span class="form-label">完成后操作</span>
<div class="after-accomplish-settings"> <a-tooltip title="队列完成后执行的操作">
<div class="setting-item"> <QuestionCircleOutlined class="help-icon" />
<div class="setting-label"> </a-tooltip>
<span class="setting-title">完成后操作</span>
<span class="setting-description">队列完成后执行的操作</span>
</div> </div>
<a-select <a-select
v-model:value="currentAfterAccomplish" v-model:value="currentAfterAccomplish"
@change="onAfterAccomplishChange" @change="onAfterAccomplishChange"
size="default" style="width: 100%"
:options="afterAccomplishOptions" :options="afterAccomplishOptions"
placeholder="请选择操作" placeholder="请选择操作"
style="min-width: 200px" size="large"
/> />
</div> </div>
</div> </a-col>
</a-row>
</div> </div>
<a-divider /> <a-divider />
@@ -197,7 +211,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { nextTick, onMounted, ref, watch } from 'vue' import { nextTick, onMounted, ref, watch } from 'vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { DeleteOutlined, EditOutlined, PlusOutlined, ReloadOutlined } from '@ant-design/icons-vue' import { DeleteOutlined, EditOutlined, PlusOutlined, ReloadOutlined, QuestionCircleOutlined } from '@ant-design/icons-vue'
import { Service } from '@/api' import { Service } from '@/api'
import TimeSetManager from '@/components/queue/TimeSetManager.vue' import TimeSetManager from '@/components/queue/TimeSetManager.vue'
import QueueItemManager from '@/components/queue/QueueItemManager.vue' import QueueItemManager from '@/components/queue/QueueItemManager.vue'
@@ -894,37 +908,33 @@ onMounted(async () => {
/* 配置区域 */ /* 配置区域 */
.config-section { .config-section {
margin-bottom: 24px; margin-bottom: 12px;
} }
/* 开关配置 */ /* 垂直排列的表单项 */
.queue-switches { .form-item-vertical {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 8px;
margin-bottom: 16px;
} }
.switch-item { .form-label-wrapper {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
gap: 8px;
} }
.switch-label { /* 表单标签 */
display: flex; .form-label {
flex-direction: column; font-weight: 600;
gap: 4px;
}
.switch-title {
font-size: 16px;
font-weight: 500;
color: var(--ant-color-text); color: var(--ant-color-text);
font-size: 14px;
} }
.switch-description { .help-icon {
color: #8c8c8c;
font-size: 14px; font-size: 14px;
color: var(--ant-color-text-secondary);
} }
/* 完成后操作配置 */ /* 完成后操作配置 */

View File

@@ -350,12 +350,6 @@
</span> </span>
</a-tooltip> </a-tooltip>
</template> </template>
<!-- <a-switch-->
<!-- v-model:checked="generalConfig.Script.IfTrackProcess"-->
<!-- size="default"-->
<!-- class="modern-switch"-->
<!-- />-->
<a-select v-model:value="generalConfig.Script.IfTrackProcess" size="large"> <a-select v-model:value="generalConfig.Script.IfTrackProcess" size="large">
<a-select-option :value="true"></a-select-option> <a-select-option :value="true"></a-select-option>
<a-select-option :value="false"></a-select-option> <a-select-option :value="false"></a-select-option>