装置重启
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) {
|
export function uploadDeviceFile(data) {
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
|
|||||||
@@ -5,19 +5,25 @@
|
|||||||
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
|
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_right" v-loading="loading">
|
<div class="main_right" v-loading="loading">
|
||||||
<div class="menu" v-if="activePathList.length != 0">
|
<div class="right_nav">
|
||||||
<el-breadcrumb :separator-icon="ArrowRight">
|
<div class="menu" v-if="activePathList.length != 0">
|
||||||
<el-breadcrumb-item
|
<el-breadcrumb :separator-icon="ArrowRight">
|
||||||
v-for="(item, index) in activePathList"
|
<el-breadcrumb-item
|
||||||
style="cursor: pointer"
|
v-for="(item, index) in activePathList"
|
||||||
:key="index"
|
style="cursor: pointer"
|
||||||
@click="handleIntoByPath(item)"
|
:key="index"
|
||||||
>
|
@click="handleIntoByPath(item)"
|
||||||
<!-- <span>{{ index > 1 ? item.path.replace(activePathList[1].path, ' '): item.path }}</span> -->
|
>
|
||||||
<span>{{ outPutPath(item, index) }}</span>
|
<!-- <span>{{ index > 1 ? item.path.replace(activePathList[1].path, ' '): item.path }}</span> -->
|
||||||
</el-breadcrumb-item>
|
<span>{{ outPutPath(item, index) }}</span>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb-item>
|
||||||
|
</el-breadcrumb>
|
||||||
|
</div>
|
||||||
|
<el-button :icon="Refresh" @click="handleRestartDevice" type="primary" :loading="deviceRestartLoading">
|
||||||
|
装置重启
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="filter" v-if="activePathList.length != 0">
|
<div class="filter" v-if="activePathList.length != 0">
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 200px; height: 32px"
|
style="width: 200px; height: 32px"
|
||||||
@@ -25,8 +31,8 @@
|
|||||||
clearable
|
clearable
|
||||||
v-model="filterFileName"
|
v-model="filterFileName"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
<el-button type="primary" @click="handleSearch" :icon="Search">搜索</el-button>
|
||||||
<el-button @click="handleRefresh">重置</el-button>
|
<el-button @click="handleRefresh" :icon="Refresh">重置</el-button>
|
||||||
<el-upload
|
<el-upload
|
||||||
v-if="!progressVisibile"
|
v-if="!progressVisibile"
|
||||||
action=""
|
action=""
|
||||||
@@ -44,7 +50,10 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div class="upload_progress" v-if="progressVisibile">
|
<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>
|
</div>
|
||||||
<div class="list" v-if="dirList.length != 0 && !loading">
|
<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 { mainHeight } from '@/utils/layout'
|
||||||
import { ref, reactive, watch } from 'vue'
|
import { ref, reactive, watch } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ArrowLeft, ArrowRight, Download, Upload } from '@element-plus/icons-vue'
|
|
||||||
import {
|
import {
|
||||||
getDeviceRootPath,
|
getDeviceRootPath,
|
||||||
getFileServiceFileOrDir,
|
getFileServiceFileOrDir,
|
||||||
downLoadDeviceFile,
|
downLoadDeviceFile,
|
||||||
uploadDeviceFile
|
uploadDeviceFile,
|
||||||
|
reStartDevice
|
||||||
} from '@/api/cs-device-boot/fileService.ts'
|
} 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'
|
import popup from './popup.vue'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'govern/device/fileService'
|
name: 'govern/device/fileService'
|
||||||
@@ -166,6 +189,17 @@ const handleRefresh = () => {
|
|||||||
filterFileName.value = ''
|
filterFileName.value = ''
|
||||||
dirList.value = currentDirList.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([])
|
const dirList = ref([])
|
||||||
// 村村当前目录数据
|
// 村村当前目录数据
|
||||||
@@ -284,25 +318,36 @@ watch(
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 10px 10px 10px 10px;
|
padding: 10px 10px 10px 10px;
|
||||||
margin-left: 10px;
|
//margin-left: 10px;
|
||||||
border: 1px solid #eee;
|
border: 1px solid #eee;
|
||||||
.menu {
|
.right_nav {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: space-between;
|
||||||
overflow-x: auto;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: var(--el-color-primary);
|
.menu {
|
||||||
border-radius: 4px;
|
width: 100%;
|
||||||
span {
|
height: 100%;
|
||||||
font-size: 14px;
|
display: flex;
|
||||||
font-weight: 800;
|
justify-content: flex-start;
|
||||||
padding: 0 5px;
|
overflow-x: auto;
|
||||||
color: #fff;
|
align-items: center;
|
||||||
cursor: pointer;
|
background-color: var(--el-color-primary);
|
||||||
|
border-radius: 4px;
|
||||||
|
span {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 800;
|
||||||
|
padding: 0 5px;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-button {
|
||||||
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter {
|
.filter {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
@@ -329,7 +374,7 @@ watch(
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
@@ -377,6 +422,10 @@ watch(
|
|||||||
margin-top: 10px;
|
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="接入时间">
|
<el-descriptions-item label="接入时间">
|
||||||
{{ deviceData.time }}
|
{{ deviceData.time }}
|
||||||
</el-descriptions-item>
|
</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-descriptions>
|
||||||
<el-tabs v-model="dataSet" type="border-card" class="device-manage-box-card" @tab-click="handleClick">
|
<el-tabs v-model="dataSet" type="border-card" class="device-manage-box-card" @tab-click="handleClick">
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
|
|||||||
Reference in New Issue
Block a user