| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <!DOCTYPE html>
- <html>
- <head>
- <title>上传更新包</title>
- <link rel="stylesheet" type="text/css" href="/main/dev/updateWeb/plugin/layui/css/layui.css" />
- <link rel="stylesheet" type="text/css" charset="UTF-8" href="/main/dev/updateWeb/plugin/sui/css/sui.min.css" />
- <link rel="stylesheet" type="text/css" charset="UTF-8"
- href="/main/dev/updateWeb/plugin/sui/css/sui-append.min.css" />
- <script src="/main/dev/updateWeb/plugin/jq/jquery-3.0.0.min.js" type="text/javascript" charset="utf-8"></script>
- <script src="/main/dev/updateWeb/plugin/vue/vue.min.js" type="text/javascript" charset="utf-8"></script>
- <style>
- html,
- body {
- background-color: #fff;
- }
- .wraper {
- width: 100%;
- height: 100%;
- }
- /* 更新包管理-上传更新包 */
- .upload-pop {
- width: 400px;
- height: 220px;
- border: 1px dashed #c0c4cc;
- text-align: center;
- border-radius: 6px;
- position: relative;
- margin: 52px auto 8px;
- cursor: pointer;
- }
- .upload-pop>div {
- position: absolute;
- top: 60%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .upload-pop i {
- font-size: 80px;
- color: #c0c4cc;
- }
- .upload-pop:hover {
- color: #07C160;
- border-color: #07C160;
- }
- .upload-pop:hover i {
- color: #07C160;
- }
- .upload-desc {
- text-align: center;
- font-size: 12px;
- }
- .upload-val {
- text-align: center;
- margin: 15px 0;
- }
- .upload-val .upload-btn {
- margin-top: 50px;
- }
- .upload-success {
- text-align: center;
- }
- .upload-success i {
- font-size: 80px;
- color: #07C160;
- }
- .upload-success p {
- margin-top: 10px;
- }
- .upload-zipImg {
- width: 140px;
- margin: 0 auto;
- }
- .upload-zipImg img {
- width: 100%;
- }
- </style>
- </head>
- <body>
- <div class="wraper layui-anim layui-anim-fadein" id="space-content">
- <form id="myForm" method="POST" action="${uploadZipURL}" enctype="multipart/form-data">
- <div class="upload-pop" @click="selectFileClick" v-show="uZipVal.length<=0">
- <div>
- <i class="layui-icon layui-icon-upload-drag"></i>
- <p>点击选择更新包</p>
- <input type="file" id="u_zip" name="uzip" accept=".zip,aplication/zip" v-model="uZipVal" style="display: none;" />
- </div>
- </div>
- <div class="upload-zipImg" v-show="uZipVal.length>0">
- <img src="/main/dev/updateWeb/images/zip.png" alt="">
- </div>
- <div class="upload-val" v-show="uZipVal.length>0">
- {{uZipVal}}
- <p class="upload-btn">
- <button type="button" @click="uBtnClick" class="sui-btn btn-xlarge btn-primary">上传</button>
- </p>
- </div>
- <div class="upload-desc">
- 只能上传zip类型的文件,且大小不能超过2G
- </div>
- </form>
- </div>
- </body>
- <script type="text/javascript">
- var space = {
- appContent: "#space-content"
- };
- space.vue = new Vue({
- el: space.appContent,
- data: function () {
- return {
- uZipVal: '',
- }
- },
- methods: {
- selectFileClick: function () { //点击选择
- $("#u_zip").click();
- },
- uBtnClick: function () { //上传
- $("#myForm").submit();
- },
- }
- })
- </script>
- </html>
|