mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-17 10:56:39 +08:00
格式与细节修改
This commit is contained in:
parent
e44b116184
commit
d0e9eef9c2
@ -107,7 +107,8 @@
|
|||||||
<template v-if="column.dataIndex === 'enabledFlag'">
|
<template v-if="column.dataIndex === 'enabledFlag'">
|
||||||
<a-switch
|
<a-switch
|
||||||
v-model:checked="record.enabledFlag"
|
v-model:checked="record.enabledFlag"
|
||||||
checked-children="已启用" un-checked-children="已禁用"
|
checked-children="已启用"
|
||||||
|
un-checked-children="已禁用"
|
||||||
@change="(checked) => handleEnabledUpdate(checked, record)"
|
@change="(checked) => handleEnabledUpdate(checked, record)"
|
||||||
:loading="record.enabledLoading"
|
:loading="record.enabledLoading"
|
||||||
/>
|
/>
|
||||||
@ -117,31 +118,31 @@
|
|||||||
<a-button v-privilege="'support:job:update'" @click="openUpdateModal(record)" type="link">编辑</a-button>
|
<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: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 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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="smart-query-table-page">
|
<div class="smart-query-table-page">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
showSizeChanger
|
showSizeChanger
|
||||||
showQuickJumper
|
showQuickJumper
|
||||||
show-less-items
|
show-less-items
|
||||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||||
:defaultPageSize="queryForm.pageSize"
|
:defaultPageSize="queryForm.pageSize"
|
||||||
v-model:current="queryForm.pageNum"
|
v-model:current="queryForm.pageNum"
|
||||||
v-model:pageSize="queryForm.pageSize"
|
v-model:pageSize="queryForm.pageSize"
|
||||||
:total="total"
|
:total="total"
|
||||||
@change="queryJobList"
|
@change="queryJobList"
|
||||||
@showSizeChange="queryJobList"
|
@showSizeChange="queryJobList"
|
||||||
:show-total="(total) => `共${total}条`"
|
:show-total="(total) => `共${total}条`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="2" tab="已删除任务"><DeletedJobList /></a-tab-pane>
|
<a-tab-pane key="2" tab="已删除任务"><DeletedJobList /></a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
|
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<!-- 表单操作 -->
|
<!-- 表单操作 -->
|
||||||
@ -152,7 +153,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {message, Modal} from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
import { jobApi } from '/@/api/support/job-api';
|
import { jobApi } from '/@/api/support/job-api';
|
||||||
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||||
@ -163,7 +164,7 @@
|
|||||||
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
|
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
|
||||||
import JobFormModal from './components/job-form-modal.vue';
|
import JobFormModal from './components/job-form-modal.vue';
|
||||||
import JobLogListModal from './components/job-log-list-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([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
@ -241,6 +242,8 @@
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const activeKey = ref('1');
|
||||||
|
|
||||||
// ---------------- 查询数据 -----------------------
|
// ---------------- 查询数据 -----------------------
|
||||||
|
|
||||||
const queryFormState = {
|
const queryFormState = {
|
||||||
@ -333,7 +336,7 @@
|
|||||||
|
|
||||||
// ------------------------------------ 删除操作 -------------------------------------
|
// ------------------------------------ 删除操作 -------------------------------------
|
||||||
|
|
||||||
function confirmDelete(jobId, jobName){
|
function confirmDelete(jobId, jobName) {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: '警告',
|
title: '警告',
|
||||||
content: `确定要删除【${jobName}】任务吗?`,
|
content: `确定要删除【${jobName}】任务吗?`,
|
||||||
@ -347,15 +350,15 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteJob(jobId){
|
async function deleteJob(jobId) {
|
||||||
try{
|
try {
|
||||||
SmartLoading.show();
|
SmartLoading.show();
|
||||||
await jobApi.deleteJob(jobId);
|
await jobApi.deleteJob(jobId);
|
||||||
message.success('删除成功!');
|
message.success('删除成功!');
|
||||||
queryJobList();
|
queryJobList();
|
||||||
}catch (e){
|
} catch (e) {
|
||||||
smartSentry.captureError(e);
|
smartSentry.captureError(e);
|
||||||
}finally {
|
} finally {
|
||||||
SmartLoading.hide();
|
SmartLoading.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
let props = defineProps({
|
let props = defineProps({
|
||||||
tree: {
|
tree: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
defineEmits(['update:value']);
|
defineEmits(['update:value']);
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
tree: {
|
tree: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
index: {
|
index: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
tree: {
|
tree: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
index: {
|
index: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -124,24 +124,22 @@
|
|||||||
</a-table>
|
</a-table>
|
||||||
<div class="smart-query-table-page">
|
<div class="smart-query-table-page">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
showSizeChanger
|
showSizeChanger
|
||||||
showQuickJumper
|
showQuickJumper
|
||||||
show-less-items
|
show-less-items
|
||||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||||
:defaultPageSize="queryForm.pageSize"
|
:defaultPageSize="queryForm.pageSize"
|
||||||
v-model:current="queryForm.pageNum"
|
v-model:current="queryForm.pageNum"
|
||||||
v-model:pageSize="queryForm.pageSize"
|
v-model:pageSize="queryForm.pageSize"
|
||||||
:total="total"
|
:total="total"
|
||||||
@change="queryJobList"
|
@change="queryJobList"
|
||||||
@showSizeChange="queryJobList"
|
@showSizeChange="queryJobList"
|
||||||
:show-total="(total) => `共${total}条`"
|
:show-total="(total) => `共${total}条`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="2" tab="已删除任务"><DeletedJobList /></a-tab-pane>
|
<a-tab-pane key="2" tab="已删除任务"><DeletedJobList /></a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
|
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<!-- 表单操作 -->
|
<!-- 表单操作 -->
|
||||||
@ -152,7 +150,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { onMounted, reactive, ref } from 'vue';
|
||||||
import { jobApi } from '/@/api/support/job-api';
|
import { jobApi } from '/@/api/support/job-api';
|
||||||
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||||
@ -163,7 +161,7 @@
|
|||||||
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
|
import { TRIGGER_TYPE_ENUM } from '/@/constants/support/job-const.js';
|
||||||
import JobFormModal from './components/job-form-modal.vue';
|
import JobFormModal from './components/job-form-modal.vue';
|
||||||
import JobLogListModal from './components/job-log-list-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([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
@ -241,6 +239,8 @@
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const activeKey = ref('1');
|
||||||
|
|
||||||
// ---------------- 查询数据 -----------------------
|
// ---------------- 查询数据 -----------------------
|
||||||
|
|
||||||
const queryFormState = {
|
const queryFormState = {
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
let props = defineProps({
|
let props = defineProps({
|
||||||
tree: {
|
tree: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
defineEmits(['update:value']);
|
defineEmits(['update:value']);
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
tree: {
|
tree: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
index: {
|
index: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
tree: {
|
tree: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
index: {
|
index: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
Loading…
Reference in New Issue
Block a user