-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
115 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<script lang="ts"> | ||
import { Component, Vue } from "vue-facing-decorator" | ||
import { NaApi } from "@/api" | ||
import { MachineModels, MachineItem } from "@/api/native/machine" | ||
import WorkerFileman from "@/cloud/worker/fileman.vue" | ||
@Component({ | ||
components: { WorkerFileman } | ||
}) | ||
export default class MachineFileman extends Vue { | ||
public MachineModels = MachineModels | ||
public loading = true | ||
// 初始化 | ||
async created() { | ||
const machineId = +this.$route.params.id | ||
await this.getMachine(machineId) | ||
} | ||
// 获取主机 | ||
public machine!: MachineItem | ||
async getMachine(id: number) { | ||
const res = await NaApi.machine.detail(id) | ||
this.machine = res.Item | ||
this.loading = false | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<t-space fixed direction="vertical"> | ||
<t-breadcrumb> | ||
<t-breadcrumb-item to="/dashboard"> | ||
首页 | ||
</t-breadcrumb-item> | ||
<t-breadcrumb-item to="/machine/list"> | ||
文件管理 | ||
</t-breadcrumb-item> | ||
<t-breadcrumb-item v-if="machine"> | ||
{{ machine.HostName || machine.Id }} · {{ MachineModels[machine.Model] }} | ||
</t-breadcrumb-item> | ||
</t-breadcrumb> | ||
|
||
<t-space v-if="loading" fixed align="center"> | ||
<t-loading /> | ||
</t-space> | ||
|
||
<template v-if="machine"> | ||
<WorkerFileman :machine="machine" /> | ||
</template> | ||
</t-space> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters