mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-12 17:40:54 +08:00
【优化】日志显示内容
【优化】表格背景显示颜色
This commit is contained in:
@@ -165,6 +165,8 @@ export const useController = () => {
|
||||
},
|
||||
})
|
||||
|
||||
// 定时执行,
|
||||
|
||||
/**
|
||||
* @description 打开添加授权API弹窗
|
||||
*/
|
||||
|
||||
@@ -122,6 +122,7 @@ export const useAuthApiManageStore = defineStore('auth-api-manage-store', () =>
|
||||
|
||||
return {
|
||||
// 状态
|
||||
times,
|
||||
apiFormProps,
|
||||
accessTypeMap,
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import type { DataTableColumn } from 'naive-ui'
|
||||
import { TableColumn } from 'naive-ui/es/data-table/src/interface'
|
||||
|
||||
const {
|
||||
refreshTable,
|
||||
fetchWorkflowList,
|
||||
fetchWorkflowHistory,
|
||||
workflowFormData,
|
||||
@@ -54,6 +55,7 @@ const statusCol = <T,>(key: string, title: string): TableColumn<T> => ({
|
||||
type: 'default',
|
||||
text: $t('t_1_1746773348701'),
|
||||
}
|
||||
if (row[key] === 'running') refreshTable.value = true
|
||||
return (
|
||||
<NTag type={status.type as any} size="small">
|
||||
{status.text}
|
||||
@@ -107,24 +109,6 @@ export const useController = () => {
|
||||
</NSpace>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// title: $t('t_4_1745215914951'),
|
||||
// key: 'active',
|
||||
// width: 100,
|
||||
// render: (row: WorkflowItem) => (
|
||||
// <NSwitch
|
||||
// size="small"
|
||||
// v-model:value={row.active}
|
||||
// onUpdate:value={() => {
|
||||
// handleChangeActive(row)
|
||||
// }}
|
||||
// checkedValue={1}
|
||||
// uncheckedValue={0}
|
||||
// checked-text={$t('t_0_1745457486299')}
|
||||
// unchecked-text={$t('t_1_1745457484314')}
|
||||
// />
|
||||
// ),
|
||||
// },
|
||||
{
|
||||
title: $t('t_7_1745215914189'),
|
||||
key: 'created_at',
|
||||
@@ -192,6 +176,21 @@ export const useController = () => {
|
||||
},
|
||||
})
|
||||
|
||||
// 节流渲染
|
||||
const throttleFn = useThrottleFn(() => {
|
||||
setTimeout(() => {
|
||||
fetch()
|
||||
refreshTable.value = false
|
||||
}, 1000)
|
||||
}, 100)
|
||||
|
||||
watch(
|
||||
() => refreshTable.value,
|
||||
(val) => {
|
||||
if (val) throttleFn()
|
||||
},
|
||||
)
|
||||
|
||||
/**
|
||||
* @description 打开添加工作流弹窗
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import {
|
||||
getWorkflowList,
|
||||
addWorkflow,
|
||||
deleteWorkflow,
|
||||
getWorkflowHistory,
|
||||
executeWorkflow,
|
||||
@@ -11,7 +10,6 @@ import { useError } from '@baota/hooks/error'
|
||||
// import { useMessage } from '@baota/naive-ui/hooks'
|
||||
import { $t } from '@locales/index'
|
||||
import type {
|
||||
AddWorkflowParams,
|
||||
WorkflowListParams,
|
||||
WorkflowHistoryParams,
|
||||
WorkflowHistoryItem,
|
||||
@@ -27,6 +25,8 @@ const { handleError } = useError()
|
||||
* @description 用于管理工作流相关的状态和操作,包括工作流列表、历史记录、分页等
|
||||
*/
|
||||
export const useWorkflowStore = defineStore('workflow-store', () => {
|
||||
// 刷新表格
|
||||
const refreshTable = ref(false)
|
||||
const isEditWorkFlow = ref(false) // 是否编辑工作流
|
||||
// 表单数据
|
||||
const workflowFormData = ref({
|
||||
@@ -138,6 +138,7 @@ export const useWorkflowStore = defineStore('workflow-store', () => {
|
||||
|
||||
return {
|
||||
// 状态
|
||||
refreshTable,
|
||||
isEditWorkFlow,
|
||||
workflowFormData,
|
||||
workflowTemplateOptions,
|
||||
|
||||
Reference in New Issue
Block a user