格式与细节修改

This commit is contained in:
zhoumingfa 2025-02-23 22:25:47 +08:00
parent e44b116184
commit d0e9eef9c2
8 changed files with 46 additions and 43 deletions

View File

@ -107,7 +107,8 @@
<template v-if="column.dataIndex === 'enabledFlag'">
<a-switch
v-model:checked="record.enabledFlag"
checked-children="已启用" un-checked-children="已禁用"
checked-children="已启用"
un-checked-children="已禁用"
@change="(checked) => handleEnabledUpdate(checked, record)"
:loading="record.enabledLoading"
/>
@ -117,7 +118,9 @@
<a-button v-privilege="'support:job:update'" @click="openUpdateModal(record)" type="link">编辑</a-button>
<a-button v-privilege="'support:job:execute'" type="link" @click="openExecuteModal(record)">执行</a-button>
<a-button v-privilege="'support:job:log:query'" @click="openJobLogModal(record.jobId, record.jobName)" type="link">记录</a-button>
<a-button danger v-privilege="'support:job:log:delete'" @click="confirmDelete(record.jobId, record.jobName)" type="link">删除</a-button>
<a-button danger v-privilege="'support:job:log:delete'" @click="confirmDelete(record.jobId, record.jobName)" type="link"
>删除</a-button
>
</div>
</template>
</template>
@ -140,8 +143,6 @@
</a-tab-pane>
<a-tab-pane key="2" tab="已删除任务"><DeletedJobList /></a-tab-pane>
</a-tabs>
</a-card>
<!-- 表单操作 -->
@ -152,7 +153,7 @@
</div>
</template>
<script setup>
import {message, Modal} from 'ant-design-vue';
import { message, Modal } from 'ant-design-vue';
import { onMounted, reactive, ref } from 'vue';
import { jobApi } from '/@/api/support/job-api';
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
@ -163,7 +164,7 @@
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
import JobFormModal from './components/job-form-modal.vue';
import JobLogListModal from './components/job-log-list-modal.vue';
import {SmartLoading} from "/@/components/framework/smart-loading/index.js";
import { SmartLoading } from '/@/components/framework/smart-loading/index.js';
const columns = ref([
{
@ -241,6 +242,8 @@
},
]);
const activeKey = ref('1');
// ---------------- -----------------------
const queryFormState = {
@ -333,7 +336,7 @@
// ------------------------------------ -------------------------------------
function confirmDelete(jobId, jobName){
function confirmDelete(jobId, jobName) {
Modal.confirm({
title: '警告',
content: `确定要删除【${jobName}】任务吗?`,
@ -347,15 +350,15 @@
});
}
async function deleteJob(jobId){
try{
async function deleteJob(jobId) {
try {
SmartLoading.show();
await jobApi.deleteJob(jobId);
message.success('删除成功!');
queryJobList();
}catch (e){
} catch (e) {
smartSentry.captureError(e);
}finally {
} finally {
SmartLoading.hide();
}
}

View File

@ -29,7 +29,7 @@
let props = defineProps({
tree: {
type: Array,
default: [],
default: () => [],
},
});
defineEmits(['update:value']);

View File

@ -30,7 +30,7 @@
const props = defineProps({
tree: {
type: Array,
default: [],
default: () => [],
},
index: {
type: Number,

View File

@ -21,7 +21,7 @@
const props = defineProps({
tree: {
type: Array,
default: [],
default: () => [],
},
index: {
type: Number,

View File

@ -140,8 +140,6 @@
</a-tab-pane>
<a-tab-pane key="2" tab="已删除任务"><DeletedJobList /></a-tab-pane>
</a-tabs>
</a-card>
<!-- 表单操作 -->
@ -152,7 +150,7 @@
</div>
</template>
<script setup lang="ts">
import {message, Modal} from 'ant-design-vue';
import { message, Modal } from 'ant-design-vue';
import { onMounted, reactive, ref } from 'vue';
import { jobApi } from '/@/api/support/job-api';
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
@ -163,7 +161,7 @@
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
import JobFormModal from './components/job-form-modal.vue';
import JobLogListModal from './components/job-log-list-modal.vue';
import {SmartLoading} from "/@/components/framework/smart-loading/index.js";
import { SmartLoading } from "/@/components/framework/smart-loading/index.js";
const columns = ref([
{
@ -241,6 +239,8 @@
},
]);
const activeKey = ref('1');
// ---------------- -----------------------
const queryFormState = {

View File

@ -29,7 +29,7 @@
let props = defineProps({
tree: {
type: Array,
default: [],
default: () => [],
},
});
defineEmits(['update:value']);

View File

@ -30,7 +30,7 @@
const props = defineProps({
tree: {
type: Array,
default: [],
default: () => [],
},
index: {
type: Number,

View File

@ -21,7 +21,7 @@
const props = defineProps({
tree: {
type: Array,
default: [],
default: () => [],
},
index: {
type: Number,