装置重启
This commit is contained in:
@@ -24,6 +24,14 @@ export function downLoadDeviceFile(data) {
|
||||
})
|
||||
}
|
||||
|
||||
//装置重启
|
||||
export function reStartDevice(data) {
|
||||
return createAxios({
|
||||
url: `/cs-device-boot/EquipmentDelivery/rebootDevice?nDid=${data.nDid}`,
|
||||
method: 'POST'
|
||||
})
|
||||
}
|
||||
|
||||
//上传文件至装置
|
||||
export function uploadDeviceFile(data) {
|
||||
let form = new FormData()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
|
||||
</div>
|
||||
<div class="main_right" v-loading="loading">
|
||||
<div class="right_nav">
|
||||
<div class="menu" v-if="activePathList.length != 0">
|
||||
<el-breadcrumb :separator-icon="ArrowRight">
|
||||
<el-breadcrumb-item
|
||||
@@ -18,6 +19,11 @@
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<el-button :icon="Refresh" @click="handleRestartDevice" type="primary" :loading="deviceRestartLoading">
|
||||
装置重启
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="filter" v-if="activePathList.length != 0">
|
||||
<el-input
|
||||
style="width: 200px; height: 32px"
|
||||
@@ -25,8 +31,8 @@
|
||||
clearable
|
||||
v-model="filterFileName"
|
||||
></el-input>
|
||||
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
||||
<el-button @click="handleRefresh">重置</el-button>
|
||||
<el-button type="primary" @click="handleSearch" :icon="Search">搜索</el-button>
|
||||
<el-button @click="handleRefresh" :icon="Refresh">重置</el-button>
|
||||
<el-upload
|
||||
v-if="!progressVisibile"
|
||||
action=""
|
||||
@@ -44,7 +50,10 @@
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<div class="upload_progress" v-if="progressVisibile">
|
||||
{{ fileName }} <el-progress :percentage="30" :indeterminate="true"><el-button text>上传中...</el-button></el-progress>
|
||||
{{ fileName }}
|
||||
<el-progress :percentage="30" :indeterminate="true">
|
||||
<el-button text>上传中...</el-button>
|
||||
</el-progress>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list" v-if="dirList.length != 0 && !loading">
|
||||
@@ -103,13 +112,27 @@ import DeviceTree from '@/components/tree/govern/deviceTree.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ArrowLeft, ArrowRight, Download, Upload } from '@element-plus/icons-vue'
|
||||
import {
|
||||
getDeviceRootPath,
|
||||
getFileServiceFileOrDir,
|
||||
downLoadDeviceFile,
|
||||
uploadDeviceFile
|
||||
uploadDeviceFile,
|
||||
reStartDevice
|
||||
} from '@/api/cs-device-boot/fileService.ts'
|
||||
import {
|
||||
CirclePlus,
|
||||
Delete,
|
||||
EditPen,
|
||||
ArrowLeft,
|
||||
ArrowRight,
|
||||
Download,
|
||||
Upload,
|
||||
View,
|
||||
Check,
|
||||
Plus,
|
||||
Refresh,
|
||||
Search
|
||||
} from '@element-plus/icons-vue'
|
||||
import popup from './popup.vue'
|
||||
defineOptions({
|
||||
name: 'govern/device/fileService'
|
||||
@@ -166,6 +189,17 @@ const handleRefresh = () => {
|
||||
filterFileName.value = ''
|
||||
dirList.value = currentDirList.value
|
||||
}
|
||||
//装置重启
|
||||
const deviceRestartLoading = ref<boolean>(false)
|
||||
const handleRestartDevice = () => {
|
||||
deviceRestartLoading.value = true
|
||||
reStartDevice({ nDid: nDid.value }).then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
deviceRestartLoading.value = false
|
||||
ElMessage.success(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 进入文件夹
|
||||
const dirList = ref([])
|
||||
// 村村当前目录数据
|
||||
@@ -284,11 +318,17 @@ watch(
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
padding: 10px 10px 10px 10px;
|
||||
margin-left: 10px;
|
||||
//margin-left: 10px;
|
||||
border: 1px solid #eee;
|
||||
.right_nav {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.menu {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
overflow-x: auto;
|
||||
@@ -303,6 +343,11 @@ watch(
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.el-button {
|
||||
margin: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.filter {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
@@ -329,7 +374,7 @@ watch(
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
// justify-content: space-between;
|
||||
overflow-y: auto;
|
||||
margin-top: 10px;
|
||||
max-height: 100%;
|
||||
@@ -377,6 +422,10 @@ watch(
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
.list_item:nth-child(4n + 2),
|
||||
.list_item:nth-child(4n + 3) {
|
||||
margin: 10px 0.8%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,15 @@
|
||||
<el-descriptions-item label="接入时间">
|
||||
{{ deviceData.time }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="应用程序版本号">
|
||||
{{ deviceData.appVersion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="应用程序发布日期">
|
||||
{{ deviceData.appDate }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="应用程序校验码">
|
||||
{{ deviceData.appCheck }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-tabs v-model="dataSet" type="border-card" class="device-manage-box-card" @tab-click="handleClick">
|
||||
<el-tab-pane
|
||||
|
||||
Reference in New Issue
Block a user