Commit b49e4389a63c0abbc30b75c01ee3c618a8b2f4a9
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
11 changed files
with
521 additions
and
0 deletions
src/main/java/com/huaheng/framework/config/HuaHengConfig.java
@@ -20,6 +20,8 @@ public class HuaHengConfig | @@ -20,6 +20,8 @@ public class HuaHengConfig | ||
20 | private String copyrightYear; | 20 | private String copyrightYear; |
21 | /** 上传路径 */ | 21 | /** 上传路径 */ |
22 | private static String profile; | 22 | private static String profile; |
23 | + /** 上传路径 */ | ||
24 | + private static String apkpath; | ||
23 | /** 获取地址开关 */ | 25 | /** 获取地址开关 */ |
24 | private static boolean addressEnabled; | 26 | private static boolean addressEnabled; |
25 | 27 | ||
@@ -63,6 +65,14 @@ public class HuaHengConfig | @@ -63,6 +65,14 @@ public class HuaHengConfig | ||
63 | HuaHengConfig.profile = profile; | 65 | HuaHengConfig.profile = profile; |
64 | } | 66 | } |
65 | 67 | ||
68 | + public static String getApkpath() { | ||
69 | + return apkpath; | ||
70 | + } | ||
71 | + | ||
72 | + public void setApkpath(String apkpath) { | ||
73 | + HuaHengConfig.apkpath = apkpath; | ||
74 | + } | ||
75 | + | ||
66 | public static boolean isAddressEnabled() | 76 | public static boolean isAddressEnabled() |
67 | { | 77 | { |
68 | return addressEnabled; | 78 | return addressEnabled; |
src/main/java/com/huaheng/pc/manager/apkinfo/controller/ApkinfoController.java
0 → 100644
1 | +package com.huaheng.pc.manager.apkinfo.controller; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
6 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
7 | +import com.huaheng.common.utils.file.FileUploadUtils; | ||
8 | +import com.huaheng.framework.config.HuaHengConfig; | ||
9 | +import com.huaheng.framework.web.page.PageDomain; | ||
10 | +import com.huaheng.framework.web.page.TableDataInfo; | ||
11 | +import com.huaheng.framework.web.page.TableSupport; | ||
12 | +import com.huaheng.common.utils.StringUtils; | ||
13 | +import com.huaheng.pc.system.user.domain.User; | ||
14 | +import io.swagger.annotations.ApiOperation; | ||
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
16 | +import org.springframework.beans.factory.annotation.Autowired; | ||
17 | +import org.springframework.stereotype.Controller; | ||
18 | +import org.springframework.ui.ModelMap; | ||
19 | +import org.springframework.web.bind.annotation.*; | ||
20 | +import com.huaheng.framework.aspectj.lang.annotation.Log; | ||
21 | +import com.huaheng.framework.aspectj.lang.constant.BusinessType; | ||
22 | +import com.huaheng.pc.manager.apkinfo.domain.Apkinfo; | ||
23 | +import com.huaheng.pc.manager.apkinfo.service.IApkinfoService; | ||
24 | +import com.huaheng.framework.web.controller.BaseController; | ||
25 | +import com.huaheng.framework.web.domain.AjaxResult; | ||
26 | +import com.huaheng.common.support.Convert; | ||
27 | +import org.springframework.web.multipart.MultipartFile; | ||
28 | + | ||
29 | +import javax.annotation.Resource; | ||
30 | +import java.util.Arrays; | ||
31 | +import java.util.Date; | ||
32 | +import java.util.List; | ||
33 | + | ||
34 | +/** | ||
35 | + * 【请填写功能名称】 信息操作处理 | ||
36 | + * | ||
37 | + * @author huaheng | ||
38 | + * @date 2020-07-23 | ||
39 | + */ | ||
40 | +@Controller | ||
41 | +@RequestMapping("/manager/apkinfo") | ||
42 | +public class ApkinfoController extends BaseController { | ||
43 | + private String prefix = "manager/apkinfo"; | ||
44 | + | ||
45 | + @Resource | ||
46 | + private IApkinfoService apkinfoService; | ||
47 | + | ||
48 | + @GetMapping() | ||
49 | + public String apkinfo() { | ||
50 | + return prefix + "/list"; | ||
51 | + } | ||
52 | + | ||
53 | + /** | ||
54 | + * 查询【请填写功能名称】列表 | ||
55 | + */ | ||
56 | + @PostMapping("/list") | ||
57 | + @ResponseBody | ||
58 | + public TableDataInfo list(Apkinfo apkinfo) { | ||
59 | + LambdaQueryWrapper<Apkinfo> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
60 | + lambdaQueryWrapper.like(StringUtils.isNotEmpty(apkinfo.getPkgName()), Apkinfo::getPkgName, apkinfo.getPkgName()) | ||
61 | + .eq(StringUtils.isNotNull(apkinfo.getVersionCode()), Apkinfo::getVersionCode, apkinfo.getVersionCode()) | ||
62 | + .like(StringUtils.isNotEmpty(apkinfo.getVersionName()), Apkinfo::getVersionName, apkinfo.getVersionName()) | ||
63 | + .eq(StringUtils.isNotEmpty(apkinfo.getUrl()), Apkinfo::getUrl, apkinfo.getUrl()) | ||
64 | + .eq(StringUtils.isNotEmpty(apkinfo.getMd5()), Apkinfo::getMd5, apkinfo.getMd5()) | ||
65 | + ; | ||
66 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
67 | + Integer pageNum = pageDomain.getPageNum(); | ||
68 | + Integer pageSize = pageDomain.getPageSize(); | ||
69 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | ||
70 | + /*使用分页查询*/ | ||
71 | + Page<Apkinfo> page = new Page<>(pageNum, pageSize); | ||
72 | + IPage<Apkinfo> iPage = apkinfoService.page(page, lambdaQueryWrapper); | ||
73 | + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | ||
74 | + } else { | ||
75 | + List<Apkinfo> list = apkinfoService.list(lambdaQueryWrapper); | ||
76 | + return getDataTable(list); | ||
77 | + } | ||
78 | + } | ||
79 | + | ||
80 | + /** | ||
81 | + * 新增【请填写功能名称】 | ||
82 | + */ | ||
83 | + @GetMapping("/add") | ||
84 | + public String add() { | ||
85 | + return prefix + "/add"; | ||
86 | + } | ||
87 | + /** | ||
88 | + * 新增保存入库单 | ||
89 | + */ | ||
90 | + @Log(title = "新增应用信息", action = BusinessType.INSERT) | ||
91 | + @PostMapping("/add") | ||
92 | + @ResponseBody | ||
93 | + public AjaxResult addSave(Apkinfo apkinfo) { | ||
94 | + return toAjax(apkinfoService.save(apkinfo)); | ||
95 | + } | ||
96 | + | ||
97 | + /** | ||
98 | + * 修改【请填写功能名称】 | ||
99 | + */ | ||
100 | + @GetMapping("/edit/{id}") | ||
101 | + public String edit(@PathVariable("id") Long id, ModelMap mmap) { | ||
102 | + Apkinfo apkinfo = apkinfoService.getById(id); | ||
103 | + mmap.put("apkinfo", apkinfo); | ||
104 | + return prefix + "/edit"; | ||
105 | + } | ||
106 | + | ||
107 | + | ||
108 | + @Log(title = "【请填写功能名称】", action = BusinessType.UPDATE) | ||
109 | + @PostMapping("/edit") | ||
110 | + @ResponseBody | ||
111 | + public AjaxResult editSave(Apkinfo apkinfo) { | ||
112 | + return toAjax(apkinfoService.updateById(apkinfo)); | ||
113 | + } | ||
114 | + | ||
115 | + @Log(title = "【请填写功能名称】", action = BusinessType.DELETE) | ||
116 | + @PostMapping( "/remove") | ||
117 | + @ResponseBody | ||
118 | + public AjaxResult remove(String ids) { | ||
119 | + if (StringUtils.isEmpty(ids)){ | ||
120 | + return AjaxResult.error("id不能为空"); | ||
121 | + } | ||
122 | + return toAjax(apkinfoService.removeByIds(Arrays.asList(Convert.toIntArray(ids)))); | ||
123 | + } | ||
124 | + | ||
125 | + | ||
126 | + @Log(title = "系统管理-用户管理", operating = "保存头像", action = BusinessType.UPDATE) | ||
127 | + @PostMapping("/updateApk") | ||
128 | + @ResponseBody | ||
129 | + public AjaxResult updateApk(@RequestParam("avatarfile") MultipartFile file) | ||
130 | + { | ||
131 | + try | ||
132 | + { | ||
133 | + if (!file.isEmpty()) | ||
134 | + { | ||
135 | + String apk = FileUploadUtils.upload(HuaHengConfig.getApkpath(), file, ""); | ||
136 | + } | ||
137 | + return success("上传成功"); | ||
138 | + } | ||
139 | + catch (Exception e) | ||
140 | + { | ||
141 | + return error(e.getMessage()); | ||
142 | + } | ||
143 | + } | ||
144 | +} |
src/main/java/com/huaheng/pc/manager/apkinfo/domain/Apkinfo.java
0 → 100644
1 | +package com.huaheng.pc.manager.apkinfo.domain; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
7 | +import lombok.Data; | ||
8 | +import org.apache.commons.lang3.builder.ToStringBuilder; | ||
9 | +import org.apache.commons.lang3.builder.ToStringStyle; | ||
10 | +import io.swagger.annotations.ApiModelProperty; | ||
11 | +import javax.validation.constraints.*; | ||
12 | +import java.io.Serializable; | ||
13 | +import java.math.BigDecimal; | ||
14 | +import java.util.Date; | ||
15 | + | ||
16 | +/** | ||
17 | + * 【请填写功能名称】表 apkinfo | ||
18 | + * | ||
19 | + * @author huaheng | ||
20 | + * @date 2020-07-23 | ||
21 | + */ | ||
22 | +@Data | ||
23 | +@TableName(value = "apkinfo") | ||
24 | +public class Apkinfo implements Serializable{ | ||
25 | + private static final long serialVersionUID = 1L; | ||
26 | + | ||
27 | + /** $column.columnComment */ | ||
28 | + @TableId(value = "id", type = IdType.AUTO) | ||
29 | + private Long id; | ||
30 | + /** $column.columnComment */ | ||
31 | + @TableField(value = "pkgName") | ||
32 | + private String pkgName; | ||
33 | + /** $column.columnComment */ | ||
34 | + @TableField(value = "versionCode") | ||
35 | + private Long versionCode; | ||
36 | + /** $column.columnComment */ | ||
37 | + @TableField(value = "versionName") | ||
38 | + private String versionName; | ||
39 | + /** $column.columnComment */ | ||
40 | + @TableField(value = "url") | ||
41 | + private String url; | ||
42 | + /** $column.columnComment */ | ||
43 | + @TableField(value = "md5") | ||
44 | + private String md5; | ||
45 | + | ||
46 | +} |
src/main/java/com/huaheng/pc/manager/apkinfo/mapper/ApkinfoMapper.java
0 → 100644
1 | +package com.huaheng.pc.manager.apkinfo.mapper; | ||
2 | + | ||
3 | +import com.huaheng.pc.manager.apkinfo.domain.Apkinfo; | ||
4 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * 【请填写功能名称】 数据层 | ||
9 | + * | ||
10 | + * @author huaheng | ||
11 | + * @date 2020-07-23 | ||
12 | + */ | ||
13 | +public interface ApkinfoMapper extends BaseMapper<Apkinfo> { | ||
14 | + | ||
15 | +} | ||
16 | + |
src/main/java/com/huaheng/pc/manager/apkinfo/service/IApkinfoService.java
0 → 100644
1 | +package com.huaheng.pc.manager.apkinfo.service; | ||
2 | + | ||
3 | +import com.huaheng.pc.manager.apkinfo.domain.Apkinfo; | ||
4 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * 【请填写功能名称】 服务层 | ||
9 | + * | ||
10 | + * @author huaheng | ||
11 | + * @date 2020-07-23 | ||
12 | + */ | ||
13 | +public interface IApkinfoService extends IService<Apkinfo> { | ||
14 | + | ||
15 | +} | ||
16 | + | ||
17 | + |
src/main/java/com/huaheng/pc/manager/apkinfo/service/impl/ApkinfoServiceImpl.java
0 → 100644
1 | +package com.huaheng.pc.manager.apkinfo.service.impl; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
4 | +import com.huaheng.pc.manager.apkinfo.service.IApkinfoService; | ||
5 | +import com.huaheng.pc.manager.apkinfo.domain.Apkinfo; | ||
6 | +import com.huaheng.pc.manager.apkinfo.mapper.ApkinfoMapper; | ||
7 | +import org.springframework.stereotype.Service; | ||
8 | + | ||
9 | + | ||
10 | +/** | ||
11 | + * 【请填写功能名称】 服务层实现 | ||
12 | + * | ||
13 | + * @author huaheng | ||
14 | + * @date 2020-07-23 | ||
15 | + */ | ||
16 | +@Service | ||
17 | +public class ApkinfoServiceImpl extends ServiceImpl<ApkinfoMapper, Apkinfo> implements IApkinfoService { | ||
18 | + | ||
19 | +} |
src/main/resources/application.yml
@@ -12,6 +12,8 @@ huaheng: | @@ -12,6 +12,8 @@ huaheng: | ||
12 | copyrightYear: 2020 | 12 | copyrightYear: 2020 |
13 | # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) | 13 | # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) |
14 | profile: D:/Huaheng/uploadPath/ | 14 | profile: D:/Huaheng/uploadPath/ |
15 | + # apk路径 | ||
16 | + apkpath: D:/download/ | ||
15 | # 获取ip地址开关 | 17 | # 获取ip地址开关 |
16 | addressEnabled: false | 18 | addressEnabled: false |
17 | 19 |
src/main/resources/mybatis/manager/apkinfo/ApkinfoMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | +<!DOCTYPE mapper | ||
3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
5 | +<mapper namespace="com.huaheng.pc.manager.apkinfo.mapper.ApkinfoMapper"> | ||
6 | + | ||
7 | + <resultMap type="com.huaheng.pc.manager.apkinfo.domain.Apkinfo" id="apkinfoResult"> | ||
8 | + <result property="id" column="id" /> | ||
9 | + <result property="pkgName" column="pkgName" /> | ||
10 | + <result property="versionCode" column="versionCode" /> | ||
11 | + <result property="versionName" column="versionName" /> | ||
12 | + <result property="url" column="url" /> | ||
13 | + <result property="md5" column="md5" /> | ||
14 | + </resultMap> | ||
15 | + <sql id="selectapkinfoVo"> | ||
16 | + select id, pkgName, versionCode, versionName, url, md5 from apkinfo | ||
17 | + </sql> | ||
18 | + | ||
19 | +</mapper> | ||
0 | \ No newline at end of file | 20 | \ No newline at end of file |
src/main/resources/templates/manager/apkinfo/add.html
0 → 100644
1 | +<!DOCTYPE HTML> | ||
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | ||
3 | +<meta charset="utf-8"> | ||
4 | +<head> | ||
5 | + <th:block th:include="include :: header"/> | ||
6 | + </head> | ||
7 | +<body class="white-bg"> | ||
8 | +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> | ||
9 | + <form class="form-horizontal m" id="form-apkinfo-add"> | ||
10 | + <div class="form-group"> | ||
11 | + <label class="col-sm-3 control-label">应用包名 | ||
12 | + :</label> | ||
13 | + <div class="col-sm-8"> | ||
14 | + <input name="pkgname" class="form-control" type="text"> | ||
15 | + </div> | ||
16 | + </div> | ||
17 | + <div class="form-group"> | ||
18 | + <label class="col-sm-3 control-label">应用版本号 | ||
19 | + :</label> | ||
20 | + <div class="col-sm-8"> | ||
21 | + <input name="versioncode" class="form-control" type="text"> | ||
22 | + </div> | ||
23 | + </div> | ||
24 | + <div class="form-group"> | ||
25 | + <label class="col-sm-3 control-label">应用版本名称 | ||
26 | + :</label> | ||
27 | + <div class="col-sm-8"> | ||
28 | + <input name="versionname" class="form-control" type="text"> | ||
29 | + </div> | ||
30 | + </div> | ||
31 | + <div class="form-group"> | ||
32 | + <label class="col-sm-3 control-label">下载链接 | ||
33 | + :</label> | ||
34 | + <div class="col-sm-8"> | ||
35 | + <input name="url" class="form-control" type="text"> | ||
36 | + </div> | ||
37 | + </div> | ||
38 | + <div class="form-group"> | ||
39 | + <label class="col-sm-3 control-label">MD5校验码 | ||
40 | + :</label> | ||
41 | + <div class="col-sm-8"> | ||
42 | + <input name="md5" class="form-control" type="text"> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + <div class="form-group"> | ||
46 | + <div class="form-control-static col-sm-offset-9"> | ||
47 | + <button type="submit" class="btn btn-primary">提交</button> | ||
48 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | ||
49 | + </div> | ||
50 | + </div> | ||
51 | + </form> | ||
52 | +</div> | ||
53 | +<th:block th:include="include :: footer"/> | ||
54 | +<script type="text/javascript"> | ||
55 | + var prefix = ctx + "manager/apkinfo" | ||
56 | + $("#form-apkinfo-add").validate({ | ||
57 | + rules:{ | ||
58 | + xxxx:{ | ||
59 | + required:true, | ||
60 | + }, | ||
61 | + }, | ||
62 | + submitHandler: function(form) { | ||
63 | + $.ajax({ | ||
64 | + cache : true, | ||
65 | + type : "POST", | ||
66 | + url : prefix + "/add", | ||
67 | + async : false, | ||
68 | + data : { | ||
69 | + "pkgName": $("input[name='pkgname']").val(), | ||
70 | + "versionCode": $("input[name='versioncode']").val(), | ||
71 | + "versionName": $("input[name='versionname']").val(), | ||
72 | + "url": $("input[name='url']").val(), | ||
73 | + "md5": $("input[name='md5']").val(), | ||
74 | + }, | ||
75 | + error : function(request) { | ||
76 | + $.modal.alertError("请求失败!"); | ||
77 | + }, | ||
78 | + success : function(data) { | ||
79 | + $.operate.saveSuccess(data); | ||
80 | + } | ||
81 | + }); | ||
82 | + } | ||
83 | + }); | ||
84 | +</script> | ||
85 | +</body> | ||
86 | +</html> |
src/main/resources/templates/manager/apkinfo/edit.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org" > | ||
3 | +<head> | ||
4 | + <th:block th:include="include :: header" /> | ||
5 | + </head> | ||
6 | +<body class="white-bg"> | ||
7 | +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> | ||
8 | + <form class="form-horizontal m" id="form-apkinfo-edit" th:object="${apkinfo}"> | ||
9 | + <input name="id" th:field="*{id}" type="hidden"> | ||
10 | + <div class="form-group"> | ||
11 | + <label class="col-sm-3 control-label">${comment}:</label> | ||
12 | + <div class="col-sm-8"> | ||
13 | + <input name="pkgname" th:field="*{pkgname}" class="form-control" type="text"> | ||
14 | + </div> | ||
15 | + </div> | ||
16 | + <div class="form-group"> | ||
17 | + <label class="col-sm-3 control-label">${comment}:</label> | ||
18 | + <div class="col-sm-8"> | ||
19 | + <input name="versioncode" th:field="*{versioncode}" class="form-control" type="text"> | ||
20 | + </div> | ||
21 | + </div> | ||
22 | + <div class="form-group"> | ||
23 | + <label class="col-sm-3 control-label">${comment}:</label> | ||
24 | + <div class="col-sm-8"> | ||
25 | + <input name="versionname" th:field="*{versionname}" class="form-control" type="text"> | ||
26 | + </div> | ||
27 | + </div> | ||
28 | + <div class="form-group"> | ||
29 | + <label class="col-sm-3 control-label">${comment}:</label> | ||
30 | + <div class="col-sm-8"> | ||
31 | + <input name="url" th:field="*{url}" class="form-control" type="text"> | ||
32 | + </div> | ||
33 | + </div> | ||
34 | + <div class="form-group"> | ||
35 | + <label class="col-sm-3 control-label">${comment}:</label> | ||
36 | + <div class="col-sm-8"> | ||
37 | + <input name="md5" th:field="*{md5}" class="form-control" type="text"> | ||
38 | + </div> | ||
39 | + </div> | ||
40 | + </form> | ||
41 | +</div> | ||
42 | +<th:block th:include="include :: footer" /> | ||
43 | + <script th:inline="javascript"> | ||
44 | + var prefix = ctx + "task/apkinfo"; | ||
45 | + $("#form-apkinfo-edit").validate({ | ||
46 | + focusCleanup: true | ||
47 | + }); | ||
48 | + | ||
49 | + function submitHandler() { | ||
50 | + if ($.validate.form()) { | ||
51 | + $.operate.save(prefix + "/edit", $('#form-apkinfo-edit').serialize()); | ||
52 | + } | ||
53 | + } | ||
54 | + </script> | ||
55 | +</body> | ||
56 | +</html> | ||
0 | \ No newline at end of file | 57 | \ No newline at end of file |
src/main/resources/templates/manager/apkinfo/list.html
0 → 100644
1 | +<!DOCTYPE HTML> | ||
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | ||
3 | +<meta charset="utf-8"> | ||
4 | +<head th:include="include :: header"></head> | ||
5 | +<body class="gray-bg"> | ||
6 | +<div class="container-div"> | ||
7 | + <div class="row"> | ||
8 | + <div class="col-sm-12 select-info"> | ||
9 | + <form id="formId"> | ||
10 | + <div class="select-list"> | ||
11 | + <ul> | ||
12 | + <li> | ||
13 | + <label>应用包名:</label> | ||
14 | + <input type="text" name="pkgname"/> | ||
15 | + </li> | ||
16 | + <li> | ||
17 | + <label>应用版本号:</label> | ||
18 | + <input type="text" name="versioncode"/> | ||
19 | + </li> | ||
20 | + <li> | ||
21 | + <label>应用版本名称:</label> | ||
22 | + <input type="text" name="versionname"/> | ||
23 | + </li> | ||
24 | + <li> | ||
25 | + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i | ||
26 | + class="fa fa-search"></i> 搜索</a> | ||
27 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i | ||
28 | + class="fa fa-refresh"></i> 重置</a> | ||
29 | + </li> | ||
30 | + </ul> | ||
31 | + </div> | ||
32 | + </form> | ||
33 | + </div> | ||
34 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | ||
35 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"> | ||
36 | + <i class="fa fa-plus"></i> 新增 | ||
37 | + </a> | ||
38 | + <a class="btn btn-outline btn-primary single disabled" onclick="$.operate.edit()"> | ||
39 | + <i class="fa fa-edit"></i> 修改 | ||
40 | + </a> | ||
41 | + <a class="btn btn-outline btn-danger btn-rounded multiple disabled" onclick="$.operate.batRemove()"> | ||
42 | + <i class="fa fa-trash-o"></i> 删除 | ||
43 | + </a> | ||
44 | + </div> | ||
45 | + | ||
46 | + <div class="col-sm-12 select-info table-striped"> | ||
47 | + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | ||
48 | + </div> | ||
49 | + </div> | ||
50 | + </div> | ||
51 | + <div th:include="include :: footer"></div> | ||
52 | + <script th:inline="javascript"> | ||
53 | + var prefix = ctx + "manager/apkinfo" | ||
54 | + | ||
55 | + $(function () { | ||
56 | + var options = { | ||
57 | + url: prefix + "/list", | ||
58 | + createUrl: prefix + "/add", | ||
59 | + updateUrl: prefix + "/edit/{id}", | ||
60 | + removeUrl: prefix + "/remove", | ||
61 | + modalName: "上传应用", | ||
62 | + columns: [{ | ||
63 | + checkbox: true | ||
64 | + }, | ||
65 | + { | ||
66 | + field: 'id', | ||
67 | + title: 'id', | ||
68 | + visible: false | ||
69 | + }, | ||
70 | + { | ||
71 | + field: 'pkgName', | ||
72 | + title: '应用包名' | ||
73 | + }, | ||
74 | + { | ||
75 | + field: 'versionCode', | ||
76 | + title: '应用版本号' | ||
77 | + }, | ||
78 | + { | ||
79 | + field: 'versionName', | ||
80 | + title: '应用版本名称' | ||
81 | + }, | ||
82 | + { | ||
83 | + field: 'url', | ||
84 | + title: '下载链接' | ||
85 | + }, | ||
86 | + { | ||
87 | + field: 'md5', | ||
88 | + title: 'md5校验码' | ||
89 | + }, | ||
90 | + { | ||
91 | + title: '操作', | ||
92 | + align: 'center', | ||
93 | + formatter: function (value, row, index) { | ||
94 | + var actions = []; | ||
95 | + actions.push('<a class="btn btn-success btn-xs ' + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | ||
96 | + actions.push('<a class="btn btn-danger btn-xs ' + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); | ||
97 | + return actions.join(''); | ||
98 | + } | ||
99 | + }] | ||
100 | + }; | ||
101 | + $.table.init(options); | ||
102 | + }); | ||
103 | + | ||
104 | +</script> | ||
105 | +</body> | ||
106 | +</html> | ||
0 | \ No newline at end of file | 107 | \ No newline at end of file |