⚡ 定时任务添加参数.
This commit is contained in:
@@ -105,8 +105,8 @@
|
||||
const emits = defineEmits(['clear']);
|
||||
|
||||
// 打开
|
||||
const open = () => {
|
||||
renderForm({ ...defaultForm() });
|
||||
const open = (record: OperatorLogQueryRequest) => {
|
||||
renderForm({ ...defaultForm(), ...record });
|
||||
setVisible(true);
|
||||
};
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<!-- 详情 -->
|
||||
<a-button type="text"
|
||||
size="mini"
|
||||
@click="openLogDetail(record)">
|
||||
@click="emits('openDetail', record)">
|
||||
详情
|
||||
</a-button>
|
||||
<!-- 删除 -->
|
||||
@@ -117,11 +117,6 @@
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
<!-- 清理模态框 -->
|
||||
<operator-log-clear-modal ref="clearModal"
|
||||
@clear="fetchTableData" />
|
||||
<!-- json 查看器模态框 -->
|
||||
<json-editor-modal ref="jsonView" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -133,7 +128,7 @@
|
||||
<script lang="ts" setup>
|
||||
import type { OperatorLogQueryRequest, OperatorLogQueryResponse } from '@/api/user/operator-log';
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { operatorLogModuleKey, operatorLogTypeKey, operatorRiskLevelKey, operatorLogResultKey, getLogDetail } from '../types/const';
|
||||
import { operatorLogModuleKey, operatorLogTypeKey, operatorRiskLevelKey, operatorLogResultKey } from '../types/const';
|
||||
import columns from '../types/table.columns';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import useLoading from '@/hooks/loading';
|
||||
@@ -143,16 +138,14 @@
|
||||
import { replaceHtmlTag, clearHtmlTag } from '@/utils';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import OperatorLogQueryHeader from './operator-log-query-header.vue';
|
||||
import OperatorLogClearModal from './operator-log-clear-modal.vue';
|
||||
import JsonEditorModal from '@/components/view/json-editor/modal/index.vue';
|
||||
|
||||
const emits = defineEmits(['openClear', 'openDetail']);
|
||||
|
||||
const pagination = usePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { getDictValue } = useDictStore();
|
||||
|
||||
const clearModal = ref();
|
||||
const jsonView = ref();
|
||||
const selectedKeys = ref<Array<number>>([]);
|
||||
const tableRenderData = ref<Array<OperatorLogQueryResponse>>([]);
|
||||
const formModel = reactive<OperatorLogQueryRequest>({
|
||||
@@ -163,14 +156,9 @@
|
||||
startTimeRange: undefined,
|
||||
});
|
||||
|
||||
// 查看详情
|
||||
const openLogDetail = (record: OperatorLogQueryResponse) => {
|
||||
jsonView.value.open(getLogDetail(record));
|
||||
};
|
||||
|
||||
// 打开清空
|
||||
const openClear = () => {
|
||||
clearModal.value?.open();
|
||||
emits('openClear', { ...formModel });
|
||||
};
|
||||
|
||||
// 删除选中行
|
||||
@@ -228,6 +216,8 @@
|
||||
doFetchTableData({ page, limit, ...form });
|
||||
};
|
||||
|
||||
defineExpose({ fetchTableData });
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
fetchTableData();
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
<template>
|
||||
<div class="layout-container" v-if="render">
|
||||
<operator-log-table />
|
||||
<!-- 表格 -->
|
||||
<operator-log-table ref="table"
|
||||
@open-detail="openLogDetail"
|
||||
@open-clear="(s) => clearModal.open(s)" />
|
||||
<!-- 清理模态框 -->
|
||||
<operator-log-clear-modal ref="clearModal"
|
||||
@clear="() => table.fetchTableData()" />
|
||||
<!-- json 查看器模态框 -->
|
||||
<json-editor-modal ref="jsonView" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -11,14 +19,25 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { OperatorLogQueryResponse } from '@/api/user/operator-log';
|
||||
import { ref, onUnmounted, onBeforeMount } from 'vue';
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
import { dictKeys } from './types/const';
|
||||
import { dictKeys, getLogDetail } from './types/const';
|
||||
import OperatorLogTable from './components/operator-log-table.vue';
|
||||
import OperatorLogClearModal from './components/operator-log-clear-modal.vue';
|
||||
import JsonEditorModal from '@/components/view/json-editor/modal/index.vue';
|
||||
|
||||
const cacheStore = useCacheStore();
|
||||
|
||||
const render = ref(false);
|
||||
const table = ref();
|
||||
const clearModal = ref();
|
||||
const jsonView = ref();
|
||||
|
||||
// 查看详情
|
||||
const openLogDetail = (record: OperatorLogQueryResponse) => {
|
||||
jsonView.value.open(getLogDetail(record));
|
||||
};
|
||||
|
||||
// 加载字典值
|
||||
onBeforeMount(async () => {
|
||||
|
||||
Reference in New Issue
Block a user