166 lines
6.2 KiB
HTML
166 lines
6.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Admin Console</title>
|
|
<link rel="icon" href="/assets/favicon.ico" type="image/x-icon" />
|
|
<link rel="bookmark" href="/assets/favicon.ico" type="image/x-icon" />
|
|
<link href="/assets/vuetify-v2.6.9/vuetify-v2.6.9.min.css" rel="stylesheet" />
|
|
<link href="/assets/vuetify-v2.6.9/materialdesignicons.min.css" rel="stylesheet">
|
|
|
|
<script src="/assets/vue/vue.min.js"></script>
|
|
<script src="/assets/vuetify-v2.6.9/vuetify-v2.6.9.min.js"></script>
|
|
<script src="/assets/axios/axios.min.js"></script>
|
|
<script src="/assets/moment/moment.js"></script>
|
|
<script src="/assets/qs/qs.js"></script>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
|
|
</head>
|
|
|
|
<body>
|
|
<div id="app"></div>
|
|
</body>
|
|
<script type="text/x-template" id="app-template">
|
|
<v-app id="inspire">
|
|
#{ render "common/bar-admin.html" . }
|
|
<!-- <#include "../../common/drawer-admin.ftl"> -->
|
|
|
|
|
|
<v-main class="grey lighten-3">
|
|
<v-container style="height: 100%">
|
|
<v-row style="height: 100%">
|
|
<v-col cols="12" sm="2" md="2" class="">
|
|
<v-sheet min-height="100%">
|
|
</v-sheet>
|
|
</v-col>
|
|
|
|
<v-col cols="12" sm="12" md="8">
|
|
<v-sheet min-height="100%" style="padding: 15px">
|
|
<v-timeline>
|
|
<v-timeline-item color="orange" large>
|
|
<template v-slot:icon>
|
|
<span>V</span>
|
|
</template>
|
|
<template v-slot:opposite>
|
|
新版发布说明
|
|
</template>
|
|
|
|
<v-card tile outlined>
|
|
<!-- <v-card-title>里程碑版本</v-card-title>-->
|
|
<v-card-text>
|
|
<v-text-field label="版本号" v-model="version.version">
|
|
<template v-slot:append-outer>
|
|
<v-btn class="mx-0" depressed @click="publicVersion">Post</v-btn>
|
|
</template>
|
|
</v-text-field>
|
|
<v-textarea outlined label="更新说明" rows="3"
|
|
v-model="version.description"></v-textarea>
|
|
<v-radio-group row v-model="version.milestone">
|
|
<v-radio label="hotfix" value="0"></v-radio>
|
|
<v-radio label="milestone" value="1"></v-radio>
|
|
</v-radio-group>
|
|
</v-card-text>
|
|
</v-card>
|
|
</v-timeline-item>
|
|
|
|
|
|
<v-timeline-item v-for="(item, i) in versionList" :key="i"
|
|
:left="item.milestone==0" :right="item.milestone==1"
|
|
small :large="item.milestone==1"
|
|
:color="item.milestone==1?'primary':'green'">
|
|
<template v-slot:opposite>
|
|
{{moment(item.createTime).format('YYYY/MM/DD HH:SS')}}
|
|
</template>
|
|
|
|
<v-card :color="item.milestone==1?'primary':''">
|
|
<v-card-title class="text-h6">{{item.version}}</v-card-title>
|
|
<v-card-text class="white text--primary">
|
|
<p style="font-size: 16px;white-space: pre-wrap;">{{item.description}}</p>
|
|
</v-card-text>
|
|
</v-card>
|
|
</v-timeline-item>
|
|
</v-timeline>
|
|
</v-sheet>
|
|
</v-col>
|
|
|
|
<v-col cols="12" sm="2" md="2">
|
|
<v-sheet min-height="100%">
|
|
|
|
</v-sheet>
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
</v-container>
|
|
</v-main>
|
|
</v-app>
|
|
</script>
|
|
|
|
|
|
<script>
|
|
var qs = Qs;
|
|
new Vue({
|
|
el: '#app',
|
|
template: '#app-template',
|
|
data: {
|
|
drawer: false,
|
|
version: {
|
|
version: null,
|
|
description: null,
|
|
milestone: '0',
|
|
},
|
|
versionList: []
|
|
},
|
|
methods: {
|
|
list() {
|
|
let ths = this;
|
|
|
|
axios.get("/admin/version/list").then(res => {
|
|
let data = res.data;
|
|
// console.log(data)
|
|
ths.versionList = data.data;
|
|
|
|
}).catch(err => {
|
|
console.error(err)
|
|
})
|
|
|
|
},
|
|
publicVersion() {
|
|
let ths = this;
|
|
axios.post("/admin/version/submit", this.version)
|
|
.then(rsp => {
|
|
let data = rsp.data.data;
|
|
return data
|
|
})
|
|
.then((data) => {
|
|
let list = [data, ...ths.versionList];
|
|
ths.versionList = list;
|
|
console.log(ths.versionList);
|
|
|
|
ths.clearVersion();
|
|
|
|
}).catch(err => {
|
|
|
|
})
|
|
},
|
|
clearVersion() {
|
|
this.version = {
|
|
version: null,
|
|
description: null,
|
|
milestone: '0'
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
mounted() {
|
|
this.list();
|
|
|
|
},
|
|
|
|
vuetify: new Vuetify(),
|
|
})
|
|
|
|
</script>
|
|
|
|
</html> |