V0.3
This commit is contained in:
parent
ca523a5a57
commit
e0cf8cc1a5
@ -5,6 +5,7 @@ import 'nprogress/nprogress.css'// nprogress样式文件
|
|||||||
|
|
||||||
import UI_1 from "../src/components/Aside/UI_1.vue";
|
import UI_1 from "../src/components/Aside/UI_1.vue";
|
||||||
import UI_2 from "../src/components/Aside/UI_2.vue";
|
import UI_2 from "../src/components/Aside/UI_2.vue";
|
||||||
|
import UI_3 from "../src/components/Aside/UI_3.vue";
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
@ -15,6 +16,10 @@ const routes = [
|
|||||||
path: '/UI_2',
|
path: '/UI_2',
|
||||||
component: UI_2
|
component: UI_2
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/UI_3',
|
||||||
|
component: UI_3
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {reactive, ref} from 'vue'
|
import {reactive, ref} from 'vue'
|
||||||
import {Api, RequestPost, User} from "../JS/RequestAPI.js";
|
import {Api, RequestPost, User} from "../JS/RequestAPI.js";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage, ElNotification} from "element-plus";
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
Duration: 1,
|
Duration: 1,
|
||||||
region: 2,
|
region: 2,
|
||||||
@ -61,14 +61,23 @@ function handleSubmit() {
|
|||||||
const data = res.data;
|
const data = res.data;
|
||||||
if(data.Code === 1){
|
if(data.Code === 1){
|
||||||
DataDB.data = data.target;
|
DataDB.data = data.target;
|
||||||
ElMessage.success('生成成功!');
|
ElMessage.success('生成成功');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(data.Code === 2){
|
if(data.Code === 2){
|
||||||
ElMessage.error("权限认证失败!");
|
ElMessage.error("破解失败");
|
||||||
|
DataDB.data = data.Text;
|
||||||
|
let A = setInterval(()=>{
|
||||||
|
window.location.reload();
|
||||||
|
},1500);
|
||||||
|
ElNotification.error( {
|
||||||
|
title: '破解失败',
|
||||||
|
message: DataDB.data,
|
||||||
|
duration: 0,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ElMessage.error('生成失败!');
|
ElMessage.error('生成失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
141
src/components/Aside/UI_3.vue
Normal file
141
src/components/Aside/UI_3.vue
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
<template>
|
||||||
|
<el-scrollbar>
|
||||||
|
<el-scrollbar>
|
||||||
|
<el-row style="margin-left: 1%;margin-top: 1%;">
|
||||||
|
<el-button type="primary" @click.stop="UpData">
|
||||||
|
刷新
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" @click.stop="UpLoad">
|
||||||
|
上传新版本
|
||||||
|
</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-scrollbar>
|
||||||
|
<div style="margin-left: 1%;margin-top: 1%;">
|
||||||
|
<el-table
|
||||||
|
:data="DataDB.tableData"
|
||||||
|
style="width: 98%;"
|
||||||
|
height="calc(100vh - 200px)"
|
||||||
|
>
|
||||||
|
<el-table-column prop="Name" label="名称" align="center"/>
|
||||||
|
<el-table-column prop="Date_t" label="时间" align="center"/>
|
||||||
|
<el-table-column label="大小" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ Convert(scope.row.Size) }} MB
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="200">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link type="primary" @click.stop="Download(scope.row.ID)">
|
||||||
|
下载
|
||||||
|
</el-link>
|
||||||
|
<el-link type="danger" @click.stop="Delete(scope.row.ID)" style="margin-left: 10px;">
|
||||||
|
删除
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-scrollbar>
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogTableVisible1" title="上传新版本" width="800">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="DataDB.fileList"
|
||||||
|
ref="UpLoadDemo"
|
||||||
|
class="upload-demo"
|
||||||
|
drag
|
||||||
|
:action="Api.GetOHBSVUpload"
|
||||||
|
multiple
|
||||||
|
limit="3"
|
||||||
|
:on-success="BUpload"
|
||||||
|
>
|
||||||
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||||
|
<div class="el-upload__text">
|
||||||
|
将文件放到这里或<em>点击上传</em>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {onMounted, reactive, ref} from "vue";
|
||||||
|
import {Api, RequestPost, User} from "../JS/RequestAPI.js";
|
||||||
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
|
import {UploadFilled} from "@element-plus/icons-vue";
|
||||||
|
onMounted(()=>{
|
||||||
|
GetData();
|
||||||
|
});
|
||||||
|
const dialogTableVisible1 = ref(false);
|
||||||
|
const dialogTableVisible2 = ref(false);
|
||||||
|
const UpLoadDemo = ref();
|
||||||
|
const UpLoadBin = ref();
|
||||||
|
const DataDB = reactive({
|
||||||
|
tableData:[],
|
||||||
|
fileList:[],
|
||||||
|
});
|
||||||
|
const StaterDB = reactive({
|
||||||
|
Ver:'',
|
||||||
|
URL:'',
|
||||||
|
});
|
||||||
|
function UpData(){
|
||||||
|
GetData();
|
||||||
|
}
|
||||||
|
function GetData(){
|
||||||
|
RequestPost(Api.GetOHBSVData,JSON.stringify({
|
||||||
|
type:0
|
||||||
|
}),(res)=>{
|
||||||
|
const data = res.data;
|
||||||
|
if(data.Code === 1){
|
||||||
|
DataDB.tableData = data.list;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function Convert(size){
|
||||||
|
const data = size / 1024 / 1024;
|
||||||
|
return data.toFixed(2);
|
||||||
|
}
|
||||||
|
function Download(ID){
|
||||||
|
const url = Api.GetOHBSVDownload + "?ID=" + ID;
|
||||||
|
window.open(url);
|
||||||
|
}
|
||||||
|
function Delete(ID){
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
'系统将永久删除该文件,继续吗?',
|
||||||
|
'警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
RequestPost(Api.GetOHBSVDelete,JSON.stringify({
|
||||||
|
ID:ID,
|
||||||
|
User:User.User,
|
||||||
|
Pwd:User.Pwd,
|
||||||
|
}),(res)=>{
|
||||||
|
const data = res.data;
|
||||||
|
if(data.Code === 1){
|
||||||
|
ElMessage.success('删除成功!');
|
||||||
|
GetData();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(data.Code === 2){
|
||||||
|
ElMessage.error('权限认证失败!');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ElMessage.error('删除失败!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
function UpLoad(){
|
||||||
|
DataDB.fileList = [];
|
||||||
|
dialogTableVisible1.value = true;
|
||||||
|
}
|
||||||
|
function BUpload(){
|
||||||
|
GetData();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@ -12,10 +12,14 @@ export const Api = reactive({
|
|||||||
GetStarter: ref(RootURL + '/Starter/GetStarter'),
|
GetStarter: ref(RootURL + '/Starter/GetStarter'),
|
||||||
ReviseStarter: ref(RootURL + '/Starter/ReviseStarter'),
|
ReviseStarter: ref(RootURL + '/Starter/ReviseStarter'),
|
||||||
UpStarter: ref(RootURL + '/Starter/UploadStarter'),
|
UpStarter: ref(RootURL + '/Starter/UploadStarter'),
|
||||||
|
GetOHBSVData: ref(RootURL + '/UI_3/GetData'),
|
||||||
|
GetOHBSVDownload: ref(RootURL + '/UI_3/Download'),
|
||||||
|
GetOHBSVUpload: ref(RootURL + '/UI_3/Upload'),
|
||||||
|
GetOHBSVDelete: ref(RootURL + '/UI_3/DeleteData'),
|
||||||
});
|
});
|
||||||
export const User = reactive({
|
export const User = reactive({
|
||||||
User:ref('-1'),
|
User:ref('-1'),
|
||||||
Pwd:ref('-1'),
|
Pwd:ref(''),
|
||||||
Verify:false,
|
Verify:false,
|
||||||
Code:0,
|
Code:0,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -13,6 +13,9 @@
|
|||||||
<el-menu-item index="/UI_2">
|
<el-menu-item index="/UI_2">
|
||||||
<span>BS更新服务</span>
|
<span>BS更新服务</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
<el-menu-item index="/UI_3">
|
||||||
|
<span>OpenHarmony-BS更新服务</span>
|
||||||
|
</el-menu-item>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
<div style="height: calc(100vh - 80px)">
|
<div style="height: calc(100vh - 80px)">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
@ -31,7 +34,7 @@
|
|||||||
<el-input v-model="DataDB.User" />
|
<el-input v-model="DataDB.User" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="密码">
|
<el-form-item label="密码">
|
||||||
<el-input v-model="DataDB.Pwd" />
|
<el-input v-model="DataDB.Pwd" type="password"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user