123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
- <head>
- <th:block th:include="include :: header('编辑版本信息')" />
- </head>
- <body class="white-bg">
- <div class="wrapper wrapper-content animated fadeInRight ibox-content">
- <form class="form-horizontal m" id="form-dict-edit" th:object="${appVersion}">
- <input name="id" type="hidden" th:field="*{versionId}" />
- <div class="form-group">
- <label class="col-sm-2 control-label">系统:</label>
- <div class="col-sm-10">
- <select name="os" id="os" class="form-control m-b" th:with="type=${@dict.getType('os_type')}">
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{os}"></option>
- </select>
- </div>
- </div>
- <div class="form-group" >
- <label class="col-sm-2 control-label">平台:</label>
- <div class="col-sm-10">
- <input id="platform" name="platform" class="form-control" type="text" readonly='true' th:field="*{platform}"/>
- </div>
- </div>
- <div class="form-group" >
- <label class="col-sm-2 control-label">appid:</label>
- <div class="col-sm-10">
- <input id="appid" name="appid" class="form-control" type="text" th:field="*{appid}"/>
- </div>
- </div>
- <div class="form-group" >
- <label class="col-sm-2 control-label">版本:</label>
- <div class="col-sm-10">
- <input id="version" name="version" class="form-control" type="text" required th:field="*{version}"/>
- </div>
- </div>
- <div class="form-group" >
- <label class="col-sm-2 control-label">状态:</label>
- <div class="col-sm-10">
- <select name="status" id="status" class="form-control m-b" th:with="type=${@dict.getType('version_status')}">
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
- </select>
- </div>
- </div>
- <div class="form-group" >
- <label class="col-sm-2 control-label">版本描述:</label>
- <div class="col-sm-10">
- <textarea name="versionDesc" id="versionDesc" class="form-control" rows="3" placeholder="请输入描述" th:field="*{versionDesc}"></textarea>
- </div>
- </div>
- <div class="form-group select-time" >
- <label class="col-sm-2 control-label">发布时间:</label>
- <div class="col-sm-10">
- <input id="time" name="publishTime" class="form-control time-input" type="text" required th:field="*{displayPublishTime}"/>
- </div>
- </div>
- <div class="form-group" >
- <label class="col-sm-2 control-label">上传包:</label>
- <div class="col-sm-10">
- <input type="file" id="picUploadFile" name="uploadFile" accept="apk">
- <button class="btn btn-success" type="button" id="picUploadBtn">上传</button>
- <input type="hidden" id="downloadUrl" name="downloadUrl" class="form-control validate[required]" th:field="*{downloadUrl}"/>
- </div>
- </div>
- </form>
- </div>
- <th:block th:include="include :: footer" />
- <script type="text/javascript">
- var prefix = ctx + "system/version";
-
- $("#form-dict-edit").validate({
- focusCleanup: true
- });
-
- function submitHandler() {
- if ($.validate.form()) {
- $.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
- }
- }
- /**
- * 文件上传
- */
- $('#picUploadBtn').on('click',function () {
- if($('#picUploadFile').get(0).files[0]==undefined){
- $.modal.alertError("请选择要上传的文件!");
- return;
- }
- var formData = new FormData();
- formData.append("file", $('#picUploadFile').get(0).files[0]);
- $.ajax({
- url: ctx + "file/upload",
- data: formData,
- type: "post",
- processData: false,
- contentType: false,
- success: function(result) {
- $("input[name='downloadUrl']").val(result.data);
- }
- })
- });
- </script>
- </body>
- </html>
|