⚡ 优化执行逻辑.
This commit is contained in:
@@ -163,7 +163,7 @@
|
||||
<a-button v-permission="['asset:exec:exec-command']"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="emits('viewLog', record.id)">
|
||||
@click="() => emits('viewLog', record.id, $event.ctrlKey)">
|
||||
日志
|
||||
</a-button>
|
||||
<!-- 中断 -->
|
||||
@@ -221,8 +221,6 @@
|
||||
|
||||
const emits = defineEmits(['viewCommand', 'viewParams', 'viewLog', 'openClear']);
|
||||
|
||||
// TODO 日志 ctrl日志
|
||||
|
||||
const pagination = usePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const expandable = useExpandable();
|
||||
|
||||
@@ -4,10 +4,13 @@
|
||||
<exec-log-table ref="tableRef"
|
||||
@view-command="viewCommand"
|
||||
@view-params="viewParams"
|
||||
@view-log="viewLog"
|
||||
@open-clear="openClearModal" />
|
||||
<!-- 清理模态框 -->
|
||||
<exec-log-clear-modal ref="clearModal"
|
||||
@clear="clearCallback" />
|
||||
<!-- 执行日志模态框 -->
|
||||
<exec-log-panel-modal ref="logModal" />
|
||||
<!-- json 模态框 -->
|
||||
<json-editor-modal ref="jsonModal"
|
||||
:esc-to-close="true" />
|
||||
@@ -32,9 +35,11 @@
|
||||
import ExecLogClearModal from './components/exec-log-clear-modal.vue';
|
||||
import JsonEditorModal from '@/components/view/json-editor/modal/index.vue';
|
||||
import ShellEditorModal from '@/components/view/shell-editor/modal/index.vue';
|
||||
import ExecLogPanelModal from '@/components/exec/log/panel-modal/index.vue';
|
||||
|
||||
const render = ref(false);
|
||||
const tableRef = ref();
|
||||
const logModal = ref();
|
||||
const clearModal = ref();
|
||||
const jsonModal = ref();
|
||||
const shellModal = ref();
|
||||
@@ -54,6 +59,15 @@
|
||||
jsonModal.value.open(JSON.parse(data));
|
||||
};
|
||||
|
||||
// 查看日志
|
||||
const viewLog = (id: number, newWindow: boolean) => {
|
||||
if (newWindow) {
|
||||
// TODO openLog
|
||||
} else {
|
||||
logModal.value.open(id);
|
||||
}
|
||||
};
|
||||
|
||||
// 清理回调
|
||||
const clearCallback = () => {
|
||||
tableRef.value.fetchTableData();
|
||||
|
||||
Reference in New Issue
Block a user