Commit 5522d54ffc53a9460d338b1800188f616079aacb
Merge branch 'minhang' of http://192.168.168.201:8888/panzhaov5/bsth_control into minhang
Showing
118 changed files
with
3928 additions
and
1428 deletions
src/main/java/com/bsth/common/Constants.java
| @@ -36,4 +36,14 @@ public class Constants { | @@ -36,4 +36,14 @@ public class Constants { | ||
| 36 | 36 | ||
| 37 | public static final String SESSION_USERNAME = "sessionUserName"; | 37 | public static final String SESSION_USERNAME = "sessionUserName"; |
| 38 | public static final String COMPANY_AUTHORITYS = "cmyAuths"; | 38 | public static final String COMPANY_AUTHORITYS = "cmyAuths"; |
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 解除调度指令和班次的外键约束 | ||
| 42 | + */ | ||
| 43 | + public static final String REMOVE_DIRECTIVE_SCH_FK = "update bsth_v_directive_60 set sch=NULL where sch=?"; | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * 批量解除调度指令和班次的外键约束 | ||
| 47 | + */ | ||
| 48 | + public static final String MULTI_REMOVE_DIRECTIVE_SCH_FK = "update bsth_v_directive_60 set sch=NULL where sch in "; | ||
| 39 | } | 49 | } |
src/main/java/com/bsth/controller/BaseController.java
| 1 | package com.bsth.controller; | 1 | package com.bsth.controller; |
| 2 | 2 | ||
| 3 | -import com.bsth.common.ResponseCode; | ||
| 4 | import com.bsth.service.BaseService; | 3 | import com.bsth.service.BaseService; |
| 5 | -import com.bsth.service.schedule.utils.DataImportExportService; | ||
| 6 | import com.google.common.base.Splitter; | 4 | import com.google.common.base.Splitter; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.data.domain.Page; | 6 | import org.springframework.data.domain.Page; |
| 9 | import org.springframework.data.domain.PageRequest; | 7 | import org.springframework.data.domain.PageRequest; |
| 10 | import org.springframework.data.domain.Sort; | 8 | import org.springframework.data.domain.Sort; |
| 11 | import org.springframework.data.domain.Sort.Direction; | 9 | import org.springframework.data.domain.Sort.Direction; |
| 12 | -import org.springframework.util.CollectionUtils; | ||
| 13 | import org.springframework.web.bind.annotation.PathVariable; | 10 | import org.springframework.web.bind.annotation.PathVariable; |
| 14 | import org.springframework.web.bind.annotation.RequestMapping; | 11 | import org.springframework.web.bind.annotation.RequestMapping; |
| 15 | import org.springframework.web.bind.annotation.RequestMethod; | 12 | import org.springframework.web.bind.annotation.RequestMethod; |
| 16 | import org.springframework.web.bind.annotation.RequestParam; | 13 | import org.springframework.web.bind.annotation.RequestParam; |
| 17 | -import org.springframework.web.multipart.MultipartFile; | ||
| 18 | 14 | ||
| 19 | -import javax.servlet.http.HttpServletResponse; | ||
| 20 | -import java.io.*; | 15 | +import java.io.Serializable; |
| 21 | import java.util.ArrayList; | 16 | import java.util.ArrayList; |
| 22 | -import java.util.HashMap; | ||
| 23 | import java.util.List; | 17 | import java.util.List; |
| 24 | import java.util.Map; | 18 | import java.util.Map; |
| 25 | 19 | ||
| @@ -35,8 +29,6 @@ public class BaseController<T, ID extends Serializable> { | @@ -35,8 +29,6 @@ public class BaseController<T, ID extends Serializable> { | ||
| 35 | 29 | ||
| 36 | @Autowired | 30 | @Autowired |
| 37 | protected BaseService<T, ID> baseService; | 31 | protected BaseService<T, ID> baseService; |
| 38 | - @Autowired | ||
| 39 | - DataImportExportService dataImportExportService; | ||
| 40 | 32 | ||
| 41 | /** | 33 | /** |
| 42 | * @param @param map 查询条件 | 34 | * @param @param map 查询条件 |
| @@ -126,115 +118,4 @@ public class BaseController<T, ID extends Serializable> { | @@ -126,115 +118,4 @@ public class BaseController<T, ID extends Serializable> { | ||
| 126 | return baseService.delete(id); | 118 | return baseService.delete(id); |
| 127 | } | 119 | } |
| 128 | 120 | ||
| 129 | - /** | ||
| 130 | - * 上传数据文件,并使用ktr转换文件导入数据。 | ||
| 131 | - * | ||
| 132 | - * @param file | ||
| 133 | - * @return | ||
| 134 | - * @throws Exception | ||
| 135 | - */ | ||
| 136 | - @RequestMapping(value = "/dataImport", method = RequestMethod.POST) | ||
| 137 | - public Map<String, Object> uploadDataAndImport(MultipartFile file) throws Exception { | ||
| 138 | - Map<String, Object> resultMap = new HashMap<>(); | ||
| 139 | - | ||
| 140 | - try { | ||
| 141 | - // 获取ktr转换文件绝对路径 | ||
| 142 | - File ktrfile = new File(this.getClass().getResource(getDataImportKtrClasspath()).toURI()); | ||
| 143 | - System.out.println(ktrfile.getAbsolutePath()); | ||
| 144 | - // 导入数据 | ||
| 145 | - dataImportExportService.fileDataImport(file, ktrfile); | ||
| 146 | - | ||
| 147 | - resultMap.put("status", ResponseCode.SUCCESS); | ||
| 148 | - resultMap.put("msg", "导入成功"); | ||
| 149 | - } catch (Exception exp) { | ||
| 150 | - exp.printStackTrace(); | ||
| 151 | - resultMap.put("status", ResponseCode.ERROR); | ||
| 152 | - resultMap.put("msg", exp.getLocalizedMessage()); | ||
| 153 | - } | ||
| 154 | - | ||
| 155 | - return resultMap; | ||
| 156 | - } | ||
| 157 | - | ||
| 158 | - /** | ||
| 159 | - * 使用ktr导出数据。 | ||
| 160 | - * | ||
| 161 | - * @param response | ||
| 162 | - * @throws Exception | ||
| 163 | - */ | ||
| 164 | - @RequestMapping(value = "/dataExport", method = RequestMethod.GET) | ||
| 165 | - public void dataExport(HttpServletResponse response) throws Exception { | ||
| 166 | - dataExport(response, null); | ||
| 167 | - } | ||
| 168 | - | ||
| 169 | - @RequestMapping(value = "/dataExportExt", method = RequestMethod.GET) | ||
| 170 | - public void dataExport(HttpServletResponse response, @RequestParam Map<String, Object> param) throws Exception { | ||
| 171 | - // 1、使用ktr转换获取输出文件 | ||
| 172 | - File ktrfile = new File(this.getClass().getResource(getDataExportKtrClasspath()).toURI()); | ||
| 173 | - File outputfile = null; | ||
| 174 | - if (!CollectionUtils.isEmpty(param)) { | ||
| 175 | - outputfile = dataImportExportService.fileDataOutput( | ||
| 176 | - getDataExportFilename(), | ||
| 177 | - ktrfile, | ||
| 178 | - param); | ||
| 179 | - } else { | ||
| 180 | - outputfile = dataImportExportService.fileDataOutput( | ||
| 181 | - getDataExportFilename(), | ||
| 182 | - ktrfile); | ||
| 183 | - } | ||
| 184 | - | ||
| 185 | - System.out.println(outputfile.getName()); | ||
| 186 | - String filePath = outputfile.getAbsolutePath(); | ||
| 187 | - String fp[] = filePath.split(File.separator); | ||
| 188 | - String fileName = fp[fp.length - 1]; | ||
| 189 | - | ||
| 190 | - // TODO:使用ktr获取导出数据 | ||
| 191 | - | ||
| 192 | - response.setHeader("conent-type", "application/octet-stream"); | ||
| 193 | - response.setContentType("application/octet-stream"); | ||
| 194 | - response.setHeader("Content-Disposition", "attachment; filename=" + "东东"); | ||
| 195 | - | ||
| 196 | - OutputStream os = response.getOutputStream(); | ||
| 197 | - BufferedOutputStream bos = new BufferedOutputStream(os); | ||
| 198 | - | ||
| 199 | - InputStream is = null; | ||
| 200 | - | ||
| 201 | - is = new FileInputStream(filePath); | ||
| 202 | - BufferedInputStream bis = new BufferedInputStream(is); | ||
| 203 | - | ||
| 204 | - int length = 0; | ||
| 205 | - byte[] temp = new byte[1 * 1024 * 10]; | ||
| 206 | - | ||
| 207 | - while ((length = bis.read(temp)) != -1) { | ||
| 208 | - bos.write(temp, 0, length); | ||
| 209 | - } | ||
| 210 | - bos.flush(); | ||
| 211 | - bis.close(); | ||
| 212 | - bos.close(); | ||
| 213 | - is.close(); | ||
| 214 | - } | ||
| 215 | - | ||
| 216 | - /** | ||
| 217 | - * @return 数据导出的ktr转换文件类路径。 | ||
| 218 | - */ | ||
| 219 | - protected String getDataExportKtrClasspath() { | ||
| 220 | - // 默认返回异常,子类如果要使用导出功能,必须覆写此方法,指定ktr文件类路径 | ||
| 221 | - throw new RuntimeException("必须override,并指定ktr classpath"); | ||
| 222 | - } | ||
| 223 | - | ||
| 224 | - /** | ||
| 225 | - * @return 导出文件名。 | ||
| 226 | - */ | ||
| 227 | - protected String getDataExportFilename() { | ||
| 228 | - // 默认返回异常,子类如果要使用导出功能,必须覆写此方法,指定导出的文件路径名 | ||
| 229 | - throw new RuntimeException("必须override,并指定导出文件名"); | ||
| 230 | - } | ||
| 231 | - | ||
| 232 | - /** | ||
| 233 | - * @return 数据导入的ktr转换文件类路径。 | ||
| 234 | - */ | ||
| 235 | - protected String getDataImportKtrClasspath() { | ||
| 236 | - // 默认返回异常,子类如果要使用导入功能,必须覆写此方法,指定ktr文件类路径 | ||
| 237 | - throw new RuntimeException("必须override,并指定ktr classpath"); | ||
| 238 | - } | ||
| 239 | - | ||
| 240 | } | 121 | } |
src/main/java/com/bsth/controller/BaseController2.java deleted
100644 → 0
| 1 | -package com.bsth.controller; | ||
| 2 | - | ||
| 3 | - | ||
| 4 | -import com.bsth.common.ResponseCode; | ||
| 5 | -import com.bsth.service.BaseService; | ||
| 6 | -import com.bsth.service.schedule.utils.DataImportExportService; | ||
| 7 | -import com.google.common.base.Splitter; | ||
| 8 | -import jxl.Sheet; | ||
| 9 | -import jxl.Workbook; | ||
| 10 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | -import org.springframework.data.domain.Page; | ||
| 12 | -import org.springframework.data.domain.PageRequest; | ||
| 13 | -import org.springframework.data.domain.Sort; | ||
| 14 | -import org.springframework.util.CollectionUtils; | ||
| 15 | -import org.springframework.web.bind.annotation.*; | ||
| 16 | -import org.springframework.web.multipart.MultipartFile; | ||
| 17 | - | ||
| 18 | -import javax.servlet.http.HttpServletResponse; | ||
| 19 | -import java.io.*; | ||
| 20 | -import java.util.ArrayList; | ||
| 21 | -import java.util.HashMap; | ||
| 22 | -import java.util.List; | ||
| 23 | -import java.util.Map; | ||
| 24 | - | ||
| 25 | -/** | ||
| 26 | - * Created by xu on 16/11/3. | ||
| 27 | - */ | ||
| 28 | -public class BaseController2<T, ID extends Serializable> { | ||
| 29 | - | ||
| 30 | - @Autowired | ||
| 31 | - protected BaseService<T, ID> baseService; | ||
| 32 | - @Autowired | ||
| 33 | - DataImportExportService dataImportExportService; | ||
| 34 | - | ||
| 35 | - /** | ||
| 36 | - * | ||
| 37 | - * @Title: list | ||
| 38 | - * @Description: TODO(多条件分页查询) | ||
| 39 | - * @param @param map 查询条件 | ||
| 40 | - * @param @param page 页码 | ||
| 41 | - * @param @param size 每页显示数量 | ||
| 42 | - * @throws | ||
| 43 | - */ | ||
| 44 | - @RequestMapping(method = RequestMethod.GET) | ||
| 45 | - public Page<T> list(@RequestParam Map<String, Object> map, | ||
| 46 | - @RequestParam(defaultValue = "0") int page, | ||
| 47 | - @RequestParam(defaultValue = "10") int size, | ||
| 48 | - @RequestParam(defaultValue = "id") String order, | ||
| 49 | - @RequestParam(defaultValue = "DESC") String direction){ | ||
| 50 | - | ||
| 51 | - // 允许多个字段排序,order可以写单个字段,也可以写多个字段 | ||
| 52 | - // 多个字段格式:{col1},{col2},{col3},....,{coln} | ||
| 53 | - List<String> order_columns = Splitter.on(",").trimResults().splitToList(order); | ||
| 54 | - // 多字段排序:DESC,ASC... | ||
| 55 | - List<String> order_dirs = Splitter.on(",").trimResults().splitToList(direction); | ||
| 56 | - | ||
| 57 | - if (order_dirs.size() == 1) { // 所有字段采用一种排序 | ||
| 58 | - if (null != order_dirs.get(0) && order_dirs.get(0).equals("ASC")) { | ||
| 59 | - return baseService.list(map, new PageRequest(page, size, new Sort(Sort.Direction.ASC, order_columns))); | ||
| 60 | - } else { | ||
| 61 | - return baseService.list(map, new PageRequest(page, size, new Sort(Sort.Direction.DESC, order_columns))); | ||
| 62 | - } | ||
| 63 | - } else if (order_columns.size() == order_dirs.size()) { | ||
| 64 | - List<Sort.Order> orderList = new ArrayList<>(); | ||
| 65 | - for (int i = 0; i < order_columns.size(); i++) { | ||
| 66 | - if (null != order_dirs.get(i) && order_dirs.get(i).equals("ASC")) { | ||
| 67 | - orderList.add(new Sort.Order(Sort.Direction.ASC, order_columns.get(i))); | ||
| 68 | - } else { | ||
| 69 | - orderList.add(new Sort.Order(Sort.Direction.DESC, order_columns.get(i))); | ||
| 70 | - } | ||
| 71 | - } | ||
| 72 | - return baseService.list(map, new PageRequest(page, size, new Sort(orderList))); | ||
| 73 | - } else { | ||
| 74 | - throw new RuntimeException("多字段排序参数格式问题,排序顺序和字段数不一致"); | ||
| 75 | - } | ||
| 76 | - } | ||
| 77 | - | ||
| 78 | - /** | ||
| 79 | - * | ||
| 80 | - * @Title: list | ||
| 81 | - * @Description: TODO(多条件查询) | ||
| 82 | - * @param @param map | ||
| 83 | - * @throws | ||
| 84 | - */ | ||
| 85 | - @RequestMapping(value = "/all", method = RequestMethod.GET) | ||
| 86 | - public Iterable<T> list(@RequestParam Map<String, Object> map){ | ||
| 87 | - return baseService.list(map); | ||
| 88 | - } | ||
| 89 | - | ||
| 90 | - /** | ||
| 91 | - * 这里保存直接返回保存后的对象,不自己定义Map返回了,和前端angularjs配合。 | ||
| 92 | - * form也可以提交,但是页面参数可能不全, | ||
| 93 | - * json的化比较灵活,但是貌似有多余属性也会报错,或者碰到lazy属性值,也有问题 | ||
| 94 | - * 不论form,还是json提交都能解决问题,就看哪个方便哪个来 | ||
| 95 | - * | ||
| 96 | - * @param t 参数需要使用@RequestBody转换json成对象 | ||
| 97 | - * @return | ||
| 98 | - */ | ||
| 99 | - @RequestMapping(method = RequestMethod.POST) | ||
| 100 | - public T save(@RequestBody T t) { | ||
| 101 | - baseService.save(t); | ||
| 102 | - return t; | ||
| 103 | - } | ||
| 104 | - | ||
| 105 | - @RequestMapping(value="/{id}", method = RequestMethod.POST) | ||
| 106 | - public T update(@RequestBody T t) { | ||
| 107 | - baseService.save(t); | ||
| 108 | - return t; | ||
| 109 | - } | ||
| 110 | - | ||
| 111 | - /** | ||
| 112 | - * | ||
| 113 | - * @Title: findById | ||
| 114 | - * @Description: TODO(根据主键获取单个对象) | ||
| 115 | - * @param @param id | ||
| 116 | - * @throws | ||
| 117 | - */ | ||
| 118 | - @RequestMapping(value="/{id}",method = RequestMethod.GET) | ||
| 119 | - public T findById(@PathVariable("id") ID id){ | ||
| 120 | - return baseService.findById(id); | ||
| 121 | - } | ||
| 122 | - | ||
| 123 | - /** | ||
| 124 | - * | ||
| 125 | - * @Title: delete | ||
| 126 | - * @Description: TODO(根据主键删除对象) | ||
| 127 | - * @param @param id | ||
| 128 | - * @throws | ||
| 129 | - */ | ||
| 130 | - @RequestMapping(value="/{id}",method = RequestMethod.DELETE) | ||
| 131 | - public Map<String, Object> delete(@PathVariable("id") ID id){ | ||
| 132 | - return baseService.delete(id); | ||
| 133 | - } | ||
| 134 | - | ||
| 135 | - /** | ||
| 136 | - * 上传数据文件,并使用ktr转换文件导入数据。 | ||
| 137 | - * @param file | ||
| 138 | - * @return | ||
| 139 | - * @throws Exception | ||
| 140 | - */ | ||
| 141 | - @RequestMapping(value = "/dataImport", method = RequestMethod.POST) | ||
| 142 | - public Map<String, Object> uploadDataAndImport(MultipartFile file) throws Exception { | ||
| 143 | - Map<String, Object> resultMap = new HashMap<>(); | ||
| 144 | - | ||
| 145 | - try { | ||
| 146 | - // 获取ktr转换文件绝对路径 | ||
| 147 | - File ktrfile = new File(this.getClass().getResource(getDataImportKtrClasspath()).toURI()); | ||
| 148 | - System.out.println(ktrfile.getAbsolutePath()); | ||
| 149 | - // 导入数据 | ||
| 150 | - dataImportExportService.fileDataImport(file, ktrfile); | ||
| 151 | - | ||
| 152 | - resultMap.put("status", ResponseCode.SUCCESS); | ||
| 153 | - resultMap.put("msg", "导入成功"); | ||
| 154 | - } catch (Exception exp) { | ||
| 155 | - exp.printStackTrace(); | ||
| 156 | - resultMap.put("status", ResponseCode.ERROR); | ||
| 157 | - resultMap.put("msg", exp.getLocalizedMessage()); | ||
| 158 | - } | ||
| 159 | - | ||
| 160 | - return resultMap; | ||
| 161 | - } | ||
| 162 | - | ||
| 163 | - /** | ||
| 164 | - * 使用ktr导出数据。 | ||
| 165 | - * @param response | ||
| 166 | - * @throws Exception | ||
| 167 | - */ | ||
| 168 | - @RequestMapping(value = "/dataExport", method = RequestMethod.GET) | ||
| 169 | - public void dataExport(HttpServletResponse response) throws Exception { | ||
| 170 | - dataExport(response, null); | ||
| 171 | - } | ||
| 172 | - | ||
| 173 | - @RequestMapping(value = "/dataExportExt", method = RequestMethod.GET) | ||
| 174 | - public void dataExport(HttpServletResponse response, @RequestParam Map<String, Object> param) throws Exception { | ||
| 175 | - // 1、使用ktr转换获取输出文件 | ||
| 176 | - File ktrfile = new File(this.getClass().getResource(getDataExportKtrClasspath()).toURI()); | ||
| 177 | - File outputfile = null; | ||
| 178 | - if (!CollectionUtils.isEmpty(param)) { | ||
| 179 | - outputfile = dataImportExportService.fileDataOutput( | ||
| 180 | - getDataExportFilename(), | ||
| 181 | - ktrfile, | ||
| 182 | - param); | ||
| 183 | - } else { | ||
| 184 | - outputfile = dataImportExportService.fileDataOutput( | ||
| 185 | - getDataExportFilename(), | ||
| 186 | - ktrfile); | ||
| 187 | - } | ||
| 188 | - | ||
| 189 | - System.out.println(outputfile.getName()); | ||
| 190 | - System.out.println(outputfile.getAbsolutePath()); | ||
| 191 | - | ||
| 192 | - String filePath = outputfile.getAbsolutePath(); | ||
| 193 | -// String fp[] = filePath.split(File.separator); | ||
| 194 | -// String fileName = fp[fp.length - 1]; | ||
| 195 | - | ||
| 196 | - // TODO:使用ktr获取导出数据 | ||
| 197 | - | ||
| 198 | - response.setHeader("conent-type", "application/octet-stream"); | ||
| 199 | - response.setContentType("application/octet-stream"); | ||
| 200 | - response.setHeader("Content-Disposition", "attachment; filename=" + "东东"); | ||
| 201 | - | ||
| 202 | - OutputStream os = response.getOutputStream(); | ||
| 203 | - BufferedOutputStream bos = new BufferedOutputStream(os); | ||
| 204 | - | ||
| 205 | - InputStream is = null; | ||
| 206 | - | ||
| 207 | - is = new FileInputStream(filePath); | ||
| 208 | - BufferedInputStream bis = new BufferedInputStream(is); | ||
| 209 | - | ||
| 210 | - int length = 0; | ||
| 211 | - byte[] temp = new byte[1 * 1024 * 10]; | ||
| 212 | - | ||
| 213 | - while ((length = bis.read(temp)) != -1) { | ||
| 214 | - bos.write(temp, 0, length); | ||
| 215 | - } | ||
| 216 | - bos.flush(); | ||
| 217 | - bis.close(); | ||
| 218 | - bos.close(); | ||
| 219 | - is.close(); | ||
| 220 | - } | ||
| 221 | - | ||
| 222 | - /** | ||
| 223 | - * @return 数据导出的ktr转换文件类路径。 | ||
| 224 | - */ | ||
| 225 | - protected String getDataExportKtrClasspath() { | ||
| 226 | - // 默认返回异常,子类如果要使用导出功能,必须覆写此方法,指定ktr文件类路径 | ||
| 227 | - throw new RuntimeException("必须override,并指定ktr classpath"); | ||
| 228 | - } | ||
| 229 | - | ||
| 230 | - /** | ||
| 231 | - * @return 导出文件名。 | ||
| 232 | - */ | ||
| 233 | - protected String getDataExportFilename() { | ||
| 234 | - // 默认返回异常,子类如果要使用导出功能,必须覆写此方法,指定导出的文件路径名 | ||
| 235 | - throw new RuntimeException("必须override,并指定导出文件名"); | ||
| 236 | - } | ||
| 237 | - | ||
| 238 | - /** | ||
| 239 | - * @return 数据导入的ktr转换文件类路径。 | ||
| 240 | - */ | ||
| 241 | - protected String getDataImportKtrClasspath() { | ||
| 242 | - // 默认返回异常,子类如果要使用导入功能,必须覆写此方法,指定ktr文件类路径 | ||
| 243 | - throw new RuntimeException("必须override,并指定ktr classpath"); | ||
| 244 | - } | ||
| 245 | - | ||
| 246 | - | ||
| 247 | - public static class ExcelFileOutput { | ||
| 248 | - private String fileName; | ||
| 249 | - private List<Map<String, Object>> sheetnames = new ArrayList<>(); | ||
| 250 | - | ||
| 251 | - public String getFileName() { | ||
| 252 | - return fileName; | ||
| 253 | - } | ||
| 254 | - | ||
| 255 | - public void setFileName(String fileName) { | ||
| 256 | - this.fileName = fileName; | ||
| 257 | - } | ||
| 258 | - | ||
| 259 | - public List<Map<String, Object>> getSheetnames() { | ||
| 260 | - return sheetnames; | ||
| 261 | - } | ||
| 262 | - | ||
| 263 | - public void setSheetnames(List<Map<String, Object>> sheetnames) { | ||
| 264 | - this.sheetnames = sheetnames; | ||
| 265 | - } | ||
| 266 | - } | ||
| 267 | - | ||
| 268 | - /** | ||
| 269 | - * 上传Excel文件,返回文件全路径名,工作区名称列表。 | ||
| 270 | - * @param file | ||
| 271 | - * @return | ||
| 272 | - * @throws Exception | ||
| 273 | - */ | ||
| 274 | - @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) | ||
| 275 | - public ExcelFileOutput fileUpload(MultipartFile file) throws Exception { | ||
| 276 | - // 返回对象 | ||
| 277 | - ExcelFileOutput rs = new ExcelFileOutput(); | ||
| 278 | - | ||
| 279 | - // 上传文件 | ||
| 280 | - File file1 = dataImportExportService.uploadFile(file); | ||
| 281 | - // 获取文件的sheet | ||
| 282 | - Workbook book = Workbook.getWorkbook(file1); | ||
| 283 | - for (Sheet sheet : book.getSheets()) { | ||
| 284 | - String sheetname = sheet.getName(); | ||
| 285 | - Map<String, Object> s = new HashMap<>(); | ||
| 286 | - s.put("name", sheetname); | ||
| 287 | - rs.getSheetnames().add(s); | ||
| 288 | - } | ||
| 289 | - | ||
| 290 | - rs.setFileName(file1.getAbsolutePath()); | ||
| 291 | - return rs; | ||
| 292 | - } | ||
| 293 | - | ||
| 294 | -} |
src/main/java/com/bsth/controller/CarsController.java
| 1 | package com.bsth.controller; | 1 | package com.bsth.controller; |
| 2 | 2 | ||
| 3 | -import com.bsth.common.ResponseCode; | ||
| 4 | import com.bsth.entity.Cars; | 3 | import com.bsth.entity.Cars; |
| 5 | -import com.bsth.service.schedule.utils.DataImportExportService; | ||
| 6 | -import com.bsth.service.schedule.utils.DataToolsProperties; | ||
| 7 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | -import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||
| 9 | import org.springframework.web.bind.annotation.RequestMapping; | 4 | import org.springframework.web.bind.annotation.RequestMapping; |
| 10 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 11 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 12 | import org.springframework.web.bind.annotation.RestController; | 5 | import org.springframework.web.bind.annotation.RestController; |
| 13 | 6 | ||
| 14 | -import java.io.File; | ||
| 15 | -import java.util.HashMap; | ||
| 16 | -import java.util.Map; | ||
| 17 | - | ||
| 18 | /** | 7 | /** |
| 19 | * Created by xu on 16/5/31. | 8 | * Created by xu on 16/5/31. |
| 20 | */ | 9 | */ |
| 21 | @RestController | 10 | @RestController |
| 22 | @RequestMapping("cars") | 11 | @RequestMapping("cars") |
| 23 | -@EnableConfigurationProperties(DataToolsProperties.class) | ||
| 24 | -public class CarsController extends BaseController2<Cars, Integer> { | ||
| 25 | - | ||
| 26 | - @Autowired | ||
| 27 | - private DataToolsProperties dataToolsProperties; | ||
| 28 | - @Autowired | ||
| 29 | - private DataImportExportService dataImportExportService; | ||
| 30 | - | ||
| 31 | - /** | ||
| 32 | - * 验证。 | ||
| 33 | - * @param map | ||
| 34 | - * @return | ||
| 35 | - */ | ||
| 36 | - @RequestMapping(value = "/validate/equale", method = RequestMethod.GET) | ||
| 37 | - public Map<String, Object> validateData(@RequestParam Map<String, Object> map) { | ||
| 38 | - // 一般比较自编号是否重复 | ||
| 39 | - return baseService.validateEquale(map); | ||
| 40 | - } | ||
| 41 | - | ||
| 42 | - // uploadFile post | ||
| 43 | - | ||
| 44 | - // 验证excel sheet | ||
| 45 | - @RequestMapping(value = "/validate/sheet", method = RequestMethod.GET) | ||
| 46 | - public Map<String, Object> validateSheet() throws Exception { | ||
| 47 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 48 | - | ||
| 49 | - // TODO: | ||
| 50 | - | ||
| 51 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 52 | - return rtn; | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - @RequestMapping(value = "/importfile", method = RequestMethod.POST) | ||
| 56 | - public Map<String, Object> importData( | ||
| 57 | - @RequestParam Map<String, Object> form) | ||
| 58 | - throws Exception { | ||
| 59 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 60 | - | ||
| 61 | - // TODO: | ||
| 62 | - String filename = (String) form.get("filename"); | ||
| 63 | - | ||
| 64 | - | ||
| 65 | - try { | ||
| 66 | - // 获取ktr转换文件绝对路径 | ||
| 67 | - File ktrfile = new File(this.getClass().getResource(getDataImportKtrClasspath()).toURI()); | ||
| 68 | - System.out.println(ktrfile.getAbsolutePath()); | ||
| 69 | - // 导入数据 | ||
| 70 | - dataImportExportService.fileDataImport(new File(filename), ktrfile); | ||
| 71 | - | ||
| 72 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 73 | - rtn.put("msg", "导入成功"); | ||
| 74 | - } catch (Exception exp) { | ||
| 75 | - exp.printStackTrace(); | ||
| 76 | - rtn.put("status", ResponseCode.ERROR); | ||
| 77 | - rtn.put("msg", exp.getLocalizedMessage()); | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | - return rtn; | ||
| 81 | - } | ||
| 82 | - | ||
| 83 | - | ||
| 84 | - @Override | ||
| 85 | - protected String getDataImportKtrClasspath() { | ||
| 86 | - return dataToolsProperties.getCarsDatainputktr(); | ||
| 87 | - } | ||
| 88 | - | ||
| 89 | - @Override | ||
| 90 | - protected String getDataExportKtrClasspath() { | ||
| 91 | - return dataToolsProperties.getCarsDataoutputktr(); | ||
| 92 | - } | 12 | +public class CarsController extends BaseController<Cars, Integer> { |
| 93 | 13 | ||
| 94 | - @Override | ||
| 95 | - protected String getDataExportFilename() { | ||
| 96 | - return "车辆基础数据"; | ||
| 97 | - } | ||
| 98 | } | 14 | } |
src/main/java/com/bsth/controller/PersonnelController.java
| @@ -2,10 +2,11 @@ package com.bsth.controller; | @@ -2,10 +2,11 @@ package com.bsth.controller; | ||
| 2 | 2 | ||
| 3 | import com.bsth.entity.Personnel; | 3 | import com.bsth.entity.Personnel; |
| 4 | import com.bsth.service.PersonnelService; | 4 | import com.bsth.service.PersonnelService; |
| 5 | -import com.bsth.service.schedule.utils.DataToolsProperties; | ||
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | -import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||
| 8 | -import org.springframework.web.bind.annotation.*; | 6 | +import org.springframework.web.bind.annotation.RequestMapping; |
| 7 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 8 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 9 | +import org.springframework.web.bind.annotation.RestController; | ||
| 9 | 10 | ||
| 10 | import java.util.List; | 11 | import java.util.List; |
| 11 | import java.util.Map; | 12 | import java.util.Map; |
| @@ -15,54 +16,11 @@ import java.util.Map; | @@ -15,54 +16,11 @@ import java.util.Map; | ||
| 15 | */ | 16 | */ |
| 16 | @RestController | 17 | @RestController |
| 17 | @RequestMapping("personnel") | 18 | @RequestMapping("personnel") |
| 18 | -@EnableConfigurationProperties(DataToolsProperties.class) | ||
| 19 | public class PersonnelController extends BaseController<Personnel, Integer> { | 19 | public class PersonnelController extends BaseController<Personnel, Integer> { |
| 20 | 20 | ||
| 21 | @Autowired | 21 | @Autowired |
| 22 | - private DataToolsProperties dataToolsProperties; | ||
| 23 | - | ||
| 24 | - @Autowired | ||
| 25 | private PersonnelService service; | 22 | private PersonnelService service; |
| 26 | - /** | ||
| 27 | - * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody | ||
| 28 | - * @Title: save | ||
| 29 | - * @Description: TODO(持久化对象) | ||
| 30 | - * @param @param t | ||
| 31 | - * @param @return 设定文件 | ||
| 32 | - * @return Map<String,Object> {status: 1(成功),-1(失败)} | ||
| 33 | - * @throws | ||
| 34 | - */ | ||
| 35 | - @RequestMapping(method = RequestMethod.POST) | ||
| 36 | - public Map<String, Object> save(@RequestBody Personnel t){ | ||
| 37 | - return baseService.save(t); | ||
| 38 | - } | ||
| 39 | - | ||
| 40 | - /** | ||
| 41 | - * 验证。 | ||
| 42 | - * @param map | ||
| 43 | - * @return | ||
| 44 | - */ | ||
| 45 | - @RequestMapping(value = "/validate/equale", method = RequestMethod.GET) | ||
| 46 | - public Map<String, Object> validateData(@RequestParam Map<String, Object> map) { | ||
| 47 | - // 一般比较相同公司下工号是否相同 | ||
| 48 | - return baseService.validateEquale(map); | ||
| 49 | - } | ||
| 50 | - | ||
| 51 | - @Override | ||
| 52 | - protected String getDataImportKtrClasspath() { | ||
| 53 | - return dataToolsProperties.getEmployeesDatainputktr(); | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - @Override | ||
| 57 | - protected String getDataExportKtrClasspath() { | ||
| 58 | - return dataToolsProperties.getEmployeesDataoutputktr(); | ||
| 59 | - } | ||
| 60 | 23 | ||
| 61 | - @Override | ||
| 62 | - protected String getDataExportFilename() { | ||
| 63 | - return "人员基础信息"; | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | @RequestMapping(value = "/sreachPersonnel", method = RequestMethod.GET) | 24 | @RequestMapping(value = "/sreachPersonnel", method = RequestMethod.GET) |
| 67 | public List<Map<String, String>> sreachPersonnel(@RequestParam String jobCode) { | 25 | public List<Map<String, String>> sreachPersonnel(@RequestParam String jobCode) { |
| 68 | return service.sreachPersonnel(jobCode); | 26 | return service.sreachPersonnel(jobCode); |
src/main/java/com/bsth/controller/realcontrol/DataManagerController.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol; | ||
| 2 | + | ||
| 3 | +import com.bsth.service.realcontrol.DataManagerService; | ||
| 4 | +import org.apache.commons.lang3.StringEscapeUtils; | ||
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 6 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 7 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 8 | +import org.springframework.web.bind.annotation.RestController; | ||
| 9 | + | ||
| 10 | +import java.util.Map; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 数据管理,包括从老系统的数据迁移。新系统的数据校验等 | ||
| 14 | + * Created by panzhao on 2017/4/17. | ||
| 15 | + */ | ||
| 16 | +@RestController | ||
| 17 | +@RequestMapping("dataManager") | ||
| 18 | +public class DataManagerController { | ||
| 19 | + | ||
| 20 | + @Autowired | ||
| 21 | + DataManagerService dataManagerService; | ||
| 22 | + | ||
| 23 | + @RequestMapping("cars/old_now") | ||
| 24 | + public Map<String, Object> carInfos(@RequestParam Integer lineId){ | ||
| 25 | + return dataManagerService.carInfos(lineId); | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + @RequestMapping("car/updateDevices") | ||
| 29 | + public Map<String, Object> updateDevices(@RequestParam String jsonStr){ | ||
| 30 | + jsonStr = StringEscapeUtils.unescapeHtml4(jsonStr); | ||
| 31 | + return dataManagerService.updateDevices(jsonStr); | ||
| 32 | + } | ||
| 33 | +} |
src/main/java/com/bsth/controller/realcontrol/anomalyCheckController.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol; | ||
| 2 | + | ||
| 3 | +import com.bsth.data.schedule.DayOfSchedule; | ||
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 5 | +import org.slf4j.Logger; | ||
| 6 | +import org.slf4j.LoggerFactory; | ||
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 11 | +import org.springframework.web.bind.annotation.RestController; | ||
| 12 | + | ||
| 13 | +import java.util.HashSet; | ||
| 14 | +import java.util.List; | ||
| 15 | +import java.util.Set; | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * 相关数据异常检测 | ||
| 19 | + * Created by panzhao on 2017/4/14. | ||
| 20 | + */ | ||
| 21 | +@RestController | ||
| 22 | +@RequestMapping("anomalyCheck") | ||
| 23 | +public class anomalyCheckController { | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 27 | + | ||
| 28 | + @Autowired | ||
| 29 | + DayOfSchedule dayOfSchedule; | ||
| 30 | + /** | ||
| 31 | + * 出现重复班次的车辆 | ||
| 32 | + * @param nbbm | ||
| 33 | + */ | ||
| 34 | + @RequestMapping(value = "/schRepeat", method = RequestMethod.POST) | ||
| 35 | + public void schRepeat(@RequestParam String nbbm){ | ||
| 36 | + logger.info("前端通知,车辆 " + nbbm + "出现重复班次,开始检测..."); | ||
| 37 | + List<ScheduleRealInfo> list = dayOfSchedule.findByNbbm(nbbm); | ||
| 38 | + | ||
| 39 | + Set<ScheduleRealInfo> set = new HashSet<>(); | ||
| 40 | + for(ScheduleRealInfo sch : list){ | ||
| 41 | + if(!set.add(sch)){ | ||
| 42 | + logger.info("出现一次重复班次,班次ID:" + sch.getId()); | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + if(set.size() > 0){ | ||
| 47 | + dayOfSchedule.replaceByNbbm(nbbm, set); | ||
| 48 | + } | ||
| 49 | + } | ||
| 50 | +} |
src/main/java/com/bsth/controller/sys/UserController.java
| @@ -237,4 +237,9 @@ public class UserController extends BaseController<SysUser, Integer> { | @@ -237,4 +237,9 @@ public class UserController extends BaseController<SysUser, Integer> { | ||
| 237 | } | 237 | } |
| 238 | return msg; | 238 | return msg; |
| 239 | } | 239 | } |
| 240 | + | ||
| 241 | + @RequestMapping(value = "/register" ,method = RequestMethod.POST) | ||
| 242 | + public Map<String, Object> register(SysUser u){ | ||
| 243 | + return sysUserService.register(u); | ||
| 244 | + } | ||
| 240 | } | 245 | } |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| @@ -3,12 +3,14 @@ package com.bsth.data.schedule; | @@ -3,12 +3,14 @@ package com.bsth.data.schedule; | ||
| 3 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 4 | import com.alibaba.fastjson.JSONArray; | 4 | import com.alibaba.fastjson.JSONArray; |
| 5 | import com.bsth.Application; | 5 | import com.bsth.Application; |
| 6 | +import com.bsth.common.Constants; | ||
| 6 | import com.bsth.common.ResponseCode; | 7 | import com.bsth.common.ResponseCode; |
| 7 | import com.bsth.data.BasicData; | 8 | import com.bsth.data.BasicData; |
| 8 | import com.bsth.data.LineConfigData; | 9 | import com.bsth.data.LineConfigData; |
| 9 | import com.bsth.data.directive.DirectivesPstThread; | 10 | import com.bsth.data.directive.DirectivesPstThread; |
| 10 | import com.bsth.data.gpsdata.GpsRealData; | 11 | import com.bsth.data.gpsdata.GpsRealData; |
| 11 | import com.bsth.data.gpsdata.recovery.GpsDataRecovery; | 12 | import com.bsth.data.gpsdata.recovery.GpsDataRecovery; |
| 13 | +import com.bsth.data.schedule.late_adjust.ScheduleLateThread; | ||
| 12 | import com.bsth.data.schedule.thread.*; | 14 | import com.bsth.data.schedule.thread.*; |
| 13 | import com.bsth.entity.realcontrol.LineConfig; | 15 | import com.bsth.entity.realcontrol.LineConfig; |
| 14 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 16 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| @@ -27,6 +29,8 @@ import org.slf4j.LoggerFactory; | @@ -27,6 +29,8 @@ import org.slf4j.LoggerFactory; | ||
| 27 | import org.springframework.beans.factory.annotation.Autowired; | 29 | import org.springframework.beans.factory.annotation.Autowired; |
| 28 | import org.springframework.boot.CommandLineRunner; | 30 | import org.springframework.boot.CommandLineRunner; |
| 29 | import org.springframework.core.annotation.Order; | 31 | import org.springframework.core.annotation.Order; |
| 32 | +import org.springframework.dao.DataIntegrityViolationException; | ||
| 33 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 30 | import org.springframework.stereotype.Component; | 34 | import org.springframework.stereotype.Component; |
| 31 | 35 | ||
| 32 | import java.text.ParseException; | 36 | import java.text.ParseException; |
| @@ -383,6 +387,11 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -383,6 +387,11 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 383 | sch.setLate(false); | 387 | sch.setLate(false); |
| 384 | } | 388 | } |
| 385 | 389 | ||
| 390 | + //售票员为空设置为""字符串 | ||
| 391 | + if(StringUtils.isEmpty(sch.getsGh())){ | ||
| 392 | + sch.setsGh(""); | ||
| 393 | + sch.setsName(""); | ||
| 394 | + } | ||
| 386 | sch.setJhlcOrig(sch.getJhlc()); | 395 | sch.setJhlcOrig(sch.getJhlc()); |
| 387 | //保留备注 | 396 | //保留备注 |
| 388 | if(StringUtils.isNotEmpty(sch.getRemark())) | 397 | if(StringUtils.isNotEmpty(sch.getRemark())) |
| @@ -855,6 +864,9 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -855,6 +864,9 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 855 | return false; | 864 | return false; |
| 856 | } | 865 | } |
| 857 | 866 | ||
| 867 | + | ||
| 868 | + @Autowired | ||
| 869 | + JdbcTemplate jdbcTemplate; | ||
| 858 | /** | 870 | /** |
| 859 | * 删除实际排班 | 871 | * 删除实际排班 |
| 860 | * @param lineCode | 872 | * @param lineCode |
| @@ -866,20 +878,33 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -866,20 +878,33 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 866 | try { | 878 | try { |
| 867 | String rq = currSchDateMap.get(lineCode); | 879 | String rq = currSchDateMap.get(lineCode); |
| 868 | if(StringUtils.isNotEmpty(rq)){ | 880 | if(StringUtils.isNotEmpty(rq)){ |
| 881 | + List<ScheduleRealInfo> all = findByLineCode(lineCode); | ||
| 869 | //解除gps 和班次之间的关联 | 882 | //解除gps 和班次之间的关联 |
| 870 | - List<ScheduleRealInfo> unions = calcUnion(findByLineCode(lineCode), carExecutePlanMap.values()); | 883 | + List<ScheduleRealInfo> unions = calcUnion(all, carExecutePlanMap.values()); |
| 871 | for(ScheduleRealInfo sch : unions){ | 884 | for(ScheduleRealInfo sch : unions){ |
| 872 | removeExecPlan(sch.getClZbh()); | 885 | removeExecPlan(sch.getClZbh()); |
| 873 | } | 886 | } |
| 887 | + //解除调度指令和班次的外键约束 | ||
| 888 | + StringBuilder inStr = new StringBuilder("("); | ||
| 889 | + for(ScheduleRealInfo sch : all){ | ||
| 890 | + inStr.append(sch.getId() + ","); | ||
| 891 | + } | ||
| 892 | + inStr.deleteCharAt(inStr.length() - 1).append(")"); | ||
| 893 | + jdbcTemplate.update(Constants.MULTI_REMOVE_DIRECTIVE_SCH_FK + " " + inStr.toString()); | ||
| 874 | 894 | ||
| 875 | //删除班次数据 | 895 | //删除班次数据 |
| 876 | removeRealSch(lineCode, rq); | 896 | removeRealSch(lineCode, rq); |
| 877 | //删除相关班次修正记录 | 897 | //删除相关班次修正记录 |
| 898 | + | ||
| 878 | } | 899 | } |
| 879 | rs.put("status", ResponseCode.SUCCESS); | 900 | rs.put("status", ResponseCode.SUCCESS); |
| 880 | }catch (Exception e){ | 901 | }catch (Exception e){ |
| 881 | logger.error("", e); | 902 | logger.error("", e); |
| 882 | rs.put("status", ResponseCode.ERROR); | 903 | rs.put("status", ResponseCode.ERROR); |
| 904 | + if(e instanceof DataIntegrityViolationException) | ||
| 905 | + rs.put("msg", "失败,违反数据约束!!"); | ||
| 906 | + else | ||
| 907 | + rs.put("msg", e.getMessage()); | ||
| 883 | } | 908 | } |
| 884 | 909 | ||
| 885 | return rs; | 910 | return rs; |
| @@ -902,4 +927,16 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -902,4 +927,16 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 902 | } | 927 | } |
| 903 | return rs; | 928 | return rs; |
| 904 | } | 929 | } |
| 930 | + | ||
| 931 | + /** | ||
| 932 | + * 覆盖一辆车的所有班次 | ||
| 933 | + * @param nbbm | ||
| 934 | + * @param sets | ||
| 935 | + */ | ||
| 936 | + public void replaceByNbbm(String nbbm, Set<ScheduleRealInfo> sets){ | ||
| 937 | + nbbmScheduleMap.removeAll(nbbm); | ||
| 938 | + nbbmScheduleMap.putAll(nbbm, sets); | ||
| 939 | + //重新计算班次应到时间 | ||
| 940 | + updateQdzTimePlan(nbbm); | ||
| 941 | + } | ||
| 905 | } | 942 | } |
| 906 | \ No newline at end of file | 943 | \ No newline at end of file |
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
0 → 100644
| 1 | + | ||
| 2 | +package com.bsth.data.schedule.late_adjust; | ||
| 3 | + | ||
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 5 | + | ||
| 6 | +import java.util.Map; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 误点调整处理程序 | ||
| 10 | + * Created by panzhao on 2017/4/16. | ||
| 11 | + */ | ||
| 12 | +public class LateAdjustHandle { | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * 误点的车辆 和 班次 | ||
| 16 | + */ | ||
| 17 | + private static Map<String, ScheduleRealInfo> lateSchMap; | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 误点的班次ID 和 停靠时间(秒) | ||
| 22 | + */ | ||
| 23 | + private static Map<Long, Integer> stopTimeMap; | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 班次误点(考虑停靠时间) | ||
| 28 | + * @param sch | ||
| 29 | + */ | ||
| 30 | + public static void schLate(ScheduleRealInfo sch){ | ||
| 31 | + | ||
| 32 | + } | ||
| 33 | +} |
src/main/java/com/bsth/data/schedule/thread/ScheduleLateThread.java renamed to src/main/java/com/bsth/data/schedule/late_adjust/ScheduleLateThread.java
| 1 | -package com.bsth.data.schedule.thread; | ||
| 2 | - | ||
| 3 | - | ||
| 4 | -import java.util.ArrayList; | ||
| 5 | -import java.util.Collections; | ||
| 6 | -import java.util.Comparator; | ||
| 7 | -import java.util.List; | ||
| 8 | - | ||
| 9 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 10 | -import org.springframework.stereotype.Component; | ||
| 11 | - | ||
| 12 | -import com.bsth.data.schedule.DayOfSchedule; | ||
| 13 | -import com.bsth.data.schedule.ScheduleComparator; | ||
| 14 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 15 | -import com.bsth.websocket.handler.SendUtils; | ||
| 16 | - | ||
| 17 | -/** | ||
| 18 | - * | ||
| 19 | - * @ClassName: ScheduleLateThread | ||
| 20 | - * @Description: TODO(班次误点扫描线程) | ||
| 21 | - * @author PanZhao | ||
| 22 | - * @date 2016年8月31日 下午3:09:02 | ||
| 23 | - * | ||
| 24 | - */ | ||
| 25 | -@Component | ||
| 26 | -public class ScheduleLateThread extends Thread{ | ||
| 27 | - | ||
| 28 | - @Autowired | ||
| 29 | - DayOfSchedule dayOfSchedule; | ||
| 30 | - | ||
| 31 | - @Autowired | ||
| 32 | - SendUtils sendUtils; | ||
| 33 | - | ||
| 34 | - private static Comparator<ScheduleRealInfo> cpm = new ScheduleComparator.FCSJ(); | ||
| 35 | - | ||
| 36 | - @Override | ||
| 37 | - public void run() { | ||
| 38 | - List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()); | ||
| 39 | - Collections.sort(all, cpm); | ||
| 40 | - | ||
| 41 | - long t = System.currentTimeMillis(); | ||
| 42 | - int size = all.size(); | ||
| 43 | - | ||
| 44 | - ScheduleRealInfo sch; | ||
| 45 | - for(int i = 0; i < size; i ++){ | ||
| 46 | - sch = all.get(i); | ||
| 47 | - if(sch.getDfsjT() > t) | ||
| 48 | - break; | ||
| 49 | - | ||
| 50 | - if(sch.isLate() == false | ||
| 51 | - && sch.getStatus() == 0 | ||
| 52 | - && sch.getFcsjActual() == null){ | ||
| 53 | - //应发未发 | ||
| 54 | - sch.setLate(true); | ||
| 55 | - //通知客户端 | ||
| 56 | - sendUtils.refreshSch(sch); | ||
| 57 | - } | ||
| 58 | - } | ||
| 59 | - } | ||
| 60 | -} | 1 | +package com.bsth.data.schedule.late_adjust; |
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.bsth.data.schedule.DayOfSchedule; | ||
| 5 | +import com.bsth.data.schedule.ScheduleComparator; | ||
| 6 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 7 | +import com.bsth.websocket.handler.SendUtils; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | +import java.util.ArrayList; | ||
| 12 | +import java.util.Collections; | ||
| 13 | +import java.util.Comparator; | ||
| 14 | +import java.util.List; | ||
| 15 | + | ||
| 16 | +/** | ||
| 17 | + * | ||
| 18 | + * @ClassName: ScheduleLateThread | ||
| 19 | + * @Description: TODO(班次误点扫描线程) | ||
| 20 | + * @author PanZhao | ||
| 21 | + * @date 2016年8月31日 下午3:09:02 | ||
| 22 | + * | ||
| 23 | + */ | ||
| 24 | +@Component | ||
| 25 | +public class ScheduleLateThread extends Thread{ | ||
| 26 | + | ||
| 27 | + @Autowired | ||
| 28 | + DayOfSchedule dayOfSchedule; | ||
| 29 | + | ||
| 30 | + @Autowired | ||
| 31 | + SendUtils sendUtils; | ||
| 32 | + | ||
| 33 | + private static Comparator<ScheduleRealInfo> cpm = new ScheduleComparator.FCSJ(); | ||
| 34 | + | ||
| 35 | + @Override | ||
| 36 | + public void run() { | ||
| 37 | + List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()); | ||
| 38 | + Collections.sort(all, cpm); | ||
| 39 | + | ||
| 40 | + long t = System.currentTimeMillis(); | ||
| 41 | + int size = all.size(); | ||
| 42 | + | ||
| 43 | + ScheduleRealInfo sch; | ||
| 44 | + for(int i = 0; i < size; i ++){ | ||
| 45 | + sch = all.get(i); | ||
| 46 | + if(sch.getDfsjT() > t) | ||
| 47 | + break; | ||
| 48 | + | ||
| 49 | + if(sch.isLate() == false | ||
| 50 | + && sch.getStatus() == 0 | ||
| 51 | + && sch.getFcsjActual() == null){ | ||
| 52 | + //应发未发 | ||
| 53 | + sch.setLate(true); | ||
| 54 | + //通知客户端 | ||
| 55 | + sendUtils.refreshSch(sch); | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | +} |
src/main/java/com/bsth/entity/mcy_forms/Shiftuehiclemanth.java
| @@ -22,6 +22,17 @@ public class Shiftuehiclemanth { | @@ -22,6 +22,17 @@ public class Shiftuehiclemanth { | ||
| 22 | 22 | ||
| 23 | private String jgh; | 23 | private String jgh; |
| 24 | private String zbh; | 24 | private String zbh; |
| 25 | + public String getSgh() { | ||
| 26 | + return sgh; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public void setSgh(String sgh) { | ||
| 30 | + this.sgh = sgh; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + private String sgh; | ||
| 34 | + | ||
| 35 | + | ||
| 25 | public String getJgh() { | 36 | public String getJgh() { |
| 26 | return jgh; | 37 | return jgh; |
| 27 | } | 38 | } |
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
| @@ -773,6 +773,7 @@ public class ScheduleRealInfo { | @@ -773,6 +773,7 @@ public class ScheduleRealInfo { | ||
| 773 | public void destroy(){ | 773 | public void destroy(){ |
| 774 | this.jhlc = 0.0; | 774 | this.jhlc = 0.0; |
| 775 | this.status = -1; | 775 | this.status = -1; |
| 776 | + this.clearFcsjActual(); | ||
| 776 | } | 777 | } |
| 777 | 778 | ||
| 778 | public boolean isDestroy(){ | 779 | public boolean isDestroy(){ |
src/main/java/com/bsth/entity/schedule/rule/ScheduleRule1Flat.java
| @@ -57,6 +57,7 @@ public class ScheduleRule1Flat extends BEntity { | @@ -57,6 +57,7 @@ public class ScheduleRule1Flat extends BEntity { | ||
| 57 | private String lpNames; | 57 | private String lpNames; |
| 58 | /** 对应的路牌ids(用逗号隔开) */ | 58 | /** 对应的路牌ids(用逗号隔开) */ |
| 59 | @NotNull | 59 | @NotNull |
| 60 | + @Column(length = 1000) | ||
| 60 | private String lpIds; | 61 | private String lpIds; |
| 61 | /** 起始路牌(从0开始) */ | 62 | /** 起始路牌(从0开始) */ |
| 62 | @NotNull | 63 | @NotNull |
| @@ -66,6 +67,7 @@ public class ScheduleRule1Flat extends BEntity { | @@ -66,6 +67,7 @@ public class ScheduleRule1Flat extends BEntity { | ||
| 66 | private String ryDbbms; | 67 | private String ryDbbms; |
| 67 | /** 对应的人员配置ids(用逗号隔开,如果分班,就先-隔开再逗号隔开) */ | 68 | /** 对应的人员配置ids(用逗号隔开,如果分班,就先-隔开再逗号隔开) */ |
| 68 | @NotNull | 69 | @NotNull |
| 70 | + @Column(length = 1000) | ||
| 69 | private String ryConfigIds; | 71 | private String ryConfigIds; |
| 70 | /** 起始人员(从0开始) */ | 72 | /** 起始人员(从0开始) */ |
| 71 | @NotNull | 73 | @NotNull |
src/main/java/com/bsth/entity/schedule/temp/SchedulePlanRuleResult.java
| @@ -2,10 +2,7 @@ package com.bsth.entity.schedule.temp; | @@ -2,10 +2,7 @@ package com.bsth.entity.schedule.temp; | ||
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.SchedulePlan; | 3 | import com.bsth.entity.schedule.SchedulePlan; |
| 4 | 4 | ||
| 5 | -import javax.persistence.Entity; | ||
| 6 | -import javax.persistence.GeneratedValue; | ||
| 7 | -import javax.persistence.Id; | ||
| 8 | -import javax.persistence.Table; | 5 | +import javax.persistence.*; |
| 9 | import java.util.Date; | 6 | import java.util.Date; |
| 10 | 7 | ||
| 11 | /** | 8 | /** |
| @@ -32,12 +29,14 @@ public class SchedulePlanRuleResult { | @@ -32,12 +29,14 @@ public class SchedulePlanRuleResult { | ||
| 32 | private String ccZbh; | 29 | private String ccZbh; |
| 33 | 30 | ||
| 34 | /** 路牌id列表字符串 */ | 31 | /** 路牌id列表字符串 */ |
| 32 | + @Column(length = 1000) | ||
| 35 | private String gids; | 33 | private String gids; |
| 36 | /** 路牌名字列表字符串 */ | 34 | /** 路牌名字列表字符串 */ |
| 37 | private String gnames; | 35 | private String gnames; |
| 38 | /** 翻到哪个路牌索引 */ | 36 | /** 翻到哪个路牌索引 */ |
| 39 | private String gidindex; | 37 | private String gidindex; |
| 40 | /** 人员配置id列表字符串 */ | 38 | /** 人员配置id列表字符串 */ |
| 39 | + @Column(length = 1000) | ||
| 41 | private String ecids; | 40 | private String ecids; |
| 42 | /** 人员配置搭班编码列表字符串 */ | 41 | /** 人员配置搭班编码列表字符串 */ |
| 43 | private String ecdbbms; | 42 | private String ecdbbms; |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -156,7 +156,10 @@ public class FormsServiceImpl implements FormsService { | @@ -156,7 +156,10 @@ public class FormsServiceImpl implements FormsService { | ||
| 156 | if(map.containsKey("fgsdmManth")){ | 156 | if(map.containsKey("fgsdmManth")){ |
| 157 | fgsdmManth=map.get("fgsdmManth").toString(); | 157 | fgsdmManth=map.get("fgsdmManth").toString(); |
| 158 | } | 158 | } |
| 159 | - String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type,r.s_name,r.lp_name " | 159 | + String sql = "select" |
| 160 | + + " r.j_name, r.cl_zbh,r.j_gh,r.s_gh,r.s_name " | ||
| 161 | +// + "r.gs_bm,r.gs_name," | ||
| 162 | +// + " r.fgs_bm,r.fgs_name,r.bc_type,r.lp_name " | ||
| 160 | + " from bsth_c_s_sp_info_real r " | 163 | + " from bsth_c_s_sp_info_real r " |
| 161 | + " where 1=1 "; | 164 | + " where 1=1 "; |
| 162 | if(map.get("startDate")!=null&&!map.get("startDate").equals("")){ | 165 | if(map.get("startDate")!=null&&!map.get("startDate").equals("")){ |
| @@ -169,19 +172,23 @@ public class FormsServiceImpl implements FormsService { | @@ -169,19 +172,23 @@ public class FormsServiceImpl implements FormsService { | ||
| 169 | if(map.get("line")!=null&&!map.get("line").equals("")){ | 172 | if(map.get("line")!=null&&!map.get("line").equals("")){ |
| 170 | sql+=" and r.xl_bm='"+ map.get("line").toString() + "' "; | 173 | sql+=" and r.xl_bm='"+ map.get("line").toString() + "' "; |
| 171 | } | 174 | } |
| 172 | - sql+= " AND r.gs_bm is not null and r.bc_type not in('in','out')"; | ||
| 173 | - if(map.get("gsdmManth")!=null&&!map.get("gsdmManth").equals("")){ | ||
| 174 | - sql+=" and r.gs_bm='"+map.get("gsdmManth").toString()+"' "; | ||
| 175 | - } | 175 | +// sql+= " AND r.gs_bm is not null and r.bc_type not in('in','out')"; |
| 176 | +// if(map.get("gsdmManth")!=null&&!map.get("gsdmManth").equals("")){ | ||
| 177 | + sql+=" and r.gs_bm like'%"+gsdmManth+"%' "; | ||
| 178 | +// } | ||
| 176 | if(map.get("fgsdmManth")!=null&&!map.get("fgsdmManth").equals("")){ | 179 | if(map.get("fgsdmManth")!=null&&!map.get("fgsdmManth").equals("")){ |
| 177 | - sql+=" and r.fgs_bm='"+map.get("fgsdmManth").toString()+"' "; | 180 | + sql+=" and r.fgs_bm like'%"+fgsdmManth+"%' "; |
| 178 | } | 181 | } |
| 179 | if(empnames.equals("售票员")){ | 182 | if(empnames.equals("售票员")){ |
| 180 | sql+="and r.s_name is not null AND r.s_name !=''"; | 183 | sql+="and r.s_name is not null AND r.s_name !=''"; |
| 181 | } | 184 | } |
| 182 | - sql += " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type "; | 185 | + sql += " GROUP BY " |
| 186 | + + "r.j_name, r.cl_zbh,r.j_gh,r.s_gh,r.s_name "; | ||
| 187 | +// + ",r.gs_bm,r.gs_name," | ||
| 188 | +// + "r.fgs_bm,r.fgs_name,r.bc_type "; | ||
| 183 | 189 | ||
| 184 | - | 190 | +// r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name," |
| 191 | +// + " r.fgs_bm,r.fgs_name,r.bc_type,r.s_name,r.lp_name | ||
| 185 | List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { | 192 | List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { |
| 186 | 193 | ||
| 187 | @Override | 194 | @Override |
| @@ -191,12 +198,13 @@ public class FormsServiceImpl implements FormsService { | @@ -191,12 +198,13 @@ public class FormsServiceImpl implements FormsService { | ||
| 191 | shif.setjName(arg0.getString("j_name")); | 198 | shif.setjName(arg0.getString("j_name")); |
| 192 | }else if(empnames.equals("售票员")){ | 199 | }else if(empnames.equals("售票员")){ |
| 193 | shif.setjName(arg0.getString("s_name")==null ? "":arg0.getString("s_name")); | 200 | shif.setjName(arg0.getString("s_name")==null ? "":arg0.getString("s_name")); |
| 201 | + shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); | ||
| 194 | }else if(empnames.equals("车辆自编号")){ | 202 | }else if(empnames.equals("车辆自编号")){ |
| 195 | shif.setjName(arg0.getString("cl_zbh")); | 203 | shif.setjName(arg0.getString("cl_zbh")); |
| 196 | } | 204 | } |
| 197 | - | ||
| 198 | shif.setJgh(arg0.getString("j_gh")); | 205 | shif.setJgh(arg0.getString("j_gh")); |
| 199 | shif.setZbh(arg0.getString("cl_zbh")); | 206 | shif.setZbh(arg0.getString("cl_zbh")); |
| 207 | +// shif.setjName(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); | ||
| 200 | return shif; | 208 | return shif; |
| 201 | } | 209 | } |
| 202 | }); | 210 | }); |
| @@ -208,9 +216,24 @@ public class FormsServiceImpl implements FormsService { | @@ -208,9 +216,24 @@ public class FormsServiceImpl implements FormsService { | ||
| 208 | Shiftuehiclemanth d=list.get(i); | 216 | Shiftuehiclemanth d=list.get(i); |
| 209 | for (int j = 0; j < lists.size(); j++) { | 217 | for (int j = 0; j < lists.size(); j++) { |
| 210 | ScheduleRealInfo s=lists.get(j); | 218 | ScheduleRealInfo s=lists.get(j); |
| 211 | - if(d.getJgh().equals(s.getjGh()) && d.getZbh().equals(s.getClZbh())){ | ||
| 212 | - sList.add(s); | 219 | +// if(d.getJgh().equals(s.getjGh()) && d.getZbh().equals(s.getClZbh())){ |
| 220 | +// sList.add(s); | ||
| 221 | +// } | ||
| 222 | + if(empnames.equals("驾驶员")){ | ||
| 223 | + if(d.getJgh().equals(s.getjGh())){ | ||
| 224 | + sList.add(s); | ||
| 225 | + } | ||
| 226 | + }else if(empnames.equals("售票员")){ | ||
| 227 | + String sgh=s.getsGh()==null?"":s.getsGh(); | ||
| 228 | + if(d.getSgh().equals(sgh) && d.getZbh().equals(s.getClZbh())){ | ||
| 229 | + sList.add(s); | ||
| 230 | + } | ||
| 231 | + }else if(empnames.equals("车辆自编号")){ | ||
| 232 | + if(d.getZbh().equals(s.getClZbh())){ | ||
| 233 | + sList.add(s); | ||
| 234 | + } | ||
| 213 | } | 235 | } |
| 236 | + | ||
| 214 | } | 237 | } |
| 215 | 238 | ||
| 216 | double ksgl=culateMileageService.culateKsgl(sList); | 239 | double ksgl=culateMileageService.culateKsgl(sList); |
| @@ -219,16 +242,17 @@ public class FormsServiceImpl implements FormsService { | @@ -219,16 +242,17 @@ public class FormsServiceImpl implements FormsService { | ||
| 219 | double ljgl=culateMileageService.culateLjgl(sList); | 242 | double ljgl=culateMileageService.culateLjgl(sList); |
| 220 | double sjgl=culateMileageService.culateSjgl(sList); | 243 | double sjgl=culateMileageService.culateSjgl(sList); |
| 221 | double zyygl=Arith.add(ljgl, sjgl); | 244 | double zyygl=Arith.add(ljgl, sjgl); |
| 222 | - double cjbc=culateMileageService.culateLbbc(sList); | ||
| 223 | - double Ljbc=culateMileageService.culateLjbc(sList,""); | 245 | + int cjbc=culateMileageService.culateLbbc(sList); |
| 246 | + int ljbc=culateMileageService.culateLjbc(sList,""); | ||
| 247 | + int sjbc=culateMileageService.culateSjbc(sList, ""); | ||
| 224 | double cjgl=culateMileageService.culateLbgl(sList); | 248 | double cjgl=culateMileageService.culateLbgl(sList); |
| 225 | double zjgl=culateMileageService.culateLjgl(sList); | 249 | double zjgl=culateMileageService.culateLjgl(sList); |
| 226 | d.setEmptMileage(String.valueOf(zksgl));//空驶公里 | 250 | d.setEmptMileage(String.valueOf(zksgl));//空驶公里 |
| 227 | d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里 | 251 | d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里 |
| 228 | - d.setSjbc(String.valueOf(culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, ""))); | 252 | + d.setSjbc(String.valueOf(sjbc+ljbc)); |
| 229 | d.setJhlc(String.valueOf(zyygl));//运营里程 | 253 | d.setJhlc(String.valueOf(zyygl));//运营里程 |
| 230 | d.setCjbc(String.valueOf(cjbc));//抽检班次 | 254 | d.setCjbc(String.valueOf(cjbc));//抽检班次 |
| 231 | - d.setLjbc(String.valueOf(Ljbc));//增加班次 | 255 | + d.setLjbc(String.valueOf(ljbc));//增加班次 |
| 232 | d.setRemMileage(String.valueOf(cjgl));//抽检里程 | 256 | d.setRemMileage(String.valueOf(cjgl));//抽检里程 |
| 233 | d.setAddMileage(String.valueOf(zjgl));//增加里程 | 257 | d.setAddMileage(String.valueOf(zjgl));//增加里程 |
| 234 | 258 | ||
| @@ -258,13 +282,16 @@ public class FormsServiceImpl implements FormsService { | @@ -258,13 +282,16 @@ public class FormsServiceImpl implements FormsService { | ||
| 258 | if(map.get("fgsdmShif")!=null&&!map.get("fgsdmShif").equals("")){ | 282 | if(map.get("fgsdmShif")!=null&&!map.get("fgsdmShif").equals("")){ |
| 259 | fgsdmShif =map.get("fgsdmShif").toString(); | 283 | fgsdmShif =map.get("fgsdmShif").toString(); |
| 260 | } | 284 | } |
| 261 | - String sql ="select t.* from (select r.schedule_date,r.j_name,IFNULL(r.s_name,'')as s_name," | ||
| 262 | - + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm,r.lp_name FROM bsth_c_s_sp_info_real r where 1=1 " | 285 | + String sql ="select t.* from (select r.schedule_date,r.j_name," |
| 286 | + + "IFNULL(r.s_name,'')as s_name," | ||
| 287 | + + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm,r.lp_name " | ||
| 288 | + + "FROM bsth_c_s_sp_info_real r where 1=1 " | ||
| 263 | + " and to_days(r.schedule_date)=to_days('"+date + "') " | 289 | + " and to_days(r.schedule_date)=to_days('"+date + "') " |
| 264 | + " and r.xl_bm like '%"+line+"%' " | 290 | + " and r.xl_bm like '%"+line+"%' " |
| 265 | + " and r.gs_bm like '%"+gsdmShif+"%' " | 291 | + " and r.gs_bm like '%"+gsdmShif+"%' " |
| 266 | + " and r.fgs_bm like '%"+fgsdmShif+"%' ) t" | 292 | + " and r.fgs_bm like '%"+fgsdmShif+"%' ) t" |
| 267 | - + " GROUP BY t.schedule_date,t.j_name,t.s_name, t.cl_zbh,t.xl_bm,t.j_gh,t.gs_bm,t.fgs_bm "; | 293 | + + " GROUP BY t.schedule_date,t.j_name,t.s_name, " |
| 294 | + + "t.cl_zbh,t.xl_bm,t.j_gh,t.gs_bm,t.fgs_bm,t.lp_name "; | ||
| 268 | 295 | ||
| 269 | 296 | ||
| 270 | List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { | 297 | List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { |
| @@ -302,22 +329,23 @@ public class FormsServiceImpl implements FormsService { | @@ -302,22 +329,23 @@ public class FormsServiceImpl implements FormsService { | ||
| 302 | double zyygl=Arith.add(ljgl, sjgl); | 329 | double zyygl=Arith.add(ljgl, sjgl); |
| 303 | double jhgl=culateMileageService.culateJhgl(sList); | 330 | double jhgl=culateMileageService.culateJhgl(sList); |
| 304 | double cjgl=culateMileageService.culateLbgl(sList); | 331 | double cjgl=culateMileageService.culateLbgl(sList); |
| 305 | - double jhbc =culateMileageService.culateJhbc(sList,""); | ||
| 306 | - double cjbc=culateMileageService.culateLbbc(sList); | ||
| 307 | - double Ljbc=culateMileageService.culateLjbc(sList,""); | 332 | + int jhbc =culateMileageService.culateJhbc(sList,""); |
| 333 | + int cjbc=culateMileageService.culateLbbc(sList); | ||
| 334 | + int ljbc=culateMileageService.culateLjbc(sList,""); | ||
| 335 | + int sjbc=culateMileageService.culateSjbc(sList, ""); | ||
| 308 | double zjgl=culateMileageService.culateLjgl(sList); | 336 | double zjgl=culateMileageService.culateLjgl(sList); |
| 309 | d.setEmptMileage(String.valueOf(zksgl));//空驶公里 | 337 | d.setEmptMileage(String.valueOf(zksgl));//空驶公里 |
| 310 | d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里 | 338 | d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里 |
| 311 | - d.setSjbc(String.valueOf(culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, ""))); | 339 | + d.setSjbc(String.valueOf(sjbc+ljbc)); |
| 312 | d.setJhlc(String.valueOf(jhgl));//计划里程 | 340 | d.setJhlc(String.valueOf(jhgl));//计划里程 |
| 313 | d.setYygl(String.valueOf(zyygl));//运营公里 | 341 | d.setYygl(String.valueOf(zyygl));//运营公里 |
| 314 | d.setSjjhlc(String.valueOf(sjgl));//实际计划里程 | 342 | d.setSjjhlc(String.valueOf(sjgl));//实际计划里程 |
| 315 | d.setRemMileage(String.valueOf(cjgl));//抽减里程 | 343 | d.setRemMileage(String.valueOf(cjgl));//抽减里程 |
| 316 | d.setJhbc(String.valueOf(jhbc));//计划班次 | 344 | d.setJhbc(String.valueOf(jhbc));//计划班次 |
| 317 | d.setCjbc(String.valueOf(cjbc));//抽检班次 | 345 | d.setCjbc(String.valueOf(cjbc));//抽检班次 |
| 318 | - d.setLjbc(String.valueOf(Ljbc));//增加班次 | 346 | + d.setLjbc(String.valueOf(ljbc));//增加班次 |
| 319 | d.setAddMileage(String.valueOf(zjgl));//增加公里 | 347 | d.setAddMileage(String.valueOf(zjgl));//增加公里 |
| 320 | - d.setSjjhbc(String.valueOf(culateMileageService.culateSjbc(sList, "")));//实际计划班次 | 348 | + d.setSjjhbc(String.valueOf(sjbc));//实际计划班次 |
| 321 | } | 349 | } |
| 322 | return list; | 350 | return list; |
| 323 | } | 351 | } |
| @@ -806,7 +834,7 @@ public class FormsServiceImpl implements FormsService { | @@ -806,7 +834,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 806 | + " and y.ssgsdm like '%"+gsbm+"%' " | 834 | + " and y.ssgsdm like '%"+gsbm+"%' " |
| 807 | + " and y.fgsdm like '%"+fgsbm+"%'" | 835 | + " and y.fgsdm like '%"+fgsbm+"%'" |
| 808 | + " ) x" | 836 | + " ) x" |
| 809 | - + " on t.cl_zbh = x.nbbm "; | 837 | + + " on t.cl_zbh = x.nbbm and t.j_gh=x.jsy"; |
| 810 | 838 | ||
| 811 | List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() { | 839 | List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() { |
| 812 | @Override | 840 | @Override |
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| @@ -106,8 +106,6 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -106,8 +106,6 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 106 | List<Cdl> cdyList=cdlRepository.obtainCdl(); | 106 | List<Cdl> cdyList=cdlRepository.obtainCdl(); |
| 107 | //从排班表中计算出行驶的总里程 | 107 | //从排班表中计算出行驶的总里程 |
| 108 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq,"","","",""); | 108 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq,"","","",""); |
| 109 | - List<Ylb> addList=new ArrayList<Ylb>(); | ||
| 110 | - List<Ylb> updateList=new ArrayList<Ylb>(); | ||
| 111 | for(int x=0;x<listpb.size();x++){ | 109 | for(int x=0;x<listpb.size();x++){ |
| 112 | String type="add"; | 110 | String type="add"; |
| 113 | boolean sfdc=false; | 111 | boolean sfdc=false; |
src/main/java/com/bsth/service/realcontrol/DataManagerService.java
0 → 100644
src/main/java/com/bsth/service/realcontrol/impl/DataManagerServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.realcontrol.impl; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSONArray; | ||
| 4 | +import com.alibaba.fastjson.JSONObject; | ||
| 5 | +import com.bsth.common.ResponseCode; | ||
| 6 | +import com.bsth.data.BasicData; | ||
| 7 | +import com.bsth.entity.Cars; | ||
| 8 | +import com.bsth.repository.CarsRepository; | ||
| 9 | +import com.bsth.service.realcontrol.DataManagerService; | ||
| 10 | +import com.bsth.util.db.DBUtils_oldSystem; | ||
| 11 | +import org.slf4j.Logger; | ||
| 12 | +import org.slf4j.LoggerFactory; | ||
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 15 | +import org.springframework.stereotype.Service; | ||
| 16 | + | ||
| 17 | +import java.util.ArrayList; | ||
| 18 | +import java.util.HashMap; | ||
| 19 | +import java.util.List; | ||
| 20 | +import java.util.Map; | ||
| 21 | + | ||
| 22 | +/** | ||
| 23 | + * Created by panzhao on 2017/4/18. | ||
| 24 | + */ | ||
| 25 | +@Service | ||
| 26 | +public class DataManagerServiceImpl implements DataManagerService{ | ||
| 27 | + | ||
| 28 | + @Autowired | ||
| 29 | + CarsRepository carsRepository; | ||
| 30 | + | ||
| 31 | + @Autowired | ||
| 32 | + JdbcTemplate controlJdbcTemp; | ||
| 33 | + | ||
| 34 | + @Autowired | ||
| 35 | + BasicData.BasicDataLoader dataLoader; | ||
| 36 | + | ||
| 37 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 38 | + | ||
| 39 | + @Override | ||
| 40 | + public Map<String, Object> carInfos(Integer lineId) { | ||
| 41 | + | ||
| 42 | + Map<String, Object> rs = new HashMap<>(); | ||
| 43 | + try { | ||
| 44 | + List<Map<String, String>> nowData = new ArrayList<>(); | ||
| 45 | + List<Map<String, String>> oldData = new ArrayList<>(); | ||
| 46 | + Map<String, String> map; | ||
| 47 | + | ||
| 48 | + //查询新系统车辆信息 | ||
| 49 | + List<Cars> list = carsRepository.findCarsByLineId(lineId); | ||
| 50 | + for(Cars c : list){ | ||
| 51 | + map = new HashMap<>(); | ||
| 52 | + map.put("nbbm", c.getInsideCode()); | ||
| 53 | + map.put("device", c.getEquipmentCode()); | ||
| 54 | + nowData.add(map); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + //获取老系统数据 | ||
| 58 | + JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_oldSystem.getDataSource()); | ||
| 59 | + List<Map<String, Object>> oyList = jdbcTemplate.queryForList("select NBBM,SBBH from JJWGPS_T_CLXXB t where xlbm=?", BasicData.lineId2CodeMap.get(lineId)); | ||
| 60 | + for(Map<String, Object> tempMap : oyList){ | ||
| 61 | + map = new HashMap<>(); | ||
| 62 | + map.put("nbbm", tempMap.get("NBBM").toString()); | ||
| 63 | + map.put("device", tempMap.get("SBBH").toString()); | ||
| 64 | + oldData.add(map); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 68 | + rs.put("nows", nowData); | ||
| 69 | + rs.put("olds", oldData); | ||
| 70 | + }catch (Exception e){ | ||
| 71 | + logger.error("", e); | ||
| 72 | + rs.put("status", ResponseCode.ERROR); | ||
| 73 | + rs.put("msg", e.getMessage()); | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + return rs; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + /** | ||
| 80 | + * 更新设备号 | ||
| 81 | + * @param jsonStr | ||
| 82 | + * @return | ||
| 83 | + */ | ||
| 84 | + @Override | ||
| 85 | + public Map<String, Object> updateDevices(String jsonStr) { | ||
| 86 | + Map<String, Object> rs = new HashMap<>(); | ||
| 87 | + try { | ||
| 88 | + int count=0; | ||
| 89 | + JSONArray array = JSONArray.parseArray(jsonStr); | ||
| 90 | + JSONObject jObj; | ||
| 91 | + for(int i = 0; i < array.size(); i ++){ | ||
| 92 | + jObj = array.getJSONObject(i); | ||
| 93 | + count += controlJdbcTemp.update("update bsth_c_cars set equipment_code=? where inside_code=?" | ||
| 94 | + , jObj.getString("device"), jObj.getString("nbbm")); | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + //刷新缓存 | ||
| 98 | + dataLoader.loadDeviceInfo(); | ||
| 99 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 100 | + rs.put("count", count); | ||
| 101 | + }catch (Exception e){ | ||
| 102 | + logger.error("", e); | ||
| 103 | + rs.put("status", ResponseCode.ERROR); | ||
| 104 | + rs.put("msg", e.getMessage()); | ||
| 105 | + } | ||
| 106 | + return rs; | ||
| 107 | + } | ||
| 108 | +} |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -3,6 +3,7 @@ package com.bsth.service.realcontrol.impl; | @@ -3,6 +3,7 @@ package com.bsth.service.realcontrol.impl; | ||
| 3 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 4 | import com.alibaba.fastjson.JSONArray; | 4 | import com.alibaba.fastjson.JSONArray; |
| 5 | import com.alibaba.fastjson.JSONObject; | 5 | import com.alibaba.fastjson.JSONObject; |
| 6 | +import com.bsth.common.Constants; | ||
| 6 | import com.bsth.common.ResponseCode; | 7 | import com.bsth.common.ResponseCode; |
| 7 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; | 8 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; |
| 8 | import com.bsth.controller.realcontrol.dto.DfsjChange; | 9 | import com.bsth.controller.realcontrol.dto.DfsjChange; |
| @@ -400,25 +401,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -400,25 +401,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 400 | Map<String, Object> rs = new HashMap<>(); | 401 | Map<String, Object> rs = new HashMap<>(); |
| 401 | rs.put("status", ResponseCode.ERROR); | 402 | rs.put("status", ResponseCode.ERROR); |
| 402 | 403 | ||
| 403 | - ScheduleRealInfo sch = dayOfSchedule.get(id); | ||
| 404 | - if (sch == null) { | ||
| 405 | - rs.put("msg", "无效的id号"); | ||
| 406 | - return rs; | ||
| 407 | - } | 404 | + try { |
| 405 | + ScheduleRealInfo sch = dayOfSchedule.get(id); | ||
| 406 | + if (sch == null) { | ||
| 407 | + rs.put("msg", "无效的id号"); | ||
| 408 | + return rs; | ||
| 409 | + } | ||
| 408 | 410 | ||
| 409 | - if (!sch.isSflj()) { | ||
| 410 | - rs.put("msg", "你只能删除临加班次"); | ||
| 411 | - return rs; | ||
| 412 | - } | 411 | + if (!sch.isSflj()) { |
| 412 | + rs.put("msg", "你只能删除临加班次"); | ||
| 413 | + return rs; | ||
| 414 | + } | ||
| 413 | 415 | ||
| 414 | - //数据库删除 | ||
| 415 | - rs = super.delete(id); | ||
| 416 | - if(rs.get("status").equals(ResponseCode.SUCCESS)){ | ||
| 417 | - dayOfSchedule.delete(sch); | ||
| 418 | - //更新起点应到时间 | ||
| 419 | - List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch.getClZbh()); | ||
| 420 | - rs.put("ts", ts); | ||
| 421 | - rs.put("delete", sch); | 416 | + //解除和调度指令的外键约束 |
| 417 | + jdbcTemplate.update(Constants.REMOVE_DIRECTIVE_SCH_FK, id); | ||
| 418 | + | ||
| 419 | + //数据库删除 | ||
| 420 | + rs = super.delete(id); | ||
| 421 | + if(rs.get("status").equals(ResponseCode.SUCCESS)){ | ||
| 422 | + dayOfSchedule.delete(sch); | ||
| 423 | + //更新起点应到时间 | ||
| 424 | + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch.getClZbh()); | ||
| 425 | + rs.put("ts", ts); | ||
| 426 | + rs.put("delete", sch); | ||
| 427 | + } | ||
| 428 | + }catch (Exception e){ | ||
| 429 | + logger.error("", e); | ||
| 430 | + rs.put("msg", e.getMessage()); | ||
| 422 | } | 431 | } |
| 423 | 432 | ||
| 424 | return rs; | 433 | return rs; |
| @@ -494,14 +503,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -494,14 +503,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 494 | String px = type; | 503 | String px = type; |
| 495 | if (state.equals("lpName")) { | 504 | if (state.equals("lpName")) { |
| 496 | state = state + "+1"; | 505 | state = state + "+1"; |
| 497 | - type = "asc"; | 506 | + type = "ASC"; |
| 498 | } | 507 | } |
| 499 | String sqlPlan = "select min(s.id) as id,s.j_Gh as jGh,s.cl_Zbh as clZbh," | 508 | String sqlPlan = "select min(s.id) as id,s.j_Gh as jGh,s.cl_Zbh as clZbh," |
| 500 | - + " s.lp_Name as lpName,s.j_Name as jName" | 509 | + + " s.lp_Name as lpName,s.j_Name as jName,min(s.schedule_date_str) as dateStr ,min(s.fcsj) as fcsj" |
| 501 | + " from bsth_c_s_sp_info_real s " | 510 | + " from bsth_c_s_sp_info_real s " |
| 502 | + " where s.xl_Bm = '" + line + "' and DATE_FORMAT(s.schedule_Date,'%Y-%m-%d') ='" + date + "' " | 511 | + " where s.xl_Bm = '" + line + "' and DATE_FORMAT(s.schedule_Date,'%Y-%m-%d') ='" + date + "' " |
| 503 | + " GROUP BY s.j_Gh,s.cl_Zbh,s.lp_Name ,s.j_Name" | 512 | + " GROUP BY s.j_Gh,s.cl_Zbh,s.lp_Name ,s.j_Name" |
| 504 | - + " order by (" + state + ") " + type; | 513 | + + " order by (" + state + "),dateStr,fcsj " + type; |
| 505 | List<ScheduleRealInfo> list = jdbcTemplate.query(sqlPlan, | 514 | List<ScheduleRealInfo> list = jdbcTemplate.query(sqlPlan, |
| 506 | new RowMapper<ScheduleRealInfo>() { | 515 | new RowMapper<ScheduleRealInfo>() { |
| 507 | @Override | 516 | @Override |
| @@ -518,29 +527,41 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -518,29 +527,41 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 518 | if (lpname.equals("lpName")) { | 527 | if (lpname.equals("lpName")) { |
| 519 | List<ScheduleRealInfo> listNew = new ArrayList<ScheduleRealInfo>(); | 528 | List<ScheduleRealInfo> listNew = new ArrayList<ScheduleRealInfo>(); |
| 520 | Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); | 529 | Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); |
| 521 | - if (px.equals("desc")) { | 530 | +// if (px.equals("desc")) { |
| 522 | int zt = 0; | 531 | int zt = 0; |
| 523 | - for (int l = 0; l < 3; l++) { | 532 | + for (int l = 0; l < 2; l++) { |
| 524 | for (int i = 0; i < list.size(); i++) { | 533 | for (int i = 0; i < list.size(); i++) { |
| 525 | ScheduleRealInfo t = list.get(i); | 534 | ScheduleRealInfo t = list.get(i); |
| 526 | if (t.getLpName().indexOf("+") != -1) { | 535 | if (t.getLpName().indexOf("+") != -1) { |
| 527 | if (zt == 0) { | 536 | if (zt == 0) { |
| 528 | listNew.add(t); | 537 | listNew.add(t); |
| 529 | } | 538 | } |
| 530 | - | ||
| 531 | } else if (pattern.matcher(t.getLpName()).matches()) { | 539 | } else if (pattern.matcher(t.getLpName()).matches()) { |
| 532 | if (zt == 1) { | 540 | if (zt == 1) { |
| 533 | listNew.add(t); | 541 | listNew.add(t); |
| 534 | } | 542 | } |
| 535 | } else { | 543 | } else { |
| 536 | - if (zt == 2) { | ||
| 537 | - listNew.add(t); | ||
| 538 | - } | 544 | +// if (zt == 2) { |
| 545 | +// listNew.add(t); | ||
| 546 | +// } | ||
| 547 | + continue; | ||
| 539 | } | 548 | } |
| 540 | } | 549 | } |
| 541 | zt++; | 550 | zt++; |
| 542 | } | 551 | } |
| 543 | - } else { | 552 | + |
| 553 | + Collections.sort(list, new ComparableLp()); | ||
| 554 | + for (int i = 0; i < list.size(); i++) { | ||
| 555 | + ScheduleRealInfo t = list.get(i); | ||
| 556 | + if (t.getLpName().indexOf("+") != -1) { | ||
| 557 | + continue; | ||
| 558 | + } else if (pattern.matcher(t.getLpName()).matches()) { | ||
| 559 | + continue; | ||
| 560 | + } else { | ||
| 561 | + listNew.add(t); | ||
| 562 | + } | ||
| 563 | + } | ||
| 564 | + /*} else { | ||
| 544 | int zt = 0; | 565 | int zt = 0; |
| 545 | for (int l = 0; l < 3; l++) { | 566 | for (int l = 0; l < 3; l++) { |
| 546 | for (int i = 0; i < list.size(); i++) { | 567 | for (int i = 0; i < list.size(); i++) { |
| @@ -563,7 +584,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -563,7 +584,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 563 | zt++; | 584 | zt++; |
| 564 | } | 585 | } |
| 565 | 586 | ||
| 566 | - } | 587 | + }*/ |
| 567 | return listNew; | 588 | return listNew; |
| 568 | } else { | 589 | } else { |
| 569 | return list; | 590 | return list; |
| @@ -1382,20 +1403,20 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1382,20 +1403,20 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1382 | lists.add(s); | 1403 | lists.add(s); |
| 1383 | } | 1404 | } |
| 1384 | } | 1405 | } |
| 1385 | - double ksgl=culateService.culateKsgl(lists); | 1406 | + double ksgl=culateService.culateKsgl(list); |
| 1386 | double sjgl=culateService.culateSjgl(lists); | 1407 | double sjgl=culateService.culateSjgl(lists); |
| 1387 | double jccgl=culateService.culateJccgl(lists); | 1408 | double jccgl=culateService.culateJccgl(lists); |
| 1388 | double ljgl=culateService.culateLjgl(lists); | 1409 | double ljgl=culateService.culateLjgl(lists); |
| 1389 | 1410 | ||
| 1390 | map.put("jhlc", culateService.culateJhgl(list)); //计划里程 | 1411 | map.put("jhlc", culateService.culateJhgl(list)); //计划里程 |
| 1391 | - map.put("remMileage", culateService.culateLbgl(lists)); //烂班公里 | 1412 | + map.put("remMileage", culateService.culateLbgl(list)); //烂班公里 |
| 1392 | map.put("addMileage", ljgl); //临加公里 | 1413 | map.put("addMileage", ljgl); //临加公里 |
| 1393 | map.put("yygl",Arith.add(sjgl,ljgl)); //实际公里 | 1414 | map.put("yygl",Arith.add(sjgl,ljgl)); //实际公里 |
| 1394 | map.put("ksgl", ksgl);//空驶公里 | 1415 | map.put("ksgl", ksgl);//空驶公里 |
| 1395 | map.put("realMileage",Arith.add(Arith.add(ksgl,jccgl ),Arith.add(sjgl,ljgl))); | 1416 | map.put("realMileage",Arith.add(Arith.add(ksgl,jccgl ),Arith.add(sjgl,ljgl))); |
| 1396 | // map.put("realMileage", format.format(yygl + ksgl + jcclc+addMileage)); | 1417 | // map.put("realMileage", format.format(yygl + ksgl + jcclc+addMileage)); |
| 1397 | map.put("jhbc", culateService.culateJhbc(list,"")); | 1418 | map.put("jhbc", culateService.culateJhbc(list,"")); |
| 1398 | - map.put("cjbc", culateService.culateLbbc(lists)); | 1419 | + map.put("cjbc", culateService.culateLbbc(list)); |
| 1399 | map.put("ljbc", culateService.culateLjbc(lists,"")); | 1420 | map.put("ljbc", culateService.culateLjbc(lists,"")); |
| 1400 | map.put("sjbc", culateService.culateJhbc(lists,"") - culateService.culateLbbc(lists) + culateService.culateLjbc(lists,"")); | 1421 | map.put("sjbc", culateService.culateJhbc(lists,"") - culateService.culateLbbc(lists) + culateService.culateLjbc(lists,"")); |
| 1401 | map.put("jcclc", jccgl); | 1422 | map.put("jcclc", jccgl); |
| @@ -3712,7 +3733,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3712,7 +3733,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3712 | tempMap.put("zdsjk" + size, ""); | 3733 | tempMap.put("zdsjk" + size, ""); |
| 3713 | tempMap.put("zdsjm" + size, ""); | 3734 | tempMap.put("zdsjm" + size, ""); |
| 3714 | tempMap.put("fcsj" + size, schedule.getFcsj()); | 3735 | tempMap.put("fcsj" + size, schedule.getFcsj()); |
| 3715 | - tempMap.put("fcsjActual" + size, schedule.getFcsjActual() != null ? schedule.getFcsjActual() : ""); | 3736 | + String fcsjActural=schedule.getFcsjActual() != null ? schedule.getFcsjActual() : ""; |
| 3737 | + String bcType=schedule.getBcType()!=null?schedule.getBcType():""; | ||
| 3738 | + if(bcType.equals("in")){ | ||
| 3739 | + fcsjActural=fcsjActural+"(进)"; | ||
| 3740 | + } | ||
| 3741 | + if(bcType.equals("out")){ | ||
| 3742 | + fcsjActural=fcsjActural+"(出)"; | ||
| 3743 | + } | ||
| 3744 | + tempMap.put("fcsjActual" + size, fcsjActural); | ||
| 3716 | tempMap.put("fcsjk" + size, ""); | 3745 | tempMap.put("fcsjk" + size, ""); |
| 3717 | tempMap.put("fcsjm" + size, ""); | 3746 | tempMap.put("fcsjm" + size, ""); |
| 3718 | tempMap.put("remarks" + size, schedule.getRemarks() != null ? schedule.getRemarks() : ""); | 3747 | tempMap.put("remarks" + size, schedule.getRemarks() != null ? schedule.getRemarks() : ""); |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| 1 | package com.bsth.service.report.impl; | 1 | package com.bsth.service.report.impl; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | +import java.util.Collections; | ||
| 4 | import java.util.HashMap; | 5 | import java.util.HashMap; |
| 5 | import java.util.Iterator; | 6 | import java.util.Iterator; |
| 6 | import java.util.List; | 7 | import java.util.List; |
| @@ -14,6 +15,7 @@ import com.bsth.entity.realcontrol.ChildTaskPlan; | @@ -14,6 +15,7 @@ import com.bsth.entity.realcontrol.ChildTaskPlan; | ||
| 14 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 15 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 15 | import com.bsth.service.report.CulateMileageService; | 16 | import com.bsth.service.report.CulateMileageService; |
| 16 | import com.bsth.util.Arith; | 17 | import com.bsth.util.Arith; |
| 18 | +import com.bsth.util.ComparableJob; | ||
| 17 | 19 | ||
| 18 | @Service | 20 | @Service |
| 19 | public class CulateMileageServiceImpl implements CulateMileageService{ | 21 | public class CulateMileageServiceImpl implements CulateMileageService{ |
| @@ -25,6 +27,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -25,6 +27,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 25 | @Override | 27 | @Override |
| 26 | public List<Map<String, Object>> jobFwqk(List<ScheduleRealInfo> lists) { | 28 | public List<Map<String, Object>> jobFwqk(List<ScheduleRealInfo> lists) { |
| 27 | // TODO Auto-generated method stub | 29 | // TODO Auto-generated method stub |
| 30 | + String[] lblxs = {"配车", "保养","故障","肇事","路阻","纠纷","缺人","客稀","缺车","气候","援外","吊慢","抽减","其他" }; | ||
| 28 | List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); | 31 | List<Map<String, Object>> list=new ArrayList<Map<String,Object>>(); |
| 29 | for (int i = 0; i < lists.size(); i++) { | 32 | for (int i = 0; i < lists.size(); i++) { |
| 30 | ScheduleRealInfo scheduleRealInfo = lists.get(i); | 33 | ScheduleRealInfo scheduleRealInfo = lists.get(i); |
| @@ -47,7 +50,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -47,7 +50,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 47 | newMap.put("dz", scheduleRealInfo.getQdzName()); | 50 | newMap.put("dz", scheduleRealInfo.getQdzName()); |
| 48 | newMap.put("sj", scheduleRealInfo.getFcsj()); | 51 | newMap.put("sj", scheduleRealInfo.getFcsj()); |
| 49 | newMap.put("lbbc", 1); | 52 | newMap.put("lbbc", 1); |
| 50 | - newMap.put("lblc", scheduleRealInfo.getJhlcOrig()); | 53 | + newMap.put("lblc", scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig()); |
| 51 | newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | 54 | newMap.put("jyqp", scheduleRealInfo.getRealMileage()); |
| 52 | list.add(newMap); | 55 | list.add(newMap); |
| 53 | } | 56 | } |
| @@ -71,7 +74,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -71,7 +74,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 71 | newMap.put("dz", childTaskPlan.getStartStationName()); | 74 | newMap.put("dz", childTaskPlan.getStartStationName()); |
| 72 | newMap.put("sj", childTaskPlan.getStartDate()); | 75 | newMap.put("sj", childTaskPlan.getStartDate()); |
| 73 | newMap.put("lbbc", 0); | 76 | newMap.put("lbbc", 0); |
| 74 | - newMap.put("lblc", childTaskPlan.getMileage()); | 77 | + newMap.put("lblc", childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage()); |
| 75 | newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | 78 | newMap.put("jyqp", scheduleRealInfo.getRealMileage()); |
| 76 | list.add(newMap); | 79 | list.add(newMap); |
| 77 | 80 | ||
| @@ -80,7 +83,33 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -80,7 +83,33 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 80 | } | 83 | } |
| 81 | } | 84 | } |
| 82 | } | 85 | } |
| 83 | - return list; | 86 | + List<Map<String, Object>> listNew=new ArrayList<Map<String,Object>>(); |
| 87 | + for (int i = 0; i < lblxs.length; i++) { | ||
| 88 | + String lx=lblxs[i]; | ||
| 89 | + double lblc=0.0; | ||
| 90 | + int lbbc=0; | ||
| 91 | + for (int j = 0; j < list.size(); j++) { | ||
| 92 | + Map<String, Object> m1=list.get(j); | ||
| 93 | + m1.put("lx", 0); | ||
| 94 | + listNew.add(m1); | ||
| 95 | + if(lx.equals(m1.get("nr").toString())){ | ||
| 96 | + lblc =Arith.add(lblc,Double.parseDouble(m1.get("lblc").toString())); | ||
| 97 | + lbbc += Integer.parseInt(m1.get("lbbc").toString()); | ||
| 98 | + } | ||
| 99 | + } | ||
| 100 | + Map<String, Object> newMap = new HashMap<String, Object>(); | ||
| 101 | + newMap.put("lx", 1); | ||
| 102 | + newMap.put("nr", lx); | ||
| 103 | + newMap.put("lp", "小计"); | ||
| 104 | + newMap.put("nbbm", "少驶公里"); | ||
| 105 | + newMap.put("dz", lbbc); | ||
| 106 | + newMap.put("sj", "少驶公里"); | ||
| 107 | + newMap.put("lblc", lblc); | ||
| 108 | + listNew.add(newMap); | ||
| 109 | + | ||
| 110 | + } | ||
| 111 | + Collections.sort(listNew, new ComparableJob()); | ||
| 112 | + return listNew; | ||
| 84 | } | 113 | } |
| 85 | 114 | ||
| 86 | @Override | 115 | @Override |
| @@ -364,7 +393,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -364,7 +393,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 364 | time=scheduleRealInfo.getFcsj(); | 393 | time=scheduleRealInfo.getFcsj(); |
| 365 | } | 394 | } |
| 366 | if(!time.equals("")){ | 395 | if(!time.equals("")){ |
| 367 | - String[] fcsjStr = scheduleRealInfo.getFcsj().split(":"); | 396 | + String[] fcsjStr = time.split(":"); |
| 368 | long fcsj= Long.parseLong(fcsjStr[0])*60+Long.parseLong(fcsjStr[1]); | 397 | long fcsj= Long.parseLong(fcsjStr[0])*60+Long.parseLong(fcsjStr[1]); |
| 369 | if(childTaskPlans.isEmpty()){ | 398 | if(childTaskPlans.isEmpty()){ |
| 370 | if(scheduleRealInfo.getStatus()!=-1){ | 399 | if(scheduleRealInfo.getStatus()!=-1){ |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| @@ -8,6 +8,7 @@ import java.text.ParseException; | @@ -8,6 +8,7 @@ import java.text.ParseException; | ||
| 8 | import java.text.SimpleDateFormat; | 8 | import java.text.SimpleDateFormat; |
| 9 | import java.util.ArrayList; | 9 | import java.util.ArrayList; |
| 10 | import java.util.Calendar; | 10 | import java.util.Calendar; |
| 11 | +import java.util.Collections; | ||
| 11 | import java.util.Date; | 12 | import java.util.Date; |
| 12 | import java.util.HashMap; | 13 | import java.util.HashMap; |
| 13 | import java.util.Iterator; | 14 | import java.util.Iterator; |
| @@ -38,6 +39,7 @@ import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | @@ -38,6 +39,7 @@ import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | ||
| 38 | import com.bsth.service.report.CulateMileageService; | 39 | import com.bsth.service.report.CulateMileageService; |
| 39 | import com.bsth.service.report.ReportService; | 40 | import com.bsth.service.report.ReportService; |
| 40 | import com.bsth.util.Arith; | 41 | import com.bsth.util.Arith; |
| 42 | +import com.bsth.util.ComparableJob; | ||
| 41 | import com.bsth.util.db.DBUtils_MS; | 43 | import com.bsth.util.db.DBUtils_MS; |
| 42 | 44 | ||
| 43 | @Service | 45 | @Service |
| @@ -1150,6 +1152,7 @@ public class ReportServiceImpl implements ReportService{ | @@ -1150,6 +1152,7 @@ public class ReportServiceImpl implements ReportService{ | ||
| 1150 | @Override | 1152 | @Override |
| 1151 | public List<Map<String, Object>> jobFwqk(Map<String, Object> map) { | 1153 | public List<Map<String, Object>> jobFwqk(Map<String, Object> map) { |
| 1152 | // TODO Auto-generated method stub | 1154 | // TODO Auto-generated method stub |
| 1155 | + String[] lblxs = {"配车", "保养","故障","肇事","路阻","纠纷","缺人","客稀","缺车","气候","援外","吊慢","抽减","其他" }; | ||
| 1153 | String line=map.get("line").toString(); | 1156 | String line=map.get("line").toString(); |
| 1154 | String date=map.get("date").toString(); | 1157 | String date=map.get("date").toString(); |
| 1155 | map.put("bcType", "normal"); | 1158 | map.put("bcType", "normal"); |
| @@ -1179,7 +1182,7 @@ public class ReportServiceImpl implements ReportService{ | @@ -1179,7 +1182,7 @@ public class ReportServiceImpl implements ReportService{ | ||
| 1179 | newMap.put("sj", scheduleRealInfo.getFcsj()); | 1182 | newMap.put("sj", scheduleRealInfo.getFcsj()); |
| 1180 | newMap.put("lbbc", 1); | 1183 | newMap.put("lbbc", 1); |
| 1181 | newMap.put("lblc", scheduleRealInfo.getJhlcOrig()); | 1184 | newMap.put("lblc", scheduleRealInfo.getJhlcOrig()); |
| 1182 | - newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | 1185 | + newMap.put("jyqp", scheduleRealInfo.getRemarks()); |
| 1183 | list.add(newMap); | 1186 | list.add(newMap); |
| 1184 | } | 1187 | } |
| 1185 | 1188 | ||
| @@ -1205,7 +1208,7 @@ public class ReportServiceImpl implements ReportService{ | @@ -1205,7 +1208,7 @@ public class ReportServiceImpl implements ReportService{ | ||
| 1205 | newMap.put("sj", childTaskPlan.getStartDate()); | 1208 | newMap.put("sj", childTaskPlan.getStartDate()); |
| 1206 | newMap.put("lbbc", 0); | 1209 | newMap.put("lbbc", 0); |
| 1207 | newMap.put("lblc", childTaskPlan.getMileage()); | 1210 | newMap.put("lblc", childTaskPlan.getMileage()); |
| 1208 | - newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | 1211 | + newMap.put("jyqp", childTaskPlan.getRemarks()); |
| 1209 | list.add(newMap); | 1212 | list.add(newMap); |
| 1210 | 1213 | ||
| 1211 | } | 1214 | } |
| @@ -1213,7 +1216,36 @@ public class ReportServiceImpl implements ReportService{ | @@ -1213,7 +1216,36 @@ public class ReportServiceImpl implements ReportService{ | ||
| 1213 | } | 1216 | } |
| 1214 | } | 1217 | } |
| 1215 | } | 1218 | } |
| 1216 | - return list; | 1219 | + List<Map<String, Object>> listNew=new ArrayList<Map<String,Object>>(); |
| 1220 | + for (int i = 0; i < lblxs.length; i++) { | ||
| 1221 | + String lx=lblxs[i]; | ||
| 1222 | + double lblc=0.0; | ||
| 1223 | + int lbbc=0; | ||
| 1224 | + for (int j = 0; j < list.size(); j++) { | ||
| 1225 | + Map<String, Object> m1=list.get(j); | ||
| 1226 | + if(lx.equals(m1.get("nr").toString())){ | ||
| 1227 | + m1.put("lx", 0); | ||
| 1228 | + listNew.add(m1); | ||
| 1229 | + lblc =Arith.add(lblc,Double.parseDouble(m1.get("lblc").toString())); | ||
| 1230 | + lbbc += Integer.parseInt(m1.get("lbbc").toString()); | ||
| 1231 | + } | ||
| 1232 | + } | ||
| 1233 | + if(lblc>0){ | ||
| 1234 | + Map<String, Object> newMap = new HashMap<String, Object>(); | ||
| 1235 | + newMap.put("lx", 1); | ||
| 1236 | + newMap.put("nr", lx); | ||
| 1237 | + newMap.put("lp", "小计"); | ||
| 1238 | + newMap.put("nbbm", "少驶班次"); | ||
| 1239 | + newMap.put("jgh", lbbc); | ||
| 1240 | + newMap.put("sj", "少驶公里"); | ||
| 1241 | + newMap.put("lblc", lblc); | ||
| 1242 | + listNew.add(newMap); | ||
| 1243 | + } | ||
| 1244 | + | ||
| 1245 | + | ||
| 1246 | + } | ||
| 1247 | + Collections.sort(listNew, new ComparableJob()); | ||
| 1248 | + return listNew; | ||
| 1217 | } | 1249 | } |
| 1218 | 1250 | ||
| 1219 | //统计临加班次详细信息 | 1251 | //统计临加班次详细信息 |
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
| @@ -65,7 +65,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -65,7 +65,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 65 | * @param schedulePlan 排班计划对象 | 65 | * @param schedulePlan 排班计划对象 |
| 66 | * @param lpInfoResults_output 时刻表每日路牌的情况 | 66 | * @param lpInfoResults_output 时刻表每日路牌的情况 |
| 67 | */ | 67 | */ |
| 68 | - private ScheduleResults_output loopRuleOutput( | 68 | + public ScheduleResults_output loopRuleOutput( |
| 69 | SchedulePlan schedulePlan, | 69 | SchedulePlan schedulePlan, |
| 70 | LpInfoResults_output lpInfoResults_output) { | 70 | LpInfoResults_output lpInfoResults_output) { |
| 71 | // 1-1、构造drools规则输入数据,输出数据 | 71 | // 1-1、构造drools规则输入数据,输出数据 |
| @@ -116,7 +116,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -116,7 +116,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 116 | * @param schedulePlan 排班计划对象 | 116 | * @param schedulePlan 排班计划对象 |
| 117 | * @return TTInfoResults_output, LpInfoResults_output | 117 | * @return TTInfoResults_output, LpInfoResults_output |
| 118 | */ | 118 | */ |
| 119 | - private Object[] ttInfoOutput(SchedulePlan schedulePlan) { | 119 | + public Object[] ttInfoOutput(SchedulePlan schedulePlan) { |
| 120 | // 获取线路的所有未作废的时刻表 | 120 | // 获取线路的所有未作废的时刻表 |
| 121 | List<TTInfo> ttInfos = ttInfoRepository.findInCanceledByXl(schedulePlan.getXl()); | 121 | List<TTInfo> ttInfos = ttInfoRepository.findInCanceledByXl(schedulePlan.getXl()); |
| 122 | 122 | ||
| @@ -174,7 +174,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -174,7 +174,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 174 | * @param ttInfoResults_output ttInfoOutput方法规则输出 | 174 | * @param ttInfoResults_output ttInfoOutput方法规则输出 |
| 175 | * @return PlanResult | 175 | * @return PlanResult |
| 176 | */ | 176 | */ |
| 177 | - private PlanResult planResultOutput( | 177 | + public PlanResult planResultOutput( |
| 178 | SchedulePlan schedulePlan, | 178 | SchedulePlan schedulePlan, |
| 179 | ScheduleResults_output scheduleResults_output, | 179 | ScheduleResults_output scheduleResults_output, |
| 180 | TTInfoResults_output ttInfoResults_output) { | 180 | TTInfoResults_output ttInfoResults_output) { |
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
| @@ -360,7 +360,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im | @@ -360,7 +360,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im | ||
| 360 | } | 360 | } |
| 361 | editInfo.getHeader().addAll(Arrays.asList(headarrays)); | 361 | editInfo.getHeader().addAll(Arrays.asList(headarrays)); |
| 362 | 362 | ||
| 363 | - editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.2f,营运里程=%.2f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy)); | 363 | + editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.2f,营运里程=%.2f,总里程=%.2f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy, all_lc_ks + all_lc_yy)); |
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//"); | 366 | LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//"); |
src/main/java/com/bsth/service/schedule/rules/MyDroolsConfiguration.java
| @@ -4,7 +4,6 @@ import org.kie.api.KieBase; | @@ -4,7 +4,6 @@ import org.kie.api.KieBase; | ||
| 4 | import org.kie.api.KieBaseConfiguration; | 4 | import org.kie.api.KieBaseConfiguration; |
| 5 | import org.kie.api.KieServices; | 5 | import org.kie.api.KieServices; |
| 6 | import org.kie.api.builder.*; | 6 | import org.kie.api.builder.*; |
| 7 | -import org.kie.api.builder.Message; | ||
| 8 | import org.kie.api.builder.model.KieBaseModel; | 7 | import org.kie.api.builder.model.KieBaseModel; |
| 9 | import org.kie.api.builder.model.KieModuleModel; | 8 | import org.kie.api.builder.model.KieModuleModel; |
| 10 | import org.kie.api.builder.model.KieSessionModel; | 9 | import org.kie.api.builder.model.KieSessionModel; |
| @@ -12,6 +11,8 @@ import org.kie.api.conf.EqualityBehaviorOption; | @@ -12,6 +11,8 @@ import org.kie.api.conf.EqualityBehaviorOption; | ||
| 12 | import org.kie.api.conf.EventProcessingOption; | 11 | import org.kie.api.conf.EventProcessingOption; |
| 13 | import org.kie.api.runtime.KieContainer; | 12 | import org.kie.api.runtime.KieContainer; |
| 14 | import org.kie.api.runtime.conf.ClockTypeOption; | 13 | import org.kie.api.runtime.conf.ClockTypeOption; |
| 14 | +import org.slf4j.Logger; | ||
| 15 | +import org.slf4j.LoggerFactory; | ||
| 15 | import org.springframework.context.annotation.Bean; | 16 | import org.springframework.context.annotation.Bean; |
| 16 | import org.springframework.context.annotation.Configuration; | 17 | import org.springframework.context.annotation.Configuration; |
| 17 | 18 | ||
| @@ -20,6 +21,9 @@ import org.springframework.context.annotation.Configuration; | @@ -20,6 +21,9 @@ import org.springframework.context.annotation.Configuration; | ||
| 20 | */ | 21 | */ |
| 21 | @Configuration | 22 | @Configuration |
| 22 | public class MyDroolsConfiguration { | 23 | public class MyDroolsConfiguration { |
| 24 | + /** 日志记录器 */ | ||
| 25 | + private static final Logger logger = LoggerFactory.getLogger(MyDroolsConfiguration.class); | ||
| 26 | + | ||
| 23 | /** | 27 | /** |
| 24 | * 返回一个kiebase知识库,直接冲文件系统读入drl规则文件, | 28 | * 返回一个kiebase知识库,直接冲文件系统读入drl规则文件, |
| 25 | * TODO:以后需要从数据库读入规则文件,并重新创建kbase知识库。 | 29 | * TODO:以后需要从数据库读入规则文件,并重新创建kbase知识库。 |
| @@ -72,8 +76,12 @@ public class MyDroolsConfiguration { | @@ -72,8 +76,12 @@ public class MyDroolsConfiguration { | ||
| 72 | // 4、创建KieBuilder,使用KieFileSystem构建 | 76 | // 4、创建KieBuilder,使用KieFileSystem构建 |
| 73 | KieBuilder kieBuilder = kieServices.newKieBuilder(kfs).buildAll(); | 77 | KieBuilder kieBuilder = kieServices.newKieBuilder(kfs).buildAll(); |
| 74 | Results results = kieBuilder.getResults(); | 78 | Results results = kieBuilder.getResults(); |
| 75 | - if (results.hasMessages(Message.Level.ERROR)) | ||
| 76 | - throw new IllegalStateException("构建drools6错误:" + results.getMessages()); | 79 | +// if (results.hasMessages(Message.Level.ERROR)) |
| 80 | +// throw new IllegalStateException("构建drools6错误:" + results.getMessages()); | ||
| 81 | + if (results.hasMessages(Message.Level.ERROR)) { | ||
| 82 | + logger.info("构建drools6错误:" + results.getMessages()); | ||
| 83 | + return null; | ||
| 84 | + } | ||
| 77 | 85 | ||
| 78 | // 5、获取KieContainer | 86 | // 5、获取KieContainer |
| 79 | // TODO:ReleaseId用处很大,以后再议 | 87 | // TODO:ReleaseId用处很大,以后再议 |
src/main/java/com/bsth/service/schedule/utils/DataImportExportService.java deleted
100644 → 0
| 1 | -package com.bsth.service.schedule.utils; | ||
| 2 | - | ||
| 3 | -import org.springframework.web.multipart.MultipartFile; | ||
| 4 | - | ||
| 5 | -import java.io.File; | ||
| 6 | -import java.util.Map; | ||
| 7 | - | ||
| 8 | -/** | ||
| 9 | - * 数据导入导出服务。 | ||
| 10 | - */ | ||
| 11 | -public interface DataImportExportService { | ||
| 12 | - /** | ||
| 13 | - * 上传文件。 | ||
| 14 | - * @param file mutipartFile | ||
| 15 | - * @return 上传后的文件路径 | ||
| 16 | - * @throws Exception | ||
| 17 | - */ | ||
| 18 | - File uploadFile(MultipartFile file) throws Exception; | ||
| 19 | - | ||
| 20 | - /** | ||
| 21 | - * 上传文件,并导入文件数据。 | ||
| 22 | - * @param datafile 上传的文件 | ||
| 23 | - * @param ktrFile 导入的逻辑ktr文件 | ||
| 24 | - * @throws Exception | ||
| 25 | - */ | ||
| 26 | - void fileDataImport(MultipartFile datafile, File ktrFile) throws Exception; | ||
| 27 | - void fileDataImport(File datafile, File ktrFile) throws Exception; | ||
| 28 | - | ||
| 29 | - /** | ||
| 30 | - * 数据导出。 | ||
| 31 | - * @param fileName 文件名 | ||
| 32 | - * @param ktrFile 导出的逻辑ktr文件 | ||
| 33 | - * @return 导出的文件 | ||
| 34 | - * @throws Exception | ||
| 35 | - */ | ||
| 36 | - File fileDataOutput(String fileName, File ktrFile) throws Exception; | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - File fileDataOutput(String fileName, File ktrFile, Map<String, Object> param) throws Exception; | ||
| 40 | -} |
src/main/java/com/bsth/service/schedule/utils/DataImportExportServiceImpl.java deleted
100644 → 0
| 1 | -package com.bsth.service.schedule.utils; | ||
| 2 | - | ||
| 3 | -import com.google.common.io.Files; | ||
| 4 | -import org.joda.time.DateTime; | ||
| 5 | -import org.pentaho.di.core.KettleEnvironment; | ||
| 6 | -import org.pentaho.di.core.util.EnvUtil; | ||
| 7 | -import org.pentaho.di.trans.Trans; | ||
| 8 | -import org.pentaho.di.trans.TransMeta; | ||
| 9 | -import org.springframework.beans.factory.InitializingBean; | ||
| 10 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | -import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||
| 12 | -import org.springframework.stereotype.Service; | ||
| 13 | -import org.springframework.util.CollectionUtils; | ||
| 14 | -import org.springframework.web.multipart.MultipartFile; | ||
| 15 | - | ||
| 16 | -import java.io.File; | ||
| 17 | -import java.util.HashMap; | ||
| 18 | -import java.util.Map; | ||
| 19 | -import java.util.Properties; | ||
| 20 | - | ||
| 21 | -/** | ||
| 22 | - * Created by xu on 16/6/23. | ||
| 23 | - */ | ||
| 24 | -@Service | ||
| 25 | -@EnableConfigurationProperties(DataToolsProperties.class) | ||
| 26 | -public class DataImportExportServiceImpl implements DataImportExportService, InitializingBean { | ||
| 27 | - | ||
| 28 | - @Autowired | ||
| 29 | - private DataToolsProperties dataToolsProperties; | ||
| 30 | - | ||
| 31 | - /** | ||
| 32 | - * 自定义kettle环境初始化定义。 | ||
| 33 | - */ | ||
| 34 | - private void ktrEnvironmentInit() throws Exception { | ||
| 35 | - // 由于kettle.properties可能没有(没有安装过kettle), | ||
| 36 | - // 导致 EnvUtil.environmentInit() 报找不到kettle.properties文件 | ||
| 37 | - // 所以这里重写 EnvUtil.environmentInit() 方法 | ||
| 38 | - | ||
| 39 | - if(Thread.currentThread().getContextClassLoader() == null) { | ||
| 40 | - Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader()); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | - // 获取配置文件 | ||
| 44 | - File file = new File(getClass().getResource(dataToolsProperties.getKettleProperties()).toURI()); | ||
| 45 | - Properties kettleProperties = EnvUtil.readProperties(file.getAbsolutePath()); | ||
| 46 | - EnvUtil.applyKettleProperties(kettleProperties); | ||
| 47 | - System.getProperties().put("Internal.Cluster.Size", "1"); | ||
| 48 | - System.getProperties().put("Internal.Slave.Transformation.Number", "0"); | ||
| 49 | - System.getProperties().put("Internal.Slave.Server.Name", "slave-trans-name"); | ||
| 50 | - System.getProperties().put("Internal.Step.CopyNr", "0"); | ||
| 51 | - System.getProperties().put("Internal.Step.Name", "step-name"); | ||
| 52 | - System.getProperties().put("Internal.Step.Partition.ID", "partition-id"); | ||
| 53 | - System.getProperties().put("Internal.Step.Partition.Number", "0"); | ||
| 54 | - System.getProperties().put("Internal.Step.Unique.Count", "1"); | ||
| 55 | - System.getProperties().put("Internal.Step.Unique.Number", "0"); | ||
| 56 | - if(!kettleProperties.containsKey("vfs.sftp.org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder.USER_DIR_IS_ROOT")) { | ||
| 57 | - System.getProperties().put("vfs.sftp.org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder.USER_DIR_IS_ROOT", "false"); | ||
| 58 | - } | ||
| 59 | - | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - @Override | ||
| 63 | - public void afterPropertiesSet() throws Exception { | ||
| 64 | - // 初始化kettle环境(自定义) | ||
| 65 | - ktrEnvironmentInit(); | ||
| 66 | - | ||
| 67 | - // 添加全局ktr变量,并覆盖原来的设置 | ||
| 68 | - Map<String, String> kvars = new HashMap<>(); | ||
| 69 | - kvars.put("v_db_ip", dataToolsProperties.getKvarsDbip()); | ||
| 70 | - kvars.put("v_db_uname", dataToolsProperties.getKvarsDbuname()); | ||
| 71 | - kvars.put("v_db_pwd", dataToolsProperties.getKvarsDbpwd()); | ||
| 72 | - kvars.put("v_db_dname", dataToolsProperties.getKvarsDbdname()); | ||
| 73 | - EnvUtil.applyKettleProperties(kvars, true); | ||
| 74 | - KettleEnvironment.init(); | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | - @Override | ||
| 78 | - public File uploadFile(MultipartFile file) throws Exception { | ||
| 79 | - // TODO:以后的文件名要加时间戳 | ||
| 80 | - File newFile = new File( | ||
| 81 | - dataToolsProperties.getFileuploadDir() + File.separator + | ||
| 82 | - file.getOriginalFilename()); | ||
| 83 | - Files.write(file.getBytes(), newFile); | ||
| 84 | - | ||
| 85 | - return newFile; | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - @Override | ||
| 89 | - public void fileDataImport(MultipartFile datafile, File ktrFile) throws Exception { | ||
| 90 | - // 1、上传数据文件 | ||
| 91 | - File uploadFile = uploadFile(datafile); | ||
| 92 | - | ||
| 93 | - // 2、使用kettle运行封装数据导入逻辑的ktr转换文件 | ||
| 94 | - // 2.1、初始化kettle(组件初始化已经做了) | ||
| 95 | - // 2.2、创建转换元数据,转换 | ||
| 96 | - TransMeta transMeta = new TransMeta(ktrFile.getAbsolutePath()); | ||
| 97 | - Trans trans = new Trans(transMeta); | ||
| 98 | - // 2.3、设定命名参数,用于指定数据文件,注意每个ktr必须都有以下指定的命名参数 | ||
| 99 | - trans.setParameterValue("filepath", uploadFile.getAbsolutePath()); // 指定导入数据文件的位置 | ||
| 100 | - trans.setParameterValue("erroroutputdir", dataToolsProperties.getTransErrordir()); // ktr转换错误输出目录 | ||
| 101 | - // TODO:可以考虑设定日志输出 | ||
| 102 | - // 2.4、执行转换 | ||
| 103 | - trans.execute(null); | ||
| 104 | - // 2.5、等待转换结束 | ||
| 105 | - trans.waitUntilFinished(); | ||
| 106 | - | ||
| 107 | - // 3、判定ktr错误数,注意这种错误代表部分数据错误,不会终止转换执行,一般设计ktr的时候,会有错误输出文件,TODO:以后考虑使用日志实时输出 | ||
| 108 | - if (trans.getErrors() > 0) { | ||
| 109 | - throw new Exception("转换数据部分错误,请查看相关错误输出文件!"); | ||
| 110 | - } | ||
| 111 | - } | ||
| 112 | - | ||
| 113 | - @Override | ||
| 114 | - public void fileDataImport(File datafile, File ktrFile) throws Exception { | ||
| 115 | -// // 1、上传数据文件 | ||
| 116 | -// File uploadFile = datafile; | ||
| 117 | - | ||
| 118 | - // 2、使用kettle运行封装数据导入逻辑的ktr转换文件 | ||
| 119 | - // 2.1、初始化kettle(组件初始化已经做了) | ||
| 120 | - // 2.2、创建转换元数据,转换 | ||
| 121 | - TransMeta transMeta = new TransMeta(ktrFile.getAbsolutePath()); | ||
| 122 | - Trans trans = new Trans(transMeta); | ||
| 123 | - // 2.3、设定命名参数,用于指定数据文件,注意每个ktr必须都有以下指定的命名参数 | ||
| 124 | - trans.setParameterValue("filepath", datafile.getAbsolutePath()); // 指定导入数据文件的位置 | ||
| 125 | - trans.setParameterValue("erroroutputdir", dataToolsProperties.getTransErrordir()); // ktr转换错误输出目录 | ||
| 126 | - // TODO:可以考虑设定日志输出 | ||
| 127 | - // 2.4、执行转换 | ||
| 128 | - trans.execute(null); | ||
| 129 | - // 2.5、等待转换结束 | ||
| 130 | - trans.waitUntilFinished(); | ||
| 131 | - | ||
| 132 | - // 3、判定ktr错误数,注意这种错误代表部分数据错误,不会终止转换执行,一般设计ktr的时候,会有错误输出文件,TODO:以后考虑使用日志实时输出 | ||
| 133 | - if (trans.getErrors() > 0) { | ||
| 134 | - throw new Exception("转换数据部分错误,请查看相关错误输出文件!"); | ||
| 135 | - } | ||
| 136 | - } | ||
| 137 | - | ||
| 138 | - @Override | ||
| 139 | - public File fileDataOutput(String fileName, File ktrFile) throws Exception { | ||
| 140 | - return fileDataOutput(fileName, ktrFile, null); | ||
| 141 | - } | ||
| 142 | - | ||
| 143 | - @Override | ||
| 144 | - public File fileDataOutput(String fileName, File ktrFile, Map<String, Object> param) throws Exception { | ||
| 145 | - // 初始化转换,元数据,转换对象 | ||
| 146 | - TransMeta transMeta = new TransMeta(ktrFile.getAbsolutePath()); | ||
| 147 | - Trans trans = new Trans(transMeta); | ||
| 148 | - // 设定命名参数 | ||
| 149 | - String filepath = dataToolsProperties.getFileoutputDir() + | ||
| 150 | - File.separator + | ||
| 151 | - fileName + | ||
| 152 | - new DateTime().toString("yyyyMMddHHmmss") + ".xls"; | ||
| 153 | - trans.setParameterValue("filepath", filepath); | ||
| 154 | - | ||
| 155 | - // 添加其他参数 | ||
| 156 | - if (!CollectionUtils.isEmpty(param)) { | ||
| 157 | - for (String key : param.keySet()) { | ||
| 158 | - trans.setParameterValue(key, String.valueOf(param.get(key))); | ||
| 159 | - } | ||
| 160 | - } | ||
| 161 | - | ||
| 162 | - // 执行转换 | ||
| 163 | - trans.execute(null); | ||
| 164 | - // 等待转换结束 | ||
| 165 | - trans.waitUntilFinished(); | ||
| 166 | - | ||
| 167 | - if (trans.getErrors() > 0) { | ||
| 168 | - throw new Exception("转换数据部分错误,请查看相关错误输出文件!"); | ||
| 169 | - } | ||
| 170 | - | ||
| 171 | - return new File(filepath); | ||
| 172 | - } | ||
| 173 | - | ||
| 174 | - | ||
| 175 | - // TODO:以后改成下面的样子 | ||
| 176 | -// import java.io.FileInputStream; | ||
| 177 | -// import java.io.FileOutputStream; | ||
| 178 | -// import java.io.IOException; | ||
| 179 | -// import java.io.InputStream; | ||
| 180 | -// import java.util.Iterator; | ||
| 181 | -// | ||
| 182 | -// import org.apache.poi.hssf.usermodel.HSSFCell; | ||
| 183 | -// import org.apache.poi.hssf.usermodel.HSSFRow; | ||
| 184 | -// import org.apache.poi.hssf.usermodel.HSSFSheet; | ||
| 185 | -// import org.apache.poi.hssf.usermodel.HSSFWorkbook; | ||
| 186 | -// | ||
| 187 | -// import org.apache.poi.xssf.usermodel.XSSFCell; | ||
| 188 | -// import org.apache.poi.xssf.usermodel.XSSFRow; | ||
| 189 | -// import org.apache.poi.xssf.usermodel.XSSFSheet; | ||
| 190 | -// import org.apache.poi.xssf.usermodel.XSSFWorkbook; | ||
| 191 | -// | ||
| 192 | -// public class ReadWriteExcelFile { | ||
| 193 | -// | ||
| 194 | -// public static void readXLSFile() throws IOException | ||
| 195 | -// { | ||
| 196 | -// InputStream ExcelFileToRead = new FileInputStream("C:/Test.xls"); | ||
| 197 | -// HSSFWorkbook wb = new HSSFWorkbook(ExcelFileToRead); | ||
| 198 | -// | ||
| 199 | -// HSSFSheet sheet=wb.getSheetAt(0); | ||
| 200 | -// HSSFRow row; | ||
| 201 | -// HSSFCell cell; | ||
| 202 | -// | ||
| 203 | -// Iterator rows = sheet.rowIterator(); | ||
| 204 | -// | ||
| 205 | -// while (rows.hasNext()) | ||
| 206 | -// { | ||
| 207 | -// row=(HSSFRow) rows.next(); | ||
| 208 | -// Iterator cells = row.cellIterator(); | ||
| 209 | -// | ||
| 210 | -// while (cells.hasNext()) | ||
| 211 | -// { | ||
| 212 | -// cell=(HSSFCell) cells.next(); | ||
| 213 | -// | ||
| 214 | -// if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) | ||
| 215 | -// { | ||
| 216 | -// System.out.print(cell.getStringCellValue()+" "); | ||
| 217 | -// } | ||
| 218 | -// else if(cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) | ||
| 219 | -// { | ||
| 220 | -// System.out.print(cell.getNumericCellValue()+" "); | ||
| 221 | -// } | ||
| 222 | -// else | ||
| 223 | -// { | ||
| 224 | -// //U Can Handel Boolean, Formula, Errors | ||
| 225 | -// } | ||
| 226 | -// } | ||
| 227 | -// System.out.println(); | ||
| 228 | -// } | ||
| 229 | -// | ||
| 230 | -// } | ||
| 231 | -// | ||
| 232 | -// public static void writeXLSFile() throws IOException { | ||
| 233 | -// | ||
| 234 | -// String excelFileName = "C:/Test.xls";//name of excel file | ||
| 235 | -// | ||
| 236 | -// String sheetName = "Sheet1";//name of sheet | ||
| 237 | -// | ||
| 238 | -// HSSFWorkbook wb = new HSSFWorkbook(); | ||
| 239 | -// HSSFSheet sheet = wb.createSheet(sheetName) ; | ||
| 240 | -// | ||
| 241 | -// //iterating r number of rows | ||
| 242 | -// for (int r=0;r < 5; r++ ) | ||
| 243 | -// { | ||
| 244 | -// HSSFRow row = sheet.createRow(r); | ||
| 245 | -// | ||
| 246 | -// //iterating c number of columns | ||
| 247 | -// for (int c=0;c < 5; c++ ) | ||
| 248 | -// { | ||
| 249 | -// HSSFCell cell = row.createCell(c); | ||
| 250 | -// | ||
| 251 | -// cell.setCellValue("Cell "+r+" "+c); | ||
| 252 | -// } | ||
| 253 | -// } | ||
| 254 | -// | ||
| 255 | -// FileOutputStream fileOut = new FileOutputStream(excelFileName); | ||
| 256 | -// | ||
| 257 | -// //write this workbook to an Outputstream. | ||
| 258 | -// wb.write(fileOut); | ||
| 259 | -// fileOut.flush(); | ||
| 260 | -// fileOut.close(); | ||
| 261 | -// } | ||
| 262 | -// | ||
| 263 | -// public static void readXLSXFile() throws IOException | ||
| 264 | -// { | ||
| 265 | -// InputStream ExcelFileToRead = new FileInputStream("C:/Test.xlsx"); | ||
| 266 | -// XSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead); | ||
| 267 | -// | ||
| 268 | -// XSSFWorkbook test = new XSSFWorkbook(); | ||
| 269 | -// | ||
| 270 | -// XSSFSheet sheet = wb.getSheetAt(0); | ||
| 271 | -// XSSFRow row; | ||
| 272 | -// XSSFCell cell; | ||
| 273 | -// | ||
| 274 | -// Iterator rows = sheet.rowIterator(); | ||
| 275 | -// | ||
| 276 | -// while (rows.hasNext()) | ||
| 277 | -// { | ||
| 278 | -// row=(XSSFRow) rows.next(); | ||
| 279 | -// Iterator cells = row.cellIterator(); | ||
| 280 | -// while (cells.hasNext()) | ||
| 281 | -// { | ||
| 282 | -// cell=(XSSFCell) cells.next(); | ||
| 283 | -// | ||
| 284 | -// if (cell.getCellType() == XSSFCell.CELL_TYPE_STRING) | ||
| 285 | -// { | ||
| 286 | -// System.out.print(cell.getStringCellValue()+" "); | ||
| 287 | -// } | ||
| 288 | -// else if(cell.getCellType() == XSSFCell.CELL_TYPE_NUMERIC) | ||
| 289 | -// { | ||
| 290 | -// System.out.print(cell.getNumericCellValue()+" "); | ||
| 291 | -// } | ||
| 292 | -// else | ||
| 293 | -// { | ||
| 294 | -// //U Can Handel Boolean, Formula, Errors | ||
| 295 | -// } | ||
| 296 | -// } | ||
| 297 | -// System.out.println(); | ||
| 298 | -// } | ||
| 299 | -// | ||
| 300 | -// } | ||
| 301 | -// | ||
| 302 | -// public static void writeXLSXFile() throws IOException { | ||
| 303 | -// | ||
| 304 | -// String excelFileName = "C:/Test.xlsx";//name of excel file | ||
| 305 | -// | ||
| 306 | -// String sheetName = "Sheet1";//name of sheet | ||
| 307 | -// | ||
| 308 | -// XSSFWorkbook wb = new XSSFWorkbook(); | ||
| 309 | -// XSSFSheet sheet = wb.createSheet(sheetName) ; | ||
| 310 | -// | ||
| 311 | -// //iterating r number of rows | ||
| 312 | -// for (int r=0;r < 5; r++ ) | ||
| 313 | -// { | ||
| 314 | -// XSSFRow row = sheet.createRow(r); | ||
| 315 | -// | ||
| 316 | -// //iterating c number of columns | ||
| 317 | -// for (int c=0;c < 5; c++ ) | ||
| 318 | -// { | ||
| 319 | -// XSSFCell cell = row.createCell(c); | ||
| 320 | -// | ||
| 321 | -// cell.setCellValue("Cell "+r+" "+c); | ||
| 322 | -// } | ||
| 323 | -// } | ||
| 324 | -// | ||
| 325 | -// FileOutputStream fileOut = new FileOutputStream(excelFileName); | ||
| 326 | -// | ||
| 327 | -// //write this workbook to an Outputstream. | ||
| 328 | -// wb.write(fileOut); | ||
| 329 | -// fileOut.flush(); | ||
| 330 | -// fileOut.close(); | ||
| 331 | -// } | ||
| 332 | -// | ||
| 333 | -// public static void main(String[] args) throws IOException { | ||
| 334 | -// | ||
| 335 | -// writeXLSFile(); | ||
| 336 | -// readXLSFile(); | ||
| 337 | -// | ||
| 338 | -// writeXLSXFile(); | ||
| 339 | -// readXLSXFile(); | ||
| 340 | -// | ||
| 341 | -// } | ||
| 342 | -// | ||
| 343 | -// } | ||
| 344 | -} |
src/main/java/com/bsth/service/schedule/utils/DataToolsServiceImpl.java
| @@ -13,10 +13,9 @@ import org.pentaho.di.trans.Trans; | @@ -13,10 +13,9 @@ import org.pentaho.di.trans.Trans; | ||
| 13 | import org.pentaho.di.trans.TransMeta; | 13 | import org.pentaho.di.trans.TransMeta; |
| 14 | import org.slf4j.Logger; | 14 | import org.slf4j.Logger; |
| 15 | import org.slf4j.LoggerFactory; | 15 | import org.slf4j.LoggerFactory; |
| 16 | -import org.springframework.beans.factory.InitializingBean; | ||
| 17 | import org.springframework.beans.factory.annotation.Autowired; | 16 | import org.springframework.beans.factory.annotation.Autowired; |
| 18 | import org.springframework.boot.context.properties.EnableConfigurationProperties; | 17 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 19 | -import org.springframework.stereotype.Service; | 18 | +import org.springframework.stereotype.Component; |
| 20 | 19 | ||
| 21 | import java.io.File; | 20 | import java.io.File; |
| 22 | import java.io.PrintWriter; | 21 | import java.io.PrintWriter; |
| @@ -24,19 +23,41 @@ import java.io.StringWriter; | @@ -24,19 +23,41 @@ import java.io.StringWriter; | ||
| 24 | import java.util.HashMap; | 23 | import java.util.HashMap; |
| 25 | import java.util.Map; | 24 | import java.util.Map; |
| 26 | import java.util.Properties; | 25 | import java.util.Properties; |
| 26 | +import java.util.concurrent.atomic.AtomicBoolean; | ||
| 27 | 27 | ||
| 28 | /** | 28 | /** |
| 29 | * Created by xu on 17/1/3. | 29 | * Created by xu on 17/1/3. |
| 30 | */ | 30 | */ |
| 31 | -@Service | 31 | +@Component |
| 32 | @EnableConfigurationProperties(DataToolsProperties.class) | 32 | @EnableConfigurationProperties(DataToolsProperties.class) |
| 33 | -public class DataToolsServiceImpl implements DataToolsService, InitializingBean { | 33 | +public class DataToolsServiceImpl implements DataToolsService { |
| 34 | /** 日志记录器 */ | 34 | /** 日志记录器 */ |
| 35 | private static final Logger LOGGER = LoggerFactory.getLogger(DataToolsServiceImpl.class); | 35 | private static final Logger LOGGER = LoggerFactory.getLogger(DataToolsServiceImpl.class); |
| 36 | 36 | ||
| 37 | @Autowired | 37 | @Autowired |
| 38 | private DataToolsProperties dataToolsProperties; | 38 | private DataToolsProperties dataToolsProperties; |
| 39 | 39 | ||
| 40 | + /** 原子操作类 */ | ||
| 41 | + private AtomicBoolean flag = new AtomicBoolean(false); | ||
| 42 | + | ||
| 43 | + private void initKettle() throws Exception { | ||
| 44 | + if (flag.compareAndSet(false, true)) { | ||
| 45 | + LOGGER.info("kettle初始化......"); | ||
| 46 | + | ||
| 47 | + // 初始化kettle环境(自定义) | ||
| 48 | + ktrEnvironmentInit(); | ||
| 49 | + | ||
| 50 | + // 添加全局ktr变量,并覆盖原来的设置 | ||
| 51 | + Map<String, String> kvars = new HashMap<>(); | ||
| 52 | + kvars.put("v_db_ip", dataToolsProperties.getKvarsDbip()); | ||
| 53 | + kvars.put("v_db_uname", dataToolsProperties.getKvarsDbuname()); | ||
| 54 | + kvars.put("v_db_pwd", dataToolsProperties.getKvarsDbpwd()); | ||
| 55 | + kvars.put("v_db_dname", dataToolsProperties.getKvarsDbdname()); | ||
| 56 | + EnvUtil.applyKettleProperties(kvars, true); | ||
| 57 | + KettleEnvironment.init(); | ||
| 58 | + } | ||
| 59 | + } | ||
| 60 | + | ||
| 40 | /** | 61 | /** |
| 41 | * 自定义kettle环境初始化定义。 | 62 | * 自定义kettle环境初始化定义。 |
| 42 | */ | 63 | */ |
| @@ -70,24 +91,11 @@ public class DataToolsServiceImpl implements DataToolsService, InitializingBean | @@ -70,24 +91,11 @@ public class DataToolsServiceImpl implements DataToolsService, InitializingBean | ||
| 70 | } | 91 | } |
| 71 | 92 | ||
| 72 | @Override | 93 | @Override |
| 73 | - public void afterPropertiesSet() throws Exception { | ||
| 74 | - // 初始化kettle环境(自定义) | ||
| 75 | - ktrEnvironmentInit(); | ||
| 76 | - | ||
| 77 | - // 添加全局ktr变量,并覆盖原来的设置 | ||
| 78 | - Map<String, String> kvars = new HashMap<>(); | ||
| 79 | - kvars.put("v_db_ip", dataToolsProperties.getKvarsDbip()); | ||
| 80 | - kvars.put("v_db_uname", dataToolsProperties.getKvarsDbuname()); | ||
| 81 | - kvars.put("v_db_pwd", dataToolsProperties.getKvarsDbpwd()); | ||
| 82 | - kvars.put("v_db_dname", dataToolsProperties.getKvarsDbdname()); | ||
| 83 | - EnvUtil.applyKettleProperties(kvars, true); | ||
| 84 | - KettleEnvironment.init(); | ||
| 85 | - } | ||
| 86 | - | ||
| 87 | - @Override | ||
| 88 | public File uploadFile(String filename, byte[] filedata) throws ScheduleException { | 94 | public File uploadFile(String filename, byte[] filedata) throws ScheduleException { |
| 89 | // 上传文件 | 95 | // 上传文件 |
| 90 | try { | 96 | try { |
| 97 | + initKettle(); | ||
| 98 | + | ||
| 91 | LOGGER.info("start uploadFile...originalFilename={}", filename); | 99 | LOGGER.info("start uploadFile...originalFilename={}", filename); |
| 92 | File newFile = new File(dataToolsProperties.getFileuploadDir() + File.separator + | 100 | File newFile = new File(dataToolsProperties.getFileuploadDir() + File.separator + |
| 93 | filename + "-upload-" + new DateTime().toString("yyyyMMddHHmmss") + ".xls"); | 101 | filename + "-upload-" + new DateTime().toString("yyyyMMddHHmmss") + ".xls"); |
| @@ -127,6 +135,8 @@ public class DataToolsServiceImpl implements DataToolsService, InitializingBean | @@ -127,6 +135,8 @@ public class DataToolsServiceImpl implements DataToolsService, InitializingBean | ||
| 127 | String transLogId = ""; | 135 | String transLogId = ""; |
| 128 | String transMetaLogId = ""; | 136 | String transMetaLogId = ""; |
| 129 | try { | 137 | try { |
| 138 | + initKettle(); | ||
| 139 | + | ||
| 130 | LOGGER.info("start importData...originalFilename={}", file.getAbsolutePath()); | 140 | LOGGER.info("start importData...originalFilename={}", file.getAbsolutePath()); |
| 131 | // 检查参数 | 141 | // 检查参数 |
| 132 | String transpath = String.valueOf(params.get("transpath")); | 142 | String transpath = String.valueOf(params.get("transpath")); |
| @@ -189,6 +199,8 @@ public class DataToolsServiceImpl implements DataToolsService, InitializingBean | @@ -189,6 +199,8 @@ public class DataToolsServiceImpl implements DataToolsService, InitializingBean | ||
| 189 | String transLogId = ""; | 199 | String transLogId = ""; |
| 190 | String transMetaLogId = ""; | 200 | String transMetaLogId = ""; |
| 191 | try { | 201 | try { |
| 202 | + initKettle(); | ||
| 203 | + | ||
| 192 | LOGGER.info("start exportData..."); | 204 | LOGGER.info("start exportData..."); |
| 193 | // 检查参数 | 205 | // 检查参数 |
| 194 | String filename = String.valueOf(params.get("filename")); | 206 | String filename = String.valueOf(params.get("filename")); |
src/main/java/com/bsth/service/sys/SysUserService.java
| @@ -3,6 +3,8 @@ package com.bsth.service.sys; | @@ -3,6 +3,8 @@ package com.bsth.service.sys; | ||
| 3 | import com.bsth.entity.sys.SysUser; | 3 | import com.bsth.entity.sys.SysUser; |
| 4 | import com.bsth.service.BaseService; | 4 | import com.bsth.service.BaseService; |
| 5 | 5 | ||
| 6 | +import java.util.Map; | ||
| 7 | + | ||
| 6 | public interface SysUserService extends BaseService<SysUser, Integer>{ | 8 | public interface SysUserService extends BaseService<SysUser, Integer>{ |
| 7 | 9 | ||
| 8 | SysUser findByUserName(String name); | 10 | SysUser findByUserName(String name); |
| @@ -10,4 +12,6 @@ public interface SysUserService extends BaseService<SysUser, Integer>{ | @@ -10,4 +12,6 @@ public interface SysUserService extends BaseService<SysUser, Integer>{ | ||
| 10 | int changeEnabled(int id,int enabled); | 12 | int changeEnabled(int id,int enabled); |
| 11 | 13 | ||
| 12 | int changePWD(int id,String newPWD); | 14 | int changePWD(int id,String newPWD); |
| 15 | + | ||
| 16 | + Map<String,Object> register(SysUser u); | ||
| 13 | } | 17 | } |
src/main/java/com/bsth/service/sys/impl/SysUserServiceImpl.java
| 1 | package com.bsth.service.sys.impl; | 1 | package com.bsth.service.sys.impl; |
| 2 | 2 | ||
| 3 | -import java.util.Map; | ||
| 4 | - | ||
| 5 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 6 | -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | ||
| 7 | -import org.springframework.stereotype.Service; | ||
| 8 | - | 3 | +import com.bsth.common.ResponseCode; |
| 9 | import com.bsth.entity.sys.SysUser; | 4 | import com.bsth.entity.sys.SysUser; |
| 10 | import com.bsth.repository.sys.SysUserRepository; | 5 | import com.bsth.repository.sys.SysUserRepository; |
| 11 | -import com.bsth.security.util.SecurityUtils; | ||
| 12 | import com.bsth.service.impl.BaseServiceImpl; | 6 | import com.bsth.service.impl.BaseServiceImpl; |
| 13 | import com.bsth.service.sys.SysUserService; | 7 | import com.bsth.service.sys.SysUserService; |
| 8 | +import org.slf4j.Logger; | ||
| 9 | +import org.slf4j.LoggerFactory; | ||
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | ||
| 12 | +import org.springframework.stereotype.Service; | ||
| 13 | + | ||
| 14 | +import java.util.HashMap; | ||
| 15 | +import java.util.Map; | ||
| 14 | 16 | ||
| 15 | @Service | 17 | @Service |
| 16 | public class SysUserServiceImpl extends BaseServiceImpl<SysUser, Integer> implements SysUserService{ | 18 | public class SysUserServiceImpl extends BaseServiceImpl<SysUser, Integer> implements SysUserService{ |
| 17 | 19 | ||
| 18 | @Autowired | 20 | @Autowired |
| 19 | SysUserRepository sysUserRepository; | 21 | SysUserRepository sysUserRepository; |
| 22 | + | ||
| 23 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 20 | 24 | ||
| 21 | @Override | 25 | @Override |
| 22 | public SysUser findByUserName(String name) { | 26 | public SysUser findByUserName(String name) { |
| @@ -45,4 +49,25 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUser, Integer> implem | @@ -45,4 +49,25 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUser, Integer> implem | ||
| 45 | public int changePWD(int id,String newPWD) { | 49 | public int changePWD(int id,String newPWD) { |
| 46 | return sysUserRepository.changePWD(id,new BCryptPasswordEncoder(4).encode(newPWD)); | 50 | return sysUserRepository.changePWD(id,new BCryptPasswordEncoder(4).encode(newPWD)); |
| 47 | } | 51 | } |
| 52 | + | ||
| 53 | + @Override | ||
| 54 | + public Map<String, Object> register(SysUser u) { | ||
| 55 | + Map<String, Object> rs = new HashMap(); | ||
| 56 | + try{ | ||
| 57 | + //检查用户名是否存在 | ||
| 58 | + if(findByUserName(u.getUserName()) != null){ | ||
| 59 | + rs.put("status", ResponseCode.ERROR); | ||
| 60 | + rs.put("msg", "用户名" + u.getUserName() + "已存在!"); | ||
| 61 | + } | ||
| 62 | + else{ | ||
| 63 | + u.setPassword(new BCryptPasswordEncoder(4).encode(u.getPassword())); | ||
| 64 | + rs = super.save(u); | ||
| 65 | + } | ||
| 66 | + }catch (Exception e){ | ||
| 67 | + logger.error("", e); | ||
| 68 | + rs.put("status", ResponseCode.ERROR); | ||
| 69 | + rs.put("msg", e.getMessage()); | ||
| 70 | + } | ||
| 71 | + return rs; | ||
| 72 | + } | ||
| 48 | } | 73 | } |
src/main/java/com/bsth/util/ComparableJob.java
0 → 100644
| 1 | +package com.bsth.util; | ||
| 2 | + | ||
| 3 | +import java.util.Comparator; | ||
| 4 | +import java.util.Map; | ||
| 5 | + | ||
| 6 | + | ||
| 7 | +public class ComparableJob implements Comparator<Map<String, Object>>{ | ||
| 8 | + | ||
| 9 | + @Override | ||
| 10 | + public int compare(Map<String, Object> o1, Map<String, Object> o2) { | ||
| 11 | + // TODO Auto-generated method stub | ||
| 12 | + return o1.get("nr").toString().compareTo(o2.get("nr").toString()); | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | +} |
src/main/java/com/bsth/util/ComparableLp.java
0 → 100644
| 1 | +package com.bsth.util; | ||
| 2 | + | ||
| 3 | +import java.util.Comparator; | ||
| 4 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 5 | + | ||
| 6 | +public class ComparableLp implements Comparator<ScheduleRealInfo>{ | ||
| 7 | + | ||
| 8 | + @Override | ||
| 9 | + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) { | ||
| 10 | + // TODO Auto-generated method stub | ||
| 11 | + return o1.getLpName().compareTo(o2.getLpName()); | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | +} |
src/main/java/com/bsth/util/db/BaseDao_MS.java deleted
100644 → 0
| 1 | -package com.bsth.util.db; | ||
| 2 | - | ||
| 3 | - | ||
| 4 | -import org.apache.commons.lang3.CharUtils; | ||
| 5 | -import org.apache.commons.lang3.StringUtils; | ||
| 6 | -import org.slf4j.Logger; | ||
| 7 | -import org.slf4j.LoggerFactory; | ||
| 8 | - | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * | ||
| 12 | - * @ClassName: BaseDao | ||
| 13 | - * @author PanZhao | ||
| 14 | - * @param <T> | ||
| 15 | - * @date 2016年6月27日 上午10:33:12 | ||
| 16 | - * | ||
| 17 | - */ | ||
| 18 | -public class BaseDao_MS { | ||
| 19 | - | ||
| 20 | - static Logger logger = LoggerFactory.getLogger(BaseDao_MS.class); | ||
| 21 | - | ||
| 22 | - /** | ||
| 23 | - * | ||
| 24 | - * @Title: propertyToField | ||
| 25 | - * @Description: TODO(java转数据库字段名) | ||
| 26 | - * @param @param property | ||
| 27 | - * @throws | ||
| 28 | - */ | ||
| 29 | - public static String propertyToField(String property) { | ||
| 30 | - if (null == property) { | ||
| 31 | - return ""; | ||
| 32 | - } | ||
| 33 | - char[] chars = property.toCharArray(); | ||
| 34 | - StringBuffer sb = new StringBuffer(); | ||
| 35 | - for (char c : chars) { | ||
| 36 | - if (CharUtils.isAsciiAlphaUpper(c)) { | ||
| 37 | - sb.append("_" + StringUtils.lowerCase(CharUtils.toString(c))); | ||
| 38 | - } else { | ||
| 39 | - sb.append(c); | ||
| 40 | - } | ||
| 41 | - } | ||
| 42 | - return sb.toString(); | ||
| 43 | - } | ||
| 44 | -} |
src/main/java/com/bsth/util/db/DBUtils_MS.java
| 1 | package com.bsth.util.db; | 1 | package com.bsth.util.db; |
| 2 | 2 | ||
| 3 | +import com.mchange.v2.c3p0.DataSources; | ||
| 4 | +import org.apache.log4j.Logger; | ||
| 5 | + | ||
| 6 | +import javax.sql.DataSource; | ||
| 3 | import java.io.FileNotFoundException; | 7 | import java.io.FileNotFoundException; |
| 4 | import java.io.IOException; | 8 | import java.io.IOException; |
| 5 | import java.sql.Connection; | 9 | import java.sql.Connection; |
| @@ -10,15 +14,8 @@ import java.util.HashMap; | @@ -10,15 +14,8 @@ import java.util.HashMap; | ||
| 10 | import java.util.Map; | 14 | import java.util.Map; |
| 11 | import java.util.Properties; | 15 | import java.util.Properties; |
| 12 | 16 | ||
| 13 | -import javax.sql.DataSource; | ||
| 14 | - | ||
| 15 | -import org.apache.log4j.Logger; | ||
| 16 | -import org.springframework.stereotype.Component; | ||
| 17 | - | ||
| 18 | -import com.mchange.v2.c3p0.DataSources; | ||
| 19 | - | ||
| 20 | /** | 17 | /** |
| 21 | - * 808GPS SQL Server数据库连接工具类 | 18 | + * 网关ms库连接池 |
| 22 | * @author PanZhao | 19 | * @author PanZhao |
| 23 | * | 20 | * |
| 24 | */ | 21 | */ |
src/main/java/com/bsth/util/db/DBUtils_oldSystem.java
0 → 100644
| 1 | +package com.bsth.util.db; | ||
| 2 | + | ||
| 3 | +import com.mchange.v2.c3p0.DataSources; | ||
| 4 | +import org.apache.log4j.Logger; | ||
| 5 | + | ||
| 6 | +import javax.sql.DataSource; | ||
| 7 | +import java.sql.Connection; | ||
| 8 | +import java.sql.ResultSet; | ||
| 9 | +import java.sql.SQLException; | ||
| 10 | +import java.sql.Statement; | ||
| 11 | +import java.util.HashMap; | ||
| 12 | +import java.util.Map; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 老系统数据库连接池(保持少量的连接,不会对老系统有什么影响) | ||
| 16 | + * @author PanZhao | ||
| 17 | + * | ||
| 18 | + */ | ||
| 19 | +//@Component | ||
| 20 | +public class DBUtils_oldSystem { | ||
| 21 | + | ||
| 22 | + private static String url = null; | ||
| 23 | + | ||
| 24 | + private static String username = null; | ||
| 25 | + | ||
| 26 | + private static String pwd = null; | ||
| 27 | + | ||
| 28 | + private static DataSource ds_pooled; | ||
| 29 | + | ||
| 30 | + static Logger logger = Logger.getLogger(DBUtils_oldSystem.class); | ||
| 31 | + | ||
| 32 | + static { | ||
| 33 | + | ||
| 34 | + try { | ||
| 35 | + // 1. 加载驱动类 | ||
| 36 | + Class.forName("oracle.jdbc.driver.OracleDriver"); | ||
| 37 | + | ||
| 38 | + url = "jdbc:oracle:thin:@10.10.200.225:1521:orcl"; | ||
| 39 | + username = "jjwgps"; | ||
| 40 | + pwd = "jjwgps"; | ||
| 41 | + | ||
| 42 | + // 设置连接数据库的配置信息 | ||
| 43 | + DataSource ds_unpooled = DataSources.unpooledDataSource(url, | ||
| 44 | + username, pwd); | ||
| 45 | + | ||
| 46 | + Map<String, Object> pool_conf = new HashMap<String, Object>(); | ||
| 47 | + // 设置最大连接数 | ||
| 48 | + pool_conf.put("maxPoolSize", 5); | ||
| 49 | + | ||
| 50 | + pool_conf.put("testConnectionOnCheckout", false); | ||
| 51 | + //异步检测连接的有效性 | ||
| 52 | + pool_conf.put("testConnectionOnCheckin", true); | ||
| 53 | + //10分钟检测一次 | ||
| 54 | + pool_conf.put("idleConnectionTestPeriod", 60 * 10); | ||
| 55 | + ds_pooled = DataSources.pooledDataSource(ds_unpooled, pool_conf); | ||
| 56 | + } catch (ClassNotFoundException e) { | ||
| 57 | + logger.error(e.toString()); | ||
| 58 | + e.printStackTrace(); | ||
| 59 | + } catch (SQLException e) { | ||
| 60 | + logger.error("初始化老系统连接池失败,非正式环境请忽略这个问题!"); | ||
| 61 | + logger.error(e.toString()); | ||
| 62 | + e.printStackTrace(); | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * 获取连接对象 | ||
| 68 | + */ | ||
| 69 | + public static Connection getConnection() throws SQLException { | ||
| 70 | + return ds_pooled.getConnection(); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 释放连接池资源 | ||
| 75 | + */ | ||
| 76 | + public static void clearup() { | ||
| 77 | + if (ds_pooled != null) { | ||
| 78 | + try { | ||
| 79 | + DataSources.destroy(ds_pooled); | ||
| 80 | + } catch (SQLException e) { | ||
| 81 | + logger.error(e.toString()); | ||
| 82 | + e.printStackTrace(); | ||
| 83 | + } | ||
| 84 | + } | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + /** | ||
| 88 | + * 资源关闭 | ||
| 89 | + * | ||
| 90 | + * @param rs | ||
| 91 | + * @param stmt | ||
| 92 | + * @param conn | ||
| 93 | + */ | ||
| 94 | + public static void close(ResultSet rs, Statement stmt, Connection conn) { | ||
| 95 | + if (rs != null) { | ||
| 96 | + try { | ||
| 97 | + rs.close(); | ||
| 98 | + } catch (SQLException e) { | ||
| 99 | + logger.error(e.toString()); | ||
| 100 | + e.printStackTrace(); | ||
| 101 | + } | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + if (stmt != null) { | ||
| 105 | + try { | ||
| 106 | + stmt.close(); | ||
| 107 | + } catch (SQLException e) { | ||
| 108 | + logger.error(e.toString()); | ||
| 109 | + e.printStackTrace(); | ||
| 110 | + } | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + if (conn != null) { | ||
| 114 | + try { | ||
| 115 | + conn.close(); | ||
| 116 | + } catch (SQLException e) { | ||
| 117 | + logger.error(e.toString()); | ||
| 118 | + e.printStackTrace(); | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + public static DataSource getDataSource(){ | ||
| 124 | + return ds_pooled; | ||
| 125 | + } | ||
| 126 | +} |
src/main/resources/datatools/ktrs/carsDataInput.ktr
| @@ -86,6 +86,30 @@ | @@ -86,6 +86,30 @@ | ||
| 86 | <notepads> | 86 | <notepads> |
| 87 | </notepads> | 87 | </notepads> |
| 88 | <connection> | 88 | <connection> |
| 89 | + <name>192.168.168.1_jwgl_dw</name> | ||
| 90 | + <server>192.168.168.1</server> | ||
| 91 | + <type>ORACLE</type> | ||
| 92 | + <access>Native</access> | ||
| 93 | + <database>orcl</database> | ||
| 94 | + <port>1521</port> | ||
| 95 | + <username>jwgl_dw</username> | ||
| 96 | + <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | ||
| 97 | + <servername/> | ||
| 98 | + <data_tablespace/> | ||
| 99 | + <index_tablespace/> | ||
| 100 | + <attributes> | ||
| 101 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 102 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 103 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 104 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 105 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 106 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 107 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 108 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 109 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 110 | + </attributes> | ||
| 111 | + </connection> | ||
| 112 | + <connection> | ||
| 89 | <name>bus_control_variable</name> | 113 | <name>bus_control_variable</name> |
| 90 | <server>${v_db_ip}</server> | 114 | <server>${v_db_ip}</server> |
| 91 | <type>MYSQL</type> | 115 | <type>MYSQL</type> |
| @@ -298,6 +322,18 @@ | @@ -298,6 +322,18 @@ | ||
| 298 | <group/> | 322 | <group/> |
| 299 | </field> | 323 | </field> |
| 300 | <field> | 324 | <field> |
| 325 | + <name>车辆编码</name> | ||
| 326 | + <type>String</type> | ||
| 327 | + <length>-1</length> | ||
| 328 | + <precision>-1</precision> | ||
| 329 | + <trim_type>none</trim_type> | ||
| 330 | + <repeat>N</repeat> | ||
| 331 | + <format/> | ||
| 332 | + <currency/> | ||
| 333 | + <decimal/> | ||
| 334 | + <group/> | ||
| 335 | + </field> | ||
| 336 | + <field> | ||
| 301 | <name>内部编码</name> | 337 | <name>内部编码</name> |
| 302 | <type>String</type> | 338 | <type>String</type> |
| 303 | <length>-1</length> | 339 | <length>-1</length> |
| @@ -358,7 +394,7 @@ | @@ -358,7 +394,7 @@ | ||
| 358 | <group/> | 394 | <group/> |
| 359 | </field> | 395 | </field> |
| 360 | <field> | 396 | <field> |
| 361 | - <name>供应商名称</name> | 397 | + <name>设备供应厂商</name> |
| 362 | <type>String</type> | 398 | <type>String</type> |
| 363 | <length>-1</length> | 399 | <length>-1</length> |
| 364 | <precision>-1</precision> | 400 | <precision>-1</precision> |
| @@ -444,12 +480,12 @@ | @@ -444,12 +480,12 @@ | ||
| 444 | <update>Y</update> | 480 | <update>Y</update> |
| 445 | </value> | 481 | </value> |
| 446 | <value> | 482 | <value> |
| 447 | - <name>inside_code</name> | ||
| 448 | - <rename>内部编码</rename> | 483 | + <name>car_code</name> |
| 484 | + <rename>车辆编码</rename> | ||
| 449 | <update>Y</update> | 485 | <update>Y</update> |
| 450 | </value> | 486 | </value> |
| 451 | <value> | 487 | <value> |
| 452 | - <name>car_code</name> | 488 | + <name>inside_code</name> |
| 453 | <rename>内部编码</rename> | 489 | <rename>内部编码</rename> |
| 454 | <update>Y</update> | 490 | <update>Y</update> |
| 455 | </value> | 491 | </value> |
| @@ -475,7 +511,7 @@ | @@ -475,7 +511,7 @@ | ||
| 475 | </value> | 511 | </value> |
| 476 | <value> | 512 | <value> |
| 477 | <name>supplier_name</name> | 513 | <name>supplier_name</name> |
| 478 | - <rename>供应商名称</rename> | 514 | + <rename>设备供应厂商</rename> |
| 479 | <update>Y</update> | 515 | <update>Y</update> |
| 480 | </value> | 516 | </value> |
| 481 | <value> | 517 | <value> |
| @@ -683,4 +719,3 @@ | @@ -683,4 +719,3 @@ | ||
| 683 | <slave_transformation>N</slave_transformation> | 719 | <slave_transformation>N</slave_transformation> |
| 684 | 720 | ||
| 685 | </transformation> | 721 | </transformation> |
| 686 | - |
src/main/resources/datatools/ktrs/carsDataOutput.ktr
| @@ -81,6 +81,30 @@ | @@ -81,6 +81,30 @@ | ||
| 81 | <notepads> | 81 | <notepads> |
| 82 | </notepads> | 82 | </notepads> |
| 83 | <connection> | 83 | <connection> |
| 84 | + <name>192.168.168.1_jwgl_dw</name> | ||
| 85 | + <server>192.168.168.1</server> | ||
| 86 | + <type>ORACLE</type> | ||
| 87 | + <access>Native</access> | ||
| 88 | + <database>orcl</database> | ||
| 89 | + <port>1521</port> | ||
| 90 | + <username>jwgl_dw</username> | ||
| 91 | + <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | ||
| 92 | + <servername/> | ||
| 93 | + <data_tablespace/> | ||
| 94 | + <index_tablespace/> | ||
| 95 | + <attributes> | ||
| 96 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 97 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 98 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 99 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 100 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 101 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 102 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 103 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 104 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 105 | + </attributes> | ||
| 106 | + </connection> | ||
| 107 | + <connection> | ||
| 84 | <name>bus_control_variable</name> | 108 | <name>bus_control_variable</name> |
| 85 | <server>${v_db_ip}</server> | 109 | <server>${v_db_ip}</server> |
| 86 | <type>MYSQL</type> | 110 | <type>MYSQL</type> |
| @@ -292,6 +316,11 @@ | @@ -292,6 +316,11 @@ | ||
| 292 | <format/> | 316 | <format/> |
| 293 | </field> | 317 | </field> |
| 294 | <field> | 318 | <field> |
| 319 | + <name>车辆编码</name> | ||
| 320 | + <type>String</type> | ||
| 321 | + <format/> | ||
| 322 | + </field> | ||
| 323 | + <field> | ||
| 295 | <name>内部编码</name> | 324 | <name>内部编码</name> |
| 296 | <type>String</type> | 325 | <type>String</type> |
| 297 | <format/> | 326 | <format/> |
| @@ -317,6 +346,11 @@ | @@ -317,6 +346,11 @@ | ||
| 317 | <format/> | 346 | <format/> |
| 318 | </field> | 347 | </field> |
| 319 | <field> | 348 | <field> |
| 349 | + <name>设备供应厂商</name> | ||
| 350 | + <type>String</type> | ||
| 351 | + <format/> | ||
| 352 | + </field> | ||
| 353 | + <field> | ||
| 320 | <name>设备终端号</name> | 354 | <name>设备终端号</name> |
| 321 | <type>String</type> | 355 | <type>String</type> |
| 322 | <format/> | 356 | <format/> |
| @@ -362,6 +396,10 @@ | @@ -362,6 +396,10 @@ | ||
| 362 | <rename>车牌号</rename> | 396 | <rename>车牌号</rename> |
| 363 | <length>-2</length> | 397 | <length>-2</length> |
| 364 | <precision>-2</precision> | 398 | <precision>-2</precision> |
| 399 | + </field> <field> <name>car_code</name> | ||
| 400 | + <rename>车辆编码</rename> | ||
| 401 | + <length>-2</length> | ||
| 402 | + <precision>-2</precision> | ||
| 365 | </field> <field> <name>inside_code</name> | 403 | </field> <field> <name>inside_code</name> |
| 366 | <rename>内部编码</rename> | 404 | <rename>内部编码</rename> |
| 367 | <length>-2</length> | 405 | <length>-2</length> |
src/main/resources/fatso/handle_real_ctl.js
0 → 100644
| 1 | +/** | ||
| 2 | + * 处理线调文件 | ||
| 3 | + */ | ||
| 4 | +var fs = require('fs') | ||
| 5 | + , cheerio = require('cheerio') | ||
| 6 | + , minifier = require('./minifier') | ||
| 7 | + , crypto = require("crypto") | ||
| 8 | + , CleanCSS = require('clean-css') | ||
| 9 | + , UglifyJS = require("uglify-js"); | ||
| 10 | +; | ||
| 11 | + | ||
| 12 | +//不参与的目录 | ||
| 13 | +var pName = 'bsth_control' | ||
| 14 | + , path = process.cwd() | ||
| 15 | + //根目录 | ||
| 16 | + , root = path.substr(0, path.indexOf('\\src\\main')) | ||
| 17 | + , workspace = root.substr(0, root.indexOf('\\' + pName)) | ||
| 18 | + //临时目录 | ||
| 19 | + , dest = (workspace + '\\' + pName + '@fatso_copy').replace(/\//g, '\\') | ||
| 20 | + , _static = '\\src\\main\\resources\\static'; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +var mainFile = dest + _static + '\\real_control_v2\\main.html'; | ||
| 24 | +var mapFile = dest + _static + '\\real_control_v2\\mapmonitor\\real.html'; | ||
| 25 | +var realCtl = { | ||
| 26 | + /** | ||
| 27 | + * 处理线调首页 | ||
| 28 | + */ | ||
| 29 | + handleMain: function (cb) { | ||
| 30 | + //读取文件 | ||
| 31 | + var data = fs.readFileSync(mainFile, 'utf-8') | ||
| 32 | + , $ = cheerio.load(data); | ||
| 33 | + | ||
| 34 | + handleCss($, function () { | ||
| 35 | + handleJs($, mainFile, cb); | ||
| 36 | + }); | ||
| 37 | + }, | ||
| 38 | + /** | ||
| 39 | + * 处理地图模块 | ||
| 40 | + * @param cb | ||
| 41 | + */ | ||
| 42 | + handleMap: function (cb) { | ||
| 43 | + //读取文件 | ||
| 44 | + var data = fs.readFileSync(mapFile, 'utf-8') | ||
| 45 | + , $ = cheerio.load(data); | ||
| 46 | + | ||
| 47 | + handleCss($, function () { | ||
| 48 | + handleJs($, mapFile, cb); | ||
| 49 | + }); | ||
| 50 | + } | ||
| 51 | +}; | ||
| 52 | + | ||
| 53 | +/** | ||
| 54 | + * 处理css | ||
| 55 | + * @type {any} | ||
| 56 | + */ | ||
| 57 | +var handleCss = function ($, cb) { | ||
| 58 | + var cssArray = $('link[rel=stylesheet][merge]'); | ||
| 59 | + //按 merge 值分组 | ||
| 60 | + var cssMap = {}, mergeName; | ||
| 61 | + for (var i = 0, c; c = cssArray[i++];) { | ||
| 62 | + mergeName = $(c).attr('merge'); | ||
| 63 | + if (!cssMap[mergeName]) | ||
| 64 | + cssMap[mergeName] = []; | ||
| 65 | + cssMap[mergeName].push(dest + _static + $(c).attr('href')); | ||
| 66 | + //remove | ||
| 67 | + $(c).remove(); | ||
| 68 | + } | ||
| 69 | + //按 merge 合并压缩css | ||
| 70 | + var ks = get_keys(cssMap), index = 0; | ||
| 71 | + (function () { | ||
| 72 | + if (index >= ks.length) { | ||
| 73 | + cb && cb(); | ||
| 74 | + return; | ||
| 75 | + } | ||
| 76 | + var k = ks[index]; | ||
| 77 | + index++; | ||
| 78 | + var f = arguments.callee; | ||
| 79 | + //合并css | ||
| 80 | + new CleanCSS().minify(cssMap[k], function (error, out) { | ||
| 81 | + var data = out.styles; | ||
| 82 | + var fName = (k + '_' + md5(data)) + '.css'; | ||
| 83 | + //写入 assets css 目录下 | ||
| 84 | + var descFile = dest + _static + '\\real_control_v2\\assets\\css\\' + fName; | ||
| 85 | + fs.open(descFile, 'a', function (err, fd) { | ||
| 86 | + | ||
| 87 | + fs.write(fd, data, function () { | ||
| 88 | + var tag = '<link rel="stylesheet" href="/real_control_v2/assets/css/' + fName + '"/>'; | ||
| 89 | + if ($('head').length > 0) | ||
| 90 | + $('head').append(tag); | ||
| 91 | + else { | ||
| 92 | + if($('link').length > 0) | ||
| 93 | + $('link').last().before(tag); | ||
| 94 | + else | ||
| 95 | + $('div').first().before(tag); | ||
| 96 | + } | ||
| 97 | + console.log(k + ' css', '结束,下一个'); | ||
| 98 | + f(); | ||
| 99 | + }); | ||
| 100 | + }); | ||
| 101 | + }); | ||
| 102 | + })(); | ||
| 103 | +}; | ||
| 104 | + | ||
| 105 | +/** | ||
| 106 | + * 处理js | ||
| 107 | + */ | ||
| 108 | +var handleJs = function ($, file, cb) { | ||
| 109 | + var scriptArray = $('script[merge]'); | ||
| 110 | + //按 merge 值分组 | ||
| 111 | + var jsMap = {}, mergeName; | ||
| 112 | + for (var i = 0, s; s = scriptArray[i++];) { | ||
| 113 | + mergeName = $(s).attr('merge'); | ||
| 114 | + if (!jsMap[mergeName]) | ||
| 115 | + jsMap[mergeName] = []; | ||
| 116 | + jsMap[mergeName].push(dest + _static + $(s).attr('src')); | ||
| 117 | + //remove | ||
| 118 | + $(s).remove(); | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + //按 merge 合并压缩js | ||
| 122 | + var ks = get_keys(jsMap), index = 0; | ||
| 123 | + (function () { | ||
| 124 | + if (index >= ks.length) { | ||
| 125 | + write(file, $.html()); | ||
| 126 | + console.log(file + ' 结束'.green); | ||
| 127 | + cb && cb(); | ||
| 128 | + return; | ||
| 129 | + } | ||
| 130 | + var k = ks[index]; | ||
| 131 | + index++; | ||
| 132 | + var f = arguments.callee; | ||
| 133 | + //合并压缩js | ||
| 134 | + var result = UglifyJS.minify(jsMap[k]); | ||
| 135 | + var data = result.code; | ||
| 136 | + var fName = (k + '_' + md5(data)) + '.js'; | ||
| 137 | + //写入 assets js 目录下 | ||
| 138 | + var descFile = dest + _static + '\\real_control_v2\\assets\\js\\' + fName; | ||
| 139 | + fs.open(descFile, 'a', function (err, fd) { | ||
| 140 | + | ||
| 141 | + fs.write(fd, data, function () { | ||
| 142 | + var tag = '<script src="/real_control_v2/assets/js/' + fName + '"></script>'; | ||
| 143 | + if ($('body').length > 0) | ||
| 144 | + $('body').append(tag); | ||
| 145 | + else { | ||
| 146 | + //没有body 就写在尾部 | ||
| 147 | + $('*').last().after(tag); | ||
| 148 | + } | ||
| 149 | + console.log(k + ' js', '结束,下一个'); | ||
| 150 | + f(); | ||
| 151 | + }); | ||
| 152 | + }); | ||
| 153 | + })(); | ||
| 154 | +}; | ||
| 155 | + | ||
| 156 | +var get_keys = function (json) { | ||
| 157 | + var array = []; | ||
| 158 | + for (var key in json) { | ||
| 159 | + array.push(key); | ||
| 160 | + } | ||
| 161 | + return array; | ||
| 162 | +}; | ||
| 163 | + | ||
| 164 | +function md5(text) { | ||
| 165 | + return crypto.createHash("md5").update(text).digest("hex"); | ||
| 166 | +} | ||
| 167 | + | ||
| 168 | +function write(file, text) { | ||
| 169 | + fs.writeFile(file, text, function (err) { | ||
| 170 | + if (err) { | ||
| 171 | + console.log(err.toString().red); | ||
| 172 | + process.exit(); | ||
| 173 | + } | ||
| 174 | + console.log(file.green); | ||
| 175 | + }); | ||
| 176 | +} | ||
| 177 | + | ||
| 178 | +module.exports = realCtl; | ||
| 0 | \ No newline at end of file | 179 | \ No newline at end of file |
src/main/resources/fatso/package.json
| @@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
| 10 | "license": "ISC", | 10 | "license": "ISC", |
| 11 | "dependencies": { | 11 | "dependencies": { |
| 12 | "cheerio": "^0.20.0", | 12 | "cheerio": "^0.20.0", |
| 13 | + "clean-css": "^4.0.12", | ||
| 13 | "colors": "^1.1.2", | 14 | "colors": "^1.1.2", |
| 14 | "eventproxy": "^0.3.4", | 15 | "eventproxy": "^0.3.4", |
| 15 | "uglify-js": "^2.6.2" | 16 | "uglify-js": "^2.6.2" |
src/main/resources/fatso/parse.js
src/main/resources/fatso/start.js
| @@ -8,7 +8,8 @@ var fs = require('fs') | @@ -8,7 +8,8 @@ var fs = require('fs') | ||
| 8 | ,EventProxy = require('eventproxy') | 8 | ,EventProxy = require('eventproxy') |
| 9 | ,parse = require('./parse') | 9 | ,parse = require('./parse') |
| 10 | ,minifier = require('./minifier') | 10 | ,minifier = require('./minifier') |
| 11 | - ,crypto = require("crypto"); | 11 | + ,crypto = require("crypto") |
| 12 | + ,handle_real_ctl = require('./handle_real_ctl'); | ||
| 12 | 13 | ||
| 13 | //不参与的目录 | 14 | //不参与的目录 |
| 14 | var excludes = ['scheduleApp', 'trafficManage', 'control'] | 15 | var excludes = ['scheduleApp', 'trafficManage', 'control'] |
| @@ -74,15 +75,21 @@ ep.tail('check-js', function(){ | @@ -74,15 +75,21 @@ ep.tail('check-js', function(){ | ||
| 74 | //合并压缩JS | 75 | //合并压缩JS |
| 75 | ep.tail('minifier-js', function(){ | 76 | ep.tail('minifier-js', function(){ |
| 76 | logInfo('handle index.html...'); | 77 | logInfo('handle index.html...'); |
| 77 | - | ||
| 78 | - //先处理首页 | 78 | + |
| 79 | + //再处理首页 | ||
| 79 | ep.emit('handle-index', function(){ | 80 | ep.emit('handle-index', function(){ |
| 80 | //递归处理片段 | 81 | //递归处理片段 |
| 81 | walk(dest + _static + '\\pages', function(item){ | 82 | walk(dest + _static + '\\pages', function(item){ |
| 82 | ep.emit('handle-fragment', item); | 83 | ep.emit('handle-fragment', item); |
| 83 | }, | 84 | }, |
| 84 | function(){ | 85 | function(){ |
| 85 | - ep.emit('package-jar'); | 86 | + //处理线调首页 |
| 87 | + handle_real_ctl.handleMain(function () { | ||
| 88 | + //处理线调地图 | ||
| 89 | + handle_real_ctl.handleMap(function () { | ||
| 90 | + ep.emit('package-jar'); | ||
| 91 | + }); | ||
| 92 | + }); | ||
| 86 | }); | 93 | }); |
| 87 | }); | 94 | }); |
| 88 | }); | 95 | }); |
src/main/resources/static/pages/forms/statement/jobSummary.html
| @@ -277,6 +277,27 @@ | @@ -277,6 +277,27 @@ | ||
| 277 | initPinYinSelect2('#line',data,''); | 277 | initPinYinSelect2('#line',data,''); |
| 278 | 278 | ||
| 279 | }) */ | 279 | }) */ |
| 280 | + | ||
| 281 | + jQuery.fn.rowspan = function(colIdx) { //封装的一个JQuery小插件 | ||
| 282 | + return this.each(function(){ | ||
| 283 | + var that; | ||
| 284 | + $('tr', this).each(function(row) { | ||
| 285 | + $('td:eq('+colIdx+')', this).filter(':visible').each(function(col) { | ||
| 286 | + if (that!=null && $(this).html() == $(that).html()) { | ||
| 287 | + rowspan = $(that).attr("rowSpan"); | ||
| 288 | + if (rowspan == undefined) { | ||
| 289 | + $(that).attr("rowSpan",1); | ||
| 290 | + rowspan = $(that).attr("rowSpan"); } | ||
| 291 | + rowspan = Number(rowspan)+1; | ||
| 292 | + $(that).attr("rowSpan",rowspan); | ||
| 293 | + $(this).hide(); | ||
| 294 | + } else { | ||
| 295 | + that = this; | ||
| 296 | + } | ||
| 297 | + }); | ||
| 298 | + }); | ||
| 299 | + }); | ||
| 300 | + } | ||
| 280 | $("#query").on("click",function(){ | 301 | $("#query").on("click",function(){ |
| 281 | var line=$("#line").val();; | 302 | var line=$("#line").val();; |
| 282 | var lineName=$(".select2-selection__rendered").html(); | 303 | var lineName=$(".select2-selection__rendered").html(); |
| @@ -292,6 +313,11 @@ | @@ -292,6 +313,11 @@ | ||
| 292 | var list_lbqk = template('list_lbqk',{list:result}); | 313 | var list_lbqk = template('list_lbqk',{list:result}); |
| 293 | // 把渲染好的模版html文本追加到表格中 | 314 | // 把渲染好的模版html文本追加到表格中 |
| 294 | $('#forms .list_lbqk').html(list_lbqk); | 315 | $('#forms .list_lbqk').html(list_lbqk); |
| 316 | + $('#forms .list_lbqk').rowspan(0); | ||
| 317 | + $('#forms .list_lbqk').rowspan(1); | ||
| 318 | + $('#forms .list_lbqk').rowspan(2); | ||
| 319 | + $('#forms .list_lbqk').rowspan(3); | ||
| 320 | + | ||
| 295 | }) | 321 | }) |
| 296 | 322 | ||
| 297 | $get('/report/jobLjqk',{line:line,date:date},function(result){ | 323 | $get('/report/jobLjqk',{line:line,date:date},function(result){ |
| @@ -328,13 +354,19 @@ | @@ -328,13 +354,19 @@ | ||
| 328 | <td>{{obj.nr}}</td> | 354 | <td>{{obj.nr}}</td> |
| 329 | <td>{{obj.lp}}</td> | 355 | <td>{{obj.lp}}</td> |
| 330 | <td>{{obj.nbbm}}</td> | 356 | <td>{{obj.nbbm}}</td> |
| 331 | - <td>{{obj.jgh}}</td> | 357 | + <td {{if obj.lx ==1}} colspan="2" {{/if}}>{{obj.jgh}}</td> |
| 358 | + {{if obj.lx ==0}} | ||
| 332 | <td>{{obj.dz}}</td> | 359 | <td>{{obj.dz}}</td> |
| 333 | - <td>{{obj.sj}}</td> | 360 | + {{/if}} |
| 361 | + <td {{if obj.lx ==1}} colspan="3" {{/if}}>{{obj.sj}}</td> | ||
| 362 | + {{if obj.lx ==0}} | ||
| 334 | <td> </td> | 363 | <td> </td> |
| 335 | <td>{{obj.lbbc}}</td> | 364 | <td>{{obj.lbbc}}</td> |
| 336 | - <td>{{obj.lblc}}</td> | 365 | + {{/if}} |
| 366 | + <td {{if obj.lx ==1}} colspan="2" {{/if}}>{{obj.lblc}}</td> | ||
| 367 | + {{if obj.lx ==0}} | ||
| 337 | <td>{{obj.jyqp}}</td> | 368 | <td>{{obj.jyqp}}</td> |
| 369 | + {{/if}} | ||
| 338 | </tr> | 370 | </tr> |
| 339 | {{/each}} | 371 | {{/each}} |
| 340 | {{if list.length == 0}} | 372 | {{if list.length == 0}} |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| @@ -14,6 +14,17 @@ | @@ -14,6 +14,17 @@ | ||
| 14 | 14 | ||
| 15 | .table > tbody + tbody { | 15 | .table > tbody + tbody { |
| 16 | border-top: 1px solid; } | 16 | border-top: 1px solid; } |
| 17 | + | ||
| 18 | + #forms > thead > tr> td >span{ | ||
| 19 | + | ||
| 20 | + width: 5px; | ||
| 21 | +word-wrap: break-word; | ||
| 22 | +letter-spacing: 20px; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + #forms tr> td >label{ | ||
| 26 | + word-break: keep-all;white-space:nowrap; | ||
| 27 | + } | ||
| 17 | </style> | 28 | </style> |
| 18 | 29 | ||
| 19 | <div class="page-head"> | 30 | <div class="page-head"> |
| @@ -60,18 +71,18 @@ | @@ -60,18 +71,18 @@ | ||
| 60 | <th colspan="40">线路调度日报</th> | 71 | <th colspan="40">线路调度日报</th> |
| 61 | </tr> | 72 | </tr> |
| 62 | <tr> | 73 | <tr> |
| 63 | - <td rowspan="3">路线名</td> | 74 | + <td rowspan="3"><span >路线名</span></td> |
| 64 | <td colspan="16"><c>全日</c>营运里程(公里)</td> | 75 | <td colspan="16"><c>全日</c>营运里程(公里)</td> |
| 65 | <td colspan="15"><c>全日</c>营运班次</td> | 76 | <td colspan="15"><c>全日</c>营运班次</td> |
| 66 | <td colspan="9">大间隔情况</td> | 77 | <td colspan="9">大间隔情况</td> |
| 67 | </tr> | 78 | </tr> |
| 68 | <tr> | 79 | <tr> |
| 69 | - <td rowspan="2">计划</td> | ||
| 70 | - <td rowspan="2">实驶</td> | ||
| 71 | - <td rowspan="2">少驶公里</td> | ||
| 72 | - <td rowspan="2">少驶班次</td> | 80 | + <td rowspan="2"><span >计划</span></td> |
| 81 | + <td rowspan="2"><span >实驶</span></td> | ||
| 82 | + <td rowspan="2"><span>少驶公里</span></td> | ||
| 83 | + <td rowspan="2"><span>少驶班次</span></td> | ||
| 73 | <td colspan="11">少驶原因(公里)</td> | 84 | <td colspan="11">少驶原因(公里)</td> |
| 74 | - <td rowspan="2">临加公里</td> | 85 | + <td rowspan="2"><span >临加公里</span></td> |
| 75 | <td colspan="3">计划班次</td> | 86 | <td colspan="3">计划班次</td> |
| 76 | <td colspan="3">实际班次</td> | 87 | <td colspan="3">实际班次</td> |
| 77 | <td colspan="3">临加班次</td> | 88 | <td colspan="3">临加班次</td> |
| @@ -82,35 +93,35 @@ | @@ -82,35 +93,35 @@ | ||
| 82 | <td colspan="5" rowspan="2">原因</td> | 93 | <td colspan="5" rowspan="2">原因</td> |
| 83 | </tr> | 94 | </tr> |
| 84 | <tr> | 95 | <tr> |
| 85 | - <td>路阻</td> | ||
| 86 | - <td>吊慢</td> | ||
| 87 | - <td>故障</td> | ||
| 88 | - <td>纠纷</td> | ||
| 89 | - <td>肇事</td> | ||
| 90 | - <td>缺人</td> | ||
| 91 | - <td>缺车</td> | ||
| 92 | - <td>客稀</td> | ||
| 93 | - <td>气候</td> | ||
| 94 | - <td>援外</td> | ||
| 95 | - <td>其他</td> | ||
| 96 | - <td><c>全日</c></td> | ||
| 97 | - <td>早高峰</td> | ||
| 98 | - <td>晚高峰</td> | ||
| 99 | - <td><c>全日</c></td> | ||
| 100 | - <td>早高峰</td> | ||
| 101 | - <td>晚高峰</td> | ||
| 102 | - <td><c>全日</c></td> | ||
| 103 | - <td>早高峰</td> | ||
| 104 | - <td>晚高峰</td> | ||
| 105 | - <td><c>全日</c></td> | ||
| 106 | - <td>早高峰</td> | ||
| 107 | - <td>晚高峰</td> | ||
| 108 | - <td><c>全日</c></td> | ||
| 109 | - <td>早高峰</td> | ||
| 110 | - <td>晚高峰</td> | ||
| 111 | - <td><c>全日</c></td> | ||
| 112 | - <td>早高峰</td> | ||
| 113 | - <td>晚高峰</td> | 96 | + <td><span >路阻</span></td> |
| 97 | + <td><span>吊慢</span></td> | ||
| 98 | + <td><span >故障</span></td> | ||
| 99 | + <td><span >纠纷</span></td> | ||
| 100 | + <td><span >肇事</span></td> | ||
| 101 | + <td><span>缺人</span></td> | ||
| 102 | + <td><span>缺车</span></td> | ||
| 103 | + <td><span >客稀</span></td> | ||
| 104 | + <td><span>气候</span></td> | ||
| 105 | + <td><span>援外</span></td> | ||
| 106 | + <td><span>其他</span></td> | ||
| 107 | + <td><span ><c>全日</c></span></td> | ||
| 108 | + <td><span >早高峰</span></td> | ||
| 109 | + <td><span>晚高峰</span></td> | ||
| 110 | + <td><span><c>全日</c></span></td> | ||
| 111 | + <td><span>早高峰</span></td> | ||
| 112 | + <td><span>晚高峰</span></td> | ||
| 113 | + <td><span><c>全日</c></span></td> | ||
| 114 | + <td><span>早高峰</span></td> | ||
| 115 | + <td><span>晚高峰</span></td> | ||
| 116 | + <td><span><c>全日</c></span></td> | ||
| 117 | + <td><span>早高峰</span></td> | ||
| 118 | + <td><span>晚高峰</span></td> | ||
| 119 | + <td><span><c>全日</c></span></td> | ||
| 120 | + <td><span>早高峰</span></td> | ||
| 121 | + <td><span>晚高峰</span></td> | ||
| 122 | + <td><span><c>全日</c></span></td> | ||
| 123 | + <td><span>早高峰</span></td> | ||
| 124 | + <td><span>晚高峰</span></td> | ||
| 114 | </tr> | 125 | </tr> |
| 115 | </thead> | 126 | </thead> |
| 116 | 127 | ||
| @@ -169,36 +180,36 @@ | @@ -169,36 +180,36 @@ | ||
| 169 | <td colspan="40"> </td> | 180 | <td colspan="40"> </td> |
| 170 | </tr> --> | 181 | </tr> --> |
| 171 | <tr> | 182 | <tr> |
| 172 | - <td colspan="2">路牌</td> | ||
| 173 | - <td colspan="2">车号</td> | ||
| 174 | - <td>司早</td> | ||
| 175 | - <td>售早</td> | ||
| 176 | - <td>司晚</td> | ||
| 177 | - <td>售晚</td> | ||
| 178 | - <td colspan="2">路牌</td> | ||
| 179 | - <td colspan="2">车号</td> | ||
| 180 | - <td>司早</td> | ||
| 181 | - <td>售早</td> | ||
| 182 | - <td>司晚</td> | ||
| 183 | - <td>售晚</td> | ||
| 184 | - <td colspan="2">路牌</td> | ||
| 185 | - <td colspan="2">车号</td> | ||
| 186 | - <td>司早</td> | ||
| 187 | - <td>售早</td> | ||
| 188 | - <td>司晚</td> | ||
| 189 | - <td>售晚</td> | ||
| 190 | - <td colspan="2">路牌</td> | ||
| 191 | - <td colspan="2">车号</td> | ||
| 192 | - <td>司早</td> | ||
| 193 | - <td>售早</td> | ||
| 194 | - <td>司晚</td> | ||
| 195 | - <td>售晚</td> | ||
| 196 | - <td colspan="2">路牌</td> | ||
| 197 | - <td colspan="2">车号</td> | ||
| 198 | - <td>司早</td> | ||
| 199 | - <td>售早</td> | ||
| 200 | - <td>司晚</td> | ||
| 201 | - <td>售晚</td> | 183 | + <td colspan="2"><label>路牌</label></td> |
| 184 | + <td colspan="2"><label>车号</label></td> | ||
| 185 | + <td> <label>司早</label></td> | ||
| 186 | + <td><label>售早</label></td> | ||
| 187 | + <td><label>司晚</label></td> | ||
| 188 | + <td><label>售晚</label></td> | ||
| 189 | + <td colspan="2"><label>路牌</label></td> | ||
| 190 | + <td colspan="2"><label>车号</label></td> | ||
| 191 | + <td><label>司早</label></td> | ||
| 192 | + <td><label>售早</label></td> | ||
| 193 | + <td><label>司晚</label></td> | ||
| 194 | + <td><label>售晚</label></td> | ||
| 195 | + <td colspan="2"><label>路牌</label></td> | ||
| 196 | + <td colspan="2"><label>车号</label></td> | ||
| 197 | + <td><label>司早</label></td> | ||
| 198 | + <td><label>售早</label></td> | ||
| 199 | + <td><label>司晚</label></td> | ||
| 200 | + <td><label>售晚</label></td> | ||
| 201 | + <td colspan="2"><label>路牌</label></td> | ||
| 202 | + <td colspan="2"><label>车号</label></td> | ||
| 203 | + <td><label>司早</label></td> | ||
| 204 | + <td><label>售早</label></td> | ||
| 205 | + <td><label>司晚</label></td> | ||
| 206 | + <td><label>售晚</label></td> | ||
| 207 | + <td colspan="2"><label>路牌</label></td> | ||
| 208 | + <td colspan="2"><label>车号</label></td> | ||
| 209 | + <td><label>司早</label></td> | ||
| 210 | + <td><label>售早</label></td> | ||
| 211 | + <td><label>司晚</label></td> | ||
| 212 | + <td><label>售晚</label></td> | ||
| 202 | </tr> | 213 | </tr> |
| 203 | <tbody class="scheduleDaily_2"> | 214 | <tbody class="scheduleDaily_2"> |
| 204 | 215 | ||
| @@ -208,17 +219,17 @@ | @@ -208,17 +219,17 @@ | ||
| 208 | </tr> | 219 | </tr> |
| 209 | <tr> | 220 | <tr> |
| 210 | <td rowspan="2">路牌</td> | 221 | <td rowspan="2">路牌</td> |
| 211 | - <td colspan="2" rowspan="2">起点站</td> | 222 | + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td> |
| 212 | <td colspan="4">到达时间</td> | 223 | <td colspan="4">到达时间</td> |
| 213 | <td colspan="4">发车时间</td> | 224 | <td colspan="4">发车时间</td> |
| 214 | <td colspan="2" rowspan="2">备注</td> | 225 | <td colspan="2" rowspan="2">备注</td> |
| 215 | <td rowspan="2">路牌</td> | 226 | <td rowspan="2">路牌</td> |
| 216 | - <td colspan="2" rowspan="2">起点站</td> | 227 | + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td> |
| 217 | <td colspan="4">到达时间</td> | 228 | <td colspan="4">到达时间</td> |
| 218 | <td colspan="4">发车时间</td> | 229 | <td colspan="4">发车时间</td> |
| 219 | <td colspan="2" rowspan="2">备注</td> | 230 | <td colspan="2" rowspan="2">备注</td> |
| 220 | <td rowspan="2">路牌</td> | 231 | <td rowspan="2">路牌</td> |
| 221 | - <td colspan="2" rowspan="2">起点站</td> | 232 | + <td colspan="2" rowspan="2" style="word-break: keep-all;white-space:nowrap;">起点站</td> |
| 222 | <td colspan="4">到达时间</td> | 233 | <td colspan="4">到达时间</td> |
| 223 | <td colspan="4">发车时间</td> | 234 | <td colspan="4">发车时间</td> |
| 224 | <td colspan="2" rowspan="2">备注</td> | 235 | <td colspan="2" rowspan="2">备注</td> |
| @@ -456,7 +467,7 @@ | @@ -456,7 +467,7 @@ | ||
| 456 | </script> | 467 | </script> |
| 457 | <script type="text/html" id="scheduleDaily_1"> | 468 | <script type="text/html" id="scheduleDaily_1"> |
| 458 | {{each list as obj i}} | 469 | {{each list as obj i}} |
| 459 | - <tr> | 470 | + <tr > |
| 460 | <td>{{obj.xlName}}</td> | 471 | <td>{{obj.xlName}}</td> |
| 461 | <td>{{obj.jhlc}}</td> | 472 | <td>{{obj.jhlc}}</td> |
| 462 | <td>{{obj.sjgl}}</td> | 473 | <td>{{obj.sjgl}}</td> |
| @@ -534,13 +545,13 @@ | @@ -534,13 +545,13 @@ | ||
| 534 | <tr> | 545 | <tr> |
| 535 | {{/if}} | 546 | {{/if}} |
| 536 | <td>{{obj.lpName}}</td> | 547 | <td>{{obj.lpName}}</td> |
| 537 | - <td colspan="2">{{obj.qdzName}}</td> | 548 | + <td colspan="2" style="word-break: keep-all;white-space:nowrap;">{{obj.qdzName}}</td> |
| 538 | <td>{{obj.zdsj}}</td> | 549 | <td>{{obj.zdsj}}</td> |
| 539 | <td>{{obj.zdsjActual}}</td> | 550 | <td>{{obj.zdsjActual}}</td> |
| 540 | <td>{{obj.fast}}</td> | 551 | <td>{{obj.fast}}</td> |
| 541 | <td>{{obj.slow}}</td> | 552 | <td>{{obj.slow}}</td> |
| 542 | <td>{{obj.fcsj}}</td> | 553 | <td>{{obj.fcsj}}</td> |
| 543 | - <td>{{obj.fcsjActual}} | 554 | + <td style="word-break: keep-all;white-space:nowrap;">{{obj.fcsjActual}} |
| 544 | {{if obj.bcType== "in"}} | 555 | {{if obj.bcType== "in"}} |
| 545 | (进) | 556 | (进) |
| 546 | {{/if}} | 557 | {{/if}} |
src/main/resources/static/pages/mforms/shifdays/shifday.html
src/main/resources/static/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html
| @@ -239,5 +239,4 @@ | @@ -239,5 +239,4 @@ | ||
| 239 | <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td> | 239 | <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td> |
| 240 | </tr> | 240 | </tr> |
| 241 | {{/if}} | 241 | {{/if}} |
| 242 | -</script> | ||
| 243 | </script> | 242 | </script> |
| 244 | \ No newline at end of file | 243 | \ No newline at end of file |
src/main/resources/static/pages/permission/user/add.html
| @@ -150,10 +150,26 @@ | @@ -150,10 +150,26 @@ | ||
| 150 | submitHandler : function(f) { | 150 | submitHandler : function(f) { |
| 151 | var params = form.serializeJSON(); | 151 | var params = form.serializeJSON(); |
| 152 | error.hide(); | 152 | error.hide(); |
| 153 | - console.log(params); | ||
| 154 | - | ||
| 155 | - //检查一下用户是否存在 | ||
| 156 | - $get('/user/all', {userName_eq: params.userName}, function(list){ | 153 | + |
| 154 | + $.ajax({ | ||
| 155 | + url: '/user/register', | ||
| 156 | + type: 'POST', | ||
| 157 | + traditional: true, | ||
| 158 | + data: params, | ||
| 159 | + success: function(rs){ | ||
| 160 | + if(!rs){ | ||
| 161 | + layer.msg('未知异常!'); | ||
| 162 | + } | ||
| 163 | + if(rs.status=='SUCCESS'){ | ||
| 164 | + layer.msg('添加用户成功.'); | ||
| 165 | + loadPage('list.html'); | ||
| 166 | + } | ||
| 167 | + else if(rs.status=='ERROR'){ | ||
| 168 | + layer.msg('添加失败[ ' + rs.msg + ']'); | ||
| 169 | + } | ||
| 170 | + } | ||
| 171 | + }); | ||
| 172 | + /*$get('/user/all', {userName_eq: params.userName}, function(list){ | ||
| 157 | if(!list || list.length == 0){ | 173 | if(!list || list.length == 0){ |
| 158 | console.log(params); | 174 | console.log(params); |
| 159 | $.ajax({ | 175 | $.ajax({ |
| @@ -166,14 +182,14 @@ | @@ -166,14 +182,14 @@ | ||
| 166 | loadPage('list.html'); | 182 | loadPage('list.html'); |
| 167 | } | 183 | } |
| 168 | }); | 184 | }); |
| 169 | - /* $post('/user', params, function(res){ | 185 | + /!* $post('/user', params, function(res){ |
| 170 | layer.msg('添加用户成功.'); | 186 | layer.msg('添加用户成功.'); |
| 171 | loadPage('list.html'); | 187 | loadPage('list.html'); |
| 172 | - }); */ | 188 | + }); *!/ |
| 173 | } | 189 | } |
| 174 | else | 190 | else |
| 175 | layer.alert('用户【' + params.userName + '】已存在', {icon: 2, title: '提交被拒绝'}); | 191 | layer.alert('用户【' + params.userName + '】已存在', {icon: 2, title: '提交被拒绝'}); |
| 176 | - }); | 192 | + });*/ |
| 177 | } | 193 | } |
| 178 | }); | 194 | }); |
| 179 | }); | 195 | }); |
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/new/sa1.js
0 → 100644
| 1 | +/** | ||
| 2 | + * saTimeTable指令工具集,创建内部单元格类,及其他操作 | ||
| 3 | + */ | ||
| 4 | +angular.module('ScheduleApp').factory( | ||
| 5 | + 'SaTimeTableUtils', | ||
| 6 | + [ | ||
| 7 | + function() { | ||
| 8 | + /** | ||
| 9 | + * 表格,单元格头类 | ||
| 10 | + * 如:路牌,出1,青2......进6 | ||
| 11 | + */ | ||
| 12 | + var Cell_Header = function(str) { | ||
| 13 | + /** 表头数据 */ | ||
| 14 | + this.headStr = str; | ||
| 15 | + }; | ||
| 16 | + Cell_Header.prototype.setHead = function(str) { | ||
| 17 | + this.headStr = str || ""; | ||
| 18 | + }; | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 表格,单元格内容类,在表格上只显示时间,但是内部还是保存其他值。 | ||
| 22 | + */ | ||
| 23 | + var Cell_Body_Bc = function() { | ||
| 24 | + /** 表格单元格显示的信息 */ | ||
| 25 | + this.info = undefined; | ||
| 26 | + | ||
| 27 | + this.isSel = false; // 是否被选中 | ||
| 28 | + this.isCanSel = true; // 是否能被选择 | ||
| 29 | + this.isValidInfo = false; // 数据是否有效 | ||
| 30 | + | ||
| 31 | + this.data = {}; // 内部信息 | ||
| 32 | + | ||
| 33 | + this.data.ttdid = undefined; // 班次信息Id | ||
| 34 | + this.data.fcsj = undefined; // 发车时间 | ||
| 35 | + this.data.bcType = undefined; // 班次类型 | ||
| 36 | + this.data.xldir = undefined; // 线路方向 | ||
| 37 | + this.data.isfb = undefined; // 是否分班 | ||
| 38 | + this.data.jhlc = undefined; // 计划里程 | ||
| 39 | + this.data.qdz = null; // 起点站id | ||
| 40 | + this.data.zdz = null; // 终点站id | ||
| 41 | + this.data.tcc = null; // 停车场id | ||
| 42 | + | ||
| 43 | + this.self.lpId = undefined; // 路牌Id | ||
| 44 | + this.self.lpName = undefined; // 路牌名字 | ||
| 45 | + | ||
| 46 | + this.self.fcno = undefined; // 发车序号 | ||
| 47 | + this.self.bcs = undefined; // 班次数 | ||
| 48 | + }; | ||
| 49 | + /** | ||
| 50 | + * 路牌单元格类。 | ||
| 51 | + */ | ||
| 52 | + var Cell_Body_Lp = function() { | ||
| 53 | + this.info = undefined; | ||
| 54 | + | ||
| 55 | + this.isSel = false; // 是否被选中 | ||
| 56 | + this.isCanSel = false; // 是否能被选择 | ||
| 57 | + this.isValidInfo = false; // 数据是否有效 | ||
| 58 | + | ||
| 59 | + this.data = {}; // 内部信息 | ||
| 60 | + | ||
| 61 | + this.data.lpId = undefined; // 路牌Id | ||
| 62 | + this.data.lpName = undefined; // 路牌名字 | ||
| 63 | + }; | ||
| 64 | + /** | ||
| 65 | + * 统计单元格类。 | ||
| 66 | + */ | ||
| 67 | + var Cell_Body_Stat = function() { | ||
| 68 | + this.info = undefined; | ||
| 69 | + | ||
| 70 | + this.isSel = false; // 是否被选中 | ||
| 71 | + this.isCanSel = false; // 是否能被选择 | ||
| 72 | + this.isValidInfo = false; // 数据是否有效 | ||
| 73 | + | ||
| 74 | + this.data = {}; // 内部信息 | ||
| 75 | + }; | ||
| 76 | + | ||
| 77 | + Cell_Body_Bc.prototype.canSel = function() { // 是否能被选中 | ||
| 78 | + return this.isCanSel; | ||
| 79 | + }; | ||
| 80 | + Cell_Body_Bc.prototype.canUpdate = function() { // 是否能更新 | ||
| 81 | + return this.isSel && this.data.ttdid; | ||
| 82 | + }; | ||
| 83 | + Cell_Body_Bc.prototype.canDelete = function() { // 是否能删除 | ||
| 84 | + return this.isSel && this.data.ttdid; | ||
| 85 | + }; | ||
| 86 | + Cell_Body_Bc.prototype.validInfo = function() { // 验证班次内数据是否正确 | ||
| 87 | + if (this.canSel() && this.data.ttdid) { | ||
| 88 | + if (this.data.bcType == 'in') { | ||
| 89 | + this.isValidInfo = this.data.qdz != null && this.data.tcc != null; | ||
| 90 | + } else if (this.data.bcType == 'out') { | ||
| 91 | + this.isValidInfo = this.data.tcc != null && this.data.zdz != null; | ||
| 92 | + } else { | ||
| 93 | + this.isValidInfo = this.data.qdz != null && this.data.zdz != null; | ||
| 94 | + } | ||
| 95 | + } else { | ||
| 96 | + this.isValidInfo = true; | ||
| 97 | + } | ||
| 98 | + return this.isValidInfo; | ||
| 99 | + }; | ||
| 100 | + Cell_Body_Bc.prototype.where = function( | ||
| 101 | + xldir, startTime_h_m, endTime_h_m, isInOut | ||
| 102 | + ) { // 判定班次是否在指定条件内 | ||
| 103 | + | ||
| 104 | + var fcsj_m_h = []; | ||
| 105 | + fcsj_m_h[0] = parseInt(this.data.fcsj.split(":")[0]); | ||
| 106 | + fcsj_m_h[1] = parseInt(this.data.fcsj.split(":")[1]); | ||
| 107 | + | ||
| 108 | + var fcsj = new Date(2000,1,1); | ||
| 109 | + fcsj.setHours(fcsj_m_h[0]); | ||
| 110 | + fcsj.setMinutes(fcsj_m_h[1]); | ||
| 111 | + | ||
| 112 | + var s_temp_date = new Date(2000, 1, 1); | ||
| 113 | + var e_temp_date = new Date(2000, 1, 1); | ||
| 114 | + | ||
| 115 | + if (xldir == 2) { // 上下行 | ||
| 116 | + // 判定是否要进出场班次 | ||
| 117 | + if (isInOut == false && (this.data.bcType == "in" || this.data.bcType == "out")) { | ||
| 118 | + return false; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + if (startTime_h_m) { | ||
| 122 | + if (endTime_h_m) { | ||
| 123 | + s_temp_date.setHours(startTime_h_m[0]); | ||
| 124 | + s_temp_date.setMinutes(startTime_h_m[1]); | ||
| 125 | + e_temp_date.setHours(endTime_h_m[0]); | ||
| 126 | + e_temp_date.setMinutes(endTime_h_m[1]); | ||
| 127 | + return fcsj >= s_temp_date && fcsj <= e_temp_date; | ||
| 128 | + } else { | ||
| 129 | + s_temp_date.setHours(startTime_h_m[0]); | ||
| 130 | + s_temp_date.setMinutes(startTime_h_m[1]); | ||
| 131 | + return fcsj >= s_temp_date; | ||
| 132 | + } | ||
| 133 | + } else { | ||
| 134 | + if (endTime_h_m) { | ||
| 135 | + e_temp_date.setHours(endTime_h_m[0]); | ||
| 136 | + e_temp_date.setMinutes(endTime_h_m[1]); | ||
| 137 | + return fcsj <= e_temp_date; | ||
| 138 | + } else { | ||
| 139 | + return false; | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + } else { | ||
| 143 | + // 判定是否要进出场班次 | ||
| 144 | + if (isInOut == false && (this.data.bcType == "in" || this.data.bcType == "out")) { | ||
| 145 | + return false; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + if (xldir == this.xldir) { | ||
| 149 | + if (startTime_h_m) { | ||
| 150 | + if (endTime_h_m) { | ||
| 151 | + s_temp_date.setHours(startTime_h_m[0]); | ||
| 152 | + s_temp_date.setMinutes(startTime_h_m[1]); | ||
| 153 | + e_temp_date.setHours(endTime_h_m[0]); | ||
| 154 | + e_temp_date.setMinutes(endTime_h_m[1]); | ||
| 155 | + return fcsj >= s_temp_date && fcsj <= e_temp_date; | ||
| 156 | + } else { | ||
| 157 | + s_temp_date.setHours(startTime_h_m[0]); | ||
| 158 | + s_temp_date.setMinutes(startTime_h_m[1]); | ||
| 159 | + return fcsj >= s_temp_date; | ||
| 160 | + } | ||
| 161 | + } else { | ||
| 162 | + if (endTime_h_m) { | ||
| 163 | + e_temp_date.setHours(endTime_h_m[0]); | ||
| 164 | + e_temp_date.setMinutes(endTime_h_m[1]); | ||
| 165 | + return fcsj <= e_temp_date; | ||
| 166 | + } else { | ||
| 167 | + return true; | ||
| 168 | + } | ||
| 169 | + } | ||
| 170 | + } else { | ||
| 171 | + return false; | ||
| 172 | + } | ||
| 173 | + } | ||
| 174 | + }; | ||
| 175 | + | ||
| 176 | + Cell_Body_Lp.prototype.canSel = function() { // 是否能被选中 | ||
| 177 | + return this.isCanSel; | ||
| 178 | + }; | ||
| 179 | + Cell_Body_Lp.prototype.canUpdate = function() { // 是否能更新 | ||
| 180 | + return this.isSel && this.data.ttdid; | ||
| 181 | + }; | ||
| 182 | + Cell_Body_Lp.prototype.canDelete = function() { // 是否能删除 | ||
| 183 | + return this.isSel && this.data.ttdid; | ||
| 184 | + }; | ||
| 185 | + | ||
| 186 | + Cell_Body_Stat.prototype.canSel = function() { // 是否能被选中 | ||
| 187 | + return this.isCanSel; | ||
| 188 | + }; | ||
| 189 | + Cell_Body_Stat.prototype.canUpdate = function() { // 是否能更新 | ||
| 190 | + return this.isSel && this.data.ttdid; | ||
| 191 | + }; | ||
| 192 | + Cell_Body_Stat.prototype.canDelete = function() { // 是否能删除 | ||
| 193 | + return this.isSel && this.data.ttdid; | ||
| 194 | + }; | ||
| 195 | + | ||
| 196 | + return { | ||
| 197 | + // TODO: | ||
| 198 | + }; | ||
| 199 | + } | ||
| 200 | + ] | ||
| 201 | +); | ||
| 0 | \ No newline at end of file | 202 | \ No newline at end of file |
src/main/resources/static/pages/scheduleApp/module/core/busConfig/module.js
| @@ -126,8 +126,9 @@ angular.module('ScheduleApp').controller( | @@ -126,8 +126,9 @@ angular.module('ScheduleApp').controller( | ||
| 126 | 126 | ||
| 127 | // 导出excel | 127 | // 导出excel |
| 128 | self.exportData = function() { | 128 | self.exportData = function() { |
| 129 | - if (busConfigService.dataExport()) { | ||
| 130 | - busConfigService.dataExport().then( | 129 | + var p = busConfigService.dataExport(); |
| 130 | + if (p) { | ||
| 131 | + p.then( | ||
| 131 | function(result) { | 132 | function(result) { |
| 132 | fileDownload.downloadFile(result.data, "application/octet-stream", "车辆配置信息.xls"); | 133 | fileDownload.downloadFile(result.data, "application/octet-stream", "车辆配置信息.xls"); |
| 133 | }, | 134 | }, |
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/module.js
| @@ -127,8 +127,9 @@ angular.module('ScheduleApp').controller( | @@ -127,8 +127,9 @@ angular.module('ScheduleApp').controller( | ||
| 127 | 127 | ||
| 128 | // 导出excel | 128 | // 导出excel |
| 129 | self.exportData = function() { | 129 | self.exportData = function() { |
| 130 | - if (service.dataExport()) { | ||
| 131 | - service.dataExport().then( | 130 | + var p = service.dataExport(); |
| 131 | + if (p) { | ||
| 132 | + p.then( | ||
| 132 | function(result) { | 133 | function(result) { |
| 133 | fileDownload.downloadFile(result.data, "application/octet-stream", "人员配置信息.xls"); | 134 | fileDownload.downloadFile(result.data, "application/octet-stream", "人员配置信息.xls"); |
| 134 | }, | 135 | }, |
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/module.js
| @@ -131,8 +131,9 @@ angular.module('ScheduleApp').controller( | @@ -131,8 +131,9 @@ angular.module('ScheduleApp').controller( | ||
| 131 | 131 | ||
| 132 | // 导出excel | 132 | // 导出excel |
| 133 | self.exportData = function() { | 133 | self.exportData = function() { |
| 134 | - if (service.dataExport()) { | ||
| 135 | - service.dataExport().then( | 134 | + var p = service.dataExport(); |
| 135 | + if (p) { | ||
| 136 | + p.then( | ||
| 136 | function(result) { | 137 | function(result) { |
| 137 | fileDownload.downloadFile(result.data, "application/octet-stream", "路牌信息.xls"); | 138 | fileDownload.downloadFile(result.data, "application/octet-stream", "路牌信息.xls"); |
| 138 | }, | 139 | }, |
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/accordion.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/all.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/autocomplete.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/base.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/button.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/core.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/datepicker.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/dialog.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/draggable.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/menu.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/progressbar.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/resizable.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/selectable.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/selectmenu.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/slider.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/sortable.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/spinner.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/tabs.css
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/theme.css
| 1 | -/*! | 1 | +/* |
| 2 | * jQuery UI CSS Framework 1.11.1 | 2 | * jQuery UI CSS Framework 1.11.1 |
| 3 | * http://jqueryui.com | 3 | * http://jqueryui.com |
| 4 | * | 4 | * |
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | } | 30 | } |
| 31 | .ui-widget-content { | 31 | .ui-widget-content { |
| 32 | border: 1px solid #aaaaaa/*{borderColorContent}*/; | 32 | border: 1px solid #aaaaaa/*{borderColorContent}*/; |
| 33 | - background: #ffffff/*{bgColorContent}*/ url("images/ui-bg_flat_75_ffffff_40x100.png")/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; | 33 | + background: #ffffff/*{bgColorContent}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_flat_75_ffffff_40x100.png")/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; |
| 34 | color: #222222/*{fcContent}*/; | 34 | color: #222222/*{fcContent}*/; |
| 35 | } | 35 | } |
| 36 | .ui-widget-content a { | 36 | .ui-widget-content a { |
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | } | 38 | } |
| 39 | .ui-widget-header { | 39 | .ui-widget-header { |
| 40 | border: 1px solid #aaaaaa/*{borderColorHeader}*/; | 40 | border: 1px solid #aaaaaa/*{borderColorHeader}*/; |
| 41 | - background: #cccccc/*{bgColorHeader}*/ url("images/ui-bg_highlight-soft_75_cccccc_1x100.png")/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; | 41 | + background: #cccccc/*{bgColorHeader}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png")/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; |
| 42 | color: #222222/*{fcHeader}*/; | 42 | color: #222222/*{fcHeader}*/; |
| 43 | font-weight: bold; | 43 | font-weight: bold; |
| 44 | } | 44 | } |
| @@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
| 52 | .ui-widget-content .ui-state-default, | 52 | .ui-widget-content .ui-state-default, |
| 53 | .ui-widget-header .ui-state-default { | 53 | .ui-widget-header .ui-state-default { |
| 54 | border: 1px solid #d3d3d3/*{borderColorDefault}*/; | 54 | border: 1px solid #d3d3d3/*{borderColorDefault}*/; |
| 55 | - background: #e6e6e6/*{bgColorDefault}*/ url("images/ui-bg_glass_75_e6e6e6_1x400.png")/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; | 55 | + background: #e6e6e6/*{bgColorDefault}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png")/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; |
| 56 | font-weight: normal/*{fwDefault}*/; | 56 | font-weight: normal/*{fwDefault}*/; |
| 57 | color: #555555/*{fcDefault}*/; | 57 | color: #555555/*{fcDefault}*/; |
| 58 | } | 58 | } |
| @@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
| 69 | .ui-widget-content .ui-state-focus, | 69 | .ui-widget-content .ui-state-focus, |
| 70 | .ui-widget-header .ui-state-focus { | 70 | .ui-widget-header .ui-state-focus { |
| 71 | border: 1px solid #999999/*{borderColorHover}*/; | 71 | border: 1px solid #999999/*{borderColorHover}*/; |
| 72 | - background: #dadada/*{bgColorHover}*/ url("images/ui-bg_glass_75_dadada_1x400.png")/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; | 72 | + background: #dadada/*{bgColorHover}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_75_dadada_1x400.png")/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; |
| 73 | font-weight: normal/*{fwDefault}*/; | 73 | font-weight: normal/*{fwDefault}*/; |
| 74 | color: #212121/*{fcHover}*/; | 74 | color: #212121/*{fcHover}*/; |
| 75 | } | 75 | } |
| @@ -88,7 +88,7 @@ | @@ -88,7 +88,7 @@ | ||
| 88 | .ui-widget-content .ui-state-active, | 88 | .ui-widget-content .ui-state-active, |
| 89 | .ui-widget-header .ui-state-active { | 89 | .ui-widget-header .ui-state-active { |
| 90 | border: 1px solid #aaaaaa/*{borderColorActive}*/; | 90 | border: 1px solid #aaaaaa/*{borderColorActive}*/; |
| 91 | - background: #ffffff/*{bgColorActive}*/ url("images/ui-bg_glass_65_ffffff_1x400.png")/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; | 91 | + background: #ffffff/*{bgColorActive}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_65_ffffff_1x400.png")/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; |
| 92 | font-weight: normal/*{fwDefault}*/; | 92 | font-weight: normal/*{fwDefault}*/; |
| 93 | color: #212121/*{fcActive}*/; | 93 | color: #212121/*{fcActive}*/; |
| 94 | } | 94 | } |
| @@ -105,7 +105,7 @@ | @@ -105,7 +105,7 @@ | ||
| 105 | .ui-widget-content .ui-state-highlight, | 105 | .ui-widget-content .ui-state-highlight, |
| 106 | .ui-widget-header .ui-state-highlight { | 106 | .ui-widget-header .ui-state-highlight { |
| 107 | border: 1px solid #fcefa1/*{borderColorHighlight}*/; | 107 | border: 1px solid #fcefa1/*{borderColorHighlight}*/; |
| 108 | - background: #fbf9ee/*{bgColorHighlight}*/ url("images/ui-bg_glass_55_fbf9ee_1x400.png")/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; | 108 | + background: #fbf9ee/*{bgColorHighlight}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png")/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; |
| 109 | color: #363636/*{fcHighlight}*/; | 109 | color: #363636/*{fcHighlight}*/; |
| 110 | } | 110 | } |
| 111 | .ui-state-highlight a, | 111 | .ui-state-highlight a, |
| @@ -117,7 +117,7 @@ | @@ -117,7 +117,7 @@ | ||
| 117 | .ui-widget-content .ui-state-error, | 117 | .ui-widget-content .ui-state-error, |
| 118 | .ui-widget-header .ui-state-error { | 118 | .ui-widget-header .ui-state-error { |
| 119 | border: 1px solid #cd0a0a/*{borderColorError}*/; | 119 | border: 1px solid #cd0a0a/*{borderColorError}*/; |
| 120 | - background: #fef1ec/*{bgColorError}*/ url("images/ui-bg_glass_95_fef1ec_1x400.png")/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; | 120 | + background: #fef1ec/*{bgColorError}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png")/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; |
| 121 | color: #cd0a0a/*{fcError}*/; | 121 | color: #cd0a0a/*{fcError}*/; |
| 122 | } | 122 | } |
| 123 | .ui-state-error a, | 123 | .ui-state-error a, |
| @@ -163,27 +163,27 @@ | @@ -163,27 +163,27 @@ | ||
| 163 | } | 163 | } |
| 164 | .ui-icon, | 164 | .ui-icon, |
| 165 | .ui-widget-content .ui-icon { | 165 | .ui-widget-content .ui-icon { |
| 166 | - background-image: url("images/ui-icons_222222_256x240.png")/*{iconsContent}*/; | 166 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_222222_256x240.png")/*{iconsContent}*/; |
| 167 | } | 167 | } |
| 168 | .ui-widget-header .ui-icon { | 168 | .ui-widget-header .ui-icon { |
| 169 | - background-image: url("images/ui-icons_222222_256x240.png")/*{iconsHeader}*/; | 169 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_222222_256x240.png")/*{iconsHeader}*/; |
| 170 | } | 170 | } |
| 171 | .ui-state-default .ui-icon { | 171 | .ui-state-default .ui-icon { |
| 172 | - background-image: url("images/ui-icons_888888_256x240.png")/*{iconsDefault}*/; | 172 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_888888_256x240.png")/*{iconsDefault}*/; |
| 173 | } | 173 | } |
| 174 | .ui-state-hover .ui-icon, | 174 | .ui-state-hover .ui-icon, |
| 175 | .ui-state-focus .ui-icon { | 175 | .ui-state-focus .ui-icon { |
| 176 | - background-image: url("images/ui-icons_454545_256x240.png")/*{iconsHover}*/; | 176 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_454545_256x240.png")/*{iconsHover}*/; |
| 177 | } | 177 | } |
| 178 | .ui-state-active .ui-icon { | 178 | .ui-state-active .ui-icon { |
| 179 | - background-image: url("images/ui-icons_454545_256x240.png")/*{iconsActive}*/; | 179 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_454545_256x240.png")/*{iconsActive}*/; |
| 180 | } | 180 | } |
| 181 | .ui-state-highlight .ui-icon { | 181 | .ui-state-highlight .ui-icon { |
| 182 | - background-image: url("images/ui-icons_2e83ff_256x240.png")/*{iconsHighlight}*/; | 182 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_2e83ff_256x240.png")/*{iconsHighlight}*/; |
| 183 | } | 183 | } |
| 184 | .ui-state-error .ui-icon, | 184 | .ui-state-error .ui-icon, |
| 185 | .ui-state-error-text .ui-icon { | 185 | .ui-state-error-text .ui-icon { |
| 186 | - background-image: url("images/ui-icons_cd0a0a_256x240.png")/*{iconsError}*/; | 186 | + background-image: url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_cd0a0a_256x240.png")/*{iconsError}*/; |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | /* positioning */ | 189 | /* positioning */ |
| @@ -396,14 +396,14 @@ | @@ -396,14 +396,14 @@ | ||
| 396 | 396 | ||
| 397 | /* Overlays */ | 397 | /* Overlays */ |
| 398 | .ui-widget-overlay { | 398 | .ui-widget-overlay { |
| 399 | - background: #aaaaaa/*{bgColorOverlay}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; | 399 | + background: #aaaaaa/*{bgColorOverlay}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; |
| 400 | opacity: .3/*{opacityOverlay}*/; | 400 | opacity: .3/*{opacityOverlay}*/; |
| 401 | filter: Alpha(Opacity=30)/*{opacityFilterOverlay}*/; /* support: IE8 */ | 401 | filter: Alpha(Opacity=30)/*{opacityFilterOverlay}*/; /* support: IE8 */ |
| 402 | } | 402 | } |
| 403 | .ui-widget-shadow { | 403 | .ui-widget-shadow { |
| 404 | margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; | 404 | margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; |
| 405 | padding: 8px/*{thicknessShadow}*/; | 405 | padding: 8px/*{thicknessShadow}*/; |
| 406 | - background: #aaaaaa/*{bgColorShadow}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; | 406 | + background: #aaaaaa/*{bgColorShadow}*/ url("/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; |
| 407 | opacity: .3/*{opacityShadow}*/; | 407 | opacity: .3/*{opacityShadow}*/; |
| 408 | filter: Alpha(Opacity=30)/*{opacityFilterShadow}*/; /* support: IE8 */ | 408 | filter: Alpha(Opacity=30)/*{opacityFilterShadow}*/; /* support: IE8 */ |
| 409 | border-radius: 8px/*{cornerRadiusShadow}*/; | 409 | border-radius: 8px/*{cornerRadiusShadow}*/; |
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/tooltip.css
src/main/resources/static/real_control_v2/assets/plugins/jstree/default/style.css
| @@ -400,7 +400,7 @@ | @@ -400,7 +400,7 @@ | ||
| 400 | } | 400 | } |
| 401 | .jstree-default .jstree-node, | 401 | .jstree-default .jstree-node, |
| 402 | .jstree-default .jstree-icon { | 402 | .jstree-default .jstree-icon { |
| 403 | - background-image: url("32px.png"); | 403 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); |
| 404 | } | 404 | } |
| 405 | .jstree-default .jstree-node { | 405 | .jstree-default .jstree-node { |
| 406 | background-position: -292px -4px; | 406 | background-position: -292px -4px; |
| @@ -505,13 +505,13 @@ | @@ -505,13 +505,13 @@ | ||
| 505 | background-position: 0 0; | 505 | background-position: 0 0; |
| 506 | } | 506 | } |
| 507 | .jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl { | 507 | .jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl { |
| 508 | - background: url("throbber.gif") center center no-repeat; | 508 | + background: url("/real_control_v2/assets/plugins/jstree/default/throbber.gif") center center no-repeat; |
| 509 | } | 509 | } |
| 510 | .jstree-default .jstree-file { | 510 | .jstree-default .jstree-file { |
| 511 | - background: url("32px.png") -100px -68px no-repeat; | 511 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -100px -68px no-repeat; |
| 512 | } | 512 | } |
| 513 | .jstree-default .jstree-folder { | 513 | .jstree-default .jstree-folder { |
| 514 | - background: url("32px.png") -260px -4px no-repeat; | 514 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -260px -4px no-repeat; |
| 515 | } | 515 | } |
| 516 | .jstree-default > .jstree-container-ul > .jstree-node { | 516 | .jstree-default > .jstree-container-ul > .jstree-node { |
| 517 | margin-left: 0; | 517 | margin-left: 0; |
| @@ -523,7 +523,7 @@ | @@ -523,7 +523,7 @@ | ||
| 523 | } | 523 | } |
| 524 | #jstree-dnd.jstree-default .jstree-ok, | 524 | #jstree-dnd.jstree-default .jstree-ok, |
| 525 | #jstree-dnd.jstree-default .jstree-er { | 525 | #jstree-dnd.jstree-default .jstree-er { |
| 526 | - background-image: url("32px.png"); | 526 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); |
| 527 | background-repeat: no-repeat; | 527 | background-repeat: no-repeat; |
| 528 | background-color: transparent; | 528 | background-color: transparent; |
| 529 | } | 529 | } |
| @@ -573,7 +573,7 @@ | @@ -573,7 +573,7 @@ | ||
| 573 | } | 573 | } |
| 574 | .jstree-default-small .jstree-node, | 574 | .jstree-default-small .jstree-node, |
| 575 | .jstree-default-small .jstree-icon { | 575 | .jstree-default-small .jstree-icon { |
| 576 | - background-image: url("32px.png"); | 576 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); |
| 577 | } | 577 | } |
| 578 | .jstree-default-small .jstree-node { | 578 | .jstree-default-small .jstree-node { |
| 579 | background-position: -295px -7px; | 579 | background-position: -295px -7px; |
| @@ -678,13 +678,13 @@ | @@ -678,13 +678,13 @@ | ||
| 678 | background-position: 0 0; | 678 | background-position: 0 0; |
| 679 | } | 679 | } |
| 680 | .jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl { | 680 | .jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl { |
| 681 | - background: url("throbber.gif") center center no-repeat; | 681 | + background: url("/real_control_v2/assets/plugins/jstree/default/throbber.gif") center center no-repeat; |
| 682 | } | 682 | } |
| 683 | .jstree-default-small .jstree-file { | 683 | .jstree-default-small .jstree-file { |
| 684 | - background: url("32px.png") -103px -71px no-repeat; | 684 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -103px -71px no-repeat; |
| 685 | } | 685 | } |
| 686 | .jstree-default-small .jstree-folder { | 686 | .jstree-default-small .jstree-folder { |
| 687 | - background: url("32px.png") -263px -7px no-repeat; | 687 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -263px -7px no-repeat; |
| 688 | } | 688 | } |
| 689 | .jstree-default-small > .jstree-container-ul > .jstree-node { | 689 | .jstree-default-small > .jstree-container-ul > .jstree-node { |
| 690 | margin-left: 0; | 690 | margin-left: 0; |
| @@ -696,7 +696,7 @@ | @@ -696,7 +696,7 @@ | ||
| 696 | } | 696 | } |
| 697 | #jstree-dnd.jstree-default-small .jstree-ok, | 697 | #jstree-dnd.jstree-default-small .jstree-ok, |
| 698 | #jstree-dnd.jstree-default-small .jstree-er { | 698 | #jstree-dnd.jstree-default-small .jstree-er { |
| 699 | - background-image: url("32px.png"); | 699 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); |
| 700 | background-repeat: no-repeat; | 700 | background-repeat: no-repeat; |
| 701 | background-color: transparent; | 701 | background-color: transparent; |
| 702 | } | 702 | } |
| @@ -746,7 +746,7 @@ | @@ -746,7 +746,7 @@ | ||
| 746 | } | 746 | } |
| 747 | .jstree-default-large .jstree-node, | 747 | .jstree-default-large .jstree-node, |
| 748 | .jstree-default-large .jstree-icon { | 748 | .jstree-default-large .jstree-icon { |
| 749 | - background-image: url("32px.png"); | 749 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); |
| 750 | } | 750 | } |
| 751 | .jstree-default-large .jstree-node { | 751 | .jstree-default-large .jstree-node { |
| 752 | background-position: -288px 0px; | 752 | background-position: -288px 0px; |
| @@ -851,13 +851,13 @@ | @@ -851,13 +851,13 @@ | ||
| 851 | background-position: 0 0; | 851 | background-position: 0 0; |
| 852 | } | 852 | } |
| 853 | .jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl { | 853 | .jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl { |
| 854 | - background: url("throbber.gif") center center no-repeat; | 854 | + background: url("/real_control_v2/assets/plugins/jstree/default/throbber.gif") center center no-repeat; |
| 855 | } | 855 | } |
| 856 | .jstree-default-large .jstree-file { | 856 | .jstree-default-large .jstree-file { |
| 857 | - background: url("32px.png") -96px -64px no-repeat; | 857 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -96px -64px no-repeat; |
| 858 | } | 858 | } |
| 859 | .jstree-default-large .jstree-folder { | 859 | .jstree-default-large .jstree-folder { |
| 860 | - background: url("32px.png") -256px 0px no-repeat; | 860 | + background: url("/real_control_v2/assets/plugins/jstree/default/32px.png") -256px 0px no-repeat; |
| 861 | } | 861 | } |
| 862 | .jstree-default-large > .jstree-container-ul > .jstree-node { | 862 | .jstree-default-large > .jstree-container-ul > .jstree-node { |
| 863 | margin-left: 0; | 863 | margin-left: 0; |
| @@ -869,7 +869,7 @@ | @@ -869,7 +869,7 @@ | ||
| 869 | } | 869 | } |
| 870 | #jstree-dnd.jstree-default-large .jstree-ok, | 870 | #jstree-dnd.jstree-default-large .jstree-ok, |
| 871 | #jstree-dnd.jstree-default-large .jstree-er { | 871 | #jstree-dnd.jstree-default-large .jstree-er { |
| 872 | - background-image: url("32px.png"); | 872 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/32px.png"); |
| 873 | background-repeat: no-repeat; | 873 | background-repeat: no-repeat; |
| 874 | background-color: transparent; | 874 | background-color: transparent; |
| 875 | } | 875 | } |
| @@ -904,12 +904,12 @@ | @@ -904,12 +904,12 @@ | ||
| 904 | height: 40px; | 904 | height: 40px; |
| 905 | } | 905 | } |
| 906 | #jstree-dnd.jstree-dnd-responsive > .jstree-ok { | 906 | #jstree-dnd.jstree-dnd-responsive > .jstree-ok { |
| 907 | - background-image: url("40px.png"); | 907 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/40px.png"); |
| 908 | background-position: 0 -200px; | 908 | background-position: 0 -200px; |
| 909 | background-size: 120px 240px; | 909 | background-size: 120px 240px; |
| 910 | } | 910 | } |
| 911 | #jstree-dnd.jstree-dnd-responsive > .jstree-er { | 911 | #jstree-dnd.jstree-dnd-responsive > .jstree-er { |
| 912 | - background-image: url("40px.png"); | 912 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/40px.png"); |
| 913 | background-position: -40px -200px; | 913 | background-position: -40px -200px; |
| 914 | background-size: 120px 240px; | 914 | background-size: 120px 240px; |
| 915 | } | 915 | } |
| @@ -928,7 +928,7 @@ | @@ -928,7 +928,7 @@ | ||
| 928 | */ | 928 | */ |
| 929 | } | 929 | } |
| 930 | .jstree-default-responsive .jstree-icon { | 930 | .jstree-default-responsive .jstree-icon { |
| 931 | - background-image: url("40px.png"); | 931 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/40px.png"); |
| 932 | } | 932 | } |
| 933 | .jstree-default-responsive .jstree-node, | 933 | .jstree-default-responsive .jstree-node, |
| 934 | .jstree-default-responsive .jstree-leaf > .jstree-ocl { | 934 | .jstree-default-responsive .jstree-leaf > .jstree-ocl { |
| @@ -1032,7 +1032,7 @@ | @@ -1032,7 +1032,7 @@ | ||
| 1032 | .jstree-default-responsive .jstree-node > .jstree-ocl, | 1032 | .jstree-default-responsive .jstree-node > .jstree-ocl, |
| 1033 | .jstree-default-responsive .jstree-themeicon, | 1033 | .jstree-default-responsive .jstree-themeicon, |
| 1034 | .jstree-default-responsive .jstree-checkbox { | 1034 | .jstree-default-responsive .jstree-checkbox { |
| 1035 | - background-image: url("40px.png"); | 1035 | + background-image: url("/real_control_v2/assets/plugins/jstree/default/40px.png"); |
| 1036 | background-size: 120px 240px; | 1036 | background-size: 120px 240px; |
| 1037 | } | 1037 | } |
| 1038 | .jstree-default-responsive .jstree-node { | 1038 | .jstree-default-responsive .jstree-node { |
| @@ -1054,11 +1054,11 @@ | @@ -1054,11 +1054,11 @@ | ||
| 1054 | background-position: 0 0; | 1054 | background-position: 0 0; |
| 1055 | } | 1055 | } |
| 1056 | .jstree-default-responsive .jstree-file { | 1056 | .jstree-default-responsive .jstree-file { |
| 1057 | - background: url("40px.png") 0 -160px no-repeat; | 1057 | + background: url("/real_control_v2/assets/plugins/jstree/default/40px.png") 0 -160px no-repeat; |
| 1058 | background-size: 120px 240px; | 1058 | background-size: 120px 240px; |
| 1059 | } | 1059 | } |
| 1060 | .jstree-default-responsive .jstree-folder { | 1060 | .jstree-default-responsive .jstree-folder { |
| 1061 | - background: url("40px.png") -40px -40px no-repeat; | 1061 | + background: url("/real_control_v2/assets/plugins/jstree/default/40px.png") -40px -40px no-repeat; |
| 1062 | background-size: 120px 240px; | 1062 | background-size: 120px 240px; |
| 1063 | } | 1063 | } |
| 1064 | .jstree-default-responsive > .jstree-container-ul > .jstree-node { | 1064 | .jstree-default-responsive > .jstree-container-ul > .jstree-node { |
src/main/resources/static/real_control_v2/assets/plugins/jstree/default/style.min.css deleted
100644 → 0
| 1 | -.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-context{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-default>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:0 0}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default .jstree-checked>.jstree-checkbox{background-position:-228px -4px}.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default .jstree-checked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-default .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default .jstree-er{background-position:-36px -68px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:0 0}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-small .jstree-checked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-small .jstree-checked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-default-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-default-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-small .jstree-ok,#jstree-dnd.jstree-default-small .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-small .jstree-er{background-position:-39px -71px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:0 0}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-large .jstree-checked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-large .jstree-checked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-default-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-default-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-large .jstree-ok,#jstree-dnd.jstree-default-large .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-large .jstree-er{background-position:-32px -64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:0 0}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 240px}.jstree-default-responsive .jstree-leaf>.jstree-ocl,.jstree-default-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover,.jstree-default-responsive .jstree-checked>.jstree-checkbox,.jstree-default-responsive .jstree-checked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 240px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:0 0}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-default-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}} | ||
| 2 | \ No newline at end of file | 0 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css
0 → 100644
| 1 | +/* perfect-scrollbar v0.6.16 */ | ||
| 2 | +.ps-container { | ||
| 3 | + -ms-touch-action: auto; | ||
| 4 | + touch-action: auto; | ||
| 5 | + overflow: hidden !important; | ||
| 6 | + -ms-overflow-style: none; } | ||
| 7 | + @supports (-ms-overflow-style: none) { | ||
| 8 | + .ps-container { | ||
| 9 | + overflow: auto !important; } } | ||
| 10 | + @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | ||
| 11 | + .ps-container { | ||
| 12 | + overflow: auto !important; } } | ||
| 13 | + .ps-container.ps-active-x > .ps-scrollbar-x-rail, | ||
| 14 | + .ps-container.ps-active-y > .ps-scrollbar-y-rail { | ||
| 15 | + display: block; | ||
| 16 | + background-color: transparent; } | ||
| 17 | + .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail { | ||
| 18 | + background-color: #eee; | ||
| 19 | + opacity: 0.9; } | ||
| 20 | + .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x { | ||
| 21 | + background-color: #999; | ||
| 22 | + height: 11px; } | ||
| 23 | + .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail { | ||
| 24 | + background-color: #eee; | ||
| 25 | + opacity: 0.9; } | ||
| 26 | + .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y { | ||
| 27 | + background-color: #999; | ||
| 28 | + width: 11px; } | ||
| 29 | + .ps-container > .ps-scrollbar-x-rail { | ||
| 30 | + display: none; | ||
| 31 | + position: absolute; | ||
| 32 | + /* please don't change 'position' */ | ||
| 33 | + opacity: 0; | ||
| 34 | + -webkit-transition: background-color .2s linear, opacity .2s linear; | ||
| 35 | + -o-transition: background-color .2s linear, opacity .2s linear; | ||
| 36 | + -moz-transition: background-color .2s linear, opacity .2s linear; | ||
| 37 | + transition: background-color .2s linear, opacity .2s linear; | ||
| 38 | + bottom: 0px; | ||
| 39 | + /* there must be 'bottom' for ps-scrollbar-x-rail */ | ||
| 40 | + height: 15px; } | ||
| 41 | + .ps-container > .ps-scrollbar-x-rail > .ps-scrollbar-x { | ||
| 42 | + position: absolute; | ||
| 43 | + /* please don't change 'position' */ | ||
| 44 | + background-color: #aaa; | ||
| 45 | + -webkit-border-radius: 6px; | ||
| 46 | + -moz-border-radius: 6px; | ||
| 47 | + border-radius: 6px; | ||
| 48 | + -webkit-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out; | ||
| 49 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out; | ||
| 50 | + -o-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out; | ||
| 51 | + -moz-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out; | ||
| 52 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out; | ||
| 53 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out; | ||
| 54 | + bottom: 2px; | ||
| 55 | + /* there must be 'bottom' for ps-scrollbar-x */ | ||
| 56 | + height: 6px; } | ||
| 57 | + .ps-container > .ps-scrollbar-x-rail:hover > .ps-scrollbar-x, .ps-container > .ps-scrollbar-x-rail:active > .ps-scrollbar-x { | ||
| 58 | + height: 11px; } | ||
| 59 | + .ps-container > .ps-scrollbar-y-rail { | ||
| 60 | + display: none; | ||
| 61 | + position: absolute; | ||
| 62 | + /* please don't change 'position' */ | ||
| 63 | + opacity: 0; | ||
| 64 | + -webkit-transition: background-color .2s linear, opacity .2s linear; | ||
| 65 | + -o-transition: background-color .2s linear, opacity .2s linear; | ||
| 66 | + -moz-transition: background-color .2s linear, opacity .2s linear; | ||
| 67 | + transition: background-color .2s linear, opacity .2s linear; | ||
| 68 | + right: 0; | ||
| 69 | + /* there must be 'right' for ps-scrollbar-y-rail */ | ||
| 70 | + width: 15px; } | ||
| 71 | + .ps-container > .ps-scrollbar-y-rail > .ps-scrollbar-y { | ||
| 72 | + position: absolute; | ||
| 73 | + /* please don't change 'position' */ | ||
| 74 | + background-color: #aaa; | ||
| 75 | + -webkit-border-radius: 6px; | ||
| 76 | + -moz-border-radius: 6px; | ||
| 77 | + border-radius: 6px; | ||
| 78 | + -webkit-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out; | ||
| 79 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out; | ||
| 80 | + -o-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out; | ||
| 81 | + -moz-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out; | ||
| 82 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out; | ||
| 83 | + transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out; | ||
| 84 | + right: 2px; | ||
| 85 | + /* there must be 'right' for ps-scrollbar-y */ | ||
| 86 | + width: 6px; } | ||
| 87 | + .ps-container > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y, .ps-container > .ps-scrollbar-y-rail:active > .ps-scrollbar-y { | ||
| 88 | + width: 11px; } | ||
| 89 | + .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail { | ||
| 90 | + background-color: #eee; | ||
| 91 | + opacity: 0.9; } | ||
| 92 | + .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x { | ||
| 93 | + background-color: #999; | ||
| 94 | + height: 11px; } | ||
| 95 | + .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail { | ||
| 96 | + background-color: #eee; | ||
| 97 | + opacity: 0.9; } | ||
| 98 | + .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y { | ||
| 99 | + background-color: #999; | ||
| 100 | + width: 11px; } | ||
| 101 | + .ps-container:hover > .ps-scrollbar-x-rail, | ||
| 102 | + .ps-container:hover > .ps-scrollbar-y-rail { | ||
| 103 | + opacity: 0.6; } | ||
| 104 | + .ps-container:hover > .ps-scrollbar-x-rail:hover { | ||
| 105 | + background-color: #eee; | ||
| 106 | + opacity: 0.9; } | ||
| 107 | + .ps-container:hover > .ps-scrollbar-x-rail:hover > .ps-scrollbar-x { | ||
| 108 | + background-color: #999; } | ||
| 109 | + .ps-container:hover > .ps-scrollbar-y-rail:hover { | ||
| 110 | + background-color: #eee; | ||
| 111 | + opacity: 0.9; } | ||
| 112 | + .ps-container:hover > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y { | ||
| 113 | + background-color: #999; } |
src/main/resources/static/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js
0 → 100644
| 1 | +/* perfect-scrollbar v0.6.16 */ | ||
| 2 | +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
| 3 | +'use strict'; | ||
| 4 | + | ||
| 5 | +var ps = require('../main'); | ||
| 6 | +var psInstances = require('../plugin/instances'); | ||
| 7 | + | ||
| 8 | +function mountJQuery(jQuery) { | ||
| 9 | + jQuery.fn.perfectScrollbar = function (settingOrCommand) { | ||
| 10 | + return this.each(function () { | ||
| 11 | + if (typeof settingOrCommand === 'object' || | ||
| 12 | + typeof settingOrCommand === 'undefined') { | ||
| 13 | + // If it's an object or none, initialize. | ||
| 14 | + var settings = settingOrCommand; | ||
| 15 | + | ||
| 16 | + if (!psInstances.get(this)) { | ||
| 17 | + ps.initialize(this, settings); | ||
| 18 | + } | ||
| 19 | + } else { | ||
| 20 | + // Unless, it may be a command. | ||
| 21 | + var command = settingOrCommand; | ||
| 22 | + | ||
| 23 | + if (command === 'update') { | ||
| 24 | + ps.update(this); | ||
| 25 | + } else if (command === 'destroy') { | ||
| 26 | + ps.destroy(this); | ||
| 27 | + } | ||
| 28 | + } | ||
| 29 | + }); | ||
| 30 | + }; | ||
| 31 | +} | ||
| 32 | + | ||
| 33 | +if (typeof define === 'function' && define.amd) { | ||
| 34 | + // AMD. Register as an anonymous module. | ||
| 35 | + define(['jquery'], mountJQuery); | ||
| 36 | +} else { | ||
| 37 | + var jq = window.jQuery ? window.jQuery : window.$; | ||
| 38 | + if (typeof jq !== 'undefined') { | ||
| 39 | + mountJQuery(jq); | ||
| 40 | + } | ||
| 41 | +} | ||
| 42 | + | ||
| 43 | +module.exports = mountJQuery; | ||
| 44 | + | ||
| 45 | +},{"../main":7,"../plugin/instances":18}],2:[function(require,module,exports){ | ||
| 46 | +'use strict'; | ||
| 47 | + | ||
| 48 | +function oldAdd(element, className) { | ||
| 49 | + var classes = element.className.split(' '); | ||
| 50 | + if (classes.indexOf(className) < 0) { | ||
| 51 | + classes.push(className); | ||
| 52 | + } | ||
| 53 | + element.className = classes.join(' '); | ||
| 54 | +} | ||
| 55 | + | ||
| 56 | +function oldRemove(element, className) { | ||
| 57 | + var classes = element.className.split(' '); | ||
| 58 | + var idx = classes.indexOf(className); | ||
| 59 | + if (idx >= 0) { | ||
| 60 | + classes.splice(idx, 1); | ||
| 61 | + } | ||
| 62 | + element.className = classes.join(' '); | ||
| 63 | +} | ||
| 64 | + | ||
| 65 | +exports.add = function (element, className) { | ||
| 66 | + if (element.classList) { | ||
| 67 | + element.classList.add(className); | ||
| 68 | + } else { | ||
| 69 | + oldAdd(element, className); | ||
| 70 | + } | ||
| 71 | +}; | ||
| 72 | + | ||
| 73 | +exports.remove = function (element, className) { | ||
| 74 | + if (element.classList) { | ||
| 75 | + element.classList.remove(className); | ||
| 76 | + } else { | ||
| 77 | + oldRemove(element, className); | ||
| 78 | + } | ||
| 79 | +}; | ||
| 80 | + | ||
| 81 | +exports.list = function (element) { | ||
| 82 | + if (element.classList) { | ||
| 83 | + return Array.prototype.slice.apply(element.classList); | ||
| 84 | + } else { | ||
| 85 | + return element.className.split(' '); | ||
| 86 | + } | ||
| 87 | +}; | ||
| 88 | + | ||
| 89 | +},{}],3:[function(require,module,exports){ | ||
| 90 | +'use strict'; | ||
| 91 | + | ||
| 92 | +var DOM = {}; | ||
| 93 | + | ||
| 94 | +DOM.e = function (tagName, className) { | ||
| 95 | + var element = document.createElement(tagName); | ||
| 96 | + element.className = className; | ||
| 97 | + return element; | ||
| 98 | +}; | ||
| 99 | + | ||
| 100 | +DOM.appendTo = function (child, parent) { | ||
| 101 | + parent.appendChild(child); | ||
| 102 | + return child; | ||
| 103 | +}; | ||
| 104 | + | ||
| 105 | +function cssGet(element, styleName) { | ||
| 106 | + return window.getComputedStyle(element)[styleName]; | ||
| 107 | +} | ||
| 108 | + | ||
| 109 | +function cssSet(element, styleName, styleValue) { | ||
| 110 | + if (typeof styleValue === 'number') { | ||
| 111 | + styleValue = styleValue.toString() + 'px'; | ||
| 112 | + } | ||
| 113 | + element.style[styleName] = styleValue; | ||
| 114 | + return element; | ||
| 115 | +} | ||
| 116 | + | ||
| 117 | +function cssMultiSet(element, obj) { | ||
| 118 | + for (var key in obj) { | ||
| 119 | + var val = obj[key]; | ||
| 120 | + if (typeof val === 'number') { | ||
| 121 | + val = val.toString() + 'px'; | ||
| 122 | + } | ||
| 123 | + element.style[key] = val; | ||
| 124 | + } | ||
| 125 | + return element; | ||
| 126 | +} | ||
| 127 | + | ||
| 128 | +DOM.css = function (element, styleNameOrObject, styleValue) { | ||
| 129 | + if (typeof styleNameOrObject === 'object') { | ||
| 130 | + // multiple set with object | ||
| 131 | + return cssMultiSet(element, styleNameOrObject); | ||
| 132 | + } else { | ||
| 133 | + if (typeof styleValue === 'undefined') { | ||
| 134 | + return cssGet(element, styleNameOrObject); | ||
| 135 | + } else { | ||
| 136 | + return cssSet(element, styleNameOrObject, styleValue); | ||
| 137 | + } | ||
| 138 | + } | ||
| 139 | +}; | ||
| 140 | + | ||
| 141 | +DOM.matches = function (element, query) { | ||
| 142 | + if (typeof element.matches !== 'undefined') { | ||
| 143 | + return element.matches(query); | ||
| 144 | + } else { | ||
| 145 | + if (typeof element.matchesSelector !== 'undefined') { | ||
| 146 | + return element.matchesSelector(query); | ||
| 147 | + } else if (typeof element.webkitMatchesSelector !== 'undefined') { | ||
| 148 | + return element.webkitMatchesSelector(query); | ||
| 149 | + } else if (typeof element.mozMatchesSelector !== 'undefined') { | ||
| 150 | + return element.mozMatchesSelector(query); | ||
| 151 | + } else if (typeof element.msMatchesSelector !== 'undefined') { | ||
| 152 | + return element.msMatchesSelector(query); | ||
| 153 | + } | ||
| 154 | + } | ||
| 155 | +}; | ||
| 156 | + | ||
| 157 | +DOM.remove = function (element) { | ||
| 158 | + if (typeof element.remove !== 'undefined') { | ||
| 159 | + element.remove(); | ||
| 160 | + } else { | ||
| 161 | + if (element.parentNode) { | ||
| 162 | + element.parentNode.removeChild(element); | ||
| 163 | + } | ||
| 164 | + } | ||
| 165 | +}; | ||
| 166 | + | ||
| 167 | +DOM.queryChildren = function (element, selector) { | ||
| 168 | + return Array.prototype.filter.call(element.childNodes, function (child) { | ||
| 169 | + return DOM.matches(child, selector); | ||
| 170 | + }); | ||
| 171 | +}; | ||
| 172 | + | ||
| 173 | +module.exports = DOM; | ||
| 174 | + | ||
| 175 | +},{}],4:[function(require,module,exports){ | ||
| 176 | +'use strict'; | ||
| 177 | + | ||
| 178 | +var EventElement = function (element) { | ||
| 179 | + this.element = element; | ||
| 180 | + this.events = {}; | ||
| 181 | +}; | ||
| 182 | + | ||
| 183 | +EventElement.prototype.bind = function (eventName, handler) { | ||
| 184 | + if (typeof this.events[eventName] === 'undefined') { | ||
| 185 | + this.events[eventName] = []; | ||
| 186 | + } | ||
| 187 | + this.events[eventName].push(handler); | ||
| 188 | + this.element.addEventListener(eventName, handler, false); | ||
| 189 | +}; | ||
| 190 | + | ||
| 191 | +EventElement.prototype.unbind = function (eventName, handler) { | ||
| 192 | + var isHandlerProvided = (typeof handler !== 'undefined'); | ||
| 193 | + this.events[eventName] = this.events[eventName].filter(function (hdlr) { | ||
| 194 | + if (isHandlerProvided && hdlr !== handler) { | ||
| 195 | + return true; | ||
| 196 | + } | ||
| 197 | + this.element.removeEventListener(eventName, hdlr, false); | ||
| 198 | + return false; | ||
| 199 | + }, this); | ||
| 200 | +}; | ||
| 201 | + | ||
| 202 | +EventElement.prototype.unbindAll = function () { | ||
| 203 | + for (var name in this.events) { | ||
| 204 | + this.unbind(name); | ||
| 205 | + } | ||
| 206 | +}; | ||
| 207 | + | ||
| 208 | +var EventManager = function () { | ||
| 209 | + this.eventElements = []; | ||
| 210 | +}; | ||
| 211 | + | ||
| 212 | +EventManager.prototype.eventElement = function (element) { | ||
| 213 | + var ee = this.eventElements.filter(function (eventElement) { | ||
| 214 | + return eventElement.element === element; | ||
| 215 | + })[0]; | ||
| 216 | + if (typeof ee === 'undefined') { | ||
| 217 | + ee = new EventElement(element); | ||
| 218 | + this.eventElements.push(ee); | ||
| 219 | + } | ||
| 220 | + return ee; | ||
| 221 | +}; | ||
| 222 | + | ||
| 223 | +EventManager.prototype.bind = function (element, eventName, handler) { | ||
| 224 | + this.eventElement(element).bind(eventName, handler); | ||
| 225 | +}; | ||
| 226 | + | ||
| 227 | +EventManager.prototype.unbind = function (element, eventName, handler) { | ||
| 228 | + this.eventElement(element).unbind(eventName, handler); | ||
| 229 | +}; | ||
| 230 | + | ||
| 231 | +EventManager.prototype.unbindAll = function () { | ||
| 232 | + for (var i = 0; i < this.eventElements.length; i++) { | ||
| 233 | + this.eventElements[i].unbindAll(); | ||
| 234 | + } | ||
| 235 | +}; | ||
| 236 | + | ||
| 237 | +EventManager.prototype.once = function (element, eventName, handler) { | ||
| 238 | + var ee = this.eventElement(element); | ||
| 239 | + var onceHandler = function (e) { | ||
| 240 | + ee.unbind(eventName, onceHandler); | ||
| 241 | + handler(e); | ||
| 242 | + }; | ||
| 243 | + ee.bind(eventName, onceHandler); | ||
| 244 | +}; | ||
| 245 | + | ||
| 246 | +module.exports = EventManager; | ||
| 247 | + | ||
| 248 | +},{}],5:[function(require,module,exports){ | ||
| 249 | +'use strict'; | ||
| 250 | + | ||
| 251 | +module.exports = (function () { | ||
| 252 | + function s4() { | ||
| 253 | + return Math.floor((1 + Math.random()) * 0x10000) | ||
| 254 | + .toString(16) | ||
| 255 | + .substring(1); | ||
| 256 | + } | ||
| 257 | + return function () { | ||
| 258 | + return s4() + s4() + '-' + s4() + '-' + s4() + '-' + | ||
| 259 | + s4() + '-' + s4() + s4() + s4(); | ||
| 260 | + }; | ||
| 261 | +})(); | ||
| 262 | + | ||
| 263 | +},{}],6:[function(require,module,exports){ | ||
| 264 | +'use strict'; | ||
| 265 | + | ||
| 266 | +var cls = require('./class'); | ||
| 267 | +var dom = require('./dom'); | ||
| 268 | + | ||
| 269 | +var toInt = exports.toInt = function (x) { | ||
| 270 | + return parseInt(x, 10) || 0; | ||
| 271 | +}; | ||
| 272 | + | ||
| 273 | +var clone = exports.clone = function (obj) { | ||
| 274 | + if (!obj) { | ||
| 275 | + return null; | ||
| 276 | + } else if (obj.constructor === Array) { | ||
| 277 | + return obj.map(clone); | ||
| 278 | + } else if (typeof obj === 'object') { | ||
| 279 | + var result = {}; | ||
| 280 | + for (var key in obj) { | ||
| 281 | + result[key] = clone(obj[key]); | ||
| 282 | + } | ||
| 283 | + return result; | ||
| 284 | + } else { | ||
| 285 | + return obj; | ||
| 286 | + } | ||
| 287 | +}; | ||
| 288 | + | ||
| 289 | +exports.extend = function (original, source) { | ||
| 290 | + var result = clone(original); | ||
| 291 | + for (var key in source) { | ||
| 292 | + result[key] = clone(source[key]); | ||
| 293 | + } | ||
| 294 | + return result; | ||
| 295 | +}; | ||
| 296 | + | ||
| 297 | +exports.isEditable = function (el) { | ||
| 298 | + return dom.matches(el, "input,[contenteditable]") || | ||
| 299 | + dom.matches(el, "select,[contenteditable]") || | ||
| 300 | + dom.matches(el, "textarea,[contenteditable]") || | ||
| 301 | + dom.matches(el, "button,[contenteditable]"); | ||
| 302 | +}; | ||
| 303 | + | ||
| 304 | +exports.removePsClasses = function (element) { | ||
| 305 | + var clsList = cls.list(element); | ||
| 306 | + for (var i = 0; i < clsList.length; i++) { | ||
| 307 | + var className = clsList[i]; | ||
| 308 | + if (className.indexOf('ps-') === 0) { | ||
| 309 | + cls.remove(element, className); | ||
| 310 | + } | ||
| 311 | + } | ||
| 312 | +}; | ||
| 313 | + | ||
| 314 | +exports.outerWidth = function (element) { | ||
| 315 | + return toInt(dom.css(element, 'width')) + | ||
| 316 | + toInt(dom.css(element, 'paddingLeft')) + | ||
| 317 | + toInt(dom.css(element, 'paddingRight')) + | ||
| 318 | + toInt(dom.css(element, 'borderLeftWidth')) + | ||
| 319 | + toInt(dom.css(element, 'borderRightWidth')); | ||
| 320 | +}; | ||
| 321 | + | ||
| 322 | +exports.startScrolling = function (element, axis) { | ||
| 323 | + cls.add(element, 'ps-in-scrolling'); | ||
| 324 | + if (typeof axis !== 'undefined') { | ||
| 325 | + cls.add(element, 'ps-' + axis); | ||
| 326 | + } else { | ||
| 327 | + cls.add(element, 'ps-x'); | ||
| 328 | + cls.add(element, 'ps-y'); | ||
| 329 | + } | ||
| 330 | +}; | ||
| 331 | + | ||
| 332 | +exports.stopScrolling = function (element, axis) { | ||
| 333 | + cls.remove(element, 'ps-in-scrolling'); | ||
| 334 | + if (typeof axis !== 'undefined') { | ||
| 335 | + cls.remove(element, 'ps-' + axis); | ||
| 336 | + } else { | ||
| 337 | + cls.remove(element, 'ps-x'); | ||
| 338 | + cls.remove(element, 'ps-y'); | ||
| 339 | + } | ||
| 340 | +}; | ||
| 341 | + | ||
| 342 | +exports.env = { | ||
| 343 | + isWebKit: 'WebkitAppearance' in document.documentElement.style, | ||
| 344 | + supportsTouch: (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch), | ||
| 345 | + supportsIePointer: window.navigator.msMaxTouchPoints !== null | ||
| 346 | +}; | ||
| 347 | + | ||
| 348 | +},{"./class":2,"./dom":3}],7:[function(require,module,exports){ | ||
| 349 | +'use strict'; | ||
| 350 | + | ||
| 351 | +var destroy = require('./plugin/destroy'); | ||
| 352 | +var initialize = require('./plugin/initialize'); | ||
| 353 | +var update = require('./plugin/update'); | ||
| 354 | + | ||
| 355 | +module.exports = { | ||
| 356 | + initialize: initialize, | ||
| 357 | + update: update, | ||
| 358 | + destroy: destroy | ||
| 359 | +}; | ||
| 360 | + | ||
| 361 | +},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(require,module,exports){ | ||
| 362 | +'use strict'; | ||
| 363 | + | ||
| 364 | +module.exports = { | ||
| 365 | + handlers: ['click-rail', 'drag-scrollbar', 'keyboard', 'wheel', 'touch'], | ||
| 366 | + maxScrollbarLength: null, | ||
| 367 | + minScrollbarLength: null, | ||
| 368 | + scrollXMarginOffset: 0, | ||
| 369 | + scrollYMarginOffset: 0, | ||
| 370 | + suppressScrollX: false, | ||
| 371 | + suppressScrollY: false, | ||
| 372 | + swipePropagation: true, | ||
| 373 | + useBothWheelAxes: false, | ||
| 374 | + wheelPropagation: false, | ||
| 375 | + wheelSpeed: 1, | ||
| 376 | + theme: 'default' | ||
| 377 | +}; | ||
| 378 | + | ||
| 379 | +},{}],9:[function(require,module,exports){ | ||
| 380 | +'use strict'; | ||
| 381 | + | ||
| 382 | +var _ = require('../lib/helper'); | ||
| 383 | +var dom = require('../lib/dom'); | ||
| 384 | +var instances = require('./instances'); | ||
| 385 | + | ||
| 386 | +module.exports = function (element) { | ||
| 387 | + var i = instances.get(element); | ||
| 388 | + | ||
| 389 | + if (!i) { | ||
| 390 | + return; | ||
| 391 | + } | ||
| 392 | + | ||
| 393 | + i.event.unbindAll(); | ||
| 394 | + dom.remove(i.scrollbarX); | ||
| 395 | + dom.remove(i.scrollbarY); | ||
| 396 | + dom.remove(i.scrollbarXRail); | ||
| 397 | + dom.remove(i.scrollbarYRail); | ||
| 398 | + _.removePsClasses(element); | ||
| 399 | + | ||
| 400 | + instances.remove(element); | ||
| 401 | +}; | ||
| 402 | + | ||
| 403 | +},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(require,module,exports){ | ||
| 404 | +'use strict'; | ||
| 405 | + | ||
| 406 | +var instances = require('../instances'); | ||
| 407 | +var updateGeometry = require('../update-geometry'); | ||
| 408 | +var updateScroll = require('../update-scroll'); | ||
| 409 | + | ||
| 410 | +function bindClickRailHandler(element, i) { | ||
| 411 | + function pageOffset(el) { | ||
| 412 | + return el.getBoundingClientRect(); | ||
| 413 | + } | ||
| 414 | + var stopPropagation = function (e) { e.stopPropagation(); }; | ||
| 415 | + | ||
| 416 | + i.event.bind(i.scrollbarY, 'click', stopPropagation); | ||
| 417 | + i.event.bind(i.scrollbarYRail, 'click', function (e) { | ||
| 418 | + var positionTop = e.pageY - window.pageYOffset - pageOffset(i.scrollbarYRail).top; | ||
| 419 | + var direction = positionTop > i.scrollbarYTop ? 1 : -1; | ||
| 420 | + | ||
| 421 | + updateScroll(element, 'top', element.scrollTop + direction * i.containerHeight); | ||
| 422 | + updateGeometry(element); | ||
| 423 | + | ||
| 424 | + e.stopPropagation(); | ||
| 425 | + }); | ||
| 426 | + | ||
| 427 | + i.event.bind(i.scrollbarX, 'click', stopPropagation); | ||
| 428 | + i.event.bind(i.scrollbarXRail, 'click', function (e) { | ||
| 429 | + var positionLeft = e.pageX - window.pageXOffset - pageOffset(i.scrollbarXRail).left; | ||
| 430 | + var direction = positionLeft > i.scrollbarXLeft ? 1 : -1; | ||
| 431 | + | ||
| 432 | + updateScroll(element, 'left', element.scrollLeft + direction * i.containerWidth); | ||
| 433 | + updateGeometry(element); | ||
| 434 | + | ||
| 435 | + e.stopPropagation(); | ||
| 436 | + }); | ||
| 437 | +} | ||
| 438 | + | ||
| 439 | +module.exports = function (element) { | ||
| 440 | + var i = instances.get(element); | ||
| 441 | + bindClickRailHandler(element, i); | ||
| 442 | +}; | ||
| 443 | + | ||
| 444 | +},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){ | ||
| 445 | +'use strict'; | ||
| 446 | + | ||
| 447 | +var _ = require('../../lib/helper'); | ||
| 448 | +var dom = require('../../lib/dom'); | ||
| 449 | +var instances = require('../instances'); | ||
| 450 | +var updateGeometry = require('../update-geometry'); | ||
| 451 | +var updateScroll = require('../update-scroll'); | ||
| 452 | + | ||
| 453 | +function bindMouseScrollXHandler(element, i) { | ||
| 454 | + var currentLeft = null; | ||
| 455 | + var currentPageX = null; | ||
| 456 | + | ||
| 457 | + function updateScrollLeft(deltaX) { | ||
| 458 | + var newLeft = currentLeft + (deltaX * i.railXRatio); | ||
| 459 | + var maxLeft = Math.max(0, i.scrollbarXRail.getBoundingClientRect().left) + (i.railXRatio * (i.railXWidth - i.scrollbarXWidth)); | ||
| 460 | + | ||
| 461 | + if (newLeft < 0) { | ||
| 462 | + i.scrollbarXLeft = 0; | ||
| 463 | + } else if (newLeft > maxLeft) { | ||
| 464 | + i.scrollbarXLeft = maxLeft; | ||
| 465 | + } else { | ||
| 466 | + i.scrollbarXLeft = newLeft; | ||
| 467 | + } | ||
| 468 | + | ||
| 469 | + var scrollLeft = _.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment; | ||
| 470 | + updateScroll(element, 'left', scrollLeft); | ||
| 471 | + } | ||
| 472 | + | ||
| 473 | + var mouseMoveHandler = function (e) { | ||
| 474 | + updateScrollLeft(e.pageX - currentPageX); | ||
| 475 | + updateGeometry(element); | ||
| 476 | + e.stopPropagation(); | ||
| 477 | + e.preventDefault(); | ||
| 478 | + }; | ||
| 479 | + | ||
| 480 | + var mouseUpHandler = function () { | ||
| 481 | + _.stopScrolling(element, 'x'); | ||
| 482 | + i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler); | ||
| 483 | + }; | ||
| 484 | + | ||
| 485 | + i.event.bind(i.scrollbarX, 'mousedown', function (e) { | ||
| 486 | + currentPageX = e.pageX; | ||
| 487 | + currentLeft = _.toInt(dom.css(i.scrollbarX, 'left')) * i.railXRatio; | ||
| 488 | + _.startScrolling(element, 'x'); | ||
| 489 | + | ||
| 490 | + i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler); | ||
| 491 | + i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler); | ||
| 492 | + | ||
| 493 | + e.stopPropagation(); | ||
| 494 | + e.preventDefault(); | ||
| 495 | + }); | ||
| 496 | +} | ||
| 497 | + | ||
| 498 | +function bindMouseScrollYHandler(element, i) { | ||
| 499 | + var currentTop = null; | ||
| 500 | + var currentPageY = null; | ||
| 501 | + | ||
| 502 | + function updateScrollTop(deltaY) { | ||
| 503 | + var newTop = currentTop + (deltaY * i.railYRatio); | ||
| 504 | + var maxTop = Math.max(0, i.scrollbarYRail.getBoundingClientRect().top) + (i.railYRatio * (i.railYHeight - i.scrollbarYHeight)); | ||
| 505 | + | ||
| 506 | + if (newTop < 0) { | ||
| 507 | + i.scrollbarYTop = 0; | ||
| 508 | + } else if (newTop > maxTop) { | ||
| 509 | + i.scrollbarYTop = maxTop; | ||
| 510 | + } else { | ||
| 511 | + i.scrollbarYTop = newTop; | ||
| 512 | + } | ||
| 513 | + | ||
| 514 | + var scrollTop = _.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight))); | ||
| 515 | + updateScroll(element, 'top', scrollTop); | ||
| 516 | + } | ||
| 517 | + | ||
| 518 | + var mouseMoveHandler = function (e) { | ||
| 519 | + updateScrollTop(e.pageY - currentPageY); | ||
| 520 | + updateGeometry(element); | ||
| 521 | + e.stopPropagation(); | ||
| 522 | + e.preventDefault(); | ||
| 523 | + }; | ||
| 524 | + | ||
| 525 | + var mouseUpHandler = function () { | ||
| 526 | + _.stopScrolling(element, 'y'); | ||
| 527 | + i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler); | ||
| 528 | + }; | ||
| 529 | + | ||
| 530 | + i.event.bind(i.scrollbarY, 'mousedown', function (e) { | ||
| 531 | + currentPageY = e.pageY; | ||
| 532 | + currentTop = _.toInt(dom.css(i.scrollbarY, 'top')) * i.railYRatio; | ||
| 533 | + _.startScrolling(element, 'y'); | ||
| 534 | + | ||
| 535 | + i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler); | ||
| 536 | + i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler); | ||
| 537 | + | ||
| 538 | + e.stopPropagation(); | ||
| 539 | + e.preventDefault(); | ||
| 540 | + }); | ||
| 541 | +} | ||
| 542 | + | ||
| 543 | +module.exports = function (element) { | ||
| 544 | + var i = instances.get(element); | ||
| 545 | + bindMouseScrollXHandler(element, i); | ||
| 546 | + bindMouseScrollYHandler(element, i); | ||
| 547 | +}; | ||
| 548 | + | ||
| 549 | +},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){ | ||
| 550 | +'use strict'; | ||
| 551 | + | ||
| 552 | +var _ = require('../../lib/helper'); | ||
| 553 | +var dom = require('../../lib/dom'); | ||
| 554 | +var instances = require('../instances'); | ||
| 555 | +var updateGeometry = require('../update-geometry'); | ||
| 556 | +var updateScroll = require('../update-scroll'); | ||
| 557 | + | ||
| 558 | +function bindKeyboardHandler(element, i) { | ||
| 559 | + var hovered = false; | ||
| 560 | + i.event.bind(element, 'mouseenter', function () { | ||
| 561 | + hovered = true; | ||
| 562 | + }); | ||
| 563 | + i.event.bind(element, 'mouseleave', function () { | ||
| 564 | + hovered = false; | ||
| 565 | + }); | ||
| 566 | + | ||
| 567 | + var shouldPrevent = false; | ||
| 568 | + function shouldPreventDefault(deltaX, deltaY) { | ||
| 569 | + var scrollTop = element.scrollTop; | ||
| 570 | + if (deltaX === 0) { | ||
| 571 | + if (!i.scrollbarYActive) { | ||
| 572 | + return false; | ||
| 573 | + } | ||
| 574 | + if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) { | ||
| 575 | + return !i.settings.wheelPropagation; | ||
| 576 | + } | ||
| 577 | + } | ||
| 578 | + | ||
| 579 | + var scrollLeft = element.scrollLeft; | ||
| 580 | + if (deltaY === 0) { | ||
| 581 | + if (!i.scrollbarXActive) { | ||
| 582 | + return false; | ||
| 583 | + } | ||
| 584 | + if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) { | ||
| 585 | + return !i.settings.wheelPropagation; | ||
| 586 | + } | ||
| 587 | + } | ||
| 588 | + return true; | ||
| 589 | + } | ||
| 590 | + | ||
| 591 | + i.event.bind(i.ownerDocument, 'keydown', function (e) { | ||
| 592 | + if ((e.isDefaultPrevented && e.isDefaultPrevented()) || e.defaultPrevented) { | ||
| 593 | + return; | ||
| 594 | + } | ||
| 595 | + | ||
| 596 | + var focused = dom.matches(i.scrollbarX, ':focus') || | ||
| 597 | + dom.matches(i.scrollbarY, ':focus'); | ||
| 598 | + | ||
| 599 | + if (!hovered && !focused) { | ||
| 600 | + return; | ||
| 601 | + } | ||
| 602 | + | ||
| 603 | + var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement; | ||
| 604 | + if (activeElement) { | ||
| 605 | + if (activeElement.tagName === 'IFRAME') { | ||
| 606 | + activeElement = activeElement.contentDocument.activeElement; | ||
| 607 | + } else { | ||
| 608 | + // go deeper if element is a webcomponent | ||
| 609 | + while (activeElement.shadowRoot) { | ||
| 610 | + activeElement = activeElement.shadowRoot.activeElement; | ||
| 611 | + } | ||
| 612 | + } | ||
| 613 | + if (_.isEditable(activeElement)) { | ||
| 614 | + return; | ||
| 615 | + } | ||
| 616 | + } | ||
| 617 | + | ||
| 618 | + var deltaX = 0; | ||
| 619 | + var deltaY = 0; | ||
| 620 | + | ||
| 621 | + switch (e.which) { | ||
| 622 | + case 37: // left | ||
| 623 | + if (e.metaKey) { | ||
| 624 | + deltaX = -i.contentWidth; | ||
| 625 | + } else if (e.altKey) { | ||
| 626 | + deltaX = -i.containerWidth; | ||
| 627 | + } else { | ||
| 628 | + deltaX = -30; | ||
| 629 | + } | ||
| 630 | + break; | ||
| 631 | + case 38: // up | ||
| 632 | + if (e.metaKey) { | ||
| 633 | + deltaY = i.contentHeight; | ||
| 634 | + } else if (e.altKey) { | ||
| 635 | + deltaY = i.containerHeight; | ||
| 636 | + } else { | ||
| 637 | + deltaY = 30; | ||
| 638 | + } | ||
| 639 | + break; | ||
| 640 | + case 39: // right | ||
| 641 | + if (e.metaKey) { | ||
| 642 | + deltaX = i.contentWidth; | ||
| 643 | + } else if (e.altKey) { | ||
| 644 | + deltaX = i.containerWidth; | ||
| 645 | + } else { | ||
| 646 | + deltaX = 30; | ||
| 647 | + } | ||
| 648 | + break; | ||
| 649 | + case 40: // down | ||
| 650 | + if (e.metaKey) { | ||
| 651 | + deltaY = -i.contentHeight; | ||
| 652 | + } else if (e.altKey) { | ||
| 653 | + deltaY = -i.containerHeight; | ||
| 654 | + } else { | ||
| 655 | + deltaY = -30; | ||
| 656 | + } | ||
| 657 | + break; | ||
| 658 | + case 33: // page up | ||
| 659 | + deltaY = 90; | ||
| 660 | + break; | ||
| 661 | + case 32: // space bar | ||
| 662 | + if (e.shiftKey) { | ||
| 663 | + deltaY = 90; | ||
| 664 | + } else { | ||
| 665 | + deltaY = -90; | ||
| 666 | + } | ||
| 667 | + break; | ||
| 668 | + case 34: // page down | ||
| 669 | + deltaY = -90; | ||
| 670 | + break; | ||
| 671 | + case 35: // end | ||
| 672 | + if (e.ctrlKey) { | ||
| 673 | + deltaY = -i.contentHeight; | ||
| 674 | + } else { | ||
| 675 | + deltaY = -i.containerHeight; | ||
| 676 | + } | ||
| 677 | + break; | ||
| 678 | + case 36: // home | ||
| 679 | + if (e.ctrlKey) { | ||
| 680 | + deltaY = element.scrollTop; | ||
| 681 | + } else { | ||
| 682 | + deltaY = i.containerHeight; | ||
| 683 | + } | ||
| 684 | + break; | ||
| 685 | + default: | ||
| 686 | + return; | ||
| 687 | + } | ||
| 688 | + | ||
| 689 | + updateScroll(element, 'top', element.scrollTop - deltaY); | ||
| 690 | + updateScroll(element, 'left', element.scrollLeft + deltaX); | ||
| 691 | + updateGeometry(element); | ||
| 692 | + | ||
| 693 | + shouldPrevent = shouldPreventDefault(deltaX, deltaY); | ||
| 694 | + if (shouldPrevent) { | ||
| 695 | + e.preventDefault(); | ||
| 696 | + } | ||
| 697 | + }); | ||
| 698 | +} | ||
| 699 | + | ||
| 700 | +module.exports = function (element) { | ||
| 701 | + var i = instances.get(element); | ||
| 702 | + bindKeyboardHandler(element, i); | ||
| 703 | +}; | ||
| 704 | + | ||
| 705 | +},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){ | ||
| 706 | +'use strict'; | ||
| 707 | + | ||
| 708 | +var instances = require('../instances'); | ||
| 709 | +var updateGeometry = require('../update-geometry'); | ||
| 710 | +var updateScroll = require('../update-scroll'); | ||
| 711 | + | ||
| 712 | +function bindMouseWheelHandler(element, i) { | ||
| 713 | + var shouldPrevent = false; | ||
| 714 | + | ||
| 715 | + function shouldPreventDefault(deltaX, deltaY) { | ||
| 716 | + var scrollTop = element.scrollTop; | ||
| 717 | + if (deltaX === 0) { | ||
| 718 | + if (!i.scrollbarYActive) { | ||
| 719 | + return false; | ||
| 720 | + } | ||
| 721 | + if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) { | ||
| 722 | + return !i.settings.wheelPropagation; | ||
| 723 | + } | ||
| 724 | + } | ||
| 725 | + | ||
| 726 | + var scrollLeft = element.scrollLeft; | ||
| 727 | + if (deltaY === 0) { | ||
| 728 | + if (!i.scrollbarXActive) { | ||
| 729 | + return false; | ||
| 730 | + } | ||
| 731 | + if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) { | ||
| 732 | + return !i.settings.wheelPropagation; | ||
| 733 | + } | ||
| 734 | + } | ||
| 735 | + return true; | ||
| 736 | + } | ||
| 737 | + | ||
| 738 | + function getDeltaFromEvent(e) { | ||
| 739 | + var deltaX = e.deltaX; | ||
| 740 | + var deltaY = -1 * e.deltaY; | ||
| 741 | + | ||
| 742 | + if (typeof deltaX === "undefined" || typeof deltaY === "undefined") { | ||
| 743 | + // OS X Safari | ||
| 744 | + deltaX = -1 * e.wheelDeltaX / 6; | ||
| 745 | + deltaY = e.wheelDeltaY / 6; | ||
| 746 | + } | ||
| 747 | + | ||
| 748 | + if (e.deltaMode && e.deltaMode === 1) { | ||
| 749 | + // Firefox in deltaMode 1: Line scrolling | ||
| 750 | + deltaX *= 10; | ||
| 751 | + deltaY *= 10; | ||
| 752 | + } | ||
| 753 | + | ||
| 754 | + if (deltaX !== deltaX && deltaY !== deltaY/* NaN checks */) { | ||
| 755 | + // IE in some mouse drivers | ||
| 756 | + deltaX = 0; | ||
| 757 | + deltaY = e.wheelDelta; | ||
| 758 | + } | ||
| 759 | + | ||
| 760 | + if (e.shiftKey) { | ||
| 761 | + // reverse axis with shift key | ||
| 762 | + return [-deltaY, -deltaX]; | ||
| 763 | + } | ||
| 764 | + return [deltaX, deltaY]; | ||
| 765 | + } | ||
| 766 | + | ||
| 767 | + function shouldBeConsumedByChild(deltaX, deltaY) { | ||
| 768 | + var child = element.querySelector('textarea:hover, select[multiple]:hover, .ps-child:hover'); | ||
| 769 | + if (child) { | ||
| 770 | + if (!window.getComputedStyle(child).overflow.match(/(scroll|auto)/)) { | ||
| 771 | + // if not scrollable | ||
| 772 | + return false; | ||
| 773 | + } | ||
| 774 | + | ||
| 775 | + var maxScrollTop = child.scrollHeight - child.clientHeight; | ||
| 776 | + if (maxScrollTop > 0) { | ||
| 777 | + if (!(child.scrollTop === 0 && deltaY > 0) && !(child.scrollTop === maxScrollTop && deltaY < 0)) { | ||
| 778 | + return true; | ||
| 779 | + } | ||
| 780 | + } | ||
| 781 | + var maxScrollLeft = child.scrollLeft - child.clientWidth; | ||
| 782 | + if (maxScrollLeft > 0) { | ||
| 783 | + if (!(child.scrollLeft === 0 && deltaX < 0) && !(child.scrollLeft === maxScrollLeft && deltaX > 0)) { | ||
| 784 | + return true; | ||
| 785 | + } | ||
| 786 | + } | ||
| 787 | + } | ||
| 788 | + return false; | ||
| 789 | + } | ||
| 790 | + | ||
| 791 | + function mousewheelHandler(e) { | ||
| 792 | + var delta = getDeltaFromEvent(e); | ||
| 793 | + | ||
| 794 | + var deltaX = delta[0]; | ||
| 795 | + var deltaY = delta[1]; | ||
| 796 | + | ||
| 797 | + if (shouldBeConsumedByChild(deltaX, deltaY)) { | ||
| 798 | + return; | ||
| 799 | + } | ||
| 800 | + | ||
| 801 | + shouldPrevent = false; | ||
| 802 | + if (!i.settings.useBothWheelAxes) { | ||
| 803 | + // deltaX will only be used for horizontal scrolling and deltaY will | ||
| 804 | + // only be used for vertical scrolling - this is the default | ||
| 805 | + updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed)); | ||
| 806 | + updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed)); | ||
| 807 | + } else if (i.scrollbarYActive && !i.scrollbarXActive) { | ||
| 808 | + // only vertical scrollbar is active and useBothWheelAxes option is | ||
| 809 | + // active, so let's scroll vertical bar using both mouse wheel axes | ||
| 810 | + if (deltaY) { | ||
| 811 | + updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed)); | ||
| 812 | + } else { | ||
| 813 | + updateScroll(element, 'top', element.scrollTop + (deltaX * i.settings.wheelSpeed)); | ||
| 814 | + } | ||
| 815 | + shouldPrevent = true; | ||
| 816 | + } else if (i.scrollbarXActive && !i.scrollbarYActive) { | ||
| 817 | + // useBothWheelAxes and only horizontal bar is active, so use both | ||
| 818 | + // wheel axes for horizontal bar | ||
| 819 | + if (deltaX) { | ||
| 820 | + updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed)); | ||
| 821 | + } else { | ||
| 822 | + updateScroll(element, 'left', element.scrollLeft - (deltaY * i.settings.wheelSpeed)); | ||
| 823 | + } | ||
| 824 | + shouldPrevent = true; | ||
| 825 | + } | ||
| 826 | + | ||
| 827 | + updateGeometry(element); | ||
| 828 | + | ||
| 829 | + shouldPrevent = (shouldPrevent || shouldPreventDefault(deltaX, deltaY)); | ||
| 830 | + if (shouldPrevent) { | ||
| 831 | + e.stopPropagation(); | ||
| 832 | + e.preventDefault(); | ||
| 833 | + } | ||
| 834 | + } | ||
| 835 | + | ||
| 836 | + if (typeof window.onwheel !== "undefined") { | ||
| 837 | + i.event.bind(element, 'wheel', mousewheelHandler); | ||
| 838 | + } else if (typeof window.onmousewheel !== "undefined") { | ||
| 839 | + i.event.bind(element, 'mousewheel', mousewheelHandler); | ||
| 840 | + } | ||
| 841 | +} | ||
| 842 | + | ||
| 843 | +module.exports = function (element) { | ||
| 844 | + var i = instances.get(element); | ||
| 845 | + bindMouseWheelHandler(element, i); | ||
| 846 | +}; | ||
| 847 | + | ||
| 848 | +},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(require,module,exports){ | ||
| 849 | +'use strict'; | ||
| 850 | + | ||
| 851 | +var instances = require('../instances'); | ||
| 852 | +var updateGeometry = require('../update-geometry'); | ||
| 853 | + | ||
| 854 | +function bindNativeScrollHandler(element, i) { | ||
| 855 | + i.event.bind(element, 'scroll', function () { | ||
| 856 | + updateGeometry(element); | ||
| 857 | + }); | ||
| 858 | +} | ||
| 859 | + | ||
| 860 | +module.exports = function (element) { | ||
| 861 | + var i = instances.get(element); | ||
| 862 | + bindNativeScrollHandler(element, i); | ||
| 863 | +}; | ||
| 864 | + | ||
| 865 | +},{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){ | ||
| 866 | +'use strict'; | ||
| 867 | + | ||
| 868 | +var _ = require('../../lib/helper'); | ||
| 869 | +var instances = require('../instances'); | ||
| 870 | +var updateGeometry = require('../update-geometry'); | ||
| 871 | +var updateScroll = require('../update-scroll'); | ||
| 872 | + | ||
| 873 | +function bindSelectionHandler(element, i) { | ||
| 874 | + function getRangeNode() { | ||
| 875 | + var selection = window.getSelection ? window.getSelection() : | ||
| 876 | + document.getSelection ? document.getSelection() : ''; | ||
| 877 | + if (selection.toString().length === 0) { | ||
| 878 | + return null; | ||
| 879 | + } else { | ||
| 880 | + return selection.getRangeAt(0).commonAncestorContainer; | ||
| 881 | + } | ||
| 882 | + } | ||
| 883 | + | ||
| 884 | + var scrollingLoop = null; | ||
| 885 | + var scrollDiff = {top: 0, left: 0}; | ||
| 886 | + function startScrolling() { | ||
| 887 | + if (!scrollingLoop) { | ||
| 888 | + scrollingLoop = setInterval(function () { | ||
| 889 | + if (!instances.get(element)) { | ||
| 890 | + clearInterval(scrollingLoop); | ||
| 891 | + return; | ||
| 892 | + } | ||
| 893 | + | ||
| 894 | + updateScroll(element, 'top', element.scrollTop + scrollDiff.top); | ||
| 895 | + updateScroll(element, 'left', element.scrollLeft + scrollDiff.left); | ||
| 896 | + updateGeometry(element); | ||
| 897 | + }, 50); // every .1 sec | ||
| 898 | + } | ||
| 899 | + } | ||
| 900 | + function stopScrolling() { | ||
| 901 | + if (scrollingLoop) { | ||
| 902 | + clearInterval(scrollingLoop); | ||
| 903 | + scrollingLoop = null; | ||
| 904 | + } | ||
| 905 | + _.stopScrolling(element); | ||
| 906 | + } | ||
| 907 | + | ||
| 908 | + var isSelected = false; | ||
| 909 | + i.event.bind(i.ownerDocument, 'selectionchange', function () { | ||
| 910 | + if (element.contains(getRangeNode())) { | ||
| 911 | + isSelected = true; | ||
| 912 | + } else { | ||
| 913 | + isSelected = false; | ||
| 914 | + stopScrolling(); | ||
| 915 | + } | ||
| 916 | + }); | ||
| 917 | + i.event.bind(window, 'mouseup', function () { | ||
| 918 | + if (isSelected) { | ||
| 919 | + isSelected = false; | ||
| 920 | + stopScrolling(); | ||
| 921 | + } | ||
| 922 | + }); | ||
| 923 | + i.event.bind(window, 'keyup', function () { | ||
| 924 | + if (isSelected) { | ||
| 925 | + isSelected = false; | ||
| 926 | + stopScrolling(); | ||
| 927 | + } | ||
| 928 | + }); | ||
| 929 | + | ||
| 930 | + i.event.bind(window, 'mousemove', function (e) { | ||
| 931 | + if (isSelected) { | ||
| 932 | + var mousePosition = {x: e.pageX, y: e.pageY}; | ||
| 933 | + var containerGeometry = { | ||
| 934 | + left: element.offsetLeft, | ||
| 935 | + right: element.offsetLeft + element.offsetWidth, | ||
| 936 | + top: element.offsetTop, | ||
| 937 | + bottom: element.offsetTop + element.offsetHeight | ||
| 938 | + }; | ||
| 939 | + | ||
| 940 | + if (mousePosition.x < containerGeometry.left + 3) { | ||
| 941 | + scrollDiff.left = -5; | ||
| 942 | + _.startScrolling(element, 'x'); | ||
| 943 | + } else if (mousePosition.x > containerGeometry.right - 3) { | ||
| 944 | + scrollDiff.left = 5; | ||
| 945 | + _.startScrolling(element, 'x'); | ||
| 946 | + } else { | ||
| 947 | + scrollDiff.left = 0; | ||
| 948 | + } | ||
| 949 | + | ||
| 950 | + if (mousePosition.y < containerGeometry.top + 3) { | ||
| 951 | + if (containerGeometry.top + 3 - mousePosition.y < 5) { | ||
| 952 | + scrollDiff.top = -5; | ||
| 953 | + } else { | ||
| 954 | + scrollDiff.top = -20; | ||
| 955 | + } | ||
| 956 | + _.startScrolling(element, 'y'); | ||
| 957 | + } else if (mousePosition.y > containerGeometry.bottom - 3) { | ||
| 958 | + if (mousePosition.y - containerGeometry.bottom + 3 < 5) { | ||
| 959 | + scrollDiff.top = 5; | ||
| 960 | + } else { | ||
| 961 | + scrollDiff.top = 20; | ||
| 962 | + } | ||
| 963 | + _.startScrolling(element, 'y'); | ||
| 964 | + } else { | ||
| 965 | + scrollDiff.top = 0; | ||
| 966 | + } | ||
| 967 | + | ||
| 968 | + if (scrollDiff.top === 0 && scrollDiff.left === 0) { | ||
| 969 | + stopScrolling(); | ||
| 970 | + } else { | ||
| 971 | + startScrolling(); | ||
| 972 | + } | ||
| 973 | + } | ||
| 974 | + }); | ||
| 975 | +} | ||
| 976 | + | ||
| 977 | +module.exports = function (element) { | ||
| 978 | + var i = instances.get(element); | ||
| 979 | + bindSelectionHandler(element, i); | ||
| 980 | +}; | ||
| 981 | + | ||
| 982 | +},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){ | ||
| 983 | +'use strict'; | ||
| 984 | + | ||
| 985 | +var _ = require('../../lib/helper'); | ||
| 986 | +var instances = require('../instances'); | ||
| 987 | +var updateGeometry = require('../update-geometry'); | ||
| 988 | +var updateScroll = require('../update-scroll'); | ||
| 989 | + | ||
| 990 | +function bindTouchHandler(element, i, supportsTouch, supportsIePointer) { | ||
| 991 | + function shouldPreventDefault(deltaX, deltaY) { | ||
| 992 | + var scrollTop = element.scrollTop; | ||
| 993 | + var scrollLeft = element.scrollLeft; | ||
| 994 | + var magnitudeX = Math.abs(deltaX); | ||
| 995 | + var magnitudeY = Math.abs(deltaY); | ||
| 996 | + | ||
| 997 | + if (magnitudeY > magnitudeX) { | ||
| 998 | + // user is perhaps trying to swipe up/down the page | ||
| 999 | + | ||
| 1000 | + if (((deltaY < 0) && (scrollTop === i.contentHeight - i.containerHeight)) || | ||
| 1001 | + ((deltaY > 0) && (scrollTop === 0))) { | ||
| 1002 | + return !i.settings.swipePropagation; | ||
| 1003 | + } | ||
| 1004 | + } else if (magnitudeX > magnitudeY) { | ||
| 1005 | + // user is perhaps trying to swipe left/right across the page | ||
| 1006 | + | ||
| 1007 | + if (((deltaX < 0) && (scrollLeft === i.contentWidth - i.containerWidth)) || | ||
| 1008 | + ((deltaX > 0) && (scrollLeft === 0))) { | ||
| 1009 | + return !i.settings.swipePropagation; | ||
| 1010 | + } | ||
| 1011 | + } | ||
| 1012 | + | ||
| 1013 | + return true; | ||
| 1014 | + } | ||
| 1015 | + | ||
| 1016 | + function applyTouchMove(differenceX, differenceY) { | ||
| 1017 | + updateScroll(element, 'top', element.scrollTop - differenceY); | ||
| 1018 | + updateScroll(element, 'left', element.scrollLeft - differenceX); | ||
| 1019 | + | ||
| 1020 | + updateGeometry(element); | ||
| 1021 | + } | ||
| 1022 | + | ||
| 1023 | + var startOffset = {}; | ||
| 1024 | + var startTime = 0; | ||
| 1025 | + var speed = {}; | ||
| 1026 | + var easingLoop = null; | ||
| 1027 | + var inGlobalTouch = false; | ||
| 1028 | + var inLocalTouch = false; | ||
| 1029 | + | ||
| 1030 | + function globalTouchStart() { | ||
| 1031 | + inGlobalTouch = true; | ||
| 1032 | + } | ||
| 1033 | + function globalTouchEnd() { | ||
| 1034 | + inGlobalTouch = false; | ||
| 1035 | + } | ||
| 1036 | + | ||
| 1037 | + function getTouch(e) { | ||
| 1038 | + if (e.targetTouches) { | ||
| 1039 | + return e.targetTouches[0]; | ||
| 1040 | + } else { | ||
| 1041 | + // Maybe IE pointer | ||
| 1042 | + return e; | ||
| 1043 | + } | ||
| 1044 | + } | ||
| 1045 | + function shouldHandle(e) { | ||
| 1046 | + if (e.targetTouches && e.targetTouches.length === 1) { | ||
| 1047 | + return true; | ||
| 1048 | + } | ||
| 1049 | + if (e.pointerType && e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) { | ||
| 1050 | + return true; | ||
| 1051 | + } | ||
| 1052 | + return false; | ||
| 1053 | + } | ||
| 1054 | + function touchStart(e) { | ||
| 1055 | + if (shouldHandle(e)) { | ||
| 1056 | + inLocalTouch = true; | ||
| 1057 | + | ||
| 1058 | + var touch = getTouch(e); | ||
| 1059 | + | ||
| 1060 | + startOffset.pageX = touch.pageX; | ||
| 1061 | + startOffset.pageY = touch.pageY; | ||
| 1062 | + | ||
| 1063 | + startTime = (new Date()).getTime(); | ||
| 1064 | + | ||
| 1065 | + if (easingLoop !== null) { | ||
| 1066 | + clearInterval(easingLoop); | ||
| 1067 | + } | ||
| 1068 | + | ||
| 1069 | + e.stopPropagation(); | ||
| 1070 | + } | ||
| 1071 | + } | ||
| 1072 | + function touchMove(e) { | ||
| 1073 | + if (!inLocalTouch && i.settings.swipePropagation) { | ||
| 1074 | + touchStart(e); | ||
| 1075 | + } | ||
| 1076 | + if (!inGlobalTouch && inLocalTouch && shouldHandle(e)) { | ||
| 1077 | + var touch = getTouch(e); | ||
| 1078 | + | ||
| 1079 | + var currentOffset = {pageX: touch.pageX, pageY: touch.pageY}; | ||
| 1080 | + | ||
| 1081 | + var differenceX = currentOffset.pageX - startOffset.pageX; | ||
| 1082 | + var differenceY = currentOffset.pageY - startOffset.pageY; | ||
| 1083 | + | ||
| 1084 | + applyTouchMove(differenceX, differenceY); | ||
| 1085 | + startOffset = currentOffset; | ||
| 1086 | + | ||
| 1087 | + var currentTime = (new Date()).getTime(); | ||
| 1088 | + | ||
| 1089 | + var timeGap = currentTime - startTime; | ||
| 1090 | + if (timeGap > 0) { | ||
| 1091 | + speed.x = differenceX / timeGap; | ||
| 1092 | + speed.y = differenceY / timeGap; | ||
| 1093 | + startTime = currentTime; | ||
| 1094 | + } | ||
| 1095 | + | ||
| 1096 | + if (shouldPreventDefault(differenceX, differenceY)) { | ||
| 1097 | + e.stopPropagation(); | ||
| 1098 | + e.preventDefault(); | ||
| 1099 | + } | ||
| 1100 | + } | ||
| 1101 | + } | ||
| 1102 | + function touchEnd() { | ||
| 1103 | + if (!inGlobalTouch && inLocalTouch) { | ||
| 1104 | + inLocalTouch = false; | ||
| 1105 | + | ||
| 1106 | + clearInterval(easingLoop); | ||
| 1107 | + easingLoop = setInterval(function () { | ||
| 1108 | + if (!instances.get(element)) { | ||
| 1109 | + clearInterval(easingLoop); | ||
| 1110 | + return; | ||
| 1111 | + } | ||
| 1112 | + | ||
| 1113 | + if (!speed.x && !speed.y) { | ||
| 1114 | + clearInterval(easingLoop); | ||
| 1115 | + return; | ||
| 1116 | + } | ||
| 1117 | + | ||
| 1118 | + if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) { | ||
| 1119 | + clearInterval(easingLoop); | ||
| 1120 | + return; | ||
| 1121 | + } | ||
| 1122 | + | ||
| 1123 | + applyTouchMove(speed.x * 30, speed.y * 30); | ||
| 1124 | + | ||
| 1125 | + speed.x *= 0.8; | ||
| 1126 | + speed.y *= 0.8; | ||
| 1127 | + }, 10); | ||
| 1128 | + } | ||
| 1129 | + } | ||
| 1130 | + | ||
| 1131 | + if (supportsTouch) { | ||
| 1132 | + i.event.bind(window, 'touchstart', globalTouchStart); | ||
| 1133 | + i.event.bind(window, 'touchend', globalTouchEnd); | ||
| 1134 | + i.event.bind(element, 'touchstart', touchStart); | ||
| 1135 | + i.event.bind(element, 'touchmove', touchMove); | ||
| 1136 | + i.event.bind(element, 'touchend', touchEnd); | ||
| 1137 | + } else if (supportsIePointer) { | ||
| 1138 | + if (window.PointerEvent) { | ||
| 1139 | + i.event.bind(window, 'pointerdown', globalTouchStart); | ||
| 1140 | + i.event.bind(window, 'pointerup', globalTouchEnd); | ||
| 1141 | + i.event.bind(element, 'pointerdown', touchStart); | ||
| 1142 | + i.event.bind(element, 'pointermove', touchMove); | ||
| 1143 | + i.event.bind(element, 'pointerup', touchEnd); | ||
| 1144 | + } else if (window.MSPointerEvent) { | ||
| 1145 | + i.event.bind(window, 'MSPointerDown', globalTouchStart); | ||
| 1146 | + i.event.bind(window, 'MSPointerUp', globalTouchEnd); | ||
| 1147 | + i.event.bind(element, 'MSPointerDown', touchStart); | ||
| 1148 | + i.event.bind(element, 'MSPointerMove', touchMove); | ||
| 1149 | + i.event.bind(element, 'MSPointerUp', touchEnd); | ||
| 1150 | + } | ||
| 1151 | + } | ||
| 1152 | +} | ||
| 1153 | + | ||
| 1154 | +module.exports = function (element) { | ||
| 1155 | + if (!_.env.supportsTouch && !_.env.supportsIePointer) { | ||
| 1156 | + return; | ||
| 1157 | + } | ||
| 1158 | + | ||
| 1159 | + var i = instances.get(element); | ||
| 1160 | + bindTouchHandler(element, i, _.env.supportsTouch, _.env.supportsIePointer); | ||
| 1161 | +}; | ||
| 1162 | + | ||
| 1163 | +},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(require,module,exports){ | ||
| 1164 | +'use strict'; | ||
| 1165 | + | ||
| 1166 | +var _ = require('../lib/helper'); | ||
| 1167 | +var cls = require('../lib/class'); | ||
| 1168 | +var instances = require('./instances'); | ||
| 1169 | +var updateGeometry = require('./update-geometry'); | ||
| 1170 | + | ||
| 1171 | +// Handlers | ||
| 1172 | +var handlers = { | ||
| 1173 | + 'click-rail': require('./handler/click-rail'), | ||
| 1174 | + 'drag-scrollbar': require('./handler/drag-scrollbar'), | ||
| 1175 | + 'keyboard': require('./handler/keyboard'), | ||
| 1176 | + 'wheel': require('./handler/mouse-wheel'), | ||
| 1177 | + 'touch': require('./handler/touch'), | ||
| 1178 | + 'selection': require('./handler/selection') | ||
| 1179 | +}; | ||
| 1180 | +var nativeScrollHandler = require('./handler/native-scroll'); | ||
| 1181 | + | ||
| 1182 | +module.exports = function (element, userSettings) { | ||
| 1183 | + userSettings = typeof userSettings === 'object' ? userSettings : {}; | ||
| 1184 | + | ||
| 1185 | + cls.add(element, 'ps-container'); | ||
| 1186 | + | ||
| 1187 | + // Create a plugin instance. | ||
| 1188 | + var i = instances.add(element); | ||
| 1189 | + | ||
| 1190 | + i.settings = _.extend(i.settings, userSettings); | ||
| 1191 | + cls.add(element, 'ps-theme-' + i.settings.theme); | ||
| 1192 | + | ||
| 1193 | + i.settings.handlers.forEach(function (handlerName) { | ||
| 1194 | + handlers[handlerName](element); | ||
| 1195 | + }); | ||
| 1196 | + | ||
| 1197 | + nativeScrollHandler(element); | ||
| 1198 | + | ||
| 1199 | + updateGeometry(element); | ||
| 1200 | +}; | ||
| 1201 | + | ||
| 1202 | +},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){ | ||
| 1203 | +'use strict'; | ||
| 1204 | + | ||
| 1205 | +var _ = require('../lib/helper'); | ||
| 1206 | +var cls = require('../lib/class'); | ||
| 1207 | +var defaultSettings = require('./default-setting'); | ||
| 1208 | +var dom = require('../lib/dom'); | ||
| 1209 | +var EventManager = require('../lib/event-manager'); | ||
| 1210 | +var guid = require('../lib/guid'); | ||
| 1211 | + | ||
| 1212 | +var instances = {}; | ||
| 1213 | + | ||
| 1214 | +function Instance(element) { | ||
| 1215 | + var i = this; | ||
| 1216 | + | ||
| 1217 | + i.settings = _.clone(defaultSettings); | ||
| 1218 | + i.containerWidth = null; | ||
| 1219 | + i.containerHeight = null; | ||
| 1220 | + i.contentWidth = null; | ||
| 1221 | + i.contentHeight = null; | ||
| 1222 | + | ||
| 1223 | + i.isRtl = dom.css(element, 'direction') === "rtl"; | ||
| 1224 | + i.isNegativeScroll = (function () { | ||
| 1225 | + var originalScrollLeft = element.scrollLeft; | ||
| 1226 | + var result = null; | ||
| 1227 | + element.scrollLeft = -1; | ||
| 1228 | + result = element.scrollLeft < 0; | ||
| 1229 | + element.scrollLeft = originalScrollLeft; | ||
| 1230 | + return result; | ||
| 1231 | + })(); | ||
| 1232 | + i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0; | ||
| 1233 | + i.event = new EventManager(); | ||
| 1234 | + i.ownerDocument = element.ownerDocument || document; | ||
| 1235 | + | ||
| 1236 | + function focus() { | ||
| 1237 | + cls.add(element, 'ps-focus'); | ||
| 1238 | + } | ||
| 1239 | + | ||
| 1240 | + function blur() { | ||
| 1241 | + cls.remove(element, 'ps-focus'); | ||
| 1242 | + } | ||
| 1243 | + | ||
| 1244 | + i.scrollbarXRail = dom.appendTo(dom.e('div', 'ps-scrollbar-x-rail'), element); | ||
| 1245 | + i.scrollbarX = dom.appendTo(dom.e('div', 'ps-scrollbar-x'), i.scrollbarXRail); | ||
| 1246 | + i.scrollbarX.setAttribute('tabindex', 0); | ||
| 1247 | + i.event.bind(i.scrollbarX, 'focus', focus); | ||
| 1248 | + i.event.bind(i.scrollbarX, 'blur', blur); | ||
| 1249 | + i.scrollbarXActive = null; | ||
| 1250 | + i.scrollbarXWidth = null; | ||
| 1251 | + i.scrollbarXLeft = null; | ||
| 1252 | + i.scrollbarXBottom = _.toInt(dom.css(i.scrollbarXRail, 'bottom')); | ||
| 1253 | + i.isScrollbarXUsingBottom = i.scrollbarXBottom === i.scrollbarXBottom; // !isNaN | ||
| 1254 | + i.scrollbarXTop = i.isScrollbarXUsingBottom ? null : _.toInt(dom.css(i.scrollbarXRail, 'top')); | ||
| 1255 | + i.railBorderXWidth = _.toInt(dom.css(i.scrollbarXRail, 'borderLeftWidth')) + _.toInt(dom.css(i.scrollbarXRail, 'borderRightWidth')); | ||
| 1256 | + // Set rail to display:block to calculate margins | ||
| 1257 | + dom.css(i.scrollbarXRail, 'display', 'block'); | ||
| 1258 | + i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight')); | ||
| 1259 | + dom.css(i.scrollbarXRail, 'display', ''); | ||
| 1260 | + i.railXWidth = null; | ||
| 1261 | + i.railXRatio = null; | ||
| 1262 | + | ||
| 1263 | + i.scrollbarYRail = dom.appendTo(dom.e('div', 'ps-scrollbar-y-rail'), element); | ||
| 1264 | + i.scrollbarY = dom.appendTo(dom.e('div', 'ps-scrollbar-y'), i.scrollbarYRail); | ||
| 1265 | + i.scrollbarY.setAttribute('tabindex', 0); | ||
| 1266 | + i.event.bind(i.scrollbarY, 'focus', focus); | ||
| 1267 | + i.event.bind(i.scrollbarY, 'blur', blur); | ||
| 1268 | + i.scrollbarYActive = null; | ||
| 1269 | + i.scrollbarYHeight = null; | ||
| 1270 | + i.scrollbarYTop = null; | ||
| 1271 | + i.scrollbarYRight = _.toInt(dom.css(i.scrollbarYRail, 'right')); | ||
| 1272 | + i.isScrollbarYUsingRight = i.scrollbarYRight === i.scrollbarYRight; // !isNaN | ||
| 1273 | + i.scrollbarYLeft = i.isScrollbarYUsingRight ? null : _.toInt(dom.css(i.scrollbarYRail, 'left')); | ||
| 1274 | + i.scrollbarYOuterWidth = i.isRtl ? _.outerWidth(i.scrollbarY) : null; | ||
| 1275 | + i.railBorderYWidth = _.toInt(dom.css(i.scrollbarYRail, 'borderTopWidth')) + _.toInt(dom.css(i.scrollbarYRail, 'borderBottomWidth')); | ||
| 1276 | + dom.css(i.scrollbarYRail, 'display', 'block'); | ||
| 1277 | + i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom')); | ||
| 1278 | + dom.css(i.scrollbarYRail, 'display', ''); | ||
| 1279 | + i.railYHeight = null; | ||
| 1280 | + i.railYRatio = null; | ||
| 1281 | +} | ||
| 1282 | + | ||
| 1283 | +function getId(element) { | ||
| 1284 | + return element.getAttribute('data-ps-id'); | ||
| 1285 | +} | ||
| 1286 | + | ||
| 1287 | +function setId(element, id) { | ||
| 1288 | + element.setAttribute('data-ps-id', id); | ||
| 1289 | +} | ||
| 1290 | + | ||
| 1291 | +function removeId(element) { | ||
| 1292 | + element.removeAttribute('data-ps-id'); | ||
| 1293 | +} | ||
| 1294 | + | ||
| 1295 | +exports.add = function (element) { | ||
| 1296 | + var newId = guid(); | ||
| 1297 | + setId(element, newId); | ||
| 1298 | + instances[newId] = new Instance(element); | ||
| 1299 | + return instances[newId]; | ||
| 1300 | +}; | ||
| 1301 | + | ||
| 1302 | +exports.remove = function (element) { | ||
| 1303 | + delete instances[getId(element)]; | ||
| 1304 | + removeId(element); | ||
| 1305 | +}; | ||
| 1306 | + | ||
| 1307 | +exports.get = function (element) { | ||
| 1308 | + return instances[getId(element)]; | ||
| 1309 | +}; | ||
| 1310 | + | ||
| 1311 | +},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){ | ||
| 1312 | +'use strict'; | ||
| 1313 | + | ||
| 1314 | +var _ = require('../lib/helper'); | ||
| 1315 | +var cls = require('../lib/class'); | ||
| 1316 | +var dom = require('../lib/dom'); | ||
| 1317 | +var instances = require('./instances'); | ||
| 1318 | +var updateScroll = require('./update-scroll'); | ||
| 1319 | + | ||
| 1320 | +function getThumbSize(i, thumbSize) { | ||
| 1321 | + if (i.settings.minScrollbarLength) { | ||
| 1322 | + thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength); | ||
| 1323 | + } | ||
| 1324 | + if (i.settings.maxScrollbarLength) { | ||
| 1325 | + thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength); | ||
| 1326 | + } | ||
| 1327 | + return thumbSize; | ||
| 1328 | +} | ||
| 1329 | + | ||
| 1330 | +function updateCss(element, i) { | ||
| 1331 | + var xRailOffset = {width: i.railXWidth}; | ||
| 1332 | + if (i.isRtl) { | ||
| 1333 | + xRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth - i.contentWidth; | ||
| 1334 | + } else { | ||
| 1335 | + xRailOffset.left = element.scrollLeft; | ||
| 1336 | + } | ||
| 1337 | + if (i.isScrollbarXUsingBottom) { | ||
| 1338 | + xRailOffset.bottom = i.scrollbarXBottom - element.scrollTop; | ||
| 1339 | + } else { | ||
| 1340 | + xRailOffset.top = i.scrollbarXTop + element.scrollTop; | ||
| 1341 | + } | ||
| 1342 | + dom.css(i.scrollbarXRail, xRailOffset); | ||
| 1343 | + | ||
| 1344 | + var yRailOffset = {top: element.scrollTop, height: i.railYHeight}; | ||
| 1345 | + if (i.isScrollbarYUsingRight) { | ||
| 1346 | + if (i.isRtl) { | ||
| 1347 | + yRailOffset.right = i.contentWidth - (i.negativeScrollAdjustment + element.scrollLeft) - i.scrollbarYRight - i.scrollbarYOuterWidth; | ||
| 1348 | + } else { | ||
| 1349 | + yRailOffset.right = i.scrollbarYRight - element.scrollLeft; | ||
| 1350 | + } | ||
| 1351 | + } else { | ||
| 1352 | + if (i.isRtl) { | ||
| 1353 | + yRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth * 2 - i.contentWidth - i.scrollbarYLeft - i.scrollbarYOuterWidth; | ||
| 1354 | + } else { | ||
| 1355 | + yRailOffset.left = i.scrollbarYLeft + element.scrollLeft; | ||
| 1356 | + } | ||
| 1357 | + } | ||
| 1358 | + dom.css(i.scrollbarYRail, yRailOffset); | ||
| 1359 | + | ||
| 1360 | + dom.css(i.scrollbarX, {left: i.scrollbarXLeft, width: i.scrollbarXWidth - i.railBorderXWidth}); | ||
| 1361 | + dom.css(i.scrollbarY, {top: i.scrollbarYTop, height: i.scrollbarYHeight - i.railBorderYWidth}); | ||
| 1362 | +} | ||
| 1363 | + | ||
| 1364 | +module.exports = function (element) { | ||
| 1365 | + var i = instances.get(element); | ||
| 1366 | + | ||
| 1367 | + i.containerWidth = element.clientWidth; | ||
| 1368 | + i.containerHeight = element.clientHeight; | ||
| 1369 | + i.contentWidth = element.scrollWidth; | ||
| 1370 | + i.contentHeight = element.scrollHeight; | ||
| 1371 | + | ||
| 1372 | + var existingRails; | ||
| 1373 | + if (!element.contains(i.scrollbarXRail)) { | ||
| 1374 | + existingRails = dom.queryChildren(element, '.ps-scrollbar-x-rail'); | ||
| 1375 | + if (existingRails.length > 0) { | ||
| 1376 | + existingRails.forEach(function (rail) { | ||
| 1377 | + dom.remove(rail); | ||
| 1378 | + }); | ||
| 1379 | + } | ||
| 1380 | + dom.appendTo(i.scrollbarXRail, element); | ||
| 1381 | + } | ||
| 1382 | + if (!element.contains(i.scrollbarYRail)) { | ||
| 1383 | + existingRails = dom.queryChildren(element, '.ps-scrollbar-y-rail'); | ||
| 1384 | + if (existingRails.length > 0) { | ||
| 1385 | + existingRails.forEach(function (rail) { | ||
| 1386 | + dom.remove(rail); | ||
| 1387 | + }); | ||
| 1388 | + } | ||
| 1389 | + dom.appendTo(i.scrollbarYRail, element); | ||
| 1390 | + } | ||
| 1391 | + | ||
| 1392 | + if (!i.settings.suppressScrollX && i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth) { | ||
| 1393 | + i.scrollbarXActive = true; | ||
| 1394 | + i.railXWidth = i.containerWidth - i.railXMarginWidth; | ||
| 1395 | + i.railXRatio = i.containerWidth / i.railXWidth; | ||
| 1396 | + i.scrollbarXWidth = getThumbSize(i, _.toInt(i.railXWidth * i.containerWidth / i.contentWidth)); | ||
| 1397 | + i.scrollbarXLeft = _.toInt((i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth)); | ||
| 1398 | + } else { | ||
| 1399 | + i.scrollbarXActive = false; | ||
| 1400 | + } | ||
| 1401 | + | ||
| 1402 | + if (!i.settings.suppressScrollY && i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight) { | ||
| 1403 | + i.scrollbarYActive = true; | ||
| 1404 | + i.railYHeight = i.containerHeight - i.railYMarginHeight; | ||
| 1405 | + i.railYRatio = i.containerHeight / i.railYHeight; | ||
| 1406 | + i.scrollbarYHeight = getThumbSize(i, _.toInt(i.railYHeight * i.containerHeight / i.contentHeight)); | ||
| 1407 | + i.scrollbarYTop = _.toInt(element.scrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight)); | ||
| 1408 | + } else { | ||
| 1409 | + i.scrollbarYActive = false; | ||
| 1410 | + } | ||
| 1411 | + | ||
| 1412 | + if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) { | ||
| 1413 | + i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth; | ||
| 1414 | + } | ||
| 1415 | + if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) { | ||
| 1416 | + i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight; | ||
| 1417 | + } | ||
| 1418 | + | ||
| 1419 | + updateCss(element, i); | ||
| 1420 | + | ||
| 1421 | + if (i.scrollbarXActive) { | ||
| 1422 | + cls.add(element, 'ps-active-x'); | ||
| 1423 | + } else { | ||
| 1424 | + cls.remove(element, 'ps-active-x'); | ||
| 1425 | + i.scrollbarXWidth = 0; | ||
| 1426 | + i.scrollbarXLeft = 0; | ||
| 1427 | + updateScroll(element, 'left', 0); | ||
| 1428 | + } | ||
| 1429 | + if (i.scrollbarYActive) { | ||
| 1430 | + cls.add(element, 'ps-active-y'); | ||
| 1431 | + } else { | ||
| 1432 | + cls.remove(element, 'ps-active-y'); | ||
| 1433 | + i.scrollbarYHeight = 0; | ||
| 1434 | + i.scrollbarYTop = 0; | ||
| 1435 | + updateScroll(element, 'top', 0); | ||
| 1436 | + } | ||
| 1437 | +}; | ||
| 1438 | + | ||
| 1439 | +},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){ | ||
| 1440 | +'use strict'; | ||
| 1441 | + | ||
| 1442 | +var instances = require('./instances'); | ||
| 1443 | + | ||
| 1444 | +var lastTop; | ||
| 1445 | +var lastLeft; | ||
| 1446 | + | ||
| 1447 | +var createDOMEvent = function (name) { | ||
| 1448 | + var event = document.createEvent("Event"); | ||
| 1449 | + event.initEvent(name, true, true); | ||
| 1450 | + return event; | ||
| 1451 | +}; | ||
| 1452 | + | ||
| 1453 | +module.exports = function (element, axis, value) { | ||
| 1454 | + if (typeof element === 'undefined') { | ||
| 1455 | + throw 'You must provide an element to the update-scroll function'; | ||
| 1456 | + } | ||
| 1457 | + | ||
| 1458 | + if (typeof axis === 'undefined') { | ||
| 1459 | + throw 'You must provide an axis to the update-scroll function'; | ||
| 1460 | + } | ||
| 1461 | + | ||
| 1462 | + if (typeof value === 'undefined') { | ||
| 1463 | + throw 'You must provide a value to the update-scroll function'; | ||
| 1464 | + } | ||
| 1465 | + | ||
| 1466 | + if (axis === 'top' && value <= 0) { | ||
| 1467 | + element.scrollTop = value = 0; // don't allow negative scroll | ||
| 1468 | + element.dispatchEvent(createDOMEvent('ps-y-reach-start')); | ||
| 1469 | + } | ||
| 1470 | + | ||
| 1471 | + if (axis === 'left' && value <= 0) { | ||
| 1472 | + element.scrollLeft = value = 0; // don't allow negative scroll | ||
| 1473 | + element.dispatchEvent(createDOMEvent('ps-x-reach-start')); | ||
| 1474 | + } | ||
| 1475 | + | ||
| 1476 | + var i = instances.get(element); | ||
| 1477 | + | ||
| 1478 | + if (axis === 'top' && value >= i.contentHeight - i.containerHeight) { | ||
| 1479 | + // don't allow scroll past container | ||
| 1480 | + value = i.contentHeight - i.containerHeight; | ||
| 1481 | + if (value - element.scrollTop <= 1) { | ||
| 1482 | + // mitigates rounding errors on non-subpixel scroll values | ||
| 1483 | + value = element.scrollTop; | ||
| 1484 | + } else { | ||
| 1485 | + element.scrollTop = value; | ||
| 1486 | + } | ||
| 1487 | + element.dispatchEvent(createDOMEvent('ps-y-reach-end')); | ||
| 1488 | + } | ||
| 1489 | + | ||
| 1490 | + if (axis === 'left' && value >= i.contentWidth - i.containerWidth) { | ||
| 1491 | + // don't allow scroll past container | ||
| 1492 | + value = i.contentWidth - i.containerWidth; | ||
| 1493 | + if (value - element.scrollLeft <= 1) { | ||
| 1494 | + // mitigates rounding errors on non-subpixel scroll values | ||
| 1495 | + value = element.scrollLeft; | ||
| 1496 | + } else { | ||
| 1497 | + element.scrollLeft = value; | ||
| 1498 | + } | ||
| 1499 | + element.dispatchEvent(createDOMEvent('ps-x-reach-end')); | ||
| 1500 | + } | ||
| 1501 | + | ||
| 1502 | + if (!lastTop) { | ||
| 1503 | + lastTop = element.scrollTop; | ||
| 1504 | + } | ||
| 1505 | + | ||
| 1506 | + if (!lastLeft) { | ||
| 1507 | + lastLeft = element.scrollLeft; | ||
| 1508 | + } | ||
| 1509 | + | ||
| 1510 | + if (axis === 'top' && value < lastTop) { | ||
| 1511 | + element.dispatchEvent(createDOMEvent('ps-scroll-up')); | ||
| 1512 | + } | ||
| 1513 | + | ||
| 1514 | + if (axis === 'top' && value > lastTop) { | ||
| 1515 | + element.dispatchEvent(createDOMEvent('ps-scroll-down')); | ||
| 1516 | + } | ||
| 1517 | + | ||
| 1518 | + if (axis === 'left' && value < lastLeft) { | ||
| 1519 | + element.dispatchEvent(createDOMEvent('ps-scroll-left')); | ||
| 1520 | + } | ||
| 1521 | + | ||
| 1522 | + if (axis === 'left' && value > lastLeft) { | ||
| 1523 | + element.dispatchEvent(createDOMEvent('ps-scroll-right')); | ||
| 1524 | + } | ||
| 1525 | + | ||
| 1526 | + if (axis === 'top') { | ||
| 1527 | + element.scrollTop = lastTop = value; | ||
| 1528 | + element.dispatchEvent(createDOMEvent('ps-scroll-y')); | ||
| 1529 | + } | ||
| 1530 | + | ||
| 1531 | + if (axis === 'left') { | ||
| 1532 | + element.scrollLeft = lastLeft = value; | ||
| 1533 | + element.dispatchEvent(createDOMEvent('ps-scroll-x')); | ||
| 1534 | + } | ||
| 1535 | + | ||
| 1536 | +}; | ||
| 1537 | + | ||
| 1538 | +},{"./instances":18}],21:[function(require,module,exports){ | ||
| 1539 | +'use strict'; | ||
| 1540 | + | ||
| 1541 | +var _ = require('../lib/helper'); | ||
| 1542 | +var dom = require('../lib/dom'); | ||
| 1543 | +var instances = require('./instances'); | ||
| 1544 | +var updateGeometry = require('./update-geometry'); | ||
| 1545 | +var updateScroll = require('./update-scroll'); | ||
| 1546 | + | ||
| 1547 | +module.exports = function (element) { | ||
| 1548 | + var i = instances.get(element); | ||
| 1549 | + | ||
| 1550 | + if (!i) { | ||
| 1551 | + return; | ||
| 1552 | + } | ||
| 1553 | + | ||
| 1554 | + // Recalcuate negative scrollLeft adjustment | ||
| 1555 | + i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0; | ||
| 1556 | + | ||
| 1557 | + // Recalculate rail margins | ||
| 1558 | + dom.css(i.scrollbarXRail, 'display', 'block'); | ||
| 1559 | + dom.css(i.scrollbarYRail, 'display', 'block'); | ||
| 1560 | + i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight')); | ||
| 1561 | + i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom')); | ||
| 1562 | + | ||
| 1563 | + // Hide scrollbars not to affect scrollWidth and scrollHeight | ||
| 1564 | + dom.css(i.scrollbarXRail, 'display', 'none'); | ||
| 1565 | + dom.css(i.scrollbarYRail, 'display', 'none'); | ||
| 1566 | + | ||
| 1567 | + updateGeometry(element); | ||
| 1568 | + | ||
| 1569 | + // Update top/left scroll to trigger events | ||
| 1570 | + updateScroll(element, 'top', element.scrollTop); | ||
| 1571 | + updateScroll(element, 'left', element.scrollLeft); | ||
| 1572 | + | ||
| 1573 | + dom.css(i.scrollbarXRail, 'display', ''); | ||
| 1574 | + dom.css(i.scrollbarYRail, 'display', ''); | ||
| 1575 | +}; | ||
| 1576 | + | ||
| 1577 | +},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]); |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | .uk-accordion-title{margin-top:0;margin-bottom:15px;padding:5px 15px;background:#f7f7f7;font-size:18px;line-height:24px;cursor:pointer;border:1px solid #ddd;border-radius:4px}.uk-accordion-content{padding:0 15px 15px 15px}.uk-accordion-content:after,.uk-accordion-content:before{content:"";display:table}.uk-accordion-content:after{clear:both}.uk-accordion-content>:last-child{margin-bottom:0} | 2 | .uk-accordion-title{margin-top:0;margin-bottom:15px;padding:5px 15px;background:#f7f7f7;font-size:18px;line-height:24px;cursor:pointer;border:1px solid #ddd;border-radius:4px}.uk-accordion-content{padding:0 15px 15px 15px}.uk-accordion-content:after,.uk-accordion-content:before{content:"";display:table}.uk-accordion-content:after{clear:both}.uk-accordion-content>:last-child{margin-bottom:0} |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.min.js
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | !function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-accordion",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";function i(i){var e=t.$(i),o="auto";if(e.is(":visible"))o=e.outerHeight();else{var a={position:e.css("position"),visibility:e.css("visibility"),display:e.css("display")};o=e.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),e.css(a)}return o}return t.component("accordion",{defaults:{showfirst:!0,collapse:!0,animate:!0,easing:"swing",duration:300,toggle:".uk-accordion-title",containers:".uk-accordion-content",clsactive:"uk-active"},boot:function(){t.ready(function(i){setTimeout(function(){t.$("[data-uk-accordion]",i).each(function(){var i=t.$(this);i.data("accordion")||t.accordion(i,t.Utils.options(i.attr("data-uk-accordion")))})},0)})},init:function(){var i=this;this.element.on("click.uk.accordion",this.options.toggle,function(e){e.preventDefault(),i.toggleItem(t.$(this).data("wrapper"),i.options.animate,i.options.collapse)}),this.update(!0),t.domObserve(this.element,function(){i.element.children(i.options.containers).length&&i.update()})},toggleItem:function(e,o,a){var n=this;e.data("toggle").toggleClass(this.options.clsactive),e.data("content").toggleClass(this.options.clsactive);var s=e.data("toggle").hasClass(this.options.clsactive);a&&(this.toggle.not(e.data("toggle")).removeClass(this.options.clsactive),this.content.not(e.data("content")).removeClass(this.options.clsactive).parent().stop().css("overflow","hidden").animate({height:0},{easing:this.options.easing,duration:o?this.options.duration:0}).attr("aria-expanded","false")),e.stop().css("overflow","hidden"),o?e.animate({height:s?i(e.data("content")):0},{easing:this.options.easing,duration:this.options.duration,complete:function(){s&&(e.css({overflow:"",height:"auto"}),t.Utils.checkDisplay(e.data("content"))),n.trigger("display.uk.check")}}):(e.height(s?"auto":0),s&&(e.css({overflow:""}),t.Utils.checkDisplay(e.data("content"))),this.trigger("display.uk.check")),e.attr("aria-expanded",s),this.element.trigger("toggle.uk.accordion",[s,e.data("toggle"),e.data("content")])},update:function(i){var e,o,a,n=this;this.toggle=this.find(this.options.toggle),this.content=this.find(this.options.containers),this.content.each(function(i){e=t.$(this),e.parent().data("wrapper")?o=e.parent():(o=t.$(this).wrap('<div data-wrapper="true" style="overflow:hidden;height:0;position:relative;"></div>').parent(),o.attr("aria-expanded","false")),a=n.toggle.eq(i),o.data("toggle",a),o.data("content",e),a.data("wrapper",o),e.data("wrapper",o)}),this.element.trigger("update.uk.accordion",[this]),i&&this.options.showfirst&&this.toggleItem(this.toggle.eq(0).data("wrapper"),!1,!1)}}),t.accordion}); | 2 | !function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-accordion",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";function i(i){var e=t.$(i),o="auto";if(e.is(":visible"))o=e.outerHeight();else{var a={position:e.css("position"),visibility:e.css("visibility"),display:e.css("display")};o=e.css({position:"absolute",visibility:"hidden",display:"block"}).outerHeight(),e.css(a)}return o}return t.component("accordion",{defaults:{showfirst:!0,collapse:!0,animate:!0,easing:"swing",duration:300,toggle:".uk-accordion-title",containers:".uk-accordion-content",clsactive:"uk-active"},boot:function(){t.ready(function(i){setTimeout(function(){t.$("[data-uk-accordion]",i).each(function(){var i=t.$(this);i.data("accordion")||t.accordion(i,t.Utils.options(i.attr("data-uk-accordion")))})},0)})},init:function(){var i=this;this.element.on("click.uk.accordion",this.options.toggle,function(e){e.preventDefault(),i.toggleItem(t.$(this).data("wrapper"),i.options.animate,i.options.collapse)}),this.update(!0),t.domObserve(this.element,function(){i.element.children(i.options.containers).length&&i.update()})},toggleItem:function(e,o,a){var n=this;e.data("toggle").toggleClass(this.options.clsactive),e.data("content").toggleClass(this.options.clsactive);var s=e.data("toggle").hasClass(this.options.clsactive);a&&(this.toggle.not(e.data("toggle")).removeClass(this.options.clsactive),this.content.not(e.data("content")).removeClass(this.options.clsactive).parent().stop().css("overflow","hidden").animate({height:0},{easing:this.options.easing,duration:o?this.options.duration:0}).attr("aria-expanded","false")),e.stop().css("overflow","hidden"),o?e.animate({height:s?i(e.data("content")):0},{easing:this.options.easing,duration:this.options.duration,complete:function(){s&&(e.css({overflow:"",height:"auto"}),t.Utils.checkDisplay(e.data("content"))),n.trigger("display.uk.check")}}):(e.height(s?"auto":0),s&&(e.css({overflow:""}),t.Utils.checkDisplay(e.data("content"))),this.trigger("display.uk.check")),e.attr("aria-expanded",s),this.element.trigger("toggle.uk.accordion",[s,e.data("toggle"),e.data("content")])},update:function(i){var e,o,a,n=this;this.toggle=this.find(this.options.toggle),this.content=this.find(this.options.containers),this.content.each(function(i){e=t.$(this),e.parent().data("wrapper")?o=e.parent():(o=t.$(this).wrap('<div data-wrapper="true" style="overflow:hidden;height:0;position:relative;"></div>').parent(),o.attr("aria-expanded","false")),a=n.toggle.eq(i),o.data("toggle",a),o.data("content",e),a.data("wrapper",o),e.data("wrapper",o)}),this.element.trigger("update.uk.accordion",[this]),i&&this.options.showfirst&&this.toggleItem(this.toggle.eq(0).data("wrapper"),!1,!1)}}),t.accordion}); |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | .uk-autocomplete{display:inline-block;position:relative;max-width:100%;vertical-align:middle}.uk-dropdown-flip{left:auto;right:0}.uk-nav-autocomplete>li>a{color:#444}.uk-nav-autocomplete>li.uk-active>a{background:#009dd8;color:#fff;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.2);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-nav-autocomplete .uk-nav-header{color:#999}.uk-nav-autocomplete .uk-nav-divider{border-top:1px solid #ddd} | 2 | .uk-autocomplete{display:inline-block;position:relative;max-width:100%;vertical-align:middle}.uk-dropdown-flip{left:auto;right:0}.uk-nav-autocomplete>li>a{color:#444}.uk-nav-autocomplete>li.uk-active>a{background:#009dd8;color:#fff;outline:0;box-shadow:inset 0 2px 4px rgba(0,0,0,.2);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-nav-autocomplete .uk-nav-header{color:#999}.uk-nav-autocomplete .uk-nav-divider{border-top:1px solid #ddd} |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.min.js
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-autocomplete",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e;return t.component("autocomplete",{defaults:{minLength:3,param:"search",method:"post",delay:300,loadingClass:"uk-loading",flipDropdown:!1,skipClass:"uk-skip",hoverClass:"uk-active",source:null,renderer:null,template:'<ul class="uk-nav uk-nav-autocomplete uk-autocomplete-results">{{~items}}<li data-value="{{$item.value}}"><a>{{$item.value}}</a></li>{{/items}}</ul>'},visible:!1,value:null,selected:null,boot:function(){t.$html.on("focus.autocomplete.uikit","[data-uk-autocomplete]",function(){var e=t.$(this);e.data("autocomplete")||t.autocomplete(e,t.Utils.options(e.attr("data-uk-autocomplete")))}),t.$html.on("click.autocomplete.uikit",function(t){e&&t.target!=e.input[0]&&e.hide()})},init:function(){var e=this,i=!1,s=t.Utils.debounce(function(){return i?i=!1:(e.handle(),void 0)},this.options.delay);this.dropdown=this.find(".uk-dropdown"),this.template=this.find('script[type="text/autocomplete"]').html(),this.template=t.Utils.template(this.template||this.options.template),this.input=this.find("input:first").attr("autocomplete","off"),this.dropdown.length||(this.dropdown=t.$('<div class="uk-dropdown"></div>').appendTo(this.element)),this.options.flipDropdown&&this.dropdown.addClass("uk-dropdown-flip"),this.dropdown.attr("aria-expanded","false"),this.input.on({keydown:function(t){if(t&&t.which&&!t.shiftKey&&e.visible)switch(t.which){case 13:i=!0,e.selected&&(t.preventDefault(),e.select());break;case 38:t.preventDefault(),e.pick("prev",!0);break;case 40:t.preventDefault(),e.pick("next",!0);break;case 27:case 9:e.hide()}},keyup:s}),this.dropdown.on("click",".uk-autocomplete-results > *",function(){e.select()}),this.dropdown.on("mouseover",".uk-autocomplete-results > *",function(){e.pick(t.$(this))}),this.triggercomplete=s},handle:function(){var t=this,e=this.value;return this.value=this.input.val(),this.value.length<this.options.minLength?this.hide():(this.value!=e&&t.request(),this)},pick:function(e,i){var s=this,o=t.$(this.dropdown.find(".uk-autocomplete-results").children(":not(."+this.options.skipClass+")")),n=!1;if("string"==typeof e||e.hasClass(this.options.skipClass)){if("next"==e||"prev"==e){if(this.selected){var a=o.index(this.selected);n="next"==e?o.eq(a+1<o.length?a+1:0):o.eq(0>a-1?o.length-1:a-1)}else n=o["next"==e?"first":"last"]();n=t.$(n)}}else n=e;if(n&&n.length&&(this.selected=n,o.removeClass(this.options.hoverClass),this.selected.addClass(this.options.hoverClass),i)){var l=n.position().top,h=s.dropdown.scrollTop(),r=s.dropdown.height();(l>r||0>l)&&s.dropdown.scrollTop(h+l)}},select:function(){if(this.selected){var t=this.selected.data();this.trigger("selectitem.uk.autocomplete",[t,this]),t.value&&this.input.val(t.value).trigger("change"),this.hide()}},show:function(){return this.visible?void 0:(this.visible=!0,this.element.addClass("uk-open"),e&&e!==this&&e.hide(),e=this,this.dropdown.attr("aria-expanded","true"),this)},hide:function(){return this.visible?(this.visible=!1,this.element.removeClass("uk-open"),e===this&&(e=!1),this.dropdown.attr("aria-expanded","false"),this):void 0},request:function(){var e=this,i=function(t){t&&e.render(t),e.element.removeClass(e.options.loadingClass)};if(this.element.addClass(this.options.loadingClass),this.options.source){var s=this.options.source;switch(typeof this.options.source){case"function":this.options.source.apply(this,[i]);break;case"object":if(s.length){var o=[];s.forEach(function(t){t.value&&-1!=t.value.toLowerCase().indexOf(e.value.toLowerCase())&&o.push(t)}),i(o)}break;case"string":var n={};n[this.options.param]=this.value,t.$.ajax({url:this.options.source,data:n,type:this.options.method,dataType:"json"}).done(function(t){i(t||[])});break;default:i(null)}}else this.element.removeClass(e.options.loadingClass)},render:function(t){return this.dropdown.empty(),this.selected=!1,this.options.renderer?this.options.renderer.apply(this,[t]):t&&t.length&&(this.dropdown.append(this.template({items:t})),this.show(),this.trigger("show.uk.autocomplete")),this}}),t.autocomplete}); | 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-autocomplete",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e;return t.component("autocomplete",{defaults:{minLength:3,param:"search",method:"post",delay:300,loadingClass:"uk-loading",flipDropdown:!1,skipClass:"uk-skip",hoverClass:"uk-active",source:null,renderer:null,template:'<ul class="uk-nav uk-nav-autocomplete uk-autocomplete-results">{{~items}}<li data-value="{{$item.value}}"><a>{{$item.value}}</a></li>{{/items}}</ul>'},visible:!1,value:null,selected:null,boot:function(){t.$html.on("focus.autocomplete.uikit","[data-uk-autocomplete]",function(){var e=t.$(this);e.data("autocomplete")||t.autocomplete(e,t.Utils.options(e.attr("data-uk-autocomplete")))}),t.$html.on("click.autocomplete.uikit",function(t){e&&t.target!=e.input[0]&&e.hide()})},init:function(){var e=this,i=!1,s=t.Utils.debounce(function(){return i?i=!1:(e.handle(),void 0)},this.options.delay);this.dropdown=this.find(".uk-dropdown"),this.template=this.find('script[type="text/autocomplete"]').html(),this.template=t.Utils.template(this.template||this.options.template),this.input=this.find("input:first").attr("autocomplete","off"),this.dropdown.length||(this.dropdown=t.$('<div class="uk-dropdown"></div>').appendTo(this.element)),this.options.flipDropdown&&this.dropdown.addClass("uk-dropdown-flip"),this.dropdown.attr("aria-expanded","false"),this.input.on({keydown:function(t){if(t&&t.which&&!t.shiftKey&&e.visible)switch(t.which){case 13:i=!0,e.selected&&(t.preventDefault(),e.select());break;case 38:t.preventDefault(),e.pick("prev",!0);break;case 40:t.preventDefault(),e.pick("next",!0);break;case 27:case 9:e.hide()}},keyup:s}),this.dropdown.on("click",".uk-autocomplete-results > *",function(){e.select()}),this.dropdown.on("mouseover",".uk-autocomplete-results > *",function(){e.pick(t.$(this))}),this.triggercomplete=s},handle:function(){var t=this,e=this.value;return this.value=this.input.val(),this.value.length<this.options.minLength?this.hide():(this.value!=e&&t.request(),this)},pick:function(e,i){var s=this,o=t.$(this.dropdown.find(".uk-autocomplete-results").children(":not(."+this.options.skipClass+")")),n=!1;if("string"==typeof e||e.hasClass(this.options.skipClass)){if("next"==e||"prev"==e){if(this.selected){var a=o.index(this.selected);n="next"==e?o.eq(a+1<o.length?a+1:0):o.eq(0>a-1?o.length-1:a-1)}else n=o["next"==e?"first":"last"]();n=t.$(n)}}else n=e;if(n&&n.length&&(this.selected=n,o.removeClass(this.options.hoverClass),this.selected.addClass(this.options.hoverClass),i)){var l=n.position().top,h=s.dropdown.scrollTop(),r=s.dropdown.height();(l>r||0>l)&&s.dropdown.scrollTop(h+l)}},select:function(){if(this.selected){var t=this.selected.data();this.trigger("selectitem.uk.autocomplete",[t,this]),t.value&&this.input.val(t.value).trigger("change"),this.hide()}},show:function(){return this.visible?void 0:(this.visible=!0,this.element.addClass("uk-open"),e&&e!==this&&e.hide(),e=this,this.dropdown.attr("aria-expanded","true"),this)},hide:function(){return this.visible?(this.visible=!1,this.element.removeClass("uk-open"),e===this&&(e=!1),this.dropdown.attr("aria-expanded","false"),this):void 0},request:function(){var e=this,i=function(t){t&&e.render(t),e.element.removeClass(e.options.loadingClass)};if(this.element.addClass(this.options.loadingClass),this.options.source){var s=this.options.source;switch(typeof this.options.source){case"function":this.options.source.apply(this,[i]);break;case"object":if(s.length){var o=[];s.forEach(function(t){t.value&&-1!=t.value.toLowerCase().indexOf(e.value.toLowerCase())&&o.push(t)}),i(o)}break;case"string":var n={};n[this.options.param]=this.value,t.$.ajax({url:this.options.source,data:n,type:this.options.method,dataType:"json"}).done(function(t){i(t||[])});break;default:i(null)}}else this.element.removeClass(e.options.loadingClass)},render:function(t){return this.dropdown.empty(),this.selected=!1,this.options.renderer?this.options.renderer.apply(this,[t]):t&&t.length&&(this.dropdown.append(this.template({items:t})),this.show(),this.trigger("show.uk.autocomplete")),this}}),t.autocomplete}); |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/form-advanced.gradient.min.css
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | .uk-form input[type=radio],.uk-form input[type=checkbox]{display:inline-block;height:14px;width:14px;border:1px solid #aaa;overflow:hidden;margin-top:-4px;vertical-align:middle;-webkit-appearance:none;outline:0;background:0 0}.uk-form input[type=radio]{border-radius:50%}.uk-form input[type=checkbox]:before,.uk-form input[type=radio]:before{display:block}.uk-form input[type=radio]:checked:before{content:'';width:8px;height:8px;margin:2px auto 0;border-radius:50%;background:#00a8e6}.uk-form input[type=checkbox]:checked:before,.uk-form input[type=checkbox]:indeterminate:before{content:"\f00c";font-family:FontAwesome;font-size:12px;-webkit-font-smoothing:antialiased;text-align:center;line-height:12px;color:#00a8e6}.uk-form input[type=checkbox]:indeterminate:before{content:"\f068"}.uk-form input[type=checkbox]:disabled,.uk-form input[type=radio]:disabled{border-color:#ddd}.uk-form input[type=radio]:disabled:checked:before{background-color:#aaa}.uk-form input[type=checkbox]:disabled:checked:before,.uk-form input[type=checkbox]:disabled:indeterminate:before{color:#aaa} | 2 | .uk-form input[type=radio],.uk-form input[type=checkbox]{display:inline-block;height:14px;width:14px;border:1px solid #aaa;overflow:hidden;margin-top:-4px;vertical-align:middle;-webkit-appearance:none;outline:0;background:0 0}.uk-form input[type=radio]{border-radius:50%}.uk-form input[type=checkbox]:before,.uk-form input[type=radio]:before{display:block}.uk-form input[type=radio]:checked:before{content:'';width:8px;height:8px;margin:2px auto 0;border-radius:50%;background:#00a8e6}.uk-form input[type=checkbox]:checked:before,.uk-form input[type=checkbox]:indeterminate:before{content:"\f00c";font-family:FontAwesome;font-size:12px;-webkit-font-smoothing:antialiased;text-align:center;line-height:12px;color:#00a8e6}.uk-form input[type=checkbox]:indeterminate:before{content:"\f068"}.uk-form input[type=checkbox]:disabled,.uk-form input[type=radio]:disabled{border-color:#ddd}.uk-form input[type=radio]:disabled:checked:before{background-color:#aaa}.uk-form input[type=checkbox]:disabled:checked:before,.uk-form input[type=checkbox]:disabled:indeterminate:before{color:#aaa} |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/lightbox.min.js
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | !function(i){var t;window.UIkit&&(t=i(UIkit)),"function"==typeof define&&define.amd&&define("uikit-lightbox",["uikit"],function(){return t||i(UIkit)})}(function(i){"use strict";function t(t){if(e)return e.lightbox=t,e;e=i.$(['<div class="uk-modal">','<div class="uk-modal-dialog uk-modal-dialog-lightbox uk-slidenav-position" style="margin-left:auto;margin-right:auto;width:200px;height:200px;top:'+Math.abs(window.innerHeight/2-200)+'px;">','<a href="#" class="uk-modal-close uk-close uk-close-alt"></a>','<div class="uk-lightbox-content"></div>','<div class="uk-modal-spinner uk-hidden"></div>',"</div>","</div>"].join("")).appendTo("body"),e.dialog=e.find(".uk-modal-dialog:first"),e.content=e.find(".uk-lightbox-content:first"),e.loader=e.find(".uk-modal-spinner:first"),e.closer=e.find(".uk-close.uk-close-alt"),e.modal=i.modal(e,{modal:!1}),e.on("swipeRight swipeLeft",function(i){e.lightbox["swipeLeft"==i.type?"next":"previous"]()}).on("click","[data-lightbox-previous], [data-lightbox-next]",function(t){t.preventDefault(),e.lightbox[i.$(this).is("[data-lightbox-next]")?"next":"previous"]()}),e.on("hide.uk.modal",function(){e.content.html("")});var o={w:window.innerWidth,h:window.innerHeight};return i.$win.on("load resize orientationchange",i.Utils.debounce(function(){o.w!==window.innerWidth&&e.is(":visible")&&!i.Utils.isFullscreen()&&e.lightbox.fitSize(),o={w:window.innerWidth,h:window.innerHeight}},100)),e.lightbox=t,e}var e,o={};return i.component("lightbox",{defaults:{allowfullscreen:!0,duration:400,group:!1,keyboard:!0},index:0,items:!1,boot:function(){i.$html.on("click","[data-uk-lightbox]",function(t){t.preventDefault();var e=i.$(this);e.data("lightbox")||i.lightbox(e,i.Utils.options(e.attr("data-uk-lightbox"))),e.data("lightbox").show(e)}),i.$doc.on("keyup",function(i){if(e&&e.is(":visible")&&e.lightbox.options.keyboard)switch(i.preventDefault(),i.keyCode){case 37:e.lightbox.previous();break;case 39:e.lightbox.next()}})},init:function(){var t=[];if(this.index=0,this.siblings=[],this.element&&this.element.length){var e=this.options.group?i.$(['[data-uk-lightbox*="'+this.options.group+'"]',"[data-uk-lightbox*='"+this.options.group+"']"].join(",")):this.element;e.each(function(){var e=i.$(this);t.push({source:e.attr("href"),title:e.attr("data-title")||e.attr("title"),type:e.attr("data-lightbox-type")||"auto",link:e})}),this.index=e.index(this.element),this.siblings=t}else this.options.group&&this.options.group.length&&(this.siblings=this.options.group);this.trigger("lightbox-init",[this])},show:function(e){this.modal=t(this),this.modal.dialog.stop(),this.modal.content.stop();var o,n,s=this,h=i.$.Deferred();e=e||0,"object"==typeof e&&this.siblings.forEach(function(i,t){e[0]===i.link[0]&&(e=t)}),0>e?e=this.siblings.length-e:this.siblings[e]||(e=0),n=this.siblings[e],o={lightbox:s,source:n.source,type:n.type,index:e,promise:h,title:n.title,item:n,meta:{content:"",width:null,height:null}},this.index=e,this.modal.content.empty(),this.modal.is(":visible")||(this.modal.content.css({width:"",height:""}).empty(),this.modal.modal.show()),this.modal.loader.removeClass("uk-hidden"),h.promise().done(function(){s.data=o,s.fitSize(o)}).fail(function(){o.meta.content='<div class="uk-position-cover uk-flex uk-flex-middle uk-flex-center"><strong>Loading resource failed!</strong></div>',o.meta.width=400,o.meta.height=300,s.data=o,s.fitSize(o)}),s.trigger("showitem.uk.lightbox",[o])},fitSize:function(){var t=this,e=this.data,o=this.modal.dialog.outerWidth()-this.modal.dialog.width(),n=parseInt(this.modal.dialog.css("margin-top"),10),s=parseInt(this.modal.dialog.css("margin-bottom"),10),h=n+s,a=e.meta.content,l=t.options.duration;this.siblings.length>1&&(a=[a,'<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-previous uk-hidden-touch" data-lightbox-previous></a>','<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-next uk-hidden-touch" data-lightbox-next></a>'].join(""));var d,r,u=i.$("<div> </div>").css({opacity:0,position:"absolute",top:0,left:0,width:"100%","max-width":t.modal.dialog.css("max-width"),padding:t.modal.dialog.css("padding"),margin:t.modal.dialog.css("margin")}),c=e.meta.width,g=e.meta.height;u.appendTo("body").width(),d=u.width(),r=window.innerHeight-h,u.remove(),this.modal.dialog.find(".uk-modal-caption").remove(),e.title&&(this.modal.dialog.append('<div class="uk-modal-caption">'+e.title+"</div>"),r-=this.modal.dialog.find(".uk-modal-caption").outerHeight()),d<e.meta.width&&(g=Math.floor(g*(d/c)),c=d),g>r&&(g=Math.floor(r),c=Math.ceil(e.meta.width*(r/e.meta.height))),this.modal.content.css("opacity",0).width(c).html(a),"iframe"==e.type&&this.modal.content.find("iframe:first").height(g);var m=g+o,p=Math.floor(window.innerHeight/2-m/2)-h;0>p&&(p=0),this.modal.closer.addClass("uk-hidden"),t.modal.data("mwidth")==c&&t.modal.data("mheight")==g&&(l=0),this.modal.dialog.animate({width:c+o,height:g+o,top:p},l,"swing",function(){t.modal.loader.addClass("uk-hidden"),t.modal.content.css({width:""}).animate({opacity:1},function(){t.modal.closer.removeClass("uk-hidden")}),t.modal.data({mwidth:c,mheight:g})})},next:function(){this.show(this.siblings[this.index+1]?this.index+1:0)},previous:function(){this.show(this.siblings[this.index-1]?this.index-1:this.siblings.length-1)}}),i.plugin("lightbox","image",{init:function(i){i.on("showitem.uk.lightbox",function(i,t){if("image"==t.type||t.source&&t.source.match(/\.(jpg|jpeg|png|gif|svg)$/i)){var e=function(i,e,o){t.meta={content:'<img class="uk-responsive-width" width="'+e+'" height="'+o+'" src ="'+i+'">',width:e,height:o},t.type="image",t.promise.resolve()};if(o[t.source])e(t.source,o[t.source].width,o[t.source].height);else{var n=new Image;n.onerror=function(){t.promise.reject("Loading image failed")},n.onload=function(){o[t.source]={width:n.width,height:n.height},e(t.source,o[t.source].width,o[t.source].height)},n.src=t.source}}})}}),i.plugin("lightbox","youtube",{init:function(i){var t=/(\/\/.*?youtube\.[a-z]+)\/watch\?v=([^&]+)&?(.*)/,n=/youtu\.be\/(.*)/;i.on("showitem.uk.lightbox",function(i,s){var h,a,l=function(i,t,o){s.meta={content:'<iframe src="//www.youtube.com/embed/'+i+'" width="'+t+'" height="'+o+'" style="max-width:100%;"'+(e.lightbox.options.allowfullscreen?" allowfullscreen":"")+"></iframe>",width:t,height:o},s.type="iframe",s.promise.resolve()};if((a=s.source.match(t))&&(h=a[2]),(a=s.source.match(n))&&(h=a[1]),h){if(o[h])l(h,o[h].width,o[h].height);else{var d=new Image,r=!1;d.onerror=function(){o[h]={width:640,height:320},l(h,o[h].width,o[h].height)},d.onload=function(){120==d.width&&90==d.height?r?(o[h]={width:640,height:320},l(h,o[h].width,o[h].height)):(r=!0,d.src="//img.youtube.com/vi/"+h+"/0.jpg"):(o[h]={width:d.width,height:d.height},l(h,d.width,d.height))},d.src="//img.youtube.com/vi/"+h+"/maxresdefault.jpg"}i.stopImmediatePropagation()}})}}),i.plugin("lightbox","vimeo",{init:function(t){var n,s=/(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/;t.on("showitem.uk.lightbox",function(t,h){var a,l=function(i,t,o){h.meta={content:'<iframe src="//player.vimeo.com/video/'+i+'" width="'+t+'" height="'+o+'" style="width:100%;box-sizing:border-box;"'+(e.lightbox.options.allowfullscreen?" allowfullscreen":"")+"></iframe>",width:t,height:o},h.type="iframe",h.promise.resolve()};(n=h.source.match(s))&&(a=n[2],o[a]?l(a,o[a].width,o[a].height):i.$.ajax({type:"GET",url:"//vimeo.com/api/oembed.json?url="+encodeURI(h.source),jsonp:"callback",dataType:"jsonp",success:function(i){o[a]={width:i.width,height:i.height},l(a,o[a].width,o[a].height)}}),t.stopImmediatePropagation())})}}),i.plugin("lightbox","video",{init:function(t){t.on("showitem.uk.lightbox",function(t,e){var n=function(i,t,o){e.meta={content:'<video class="uk-responsive-width" src="'+i+'" width="'+t+'" height="'+o+'" controls></video>',width:t,height:o},e.type="video",e.promise.resolve()};if("video"==e.type||e.source.match(/\.(mp4|webm|ogv)$/i))if(o[e.source])n(e.source,o[e.source].width,o[e.source].height);else var s=i.$('<video style="position:fixed;visibility:hidden;top:-10000px;"></video>').attr("src",e.source).appendTo("body"),h=setInterval(function(){s[0].videoWidth&&(clearInterval(h),o[e.source]={width:s[0].videoWidth,height:s[0].videoHeight},n(e.source,o[e.source].width,o[e.source].height),s.remove())},20)})}}),UIkit.plugin("lightbox","iframe",{init:function(i){i.on("showitem.uk.lightbox",function(t,o){var n=function(i,t,n){o.meta={content:'<iframe class="uk-responsive-width" src="'+i+'" width="'+t+'" height="'+n+'"'+(e.lightbox.options.allowfullscreen?" allowfullscreen":"")+"></iframe>",width:t,height:n},o.type="iframe",o.promise.resolve()};("iframe"===o.type||o.source.match(/\.(html|php)$/))&&n(o.source,i.options.width||800,i.options.height||600)})}}),i.lightbox.create=function(t,e){if(t){var o,n=[];return t.forEach(function(t){n.push(i.$.extend({source:"",title:"",type:"auto",link:!1},"string"==typeof t?{source:t}:t))}),o=i.lightbox(i.$.extend({},e,{group:n}))}},i.lightbox}); | 2 | !function(i){var t;window.UIkit&&(t=i(UIkit)),"function"==typeof define&&define.amd&&define("uikit-lightbox",["uikit"],function(){return t||i(UIkit)})}(function(i){"use strict";function t(t){if(e)return e.lightbox=t,e;e=i.$(['<div class="uk-modal">','<div class="uk-modal-dialog uk-modal-dialog-lightbox uk-slidenav-position" style="margin-left:auto;margin-right:auto;width:200px;height:200px;top:'+Math.abs(window.innerHeight/2-200)+'px;">','<a href="#" class="uk-modal-close uk-close uk-close-alt"></a>','<div class="uk-lightbox-content"></div>','<div class="uk-modal-spinner uk-hidden"></div>',"</div>","</div>"].join("")).appendTo("body"),e.dialog=e.find(".uk-modal-dialog:first"),e.content=e.find(".uk-lightbox-content:first"),e.loader=e.find(".uk-modal-spinner:first"),e.closer=e.find(".uk-close.uk-close-alt"),e.modal=i.modal(e,{modal:!1}),e.on("swipeRight swipeLeft",function(i){e.lightbox["swipeLeft"==i.type?"next":"previous"]()}).on("click","[data-lightbox-previous], [data-lightbox-next]",function(t){t.preventDefault(),e.lightbox[i.$(this).is("[data-lightbox-next]")?"next":"previous"]()}),e.on("hide.uk.modal",function(){e.content.html("")});var o={w:window.innerWidth,h:window.innerHeight};return i.$win.on("load resize orientationchange",i.Utils.debounce(function(){o.w!==window.innerWidth&&e.is(":visible")&&!i.Utils.isFullscreen()&&e.lightbox.fitSize(),o={w:window.innerWidth,h:window.innerHeight}},100)),e.lightbox=t,e}var e,o={};return i.component("lightbox",{defaults:{allowfullscreen:!0,duration:400,group:!1,keyboard:!0},index:0,items:!1,boot:function(){i.$html.on("click","[data-uk-lightbox]",function(t){t.preventDefault();var e=i.$(this);e.data("lightbox")||i.lightbox(e,i.Utils.options(e.attr("data-uk-lightbox"))),e.data("lightbox").show(e)}),i.$doc.on("keyup",function(i){if(e&&e.is(":visible")&&e.lightbox.options.keyboard)switch(i.preventDefault(),i.keyCode){case 37:e.lightbox.previous();break;case 39:e.lightbox.next()}})},init:function(){var t=[];if(this.index=0,this.siblings=[],this.element&&this.element.length){var e=this.options.group?i.$(['[data-uk-lightbox*="'+this.options.group+'"]',"[data-uk-lightbox*='"+this.options.group+"']"].join(",")):this.element;e.each(function(){var e=i.$(this);t.push({source:e.attr("href"),title:e.attr("data-title")||e.attr("title"),type:e.attr("data-lightbox-type")||"auto",link:e})}),this.index=e.index(this.element),this.siblings=t}else this.options.group&&this.options.group.length&&(this.siblings=this.options.group);this.trigger("lightbox-init",[this])},show:function(e){this.modal=t(this),this.modal.dialog.stop(),this.modal.content.stop();var o,n,s=this,h=i.$.Deferred();e=e||0,"object"==typeof e&&this.siblings.forEach(function(i,t){e[0]===i.link[0]&&(e=t)}),0>e?e=this.siblings.length-e:this.siblings[e]||(e=0),n=this.siblings[e],o={lightbox:s,source:n.source,type:n.type,index:e,promise:h,title:n.title,item:n,meta:{content:"",width:null,height:null}},this.index=e,this.modal.content.empty(),this.modal.is(":visible")||(this.modal.content.css({width:"",height:""}).empty(),this.modal.modal.show()),this.modal.loader.removeClass("uk-hidden"),h.promise().done(function(){s.data=o,s.fitSize(o)}).fail(function(){o.meta.content='<div class="uk-position-cover uk-flex uk-flex-middle uk-flex-center"><strong>Loading resource failed!</strong></div>',o.meta.width=400,o.meta.height=300,s.data=o,s.fitSize(o)}),s.trigger("showitem.uk.lightbox",[o])},fitSize:function(){var t=this,e=this.data,o=this.modal.dialog.outerWidth()-this.modal.dialog.width(),n=parseInt(this.modal.dialog.css("margin-top"),10),s=parseInt(this.modal.dialog.css("margin-bottom"),10),h=n+s,a=e.meta.content,l=t.options.duration;this.siblings.length>1&&(a=[a,'<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-previous uk-hidden-touch" data-lightbox-previous></a>','<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-next uk-hidden-touch" data-lightbox-next></a>'].join(""));var d,r,u=i.$("<div> </div>").css({opacity:0,position:"absolute",top:0,left:0,width:"100%","max-width":t.modal.dialog.css("max-width"),padding:t.modal.dialog.css("padding"),margin:t.modal.dialog.css("margin")}),c=e.meta.width,g=e.meta.height;u.appendTo("body").width(),d=u.width(),r=window.innerHeight-h,u.remove(),this.modal.dialog.find(".uk-modal-caption").remove(),e.title&&(this.modal.dialog.append('<div class="uk-modal-caption">'+e.title+"</div>"),r-=this.modal.dialog.find(".uk-modal-caption").outerHeight()),d<e.meta.width&&(g=Math.floor(g*(d/c)),c=d),g>r&&(g=Math.floor(r),c=Math.ceil(e.meta.width*(r/e.meta.height))),this.modal.content.css("opacity",0).width(c).html(a),"iframe"==e.type&&this.modal.content.find("iframe:first").height(g);var m=g+o,p=Math.floor(window.innerHeight/2-m/2)-h;0>p&&(p=0),this.modal.closer.addClass("uk-hidden"),t.modal.data("mwidth")==c&&t.modal.data("mheight")==g&&(l=0),this.modal.dialog.animate({width:c+o,height:g+o,top:p},l,"swing",function(){t.modal.loader.addClass("uk-hidden"),t.modal.content.css({width:""}).animate({opacity:1},function(){t.modal.closer.removeClass("uk-hidden")}),t.modal.data({mwidth:c,mheight:g})})},next:function(){this.show(this.siblings[this.index+1]?this.index+1:0)},previous:function(){this.show(this.siblings[this.index-1]?this.index-1:this.siblings.length-1)}}),i.plugin("lightbox","image",{init:function(i){i.on("showitem.uk.lightbox",function(i,t){if("image"==t.type||t.source&&t.source.match(/\.(jpg|jpeg|png|gif|svg)$/i)){var e=function(i,e,o){t.meta={content:'<img class="uk-responsive-width" width="'+e+'" height="'+o+'" src ="'+i+'">',width:e,height:o},t.type="image",t.promise.resolve()};if(o[t.source])e(t.source,o[t.source].width,o[t.source].height);else{var n=new Image;n.onerror=function(){t.promise.reject("Loading image failed")},n.onload=function(){o[t.source]={width:n.width,height:n.height},e(t.source,o[t.source].width,o[t.source].height)},n.src=t.source}}})}}),i.plugin("lightbox","youtube",{init:function(i){var t=/(\/\/.*?youtube\.[a-z]+)\/watch\?v=([^&]+)&?(.*)/,n=/youtu\.be\/(.*)/;i.on("showitem.uk.lightbox",function(i,s){var h,a,l=function(i,t,o){s.meta={content:'<iframe src="//www.youtube.com/embed/'+i+'" width="'+t+'" height="'+o+'" style="max-width:100%;"'+(e.lightbox.options.allowfullscreen?" allowfullscreen":"")+"></iframe>",width:t,height:o},s.type="iframe",s.promise.resolve()};if((a=s.source.match(t))&&(h=a[2]),(a=s.source.match(n))&&(h=a[1]),h){if(o[h])l(h,o[h].width,o[h].height);else{var d=new Image,r=!1;d.onerror=function(){o[h]={width:640,height:320},l(h,o[h].width,o[h].height)},d.onload=function(){120==d.width&&90==d.height?r?(o[h]={width:640,height:320},l(h,o[h].width,o[h].height)):(r=!0,d.src="//img.youtube.com/vi/"+h+"/0.jpg"):(o[h]={width:d.width,height:d.height},l(h,d.width,d.height))},d.src="//img.youtube.com/vi/"+h+"/maxresdefault.jpg"}i.stopImmediatePropagation()}})}}),i.plugin("lightbox","vimeo",{init:function(t){var n,s=/(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/;t.on("showitem.uk.lightbox",function(t,h){var a,l=function(i,t,o){h.meta={content:'<iframe src="//player.vimeo.com/video/'+i+'" width="'+t+'" height="'+o+'" style="width:100%;box-sizing:border-box;"'+(e.lightbox.options.allowfullscreen?" allowfullscreen":"")+"></iframe>",width:t,height:o},h.type="iframe",h.promise.resolve()};(n=h.source.match(s))&&(a=n[2],o[a]?l(a,o[a].width,o[a].height):i.$.ajax({type:"GET",url:"//vimeo.com/api/oembed.json?url="+encodeURI(h.source),jsonp:"callback",dataType:"jsonp",success:function(i){o[a]={width:i.width,height:i.height},l(a,o[a].width,o[a].height)}}),t.stopImmediatePropagation())})}}),i.plugin("lightbox","video",{init:function(t){t.on("showitem.uk.lightbox",function(t,e){var n=function(i,t,o){e.meta={content:'<video class="uk-responsive-width" src="'+i+'" width="'+t+'" height="'+o+'" controls></video>',width:t,height:o},e.type="video",e.promise.resolve()};if("video"==e.type||e.source.match(/\.(mp4|webm|ogv)$/i))if(o[e.source])n(e.source,o[e.source].width,o[e.source].height);else var s=i.$('<video style="position:fixed;visibility:hidden;top:-10000px;"></video>').attr("src",e.source).appendTo("body"),h=setInterval(function(){s[0].videoWidth&&(clearInterval(h),o[e.source]={width:s[0].videoWidth,height:s[0].videoHeight},n(e.source,o[e.source].width,o[e.source].height),s.remove())},20)})}}),UIkit.plugin("lightbox","iframe",{init:function(i){i.on("showitem.uk.lightbox",function(t,o){var n=function(i,t,n){o.meta={content:'<iframe class="uk-responsive-width" src="'+i+'" width="'+t+'" height="'+n+'"'+(e.lightbox.options.allowfullscreen?" allowfullscreen":"")+"></iframe>",width:t,height:n},o.type="iframe",o.promise.resolve()};("iframe"===o.type||o.source.match(/\.(html|php)$/))&&n(o.source,i.options.width||800,i.options.height||600)})}}),i.lightbox.create=function(t,e){if(t){var o,n=[];return t.forEach(function(t){n.push(i.$.extend({source:"",title:"",type:"auto",link:!1},"string"==typeof t?{source:t}:t))}),o=i.lightbox(i.$.extend({},e,{group:n}))}},i.lightbox}); |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | .uk-notify{position:fixed;top:10px;left:10px;z-index:1040;box-sizing:border-box;width:350px}.uk-notify-bottom-right,.uk-notify-top-right{left:auto;right:10px}.uk-notify-bottom-center,.uk-notify-top-center{left:50%;margin-left:-175px}.uk-notify-bottom-center,.uk-notify-bottom-left,.uk-notify-bottom-right{top:auto;bottom:10px}@media (max-width:479px){.uk-notify{left:10px;right:10px;width:auto;margin:0}}.uk-notify-message{position:relative;margin-bottom:10px;padding:15px;background:#444;color:#fff;font-size:16px;line-height:22px;cursor:pointer;border:1px solid #444;border-radius:4px}.uk-notify-message>.uk-close{visibility:hidden;float:right}.uk-notify-message:hover>.uk-close{visibility:visible}.uk-notify-message-primary{background:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-notify-message-success{background:#f2fae3;color:#659f13;border-color:rgba(101,159,19,.3)}.uk-notify-message-warning{background:#fffceb;color:#e28327;border-color:rgba(226,131,39,.3)}.uk-notify-message-danger{background:#fff1f0;color:#d85030;border-color:rgba(216,80,48,.3)} | 2 | .uk-notify{position:fixed;top:10px;left:10px;z-index:1040;box-sizing:border-box;width:350px}.uk-notify-bottom-right,.uk-notify-top-right{left:auto;right:10px}.uk-notify-bottom-center,.uk-notify-top-center{left:50%;margin-left:-175px}.uk-notify-bottom-center,.uk-notify-bottom-left,.uk-notify-bottom-right{top:auto;bottom:10px}@media (max-width:479px){.uk-notify{left:10px;right:10px;width:auto;margin:0}}.uk-notify-message{position:relative;margin-bottom:10px;padding:15px;background:#444;color:#fff;font-size:16px;line-height:22px;cursor:pointer;border:1px solid #444;border-radius:4px}.uk-notify-message>.uk-close{visibility:hidden;float:right}.uk-notify-message:hover>.uk-close{visibility:visible}.uk-notify-message-primary{background:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-notify-message-success{background:#f2fae3;color:#659f13;border-color:rgba(101,159,19,.3)}.uk-notify-message-warning{background:#fffceb;color:#e28327;border-color:rgba(226,131,39,.3)}.uk-notify-message-danger{background:#fff1f0;color:#d85030;border-color:rgba(216,80,48,.3)} |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.min.js
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-notify",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e={},i={},s=function(e){return"string"==t.$.type(e)&&(e={message:e}),arguments[1]&&(e=t.$.extend(e,"string"==t.$.type(arguments[1])?{status:arguments[1]}:arguments[1])),new n(e).show()},o=function(t,e){var s;if(t)for(s in i)t===i[s].group&&i[s].close(e);else for(s in i)i[s].close(e)},n=function(s){this.options=t.$.extend({},n.defaults,s),this.uuid=t.Utils.uid("notifymsg"),this.element=t.$(['<div class="uk-notify-message">','<a class="uk-close"></a>',"<div></div>","</div>"].join("")).data("notifyMessage",this),this.content(this.options.message),this.options.status&&(this.element.addClass("uk-notify-message-"+this.options.status),this.currentstatus=this.options.status),this.group=this.options.group,i[this.uuid]=this,e[this.options.pos]||(e[this.options.pos]=t.$('<div class="uk-notify uk-notify-'+this.options.pos+'"></div>').appendTo("body").on("click",".uk-notify-message",function(){var e=t.$(this).data("notifyMessage");e.element.trigger("manualclose.uk.notify",[e]),e.close()}))};return t.$.extend(n.prototype,{uuid:!1,element:!1,timout:!1,currentstatus:"",group:!1,show:function(){if(!this.element.is(":visible")){var t=this;e[this.options.pos].show().prepend(this.element);var i=parseInt(this.element.css("margin-bottom"),10);return this.element.css({opacity:0,"margin-top":-1*this.element.outerHeight(),"margin-bottom":0}).animate({opacity:1,"margin-top":0,"margin-bottom":i},function(){if(t.options.timeout){var e=function(){t.close()};t.timeout=setTimeout(e,t.options.timeout),t.element.hover(function(){clearTimeout(t.timeout)},function(){t.timeout=setTimeout(e,t.options.timeout)})}}),this}},close:function(t){var s=this,o=function(){s.element.remove(),e[s.options.pos].children().length||e[s.options.pos].hide(),s.options.onClose.apply(s,[]),s.element.trigger("close.uk.notify",[s]),delete i[s.uuid]};this.timeout&&clearTimeout(this.timeout),t?o():this.element.animate({opacity:0,"margin-top":-1*this.element.outerHeight(),"margin-bottom":0},function(){o()})},content:function(t){var e=this.element.find(">div");return t?(e.html(t),this):e.html()},status:function(t){return t?(this.element.removeClass("uk-notify-message-"+this.currentstatus).addClass("uk-notify-message-"+t),this.currentstatus=t,this):this.currentstatus}}),n.defaults={message:"",status:"",timeout:5e3,group:null,pos:"top-center",onClose:function(){}},t.notify=s,t.notify.message=n,t.notify.closeAll=o,s}); | 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-notify",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e={},i={},s=function(e){return"string"==t.$.type(e)&&(e={message:e}),arguments[1]&&(e=t.$.extend(e,"string"==t.$.type(arguments[1])?{status:arguments[1]}:arguments[1])),new n(e).show()},o=function(t,e){var s;if(t)for(s in i)t===i[s].group&&i[s].close(e);else for(s in i)i[s].close(e)},n=function(s){this.options=t.$.extend({},n.defaults,s),this.uuid=t.Utils.uid("notifymsg"),this.element=t.$(['<div class="uk-notify-message">','<a class="uk-close"></a>',"<div></div>","</div>"].join("")).data("notifyMessage",this),this.content(this.options.message),this.options.status&&(this.element.addClass("uk-notify-message-"+this.options.status),this.currentstatus=this.options.status),this.group=this.options.group,i[this.uuid]=this,e[this.options.pos]||(e[this.options.pos]=t.$('<div class="uk-notify uk-notify-'+this.options.pos+'"></div>').appendTo("body").on("click",".uk-notify-message",function(){var e=t.$(this).data("notifyMessage");e.element.trigger("manualclose.uk.notify",[e]),e.close()}))};return t.$.extend(n.prototype,{uuid:!1,element:!1,timout:!1,currentstatus:"",group:!1,show:function(){if(!this.element.is(":visible")){var t=this;e[this.options.pos].show().prepend(this.element);var i=parseInt(this.element.css("margin-bottom"),10);return this.element.css({opacity:0,"margin-top":-1*this.element.outerHeight(),"margin-bottom":0}).animate({opacity:1,"margin-top":0,"margin-bottom":i},function(){if(t.options.timeout){var e=function(){t.close()};t.timeout=setTimeout(e,t.options.timeout),t.element.hover(function(){clearTimeout(t.timeout)},function(){t.timeout=setTimeout(e,t.options.timeout)})}}),this}},close:function(t){var s=this,o=function(){s.element.remove(),e[s.options.pos].children().length||e[s.options.pos].hide(),s.options.onClose.apply(s,[]),s.element.trigger("close.uk.notify",[s]),delete i[s.uuid]};this.timeout&&clearTimeout(this.timeout),t?o():this.element.animate({opacity:0,"margin-top":-1*this.element.outerHeight(),"margin-bottom":0},function(){o()})},content:function(t){var e=this.element.find(">div");return t?(e.html(t),this):e.html()},status:function(t){return t?(this.element.removeClass("uk-notify-message-"+this.currentstatus).addClass("uk-notify-message-"+t),this.currentstatus=t,this):this.currentstatus}}),n.defaults={message:"",status:"",timeout:5e3,group:null,pos:"top-center",onClose:function(){}},t.notify=s,t.notify.message=n,t.notify.closeAll=o,s}); |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/pagination.min.js
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-pagination",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";return t.component("pagination",{defaults:{items:1,itemsOnPage:1,pages:0,displayedPages:7,edges:1,currentPage:0,lblPrev:!1,lblNext:!1,onSelectPage:function(){}},boot:function(){t.ready(function(e){t.$("[data-uk-pagination]",e).each(function(){var e=t.$(this);e.data("pagination")||t.pagination(e,t.Utils.options(e.attr("data-uk-pagination")))})})},init:function(){var e=this;this.pages=this.options.pages?this.options.pages:Math.ceil(this.options.items/this.options.itemsOnPage)?Math.ceil(this.options.items/this.options.itemsOnPage):1,this.currentPage=this.options.currentPage,this.halfDisplayed=this.options.displayedPages/2,this.on("click","a[data-page]",function(i){i.preventDefault(),e.selectPage(t.$(this).data("page"))}),this._render()},_getInterval:function(){return{start:Math.ceil(this.currentPage>this.halfDisplayed?Math.max(Math.min(this.currentPage-this.halfDisplayed,this.pages-this.options.displayedPages),0):0),end:Math.ceil(this.currentPage>this.halfDisplayed?Math.min(this.currentPage+this.halfDisplayed,this.pages):Math.min(this.options.displayedPages,this.pages))}},render:function(t){this.pages=t?t:this.pages,this._render()},selectPage:function(t,e){this.currentPage=t,this.render(e),this.options.onSelectPage.apply(this,[t]),this.trigger("select.uk.pagination",[t,this])},_render:function(){var t,e=this.options,i=this._getInterval();if(this.element.empty(),e.lblPrev&&this._append(this.currentPage-1,{text:e.lblPrev}),i.start>0&&e.edges>0){var s=Math.min(e.edges,i.start);for(t=0;s>t;t++)this._append(t);e.edges<i.start&&i.start-e.edges!=1?this.element.append("<li><span>...</span></li>"):i.start-e.edges==1&&this._append(e.edges)}for(t=i.start;t<i.end;t++)this._append(t);if(i.end<this.pages&&e.edges>0){this.pages-e.edges>i.end&&this.pages-e.edges-i.end!=1?this.element.append("<li><span>...</span></li>"):this.pages-e.edges-i.end==1&&this._append(i.end++);var a=Math.max(this.pages-e.edges,i.end);for(t=a;t<this.pages;t++)this._append(t)}e.lblNext&&this._append(this.currentPage+1,{text:e.lblNext})},_append:function(e,i){var s,a;e=0>e?0:e<this.pages?e:this.pages-1,a=t.$.extend({text:e+1},i),s=e==this.currentPage?'<li class="uk-active"><span>'+a.text+"</span></li>":'<li><a href="#page-'+(e+1)+'" data-page="'+e+'">'+a.text+"</a></li>",this.element.append(s)}}),t.pagination}); | 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-pagination",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";return t.component("pagination",{defaults:{items:1,itemsOnPage:1,pages:0,displayedPages:7,edges:1,currentPage:0,lblPrev:!1,lblNext:!1,onSelectPage:function(){}},boot:function(){t.ready(function(e){t.$("[data-uk-pagination]",e).each(function(){var e=t.$(this);e.data("pagination")||t.pagination(e,t.Utils.options(e.attr("data-uk-pagination")))})})},init:function(){var e=this;this.pages=this.options.pages?this.options.pages:Math.ceil(this.options.items/this.options.itemsOnPage)?Math.ceil(this.options.items/this.options.itemsOnPage):1,this.currentPage=this.options.currentPage,this.halfDisplayed=this.options.displayedPages/2,this.on("click","a[data-page]",function(i){i.preventDefault(),e.selectPage(t.$(this).data("page"))}),this._render()},_getInterval:function(){return{start:Math.ceil(this.currentPage>this.halfDisplayed?Math.max(Math.min(this.currentPage-this.halfDisplayed,this.pages-this.options.displayedPages),0):0),end:Math.ceil(this.currentPage>this.halfDisplayed?Math.min(this.currentPage+this.halfDisplayed,this.pages):Math.min(this.options.displayedPages,this.pages))}},render:function(t){this.pages=t?t:this.pages,this._render()},selectPage:function(t,e){this.currentPage=t,this.render(e),this.options.onSelectPage.apply(this,[t]),this.trigger("select.uk.pagination",[t,this])},_render:function(){var t,e=this.options,i=this._getInterval();if(this.element.empty(),e.lblPrev&&this._append(this.currentPage-1,{text:e.lblPrev}),i.start>0&&e.edges>0){var s=Math.min(e.edges,i.start);for(t=0;s>t;t++)this._append(t);e.edges<i.start&&i.start-e.edges!=1?this.element.append("<li><span>...</span></li>"):i.start-e.edges==1&&this._append(e.edges)}for(t=i.start;t<i.end;t++)this._append(t);if(i.end<this.pages&&e.edges>0){this.pages-e.edges>i.end&&this.pages-e.edges-i.end!=1?this.element.append("<li><span>...</span></li>"):this.pages-e.edges-i.end==1&&this._append(i.end++);var a=Math.max(this.pages-e.edges,i.end);for(t=a;t<this.pages;t++)this._append(t)}e.lblNext&&this._append(this.currentPage+1,{text:e.lblNext})},_append:function(e,i){var s,a;e=0>e?0:e<this.pages?e:this.pages-1,a=t.$.extend({text:e+1},i),s=e==this.currentPage?'<li class="uk-active"><span>'+a.text+"</span></li>":'<li><a href="#page-'+(e+1)+'" data-page="'+e+'">'+a.text+"</a></li>",this.element.append(s)}}),t.pagination}); |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/progress.gradient.min.css
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | .uk-progress{box-sizing:border-box;height:20px;margin-bottom:15px;background:#f7f7f7;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.07),inset 0 2px 2px rgba(0,0,0,.07);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#009dd8;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;background-image:-webkit-linear-gradient(top,#00b4f5,#008dc5);background-image:linear-gradient(to bottom,#00b4f5,#008dc5);box-shadow:inset 0 -1px 0 rgba(0,0,0,.2),inset 0 0 0 1px rgba(0,0,0,.1);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#82bb42;background-image:-webkit-linear-gradient(top,#9fd256,#6fac34);background-image:linear-gradient(to bottom,#9fd256,#6fac34)}.uk-progress-warning .uk-progress-bar{background-color:#f9a124;background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406)}.uk-progress-danger .uk-progress-bar{background-color:#d32c46;background-image:-webkit-linear-gradient(top,#ee465a,#c11a39);background-image:linear-gradient(to bottom,#ee465a,#c11a39)}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px} | 2 | .uk-progress{box-sizing:border-box;height:20px;margin-bottom:15px;background:#f7f7f7;overflow:hidden;line-height:20px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.07),inset 0 2px 2px rgba(0,0,0,.07);border-radius:4px}*+.uk-progress{margin-top:15px}.uk-progress-bar{width:0;height:100%;background:#009dd8;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:12px;color:#fff;text-align:center;background-image:-webkit-linear-gradient(top,#00b4f5,#008dc5);background-image:linear-gradient(to bottom,#00b4f5,#008dc5);box-shadow:inset 0 -1px 0 rgba(0,0,0,.2),inset 0 0 0 1px rgba(0,0,0,.1);text-shadow:0 -1px 0 rgba(0,0,0,.2)}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#82bb42;background-image:-webkit-linear-gradient(top,#9fd256,#6fac34);background-image:linear-gradient(to bottom,#9fd256,#6fac34)}.uk-progress-warning .uk-progress-bar{background-color:#f9a124;background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406)}.uk-progress-danger .uk-progress-bar{background-color:#d32c46;background-image:-webkit-linear-gradient(top,#ee465a,#c11a39);background-image:linear-gradient(to bottom,#ee465a,#c11a39)}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px} |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | .uk-slidenav{display:inline-block;box-sizing:border-box;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:focus,.uk-slidenav:hover{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;z-index:1;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-slidenav-contrast{color:rgba(255,255,255,.5)}.uk-slidenav-contrast:focus,.uk-slidenav-contrast:hover{color:rgba(255,255,255,.7)}.uk-slidenav-contrast:active{color:rgba(255,255,255,.9)} | 2 | .uk-slidenav{display:inline-block;box-sizing:border-box;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:focus,.uk-slidenav:hover{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;z-index:1;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-slidenav-contrast{color:rgba(255,255,255,.5)}.uk-slidenav-contrast:focus,.uk-slidenav-contrast:hover{color:rgba(255,255,255,.7)}.uk-slidenav-contrast:active{color:rgba(255,255,255,.9)} |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/slider.gradient.min.css
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | [data-uk-slider]{direction:ltr}html[dir=rtl] .uk-slider>*{direction:rtl}.uk-slider{position:relative;z-index:0;touch-action:pan-y}.uk-slider:not(.uk-grid){margin:0;padding:0;list-style:none}.uk-slider>*{position:absolute;top:0;left:0}.uk-slider-container{overflow:hidden}.uk-slider:not(.uk-drag){-webkit-transition:-webkit-transform .2s linear;transition:transform .2s linear}.uk-slider.uk-drag{cursor:col-resize;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-slider a,.uk-slider img{-webkit-user-drag:none;user-drag:none;-webkit-touch-callout:none}.uk-slider img{pointer-events:none}.uk-slider-fullscreen,.uk-slider-fullscreen>li{height:100vh} | 2 | [data-uk-slider]{direction:ltr}html[dir=rtl] .uk-slider>*{direction:rtl}.uk-slider{position:relative;z-index:0;touch-action:pan-y}.uk-slider:not(.uk-grid){margin:0;padding:0;list-style:none}.uk-slider>*{position:absolute;top:0;left:0}.uk-slider-container{overflow:hidden}.uk-slider:not(.uk-drag){-webkit-transition:-webkit-transform .2s linear;transition:transform .2s linear}.uk-slider.uk-drag{cursor:col-resize;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-slider a,.uk-slider img{-webkit-user-drag:none;user-drag:none;-webkit-touch-callout:none}.uk-slider img{pointer-events:none}.uk-slider-fullscreen,.uk-slider-fullscreen>li{height:100vh} |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/slider.min.js
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-slider",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e,i,s,n,a={};return t.component("slider",{defaults:{center:!1,threshold:10,infinite:!0,autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0,activecls:"uk-active"},boot:function(){t.ready(function(e){setTimeout(function(){t.$("[data-uk-slider]",e).each(function(){var e=t.$(this);e.data("slider")||t.slider(e,t.Utils.options(e.attr("data-uk-slider")))})},0)})},init:function(){var o=this;this.container=this.element.find(".uk-slider"),this.focus=0,t.$win.on("resize load",t.Utils.debounce(function(){o.update(!0)},100)),this.on("click.uk.slider","[data-uk-slider-item]",function(e){e.preventDefault();var i=t.$(this).attr("data-uk-slider-item");if(o.focus!=i)switch(o.stop(),i){case"next":case"previous":o["next"==i?"next":"previous"]();break;default:o.updateFocus(parseInt(i,10))}}),this.container.on({"touchstart mousedown":function(h){h.originalEvent&&h.originalEvent.touches&&(h=h.originalEvent.touches[0]),h.button&&2==h.button||!o.active||(o.stop(),s=t.$(h.target).is("a")?t.$(h.target):t.$(h.target).parents("a:first"),n=!1,s.length&&s.one("click",function(t){n&&t.preventDefault()}),i=function(t){n=!0,e=o,a={touchx:parseInt(t.pageX,10),dir:1,focus:o.focus,base:o.options.center?"center":"area"},t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),e.element.data({"pointer-start":{x:parseInt(t.pageX,10),y:parseInt(t.pageY,10)},"pointer-pos-start":o.pos}),o.container.addClass("uk-drag"),i=!1},i.x=parseInt(h.pageX,10),i.threshold=o.options.threshold)},mouseenter:function(){o.options.pauseOnHover&&(o.hovering=!0)},mouseleave:function(){o.hovering=!1}}),this.update(!0),this.on("display.uk.check",function(){o.element.is(":visible")&&o.update(!0)}),this.element.find("a,img").attr("draggable","false"),this.options.autoplay&&this.start(),t.domObserve(this.element,function(){o.element.children(":not([data-slide])").length&&o.update(!0)})},update:function(e){var i,s,n,a,o=this,h=0,r=0;return this.items=this.container.children().filter(":visible"),this.vp=this.element[0].getBoundingClientRect().width,this.container.css({"min-width":"","min-height":""}),this.items.each(function(e){i=t.$(this).attr("data-slide",e),a=i.css({left:"",width:""})[0].getBoundingClientRect(),s=a.width,n=i.width(),r=Math.max(r,a.height),i.css({left:h,width:s}).data({idx:e,left:h,width:s,cwidth:n,area:h+s,center:h-(o.vp/2-n/2)}),h+=s}),this.container.css({"min-width":h,"min-height":r}),this.options.infinite&&(h<=2*this.vp||this.items.length<5)&&!this.itemsResized?(this.container.children().each(function(t){o.container.append(o.items.eq(t).clone(!0).attr("id",""))}).each(function(t){o.container.append(o.items.eq(t).clone(!0).attr("id",""))}),this.itemsResized=!0,this.update()):(this.cw=h,this.pos=0,this.active=h>=this.vp,this.container.css({"-ms-transform":"","-webkit-transform":"",transform:""}),e&&this.updateFocus(this.focus),void 0)},updatePos:function(t){this.pos=t,this.container.css({"-ms-transform":"translateX("+t+"px)","-webkit-transform":"translateX("+t+"px)",transform:"translateX("+t+"px)"})},updateFocus:function(e,i){if(this.active){i=i||(e>this.focus?1:-1);var s,n,a=this.items.eq(e);if(this.options.infinite&&this.infinite(e,i),this.options.center)this.updatePos(-1*a.data("center")),this.items.filter("."+this.options.activecls).removeClass(this.options.activecls),a.addClass(this.options.activecls);else if(this.options.infinite)this.updatePos(-1*a.data("left"));else{for(s=0,n=e;n<this.items.length;n++)s+=this.items.eq(n).data("width");if(s>this.vp)this.updatePos(-1*a.data("left"));else if(1==i){for(s=0,n=this.items.length-1;n>=0;n--){if(s+=this.items.eq(n).data("width"),s==this.vp){e=n;break}if(s>this.vp){e=n<this.items.length-1?n+1:n;break}}s>this.vp?this.updatePos(-1*(this.container.width()-this.vp)):this.updatePos(-1*this.items.eq(e).data("left"))}}var o=this.items.eq(e).data("left");this.items.removeClass("uk-slide-before uk-slide-after").each(function(i){i!==e&&t.$(this).addClass(t.$(this).data("left")<o?"uk-slide-before":"uk-slide-after")}),this.focus=e,this.trigger("focusitem.uk.slider",[e,this.items.eq(e),this])}},next:function(){var t=this.items[this.focus+1]?this.focus+1:this.options.infinite?0:this.focus;this.updateFocus(t,1)},previous:function(){var t=this.items[this.focus-1]?this.focus-1:this.options.infinite?this.items[this.focus-1]?this.items-1:this.items.length-1:this.focus;this.updateFocus(t,-1)},start:function(){this.stop();var t=this;this.interval=setInterval(function(){t.hovering||t.next()},this.options.autoplayInterval)},stop:function(){this.interval&&clearInterval(this.interval)},infinite:function(t,e){var i,s=this,n=this.items.eq(t),a=t,o=[],h=0;if(1==e){for(i=0;i<this.items.length&&(a!=t&&(h+=this.items.eq(a).data("width"),o.push(this.items.eq(a))),!(h>this.vp));i++)a=a+1==this.items.length?0:a+1;o.length&&o.forEach(function(t){var e=n.data("area");t.css({left:e}).data({left:e,area:e+t.data("width"),center:e-(s.vp/2-t.data("cwidth")/2)}),n=t})}else{for(i=this.items.length-1;i>-1&&(h+=this.items.eq(a).data("width"),a!=t&&o.push(this.items.eq(a)),!(h>this.vp));i--)a=a-1==-1?this.items.length-1:a-1;o.length&&o.forEach(function(t){var e=n.data("left")-t.data("width");t.css({left:e}).data({left:e,area:e+t.data("width"),center:e-(s.vp/2-t.data("cwidth")/2)}),n=t})}}}),t.$doc.on("mousemove.uk.slider touchmove.uk.slider",function(t){if(t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),i&&Math.abs(t.pageX-i.x)>i.threshold&&(window.getSelection().toString()?e=i=!1:i(t)),e){var s,n,o,h,r,c,d,u,f,l;if(t.clientX||t.clientY?s=t.clientX:(t.pageX||t.pageY)&&(s=t.pageX-document.body.scrollLeft-document.documentElement.scrollLeft),r=a.focus,n=s-e.element.data("pointer-start").x,o=e.element.data("pointer-pos-start")+n,h=s>e.element.data("pointer-start").x?-1:1,c=e.items.eq(a.focus),1==h)for(d=c.data("left")+Math.abs(n),u=0,f=a.focus;u<e.items.length;u++){if(l=e.items.eq(f),f!=a.focus&&l.data("left")<d&&l.data("area")>d){r=f;break}f=f+1==e.items.length?0:f+1}else for(d=c.data("left")-Math.abs(n),u=0,f=a.focus;u<e.items.length;u++){if(l=e.items.eq(f),f!=a.focus&&l.data("area")<=c.data("left")&&l.data("center")<d){r=f;break}f=f-1==-1?e.items.length-1:f-1}e.options.infinite&&r!=a._focus&&e.infinite(r,h),e.updatePos(o),a.dir=h,a._focus=r,a.touchx=parseInt(t.pageX,10),a.diff=d}}),t.$doc.on("mouseup.uk.slider touchend.uk.slider",function(){if(e){e.container.removeClass("uk-drag"),e.items.eq(a.focus);var t,s,n,o=!1;if(1==a.dir){for(s=0,n=a.focus;s<e.items.length;s++){if(t=e.items.eq(n),n!=a.focus&&t.data("left")>a.diff){o=n;break}n=n+1==e.items.length?0:n+1}e.options.infinite||o||(o=e.items.length)}else{for(s=0,n=a.focus;s<e.items.length;s++){if(t=e.items.eq(n),n!=a.focus&&t.data("left")<a.diff){o=n;break}n=n-1==-1?e.items.length-1:n-1}e.options.infinite||o||(o=0)}e.updateFocus(o!==!1?o:a._focus)}e=i=!1}),t.slider}); | 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-slider",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";var e,i,s,n,a={};return t.component("slider",{defaults:{center:!1,threshold:10,infinite:!0,autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0,activecls:"uk-active"},boot:function(){t.ready(function(e){setTimeout(function(){t.$("[data-uk-slider]",e).each(function(){var e=t.$(this);e.data("slider")||t.slider(e,t.Utils.options(e.attr("data-uk-slider")))})},0)})},init:function(){var o=this;this.container=this.element.find(".uk-slider"),this.focus=0,t.$win.on("resize load",t.Utils.debounce(function(){o.update(!0)},100)),this.on("click.uk.slider","[data-uk-slider-item]",function(e){e.preventDefault();var i=t.$(this).attr("data-uk-slider-item");if(o.focus!=i)switch(o.stop(),i){case"next":case"previous":o["next"==i?"next":"previous"]();break;default:o.updateFocus(parseInt(i,10))}}),this.container.on({"touchstart mousedown":function(h){h.originalEvent&&h.originalEvent.touches&&(h=h.originalEvent.touches[0]),h.button&&2==h.button||!o.active||(o.stop(),s=t.$(h.target).is("a")?t.$(h.target):t.$(h.target).parents("a:first"),n=!1,s.length&&s.one("click",function(t){n&&t.preventDefault()}),i=function(t){n=!0,e=o,a={touchx:parseInt(t.pageX,10),dir:1,focus:o.focus,base:o.options.center?"center":"area"},t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),e.element.data({"pointer-start":{x:parseInt(t.pageX,10),y:parseInt(t.pageY,10)},"pointer-pos-start":o.pos}),o.container.addClass("uk-drag"),i=!1},i.x=parseInt(h.pageX,10),i.threshold=o.options.threshold)},mouseenter:function(){o.options.pauseOnHover&&(o.hovering=!0)},mouseleave:function(){o.hovering=!1}}),this.update(!0),this.on("display.uk.check",function(){o.element.is(":visible")&&o.update(!0)}),this.element.find("a,img").attr("draggable","false"),this.options.autoplay&&this.start(),t.domObserve(this.element,function(){o.element.children(":not([data-slide])").length&&o.update(!0)})},update:function(e){var i,s,n,a,o=this,h=0,r=0;return this.items=this.container.children().filter(":visible"),this.vp=this.element[0].getBoundingClientRect().width,this.container.css({"min-width":"","min-height":""}),this.items.each(function(e){i=t.$(this).attr("data-slide",e),a=i.css({left:"",width:""})[0].getBoundingClientRect(),s=a.width,n=i.width(),r=Math.max(r,a.height),i.css({left:h,width:s}).data({idx:e,left:h,width:s,cwidth:n,area:h+s,center:h-(o.vp/2-n/2)}),h+=s}),this.container.css({"min-width":h,"min-height":r}),this.options.infinite&&(h<=2*this.vp||this.items.length<5)&&!this.itemsResized?(this.container.children().each(function(t){o.container.append(o.items.eq(t).clone(!0).attr("id",""))}).each(function(t){o.container.append(o.items.eq(t).clone(!0).attr("id",""))}),this.itemsResized=!0,this.update()):(this.cw=h,this.pos=0,this.active=h>=this.vp,this.container.css({"-ms-transform":"","-webkit-transform":"",transform:""}),e&&this.updateFocus(this.focus),void 0)},updatePos:function(t){this.pos=t,this.container.css({"-ms-transform":"translateX("+t+"px)","-webkit-transform":"translateX("+t+"px)",transform:"translateX("+t+"px)"})},updateFocus:function(e,i){if(this.active){i=i||(e>this.focus?1:-1);var s,n,a=this.items.eq(e);if(this.options.infinite&&this.infinite(e,i),this.options.center)this.updatePos(-1*a.data("center")),this.items.filter("."+this.options.activecls).removeClass(this.options.activecls),a.addClass(this.options.activecls);else if(this.options.infinite)this.updatePos(-1*a.data("left"));else{for(s=0,n=e;n<this.items.length;n++)s+=this.items.eq(n).data("width");if(s>this.vp)this.updatePos(-1*a.data("left"));else if(1==i){for(s=0,n=this.items.length-1;n>=0;n--){if(s+=this.items.eq(n).data("width"),s==this.vp){e=n;break}if(s>this.vp){e=n<this.items.length-1?n+1:n;break}}s>this.vp?this.updatePos(-1*(this.container.width()-this.vp)):this.updatePos(-1*this.items.eq(e).data("left"))}}var o=this.items.eq(e).data("left");this.items.removeClass("uk-slide-before uk-slide-after").each(function(i){i!==e&&t.$(this).addClass(t.$(this).data("left")<o?"uk-slide-before":"uk-slide-after")}),this.focus=e,this.trigger("focusitem.uk.slider",[e,this.items.eq(e),this])}},next:function(){var t=this.items[this.focus+1]?this.focus+1:this.options.infinite?0:this.focus;this.updateFocus(t,1)},previous:function(){var t=this.items[this.focus-1]?this.focus-1:this.options.infinite?this.items[this.focus-1]?this.items-1:this.items.length-1:this.focus;this.updateFocus(t,-1)},start:function(){this.stop();var t=this;this.interval=setInterval(function(){t.hovering||t.next()},this.options.autoplayInterval)},stop:function(){this.interval&&clearInterval(this.interval)},infinite:function(t,e){var i,s=this,n=this.items.eq(t),a=t,o=[],h=0;if(1==e){for(i=0;i<this.items.length&&(a!=t&&(h+=this.items.eq(a).data("width"),o.push(this.items.eq(a))),!(h>this.vp));i++)a=a+1==this.items.length?0:a+1;o.length&&o.forEach(function(t){var e=n.data("area");t.css({left:e}).data({left:e,area:e+t.data("width"),center:e-(s.vp/2-t.data("cwidth")/2)}),n=t})}else{for(i=this.items.length-1;i>-1&&(h+=this.items.eq(a).data("width"),a!=t&&o.push(this.items.eq(a)),!(h>this.vp));i--)a=a-1==-1?this.items.length-1:a-1;o.length&&o.forEach(function(t){var e=n.data("left")-t.data("width");t.css({left:e}).data({left:e,area:e+t.data("width"),center:e-(s.vp/2-t.data("cwidth")/2)}),n=t})}}}),t.$doc.on("mousemove.uk.slider touchmove.uk.slider",function(t){if(t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),i&&Math.abs(t.pageX-i.x)>i.threshold&&(window.getSelection().toString()?e=i=!1:i(t)),e){var s,n,o,h,r,c,d,u,f,l;if(t.clientX||t.clientY?s=t.clientX:(t.pageX||t.pageY)&&(s=t.pageX-document.body.scrollLeft-document.documentElement.scrollLeft),r=a.focus,n=s-e.element.data("pointer-start").x,o=e.element.data("pointer-pos-start")+n,h=s>e.element.data("pointer-start").x?-1:1,c=e.items.eq(a.focus),1==h)for(d=c.data("left")+Math.abs(n),u=0,f=a.focus;u<e.items.length;u++){if(l=e.items.eq(f),f!=a.focus&&l.data("left")<d&&l.data("area")>d){r=f;break}f=f+1==e.items.length?0:f+1}else for(d=c.data("left")-Math.abs(n),u=0,f=a.focus;u<e.items.length;u++){if(l=e.items.eq(f),f!=a.focus&&l.data("area")<=c.data("left")&&l.data("center")<d){r=f;break}f=f-1==-1?e.items.length-1:f-1}e.options.infinite&&r!=a._focus&&e.infinite(r,h),e.updatePos(o),a.dir=h,a._focus=r,a.touchx=parseInt(t.pageX,10),a.diff=d}}),t.$doc.on("mouseup.uk.slider touchend.uk.slider",function(){if(e){e.container.removeClass("uk-drag"),e.items.eq(a.focus);var t,s,n,o=!1;if(1==a.dir){for(s=0,n=a.focus;s<e.items.length;s++){if(t=e.items.eq(n),n!=a.focus&&t.data("left")>a.diff){o=n;break}n=n+1==e.items.length?0:n+1}e.options.infinite||o||(o=e.items.length)}else{for(s=0,n=a.focus;s<e.items.length;s++){if(t=e.items.eq(n),n!=a.focus&&t.data("left")<a.diff){o=n;break}n=n-1==-1?e.items.length-1:n-1}e.options.infinite||o||(o=0)}e.updateFocus(o!==!1?o:a._focus)}e=i=!1}),t.slider}); |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/sortable.gradient.min.css
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | .uk-sortable{position:relative}.uk-sortable>*{touch-action:none}.uk-sortable a,.uk-sortable img{-webkit-touch-callout:none}.uk-sortable>:last-child{margin-bottom:0}.uk-sortable-dragged{position:absolute;z-index:1050;pointer-events:none}.uk-sortable-placeholder{opacity:0}.uk-sortable-empty{min-height:30px}.uk-sortable-handle{touch-action:none}.uk-sortable-handle:hover{cursor:move}.uk-sortable-moving,.uk-sortable-moving *{cursor:move}.uk-sortable-moving iframe{pointer-events:none} | 2 | .uk-sortable{position:relative}.uk-sortable>*{touch-action:none}.uk-sortable a,.uk-sortable img{-webkit-touch-callout:none}.uk-sortable>:last-child{margin-bottom:0}.uk-sortable-dragged{position:absolute;z-index:1050;pointer-events:none}.uk-sortable-placeholder{opacity:0}.uk-sortable-empty{min-height:30px}.uk-sortable-handle{touch-action:none}.uk-sortable-handle:hover{cursor:move}.uk-sortable-moving,.uk-sortable-moving *{cursor:move}.uk-sortable-moving iframe{pointer-events:none} |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/sortable.min.js
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-sortable",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";function e(e){e=t.$(e);do{if(e.data("sortable"))return e;e=t.$(e).parent()}while(e.length);return e}function o(t,e){var o=t.parentNode;if(e.parentNode!=o)return!1;for(var n=t.previousSibling;n&&9!==n.nodeType;){if(n===e)return!0;n=n.previousSibling}return!1}function n(t,e){var o=e;if(o==t)return null;for(;o;){if(o.parentNode===t)return o;if(o=o.parentNode,!o||!o.ownerDocument||11===o.nodeType)break}return null}function s(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}var a,r,i,l,d,h,u,p,c,g,f,m="ontouchstart"in window||"MSGesture"in window||window.DocumentTouch&&document instanceof DocumentTouch,v=m?"MSGesture"in window?"pointerdown":"touchstart":"mousedown",b=m?"MSGesture"in window?"pointermove":"touchmove":"mousemove",C=m?"MSGesture"in window?"pointerup":"touchend":"mouseup";return t.component("sortable",{defaults:{animation:150,threshold:10,childClass:"uk-sortable-item",placeholderClass:"uk-sortable-placeholder",overClass:"uk-sortable-over",draggingClass:"uk-sortable-dragged",dragMovingClass:"uk-sortable-moving",baseClass:"uk-sortable",noDragClass:"uk-sortable-nodrag",emptyClass:"uk-sortable-empty",dragCustomClass:"",handleClass:!1,group:!1,stop:function(){},start:function(){},change:function(){}},boot:function(){t.ready(function(e){t.$("[data-uk-sortable]",e).each(function(){var e=t.$(this);e.data("sortable")||t.sortable(e,t.Utils.options(e.attr("data-uk-sortable")))})}),t.$html.on(b,function(e){if(u){var o=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0]:e;(Math.abs(o.pageX-u.pos.x)>u.threshold||Math.abs(o.pageY-u.pos.y)>u.threshold)&&u.apply(o)}if(a){d||(d=!0,a.show(),a.$current.addClass(a.$sortable.options.placeholderClass),a.$sortable.element.children().addClass(a.$sortable.options.childClass),t.$html.addClass(a.$sortable.options.dragMovingClass));var n=a.data("mouse-offset"),s=e.originalEvent.touches&&e.originalEvent.touches[0]||e.originalEvent,r=parseInt(s.pageX,10)+n.left,i=parseInt(s.pageY,10)+n.top;if(a.css({left:r,top:i}),i+a.height()/3>document.body.offsetHeight)return;i<t.$win.scrollTop()?t.$win.scrollTop(t.$win.scrollTop()-Math.ceil(a.height()/3)):i+a.height()/3>window.innerHeight+t.$win.scrollTop()&&t.$win.scrollTop(t.$win.scrollTop()+Math.ceil(a.height()/3))}}),t.$html.on(C,function(t){if(u=h=!1,!r||!a)return r=a=null,void 0;var o=e(r),n=a.$sortable,s={type:t.type};o[0]&&n.dragDrop(s,n.element),n.dragEnd(s,n.element)})},init:function(){function e(){m&&f.touches&&f.touches.length?h.addEventListener(b,y,!1):(h.addEventListener("mouseover",$,!1),h.addEventListener("mouseout",w,!1))}function o(){m&&f.touches&&f.touches.length?h.removeEventListener(b,y,!1):(h.removeEventListener("mouseover",$,!1),h.removeEventListener("mouseout",w,!1))}function a(t){r&&d.dragMove(t,d)}function l(e){return function(o){var s,a,r;f=o,o&&(s=o.touches&&o.touches[0]||o,a=s.target||o.target,m&&document.elementFromPoint&&(a=document.elementFromPoint(s.pageX-document.body.scrollLeft,s.pageY-document.body.scrollTop)),g=t.$(a)),t.$(a).hasClass("."+d.options.childClass)?e.apply(a,[o]):a!==h&&(r=n(h,a),r&&e.apply(r,[o]))}}var d=this,h=this.element[0];p=[],this.checkEmptyList(),this.element.data("sortable-group",this.options.group?this.options.group:t.Utils.uid("sortable-group"));var u=l(function(e){if(!e.data||!e.data.sortable){var o=t.$(e.target),n=o.is("a[href]")?o:o.parents("a[href]");if(!o.is(":input")){if(d.options.handleClass){var s=o.hasClass(d.options.handleClass)?o:o.closest("."+d.options.handleClass,d.element);if(!s.length)return}return e.preventDefault(),n.length&&n.one("click",function(t){t.preventDefault()}).one(C,function(){c||(n.trigger("click"),m&&n.attr("href").trim()&&(location.href=n.attr("href")))}),e.data=e.data||{},e.data.sortable=h,d.dragStart(e,this)}}}),$=l(t.Utils.debounce(function(t){return d.dragEnter(t,this)}),40),w=l(function(){var e=d.dragenterData(this);d.dragenterData(this,e-1),d.dragenterData(this)||(t.$(this).removeClass(d.options.overClass),d.dragenterData(this,!1))}),y=l(function(t){return r&&r!==this&&i!==this?(d.element.children().removeClass(d.options.overClass),i=this,d.moveElementNextTo(r,this),s(t)):!0});this.addDragHandlers=e,this.removeDragHandlers=o,window.addEventListener(b,a,!1),h.addEventListener(v,u,!1)},dragStart:function(e,o){c=!1,d=!1,l=!1;var n=this,s=t.$(e.target);if(!(!m&&2==e.button||s.is("."+n.options.noDragClass)||s.closest("."+n.options.noDragClass).length||s.is(":input"))){r=o,a&&a.remove();var i=t.$(r),h=i.offset(),p=e.touches&&e.touches[0]||e;u={pos:{x:p.pageX,y:p.pageY},threshold:n.options.handleClass?1:n.options.threshold,apply:function(){a=t.$('<div class="'+[n.options.draggingClass,n.options.dragCustomClass].join(" ")+'"></div>').css({display:"none",top:h.top,left:h.left,width:i.width(),height:i.height(),padding:i.css("padding")}).data({"mouse-offset":{left:h.left-parseInt(p.pageX,10),top:h.top-parseInt(p.pageY,10)},origin:n.element,index:i.index()}).append(i.html()).appendTo("body"),a.$current=i,a.$sortable=n,i.data({"start-list":i.parent(),"start-index":i.index(),"sortable-group":n.options.group}),n.addDragHandlers(),n.options.start(this,r),n.trigger("start.uk.sortable",[n,r,a]),c=!0,u=!1}}}},dragMove:function(e){g=t.$(document.elementFromPoint(e.pageX-(document.body.scrollLeft||document.scrollLeft||0),e.pageY-(document.body.scrollTop||document.documentElement.scrollTop||0)));var o,n=g.closest("."+this.options.baseClass),s=n.data("sortable-group"),a=t.$(r),i=a.parent(),l=a.data("sortable-group");n[0]!==i[0]&&void 0!==l&&s===l&&(n.data("sortable").addDragHandlers(),p.push(n),n.children().addClass(this.options.childClass),n.children().length>0?(o=g.closest("."+this.options.childClass),o.length?o.before(a):n.append(a)):g.append(a),UIkit.$doc.trigger("mouseover")),this.checkEmptyList(),this.checkEmptyList(i)},dragEnter:function(e,o){if(!r||r===o)return!0;var n=this.dragenterData(o);if(this.dragenterData(o,n+1),0===n){var s=t.$(o).parent(),a=t.$(r).data("start-list");if(s[0]!==a[0]){var i=s.data("sortable-group"),l=t.$(r).data("sortable-group");if((i||l)&&i!=l)return!1}t.$(o).addClass(this.options.overClass),this.moveElementNextTo(r,o)}return!1},dragEnd:function(e,o){var n=this;r&&(this.options.stop(o),this.trigger("stop.uk.sortable",[this])),r=null,i=null,p.push(this.element),p.forEach(function(e){t.$(e).children().each(function(){1===this.nodeType&&(t.$(this).removeClass(n.options.overClass).removeClass(n.options.placeholderClass).removeClass(n.options.childClass),n.dragenterData(this,!1))})}),p=[],t.$html.removeClass(this.options.dragMovingClass),this.removeDragHandlers(),a&&(a.remove(),a=null)},dragDrop:function(t){"drop"===t.type&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()),this.triggerChangeEvents()},triggerChangeEvents:function(){if(r){var e=t.$(r),o=a.data("origin"),n=e.closest("."+this.options.baseClass),s=[],i=t.$(r);o[0]===n[0]&&a.data("index")!=e.index()?s.push({sortable:this,mode:"moved"}):o[0]!=n[0]&&s.push({sortable:t.$(n).data("sortable"),mode:"added"},{sortable:t.$(o).data("sortable"),mode:"removed"}),s.forEach(function(t){t.sortable&&t.sortable.element.trigger("change.uk.sortable",[t.sortable,i,t.mode])})}},dragenterData:function(e,o){return e=t.$(e),1==arguments.length?parseInt(e.data("child-dragenter"),10)||0:(o?e.data("child-dragenter",Math.max(0,o)):e.removeData("child-dragenter"),void 0)},moveElementNextTo:function(e,n){l=!0;var s=this,a=t.$(e).parent().css("min-height",""),r=o(e,n)?n:n.nextSibling,i=a.children(),d=i.length;return s.options.animation?(a.css("min-height",a.height()),i.stop().each(function(){var e=t.$(this),o=e.position();o.width=e.width(),e.data("offset-before",o)}),n.parentNode.insertBefore(e,r),t.Utils.checkDisplay(s.element.parent()),i=a.children().each(function(){var e=t.$(this);e.data("offset-after",e.position())}).each(function(){var e=t.$(this),o=e.data("offset-before");e.css({position:"absolute",top:o.top,left:o.left,"min-width":o.width})}),i.each(function(){var e=t.$(this),o=(e.data("offset-before"),e.data("offset-after"));e.css("pointer-events","none").width(),setTimeout(function(){e.animate({top:o.top,left:o.left},s.options.animation,function(){e.css({position:"",top:"",left:"","min-width":"","pointer-events":""}).removeClass(s.options.overClass).removeData("child-dragenter"),d--,d||(a.css("min-height",""),t.Utils.checkDisplay(s.element.parent()))})},0)}),void 0):(n.parentNode.insertBefore(e,r),t.Utils.checkDisplay(s.element.parent()),void 0)},serialize:function(){var e,o,n=[];return this.element.children().each(function(s,a){e={};for(var r,i,l=0;l<a.attributes.length;l++)o=a.attributes[l],0===o.name.indexOf("data-")&&(r=o.name.substr(5),i=t.Utils.str2json(o.value),e[r]=i||"false"==o.value||"0"==o.value?i:o.value);n.push(e)}),n},checkEmptyList:function(e){e=e?t.$(e):this.element,this.options.emptyClass&&e[e.children().length?"removeClass":"addClass"](this.options.emptyClass)}}),t.sortable}); | 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-sortable",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";function e(e){e=t.$(e);do{if(e.data("sortable"))return e;e=t.$(e).parent()}while(e.length);return e}function o(t,e){var o=t.parentNode;if(e.parentNode!=o)return!1;for(var n=t.previousSibling;n&&9!==n.nodeType;){if(n===e)return!0;n=n.previousSibling}return!1}function n(t,e){var o=e;if(o==t)return null;for(;o;){if(o.parentNode===t)return o;if(o=o.parentNode,!o||!o.ownerDocument||11===o.nodeType)break}return null}function s(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}var a,r,i,l,d,h,u,p,c,g,f,m="ontouchstart"in window||"MSGesture"in window||window.DocumentTouch&&document instanceof DocumentTouch,v=m?"MSGesture"in window?"pointerdown":"touchstart":"mousedown",b=m?"MSGesture"in window?"pointermove":"touchmove":"mousemove",C=m?"MSGesture"in window?"pointerup":"touchend":"mouseup";return t.component("sortable",{defaults:{animation:150,threshold:10,childClass:"uk-sortable-item",placeholderClass:"uk-sortable-placeholder",overClass:"uk-sortable-over",draggingClass:"uk-sortable-dragged",dragMovingClass:"uk-sortable-moving",baseClass:"uk-sortable",noDragClass:"uk-sortable-nodrag",emptyClass:"uk-sortable-empty",dragCustomClass:"",handleClass:!1,group:!1,stop:function(){},start:function(){},change:function(){}},boot:function(){t.ready(function(e){t.$("[data-uk-sortable]",e).each(function(){var e=t.$(this);e.data("sortable")||t.sortable(e,t.Utils.options(e.attr("data-uk-sortable")))})}),t.$html.on(b,function(e){if(u){var o=e.originalEvent.targetTouches?e.originalEvent.targetTouches[0]:e;(Math.abs(o.pageX-u.pos.x)>u.threshold||Math.abs(o.pageY-u.pos.y)>u.threshold)&&u.apply(o)}if(a){d||(d=!0,a.show(),a.$current.addClass(a.$sortable.options.placeholderClass),a.$sortable.element.children().addClass(a.$sortable.options.childClass),t.$html.addClass(a.$sortable.options.dragMovingClass));var n=a.data("mouse-offset"),s=e.originalEvent.touches&&e.originalEvent.touches[0]||e.originalEvent,r=parseInt(s.pageX,10)+n.left,i=parseInt(s.pageY,10)+n.top;if(a.css({left:r,top:i}),i+a.height()/3>document.body.offsetHeight)return;i<t.$win.scrollTop()?t.$win.scrollTop(t.$win.scrollTop()-Math.ceil(a.height()/3)):i+a.height()/3>window.innerHeight+t.$win.scrollTop()&&t.$win.scrollTop(t.$win.scrollTop()+Math.ceil(a.height()/3))}}),t.$html.on(C,function(t){if(u=h=!1,!r||!a)return r=a=null,void 0;var o=e(r),n=a.$sortable,s={type:t.type};o[0]&&n.dragDrop(s,n.element),n.dragEnd(s,n.element)})},init:function(){function e(){m&&f.touches&&f.touches.length?h.addEventListener(b,y,!1):(h.addEventListener("mouseover",$,!1),h.addEventListener("mouseout",w,!1))}function o(){m&&f.touches&&f.touches.length?h.removeEventListener(b,y,!1):(h.removeEventListener("mouseover",$,!1),h.removeEventListener("mouseout",w,!1))}function a(t){r&&d.dragMove(t,d)}function l(e){return function(o){var s,a,r;f=o,o&&(s=o.touches&&o.touches[0]||o,a=s.target||o.target,m&&document.elementFromPoint&&(a=document.elementFromPoint(s.pageX-document.body.scrollLeft,s.pageY-document.body.scrollTop)),g=t.$(a)),t.$(a).hasClass("."+d.options.childClass)?e.apply(a,[o]):a!==h&&(r=n(h,a),r&&e.apply(r,[o]))}}var d=this,h=this.element[0];p=[],this.checkEmptyList(),this.element.data("sortable-group",this.options.group?this.options.group:t.Utils.uid("sortable-group"));var u=l(function(e){if(!e.data||!e.data.sortable){var o=t.$(e.target),n=o.is("a[href]")?o:o.parents("a[href]");if(!o.is(":input")){if(d.options.handleClass){var s=o.hasClass(d.options.handleClass)?o:o.closest("."+d.options.handleClass,d.element);if(!s.length)return}return e.preventDefault(),n.length&&n.one("click",function(t){t.preventDefault()}).one(C,function(){c||(n.trigger("click"),m&&n.attr("href").trim()&&(location.href=n.attr("href")))}),e.data=e.data||{},e.data.sortable=h,d.dragStart(e,this)}}}),$=l(t.Utils.debounce(function(t){return d.dragEnter(t,this)}),40),w=l(function(){var e=d.dragenterData(this);d.dragenterData(this,e-1),d.dragenterData(this)||(t.$(this).removeClass(d.options.overClass),d.dragenterData(this,!1))}),y=l(function(t){return r&&r!==this&&i!==this?(d.element.children().removeClass(d.options.overClass),i=this,d.moveElementNextTo(r,this),s(t)):!0});this.addDragHandlers=e,this.removeDragHandlers=o,window.addEventListener(b,a,!1),h.addEventListener(v,u,!1)},dragStart:function(e,o){c=!1,d=!1,l=!1;var n=this,s=t.$(e.target);if(!(!m&&2==e.button||s.is("."+n.options.noDragClass)||s.closest("."+n.options.noDragClass).length||s.is(":input"))){r=o,a&&a.remove();var i=t.$(r),h=i.offset(),p=e.touches&&e.touches[0]||e;u={pos:{x:p.pageX,y:p.pageY},threshold:n.options.handleClass?1:n.options.threshold,apply:function(){a=t.$('<div class="'+[n.options.draggingClass,n.options.dragCustomClass].join(" ")+'"></div>').css({display:"none",top:h.top,left:h.left,width:i.width(),height:i.height(),padding:i.css("padding")}).data({"mouse-offset":{left:h.left-parseInt(p.pageX,10),top:h.top-parseInt(p.pageY,10)},origin:n.element,index:i.index()}).append(i.html()).appendTo("body"),a.$current=i,a.$sortable=n,i.data({"start-list":i.parent(),"start-index":i.index(),"sortable-group":n.options.group}),n.addDragHandlers(),n.options.start(this,r),n.trigger("start.uk.sortable",[n,r,a]),c=!0,u=!1}}}},dragMove:function(e){g=t.$(document.elementFromPoint(e.pageX-(document.body.scrollLeft||document.scrollLeft||0),e.pageY-(document.body.scrollTop||document.documentElement.scrollTop||0)));var o,n=g.closest("."+this.options.baseClass),s=n.data("sortable-group"),a=t.$(r),i=a.parent(),l=a.data("sortable-group");n[0]!==i[0]&&void 0!==l&&s===l&&(n.data("sortable").addDragHandlers(),p.push(n),n.children().addClass(this.options.childClass),n.children().length>0?(o=g.closest("."+this.options.childClass),o.length?o.before(a):n.append(a)):g.append(a),UIkit.$doc.trigger("mouseover")),this.checkEmptyList(),this.checkEmptyList(i)},dragEnter:function(e,o){if(!r||r===o)return!0;var n=this.dragenterData(o);if(this.dragenterData(o,n+1),0===n){var s=t.$(o).parent(),a=t.$(r).data("start-list");if(s[0]!==a[0]){var i=s.data("sortable-group"),l=t.$(r).data("sortable-group");if((i||l)&&i!=l)return!1}t.$(o).addClass(this.options.overClass),this.moveElementNextTo(r,o)}return!1},dragEnd:function(e,o){var n=this;r&&(this.options.stop(o),this.trigger("stop.uk.sortable",[this])),r=null,i=null,p.push(this.element),p.forEach(function(e){t.$(e).children().each(function(){1===this.nodeType&&(t.$(this).removeClass(n.options.overClass).removeClass(n.options.placeholderClass).removeClass(n.options.childClass),n.dragenterData(this,!1))})}),p=[],t.$html.removeClass(this.options.dragMovingClass),this.removeDragHandlers(),a&&(a.remove(),a=null)},dragDrop:function(t){"drop"===t.type&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()),this.triggerChangeEvents()},triggerChangeEvents:function(){if(r){var e=t.$(r),o=a.data("origin"),n=e.closest("."+this.options.baseClass),s=[],i=t.$(r);o[0]===n[0]&&a.data("index")!=e.index()?s.push({sortable:this,mode:"moved"}):o[0]!=n[0]&&s.push({sortable:t.$(n).data("sortable"),mode:"added"},{sortable:t.$(o).data("sortable"),mode:"removed"}),s.forEach(function(t){t.sortable&&t.sortable.element.trigger("change.uk.sortable",[t.sortable,i,t.mode])})}},dragenterData:function(e,o){return e=t.$(e),1==arguments.length?parseInt(e.data("child-dragenter"),10)||0:(o?e.data("child-dragenter",Math.max(0,o)):e.removeData("child-dragenter"),void 0)},moveElementNextTo:function(e,n){l=!0;var s=this,a=t.$(e).parent().css("min-height",""),r=o(e,n)?n:n.nextSibling,i=a.children(),d=i.length;return s.options.animation?(a.css("min-height",a.height()),i.stop().each(function(){var e=t.$(this),o=e.position();o.width=e.width(),e.data("offset-before",o)}),n.parentNode.insertBefore(e,r),t.Utils.checkDisplay(s.element.parent()),i=a.children().each(function(){var e=t.$(this);e.data("offset-after",e.position())}).each(function(){var e=t.$(this),o=e.data("offset-before");e.css({position:"absolute",top:o.top,left:o.left,"min-width":o.width})}),i.each(function(){var e=t.$(this),o=(e.data("offset-before"),e.data("offset-after"));e.css("pointer-events","none").width(),setTimeout(function(){e.animate({top:o.top,left:o.left},s.options.animation,function(){e.css({position:"",top:"",left:"","min-width":"","pointer-events":""}).removeClass(s.options.overClass).removeData("child-dragenter"),d--,d||(a.css("min-height",""),t.Utils.checkDisplay(s.element.parent()))})},0)}),void 0):(n.parentNode.insertBefore(e,r),t.Utils.checkDisplay(s.element.parent()),void 0)},serialize:function(){var e,o,n=[];return this.element.children().each(function(s,a){e={};for(var r,i,l=0;l<a.attributes.length;l++)o=a.attributes[l],0===o.name.indexOf("data-")&&(r=o.name.substr(5),i=t.Utils.str2json(o.value),e[r]=i||"false"==o.value||"0"==o.value?i:o.value);n.push(e)}),n},checkEmptyList:function(e){e=e?t.$(e):this.element,this.options.emptyClass&&e[e.children().length?"removeClass":"addClass"](this.options.emptyClass)}}),t.sortable}); |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.gradient.min.css
0 → 100644
| 1 | +/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | ||
| 2 | +[data-uk-sticky].uk-active{z-index:980;box-sizing:border-box;-webkit-backface-visibility:hidden}[data-uk-sticky][class*=uk-animation-]{-webkit-animation-duration:.2s;animation-duration:.2s}[data-uk-sticky].uk-animation-reverse{-webkit-animation-duration:.2s;animation-duration:.2s} | ||
| 0 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.min.js
0 → 100644
| 1 | +/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | ||
| 2 | +!function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-sticky",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";function i(){var i=arguments.length?arguments:n;if(i.length&&!(e.scrollTop()<0))for(var o,a,r,h,p=e.scrollTop(),c=s.height(),l=e.height(),m=c-l,d=p>m?m-p:0,u=0;u<i.length;u++)if(h=i[u],h.element.is(":visible")&&!h.animate){if(h.check()){if(h.top<0?o=0:(r=h.element.outerHeight(),o=c-r-h.top-h.options.bottom-p-d,o=0>o?o+h.top:h.top),h.boundary&&h.boundary.length){var f=h.boundary.offset().top;a=h.boundtoparent?c-(f+h.boundary.outerHeight())+parseInt(h.boundary.css("padding-bottom")):c-f,o=p+r>c-a-(h.top<0?0:h.top)?c-a-(p+r):o}if(h.currentTop!=o){if(h.element.css({position:"fixed",top:o,width:h.getWidthFrom.length?h.getWidthFrom.width():h.element.width()}),!h.init&&(h.element.addClass(h.options.clsinit),location.hash&&p>0&&h.options.target)){var g=t.$(location.hash);g.length&&setTimeout(function(t,i){return function(){i.element.width();var e=t.offset(),s=e.top+t.outerHeight(),n=i.element.offset(),o=i.element.outerHeight(),a=n.top+o;n.top<s&&e.top<a&&(p=e.top-o-i.options.target,window.scrollTo(0,p))}}(g,h),0)}h.element.addClass(h.options.clsactive).removeClass(h.options.clsinactive),h.element.trigger("active.uk.sticky"),h.element.css("margin",""),h.options.animation&&h.init&&!t.Utils.isInView(h.wrapper)&&h.element.addClass(h.options.animation),h.currentTop=o}}else null!==h.currentTop&&h.reset();h.init=!0}}var e=t.$win,s=t.$doc,n=[],o=1;return t.component("sticky",{defaults:{top:0,bottom:0,animation:"",clsinit:"uk-sticky-init",clsactive:"uk-active",clsinactive:"",getWidthFrom:"",showup:!1,boundary:!1,media:!1,target:!1,disabled:!1},boot:function(){t.$doc.on("scrolling.uk.document",function(t,e){e&&e.dir&&(o=e.dir.y,i())}),t.$win.on("resize orientationchange",t.Utils.debounce(function(){if(n.length){for(var t=0;t<n.length;t++)n[t].reset(!0),n[t].self.computeWrapper();i()}},100)),t.ready(function(e){setTimeout(function(){t.$("[data-uk-sticky]",e).each(function(){var i=t.$(this);i.data("sticky")||t.sticky(i,t.Utils.options(i.attr("data-uk-sticky")))}),i()},0)})},init:function(){var i,a=this.options.boundary;this.wrapper=this.element.wrap('<div class="uk-sticky-placeholder"></div>').parent(),this.computeWrapper(),this.wrapper.css({"margin-top":this.element.css("margin-top"),"margin-bottom":this.element.css("margin-bottom"),"margin-left":this.element.css("margin-left"),"margin-right":this.element.css("margin-right")}),this.element.css("margin",0),a&&(a===!0||"!"===a[0]?(a=a===!0?this.wrapper.parent():this.wrapper.closest(a.substr(1)),i=!0):"string"==typeof a&&(a=t.$(a))),this.sticky={self:this,options:this.options,element:this.element,currentTop:null,wrapper:this.wrapper,init:!1,getWidthFrom:t.$(this.options.getWidthFrom||this.wrapper),boundary:a,boundtoparent:i,top:0,calcTop:function(){var i=this.options.top;if(this.options.top&&"string"==typeof this.options.top)if(this.options.top.match(/^(-|)(\d+)vh$/))i=window.innerHeight*parseInt(this.options.top,10)/100;else{var e=t.$(this.options.top).first();e.length&&e.is(":visible")&&(i=-1*(e.offset().top+e.outerHeight()-this.wrapper.offset().top))}this.top=i},reset:function(i){this.calcTop();var e=function(){this.element.css({position:"",top:"",width:"",left:"",margin:"0"}),this.element.removeClass([this.options.animation,"uk-animation-reverse",this.options.clsactive].join(" ")),this.element.addClass(this.options.clsinactive),this.element.trigger("inactive.uk.sticky"),this.currentTop=null,this.animate=!1}.bind(this);!i&&this.options.animation&&t.support.animation&&!t.Utils.isInView(this.wrapper)?(this.animate=!0,this.element.removeClass(this.options.animation).one(t.support.animation.end,function(){e()}).width(),this.element.addClass(this.options.animation+" uk-animation-reverse")):e()},check:function(){if(this.options.disabled)return!1;if(this.options.media)switch(typeof this.options.media){case"number":if(window.innerWidth<this.options.media)return!1;break;case"string":if(window.matchMedia&&!window.matchMedia(this.options.media).matches)return!1}var i=e.scrollTop(),n=s.height(),a=n-window.innerHeight,r=i>a?a-i:0,h=this.wrapper.offset().top,p=h-this.top-r,c=i>=p;return c&&this.options.showup&&(1==o&&(c=!1),-1==o&&!this.element.hasClass(this.options.clsactive)&&t.Utils.isInView(this.wrapper)&&(c=!1)),c}},this.sticky.calcTop(),n.push(this.sticky)},update:function(){i(this.sticky)},enable:function(){this.options.disabled=!1,this.update()},disable:function(t){this.options.disabled=!0,this.sticky.reset(t)},computeWrapper:function(){this.wrapper.css({height:-1==["absolute","fixed"].indexOf(this.element.css("position"))?this.element.outerHeight():"","float":"none"!=this.element.css("float")?this.element.css("float"):""}),"fixed"==this.element.css("position")&&this.element.css({width:this.sticky.getWidthFrom.length?this.sticky.getWidthFrom.width():this.element.width()})}}),t.sticky}); | ||
| 0 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/timepicker.min.js
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-timepicker",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";function e(t,e){t=t||0,e=e||24;var i,o,a={"12h":[],"24h":[]};for(i=t,o="";e>i;i++)o=""+i,10>i&&(o="0"+o),a["24h"].push({value:o+":00"}),a["24h"].push({value:o+":30"}),0===i&&(o=12,a["12h"].push({value:o+":00 AM"}),a["12h"].push({value:o+":30 AM"})),i>0&&13>i&&12!==i&&(a["12h"].push({value:o+":00 AM"}),a["12h"].push({value:o+":30 AM"})),i>=12&&(o-=12,0===o&&(o=12),10>o&&(o="0"+String(o)),a["12h"].push({value:o+":00 PM"}),a["12h"].push({value:o+":30 PM"}));return a}t.component("timepicker",{defaults:{format:"24h",delay:0,start:0,end:24},boot:function(){t.$html.on("focus.timepicker.uikit","[data-uk-timepicker]",function(){var e=t.$(this);if(!e.data("timepicker")){var i=t.timepicker(e,t.Utils.options(e.attr("data-uk-timepicker")));setTimeout(function(){i.autocomplete.input.focus()},40)}})},init:function(){var i,o=this,a=e(this.options.start,this.options.end);this.options.minLength=0,this.options.template='<ul class="uk-nav uk-nav-autocomplete uk-autocomplete-results">{{~items}}<li data-value="{{$item.value}}"><a>{{$item.value}}</a></li>{{/items}}</ul>',this.options.source=function(t){t(a[o.options.format]||a["12h"])},this.element.is("input")?(this.element.wrap('<div class="uk-autocomplete"></div>'),i=this.element.parent()):i=this.element.addClass("uk-autocomplete"),this.autocomplete=t.autocomplete(i,this.options),this.autocomplete.dropdown.addClass("uk-dropdown-small uk-dropdown-scrollable"),this.autocomplete.on("show.uk.autocomplete",function(){var t=o.autocomplete.dropdown.find('[data-value="'+o.autocomplete.input.val()+'"]');setTimeout(function(){o.autocomplete.pick(t,!0)},10)}),this.autocomplete.input.on("focus",function(){o.autocomplete.value=Math.random(),o.autocomplete.triggercomplete()}).on("blur",t.Utils.debounce(function(){o.checkTime()},100)),this.element.data("timepicker",this)},checkTime:function(){var t,e,i,o,a="AM",u=this.autocomplete.input.val();"12h"==this.options.format?(t=u.split(" "),e=t[0].split(":"),a=t[1]):e=u.split(":"),i=parseInt(e[0],10),o=parseInt(e[1],10),isNaN(i)&&(i=0),isNaN(o)&&(o=0),"12h"==this.options.format?(i>12?i=12:0>i&&(i=12),"am"===a||"a"===a?a="AM":("pm"===a||"p"===a)&&(a="PM"),"AM"!==a&&"PM"!==a&&(a="AM")):i>=24?i=23:0>i&&(i=0),0>o?o=0:o>=60&&(o=0),this.autocomplete.input.val(this.formatTime(i,o,a)).trigger("change")},formatTime:function(t,e,i){return t=10>t?"0"+t:t,e=10>e?"0"+e:e,t+":"+e+("12h"==this.options.format?" "+i:"")}})}); | 2 | !function(t){var e;window.UIkit&&(e=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-timepicker",["uikit"],function(){return e||t(UIkit)})}(function(t){"use strict";function e(t,e){t=t||0,e=e||24;var i,o,a={"12h":[],"24h":[]};for(i=t,o="";e>i;i++)o=""+i,10>i&&(o="0"+o),a["24h"].push({value:o+":00"}),a["24h"].push({value:o+":30"}),0===i&&(o=12,a["12h"].push({value:o+":00 AM"}),a["12h"].push({value:o+":30 AM"})),i>0&&13>i&&12!==i&&(a["12h"].push({value:o+":00 AM"}),a["12h"].push({value:o+":30 AM"})),i>=12&&(o-=12,0===o&&(o=12),10>o&&(o="0"+String(o)),a["12h"].push({value:o+":00 PM"}),a["12h"].push({value:o+":30 PM"}));return a}t.component("timepicker",{defaults:{format:"24h",delay:0,start:0,end:24},boot:function(){t.$html.on("focus.timepicker.uikit","[data-uk-timepicker]",function(){var e=t.$(this);if(!e.data("timepicker")){var i=t.timepicker(e,t.Utils.options(e.attr("data-uk-timepicker")));setTimeout(function(){i.autocomplete.input.focus()},40)}})},init:function(){var i,o=this,a=e(this.options.start,this.options.end);this.options.minLength=0,this.options.template='<ul class="uk-nav uk-nav-autocomplete uk-autocomplete-results">{{~items}}<li data-value="{{$item.value}}"><a>{{$item.value}}</a></li>{{/items}}</ul>',this.options.source=function(t){t(a[o.options.format]||a["12h"])},this.element.is("input")?(this.element.wrap('<div class="uk-autocomplete"></div>'),i=this.element.parent()):i=this.element.addClass("uk-autocomplete"),this.autocomplete=t.autocomplete(i,this.options),this.autocomplete.dropdown.addClass("uk-dropdown-small uk-dropdown-scrollable"),this.autocomplete.on("show.uk.autocomplete",function(){var t=o.autocomplete.dropdown.find('[data-value="'+o.autocomplete.input.val()+'"]');setTimeout(function(){o.autocomplete.pick(t,!0)},10)}),this.autocomplete.input.on("focus",function(){o.autocomplete.value=Math.random(),o.autocomplete.triggercomplete()}).on("blur",t.Utils.debounce(function(){o.checkTime()},100)),this.element.data("timepicker",this)},checkTime:function(){var t,e,i,o,a="AM",u=this.autocomplete.input.val();"12h"==this.options.format?(t=u.split(" "),e=t[0].split(":"),a=t[1]):e=u.split(":"),i=parseInt(e[0],10),o=parseInt(e[1],10),isNaN(i)&&(i=0),isNaN(o)&&(o=0),"12h"==this.options.format?(i>12?i=12:0>i&&(i=12),"am"===a||"a"===a?a="AM":("pm"===a||"p"===a)&&(a="PM"),"AM"!==a&&"PM"!==a&&(a="AM")):i>=24?i=23:0>i&&(i=0),0>o?o=0:o>=60&&(o=0),this.autocomplete.input.val(this.formatTime(i,o,a)).trigger("change")},formatTime:function(t,e,i){return t=10>t?"0"+t:t,e=10>e?"0"+e:e,t+":"+e+("12h"==this.options.format?" "+i:"")}})}); |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | .uk-tooltip{display:none;position:absolute;z-index:1030;box-sizing:border-box;max-width:200px;padding:5px 8px;background:#333;color:rgba(255,255,255,.7);font-size:12px;line-height:18px;border-radius:3px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-tooltip:after{content:"";display:block;position:absolute;width:0;height:0;border:5px dashed #333}.uk-tooltip-top-left:after,.uk-tooltip-top-right:after,.uk-tooltip-top:after{bottom:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-color:#333}.uk-tooltip-bottom-left:after,.uk-tooltip-bottom-right:after,.uk-tooltip-bottom:after{top:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent;border-bottom-color:#333}.uk-tooltip-bottom:after,.uk-tooltip-top:after{left:50%;margin-left:-5px}.uk-tooltip-bottom-left:after,.uk-tooltip-top-left:after{left:10px}.uk-tooltip-bottom-right:after,.uk-tooltip-top-right:after{right:10px}.uk-tooltip-left:after{right:-5px;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent;border-left-color:#333}.uk-tooltip-right:after{left:-5px;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent;border-right-color:#333} | 2 | .uk-tooltip{display:none;position:absolute;z-index:1030;box-sizing:border-box;max-width:200px;padding:5px 8px;background:#333;color:rgba(255,255,255,.7);font-size:12px;line-height:18px;border-radius:3px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-tooltip:after{content:"";display:block;position:absolute;width:0;height:0;border:5px dashed #333}.uk-tooltip-top-left:after,.uk-tooltip-top-right:after,.uk-tooltip-top:after{bottom:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-color:#333}.uk-tooltip-bottom-left:after,.uk-tooltip-bottom-right:after,.uk-tooltip-bottom:after{top:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent;border-bottom-color:#333}.uk-tooltip-bottom:after,.uk-tooltip-top:after{left:50%;margin-left:-5px}.uk-tooltip-bottom-left:after,.uk-tooltip-top-left:after{left:10px}.uk-tooltip-bottom-right:after,.uk-tooltip-top-right:after{right:10px}.uk-tooltip-left:after{right:-5px;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent;border-left-color:#333}.uk-tooltip-right:after{left:-5px;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent;border-right-color:#333} |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.min.js
| 1 | -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ | 1 | +/* UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ |
| 2 | !function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-tooltip",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";var i,o,e;return t.component("tooltip",{defaults:{offset:5,pos:"top",animation:!1,delay:0,cls:"",activeClass:"uk-active",src:function(t){var i=t.attr("title");return void 0!==i&&t.data("cached-title",i).removeAttr("title"),t.data("cached-title")}},tip:"",boot:function(){t.$html.on("mouseenter.tooltip.uikit focus.tooltip.uikit","[data-uk-tooltip]",function(){var i=t.$(this);i.data("tooltip")||(t.tooltip(i,t.Utils.options(i.attr("data-uk-tooltip"))),i.trigger("mouseenter"))})},init:function(){var o=this;i||(i=t.$('<div class="uk-tooltip"></div>').appendTo("body")),this.on({focus:function(){o.show()},blur:function(){o.hide()},mouseenter:function(){o.show()},mouseleave:function(){o.hide()}})},show:function(){if(this.tip="function"==typeof this.options.src?this.options.src(this.element):this.options.src,o&&clearTimeout(o),e&&clearTimeout(e),"string"==typeof this.tip?this.tip.length:0){i.stop().css({top:-2e3,visibility:"hidden"}).removeClass(this.options.activeClass).show(),i.html('<div class="uk-tooltip-inner">'+this.tip+"</div>");var s=this,n=t.$.extend({},this.element.offset(),{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}),l=i[0].offsetWidth,f=i[0].offsetHeight,p="function"==typeof this.options.offset?this.options.offset.call(this.element):this.options.offset,a="function"==typeof this.options.pos?this.options.pos.call(this.element):this.options.pos,h=a.split("-"),c={display:"none",visibility:"visible",top:n.top+n.height+f,left:n.left};if("fixed"==t.$html.css("position")||"fixed"==t.$body.css("position")){var r=t.$("body").offset(),d=t.$("html").offset(),u={top:d.top+r.top,left:d.left+r.left};n.left-=u.left,n.top-=u.top}"left"!=h[0]&&"right"!=h[0]||"right"!=t.langdirection||(h[0]="left"==h[0]?"right":"left");var m={bottom:{top:n.top+n.height+p,left:n.left+n.width/2-l/2},top:{top:n.top-f-p,left:n.left+n.width/2-l/2},left:{top:n.top+n.height/2-f/2,left:n.left-l-p},right:{top:n.top+n.height/2-f/2,left:n.left+n.width+p}};t.$.extend(c,m[h[0]]),2==h.length&&(c.left="left"==h[1]?n.left:n.left+n.width-l);var v=this.checkBoundary(c.left,c.top,l,f);if(v){switch(v){case"x":a=2==h.length?h[0]+"-"+(c.left<0?"left":"right"):c.left<0?"right":"left";break;case"y":a=2==h.length?(c.top<0?"bottom":"top")+"-"+h[1]:c.top<0?"bottom":"top";break;case"xy":a=2==h.length?(c.top<0?"bottom":"top")+"-"+(c.left<0?"left":"right"):c.left<0?"right":"left"}h=a.split("-"),t.$.extend(c,m[h[0]]),2==h.length&&(c.left="left"==h[1]?n.left:n.left+n.width-l)}c.left-=t.$body.position().left,o=setTimeout(function(){i.css(c).attr("class",["uk-tooltip","uk-tooltip-"+a,s.options.cls].join(" ")),s.options.animation?i.css({opacity:0,display:"block"}).addClass(s.options.activeClass).animate({opacity:1},parseInt(s.options.animation,10)||400):i.show().addClass(s.options.activeClass),o=!1,e=setInterval(function(){s.element.is(":visible")||s.hide()},150)},parseInt(this.options.delay,10)||0)}},hide:function(){if(!this.element.is("input")||this.element[0]!==document.activeElement)if(o&&clearTimeout(o),e&&clearTimeout(e),i.stop(),this.options.animation){var t=this;i.fadeOut(parseInt(this.options.animation,10)||400,function(){i.removeClass(t.options.activeClass)})}else i.hide().removeClass(this.options.activeClass)},content:function(){return this.tip},checkBoundary:function(i,o,e,s){var n="";return(0>i||i-t.$win.scrollLeft()+e>window.innerWidth)&&(n+="x"),(0>o||o-t.$win.scrollTop()+s>window.innerHeight)&&(n+="y"),n}}),t.tooltip}); | 2 | !function(t){var i;window.UIkit&&(i=t(UIkit)),"function"==typeof define&&define.amd&&define("uikit-tooltip",["uikit"],function(){return i||t(UIkit)})}(function(t){"use strict";var i,o,e;return t.component("tooltip",{defaults:{offset:5,pos:"top",animation:!1,delay:0,cls:"",activeClass:"uk-active",src:function(t){var i=t.attr("title");return void 0!==i&&t.data("cached-title",i).removeAttr("title"),t.data("cached-title")}},tip:"",boot:function(){t.$html.on("mouseenter.tooltip.uikit focus.tooltip.uikit","[data-uk-tooltip]",function(){var i=t.$(this);i.data("tooltip")||(t.tooltip(i,t.Utils.options(i.attr("data-uk-tooltip"))),i.trigger("mouseenter"))})},init:function(){var o=this;i||(i=t.$('<div class="uk-tooltip"></div>').appendTo("body")),this.on({focus:function(){o.show()},blur:function(){o.hide()},mouseenter:function(){o.show()},mouseleave:function(){o.hide()}})},show:function(){if(this.tip="function"==typeof this.options.src?this.options.src(this.element):this.options.src,o&&clearTimeout(o),e&&clearTimeout(e),"string"==typeof this.tip?this.tip.length:0){i.stop().css({top:-2e3,visibility:"hidden"}).removeClass(this.options.activeClass).show(),i.html('<div class="uk-tooltip-inner">'+this.tip+"</div>");var s=this,n=t.$.extend({},this.element.offset(),{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}),l=i[0].offsetWidth,f=i[0].offsetHeight,p="function"==typeof this.options.offset?this.options.offset.call(this.element):this.options.offset,a="function"==typeof this.options.pos?this.options.pos.call(this.element):this.options.pos,h=a.split("-"),c={display:"none",visibility:"visible",top:n.top+n.height+f,left:n.left};if("fixed"==t.$html.css("position")||"fixed"==t.$body.css("position")){var r=t.$("body").offset(),d=t.$("html").offset(),u={top:d.top+r.top,left:d.left+r.left};n.left-=u.left,n.top-=u.top}"left"!=h[0]&&"right"!=h[0]||"right"!=t.langdirection||(h[0]="left"==h[0]?"right":"left");var m={bottom:{top:n.top+n.height+p,left:n.left+n.width/2-l/2},top:{top:n.top-f-p,left:n.left+n.width/2-l/2},left:{top:n.top+n.height/2-f/2,left:n.left-l-p},right:{top:n.top+n.height/2-f/2,left:n.left+n.width+p}};t.$.extend(c,m[h[0]]),2==h.length&&(c.left="left"==h[1]?n.left:n.left+n.width-l);var v=this.checkBoundary(c.left,c.top,l,f);if(v){switch(v){case"x":a=2==h.length?h[0]+"-"+(c.left<0?"left":"right"):c.left<0?"right":"left";break;case"y":a=2==h.length?(c.top<0?"bottom":"top")+"-"+h[1]:c.top<0?"bottom":"top";break;case"xy":a=2==h.length?(c.top<0?"bottom":"top")+"-"+(c.left<0?"left":"right"):c.left<0?"right":"left"}h=a.split("-"),t.$.extend(c,m[h[0]]),2==h.length&&(c.left="left"==h[1]?n.left:n.left+n.width-l)}c.left-=t.$body.position().left,o=setTimeout(function(){i.css(c).attr("class",["uk-tooltip","uk-tooltip-"+a,s.options.cls].join(" ")),s.options.animation?i.css({opacity:0,display:"block"}).addClass(s.options.activeClass).animate({opacity:1},parseInt(s.options.animation,10)||400):i.show().addClass(s.options.activeClass),o=!1,e=setInterval(function(){s.element.is(":visible")||s.hide()},150)},parseInt(this.options.delay,10)||0)}},hide:function(){if(!this.element.is("input")||this.element[0]!==document.activeElement)if(o&&clearTimeout(o),e&&clearTimeout(e),i.stop(),this.options.animation){var t=this;i.fadeOut(parseInt(this.options.animation,10)||400,function(){i.removeClass(t.options.activeClass)})}else i.hide().removeClass(this.options.activeClass)},content:function(){return this.tip},checkBoundary:function(i,o,e,s){var n="";return(0>i||i-t.$win.scrollLeft()+e>window.innerWidth)&&(n+="x"),(0>o||o-t.$win.scrollTop()+s>window.innerHeight)&&(n+="y"),n}}),t.tooltip}); |
| 3 | \ No newline at end of file | 3 | \ No newline at end of file |
src/main/resources/static/real_control_v2/css/main.css
| 1 | /* ^_^ baidu map hide logo */ | 1 | /* ^_^ baidu map hide logo */ |
| 2 | 2 | ||
| 3 | +.ps-container > .ps-scrollbar-y-rail{ | ||
| 4 | + z-index: 9 !important; | ||
| 5 | +} | ||
| 6 | + | ||
| 7 | +.ps-container > .ps-scrollbar-x-rail, | ||
| 8 | +.ps-container > .ps-scrollbar-y-rail { | ||
| 9 | + opacity: 0.6 !important; | ||
| 10 | + padding: 0 !important; | ||
| 11 | +} | ||
| 12 | + | ||
| 3 | .anchorBL, .anchorBL, .amap-logo, .amap-copyright { | 13 | .anchorBL, .anchorBL, .amap-logo, .amap-copyright { |
| 4 | display: none; | 14 | display: none; |
| 5 | } | 15 | } |
| @@ -952,9 +962,6 @@ option.oil_station_opt{ | @@ -952,9 +962,6 @@ option.oil_station_opt{ | ||
| 952 | .safe_driv_pop .title{ | 962 | .safe_driv_pop .title{ |
| 953 | } | 963 | } |
| 954 | 964 | ||
| 955 | -/*.safe_driv_pop i.uk-icon-times-circle{ | ||
| 956 | - margin-right: 5px; | ||
| 957 | -}*/ | ||
| 958 | .safe_driv_pop .desc{ | 965 | .safe_driv_pop .desc{ |
| 959 | display: block; | 966 | display: block; |
| 960 | font-size: 12px; | 967 | font-size: 12px; |
| @@ -963,20 +970,20 @@ option.oil_station_opt{ | @@ -963,20 +970,20 @@ option.oil_station_opt{ | ||
| 963 | margin-right: 5px; | 970 | margin-right: 5px; |
| 964 | } | 971 | } |
| 965 | 972 | ||
| 966 | -/*.safe_driv_pop .detail_content{ | ||
| 967 | - display: none; | 973 | +/** 嵌入表单modal滚动条样式 */ |
| 974 | +#formFragmentModal::-webkit-scrollbar { | ||
| 975 | + width: 10px; | ||
| 976 | + background-color: #F5F5F5; | ||
| 968 | } | 977 | } |
| 969 | - | ||
| 970 | -.safe_driv_pop.open .detail_content{ | ||
| 971 | - display: block; | ||
| 972 | - background: rgb(255, 255, 255); | ||
| 973 | - height: 200px; | ||
| 974 | - margin: 7px 0; | ||
| 975 | - border-radius: 5px; | ||
| 976 | - color: #000000; | 978 | +#formFragmentModal::-webkit-scrollbar-thumb { |
| 979 | + background-color: #000000; | ||
| 980 | +} | ||
| 981 | +#formFragmentModal::-webkit-scrollbar-track { | ||
| 982 | + border: 0; | ||
| 983 | + background-color: #F5F5F5; | ||
| 984 | + border-radius: 0; | ||
| 977 | } | 985 | } |
| 978 | 986 | ||
| 979 | -.safe_driv_pop.open .desc{ | ||
| 980 | - display: none; | ||
| 981 | -}*/ | ||
| 982 | -/** 安全驾驶相关css结束 */ | ||
| 983 | \ No newline at end of file | 987 | \ No newline at end of file |
| 988 | +#formFragmentModal::-webkit-scrollbar-thumb{ | ||
| 989 | + border: 5px solid rgb(226, 122, 122); | ||
| 990 | +} | ||
| 984 | \ No newline at end of file | 991 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
| @@ -129,7 +129,7 @@ | @@ -129,7 +129,7 @@ | ||
| 129 | <div class="uk-width-1-1"> | 129 | <div class="uk-width-1-1"> |
| 130 | <div class="uk-form-row ct-stacked"> | 130 | <div class="uk-form-row ct-stacked"> |
| 131 | <div class="uk-form-controls" style="margin-top: 5px;"> | 131 | <div class="uk-form-controls" style="margin-top: 5px;"> |
| 132 | - <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" placeholder="备注,不超过20个字符">{{sch.remarks}}</textarea> | 132 | + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="50" placeholder="备注,不超过50个字符">{{sch.remarks}}</textarea> |
| 133 | </div> | 133 | </div> |
| 134 | </div> | 134 | </div> |
| 135 | </div> | 135 | </div> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/jhlb.html
| @@ -22,10 +22,33 @@ | @@ -22,10 +22,33 @@ | ||
| 22 | <div class="uk-grid"> | 22 | <div class="uk-grid"> |
| 23 | <div class="uk-width-1-1"> | 23 | <div class="uk-width-1-1"> |
| 24 | <div class="uk-form-row"> | 24 | <div class="uk-form-row"> |
| 25 | - <label class="uk-form-label" >班次</label> | 25 | + <label class="uk-form-label" >路牌</label> |
| 26 | + <div class="uk-form-controls"> | ||
| 27 | + <select name="lpName"> | ||
| 28 | + {{if lps.length > 1}} | ||
| 29 | + <option value="-100">全部</option> | ||
| 30 | + {{/if}} | ||
| 31 | + {{each lps as lpName i}} | ||
| 32 | + <option value="{{lpName}}">{{lpName}}</option> | ||
| 33 | + {{/each}} | ||
| 34 | + </select> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + </div> | ||
| 38 | + </div> | ||
| 39 | + | ||
| 40 | + <div class="uk-grid"> | ||
| 41 | + <div class="uk-width-1-1"> | ||
| 42 | + <div class="uk-form-row"> | ||
| 43 | + <label class="uk-form-label" >班次 | ||
| 44 | + <hr> | ||
| 45 | + <label>全选 | ||
| 46 | + <input class="i-cbox" name="allCheck" type="checkbox" > | ||
| 47 | + </label> | ||
| 48 | + </label> | ||
| 26 | <div class="uk-form-controls sch-time-checkbox-list"> | 49 | <div class="uk-form-controls sch-time-checkbox-list"> |
| 27 | {{each list as sch i}} | 50 | {{each list as sch i}} |
| 28 | - <label {{if sch.destroy}}class="destroy-sch"{{/if}}> | 51 | + <label data-lp="{{sch.lpName}}" {{if sch.destroy}}class="destroy-sch"{{/if}}> |
| 29 | <input class="i-cbox" name="ids[]" value="{{sch.id}}" type="checkbox" {{if sch.destroy}}disabled{{/if}}> | 52 | <input class="i-cbox" name="ids[]" value="{{sch.id}}" type="checkbox" {{if sch.destroy}}disabled{{/if}}> |
| 30 | {{sch.dfsj}} | 53 | {{sch.dfsj}} |
| 31 | 54 | ||
| @@ -94,10 +117,17 @@ | @@ -94,10 +117,17 @@ | ||
| 94 | return item.clZbh == sch.clZbh; | 117 | return item.clZbh == sch.clZbh; |
| 95 | }).sort(gb_schedule_table.schedule_sort); | 118 | }).sort(gb_schedule_table.schedule_sort); |
| 96 | 119 | ||
| 120 | + //获取路牌 | ||
| 121 | + var lps = {}; | ||
| 122 | + $.each(schArr, function () { | ||
| 123 | + lps[this.lpName]=1; | ||
| 124 | + }); | ||
| 125 | + | ||
| 97 | var formHtml = template('schedule-jhlb-form-temp', { | 126 | var formHtml = template('schedule-jhlb-form-temp', { |
| 98 | sch: sch, | 127 | sch: sch, |
| 99 | list: schArr, | 128 | list: schArr, |
| 100 | - adjustExps:adjustExps | 129 | + adjustExps:adjustExps, |
| 130 | + lps: gb_common.get_keys(lps) | ||
| 101 | }); | 131 | }); |
| 102 | $('form', modal).html(formHtml); | 132 | $('form', modal).html(formHtml); |
| 103 | 133 | ||
| @@ -137,6 +167,35 @@ | @@ -137,6 +167,35 @@ | ||
| 137 | var rem=$('[name=remarks]', f); | 167 | var rem=$('[name=remarks]', f); |
| 138 | rem.val(rem.val() + $(this).val() + ',').trigger('input'); | 168 | rem.val(rem.val() + $(this).val() + ',').trigger('input'); |
| 139 | }); | 169 | }); |
| 170 | + | ||
| 171 | + //路牌切换事件 | ||
| 172 | + $('[name=lpName]', f).on('change', function () { | ||
| 173 | + var v = $(this).val(); | ||
| 174 | + var lbs = $('.sch-time-checkbox-list label', modal); | ||
| 175 | + if(v=='-100'){ | ||
| 176 | + //显示全部 | ||
| 177 | + lbs.show(); | ||
| 178 | + } | ||
| 179 | + else { | ||
| 180 | + lbs.hide().each(function () { | ||
| 181 | + if($(this).data('lp')==v) | ||
| 182 | + $(this).show(); | ||
| 183 | + else{ | ||
| 184 | + //将隐藏的checkbox取消选中 | ||
| 185 | + $(this).find('input[type=checkbox]')[0].checked=false; | ||
| 186 | + } | ||
| 187 | + }); | ||
| 188 | + } | ||
| 189 | + }); | ||
| 190 | + | ||
| 191 | + //全选 | ||
| 192 | + $('[name=allCheck]', f).on('click', function () { | ||
| 193 | + var cbs = $('.sch-time-checkbox-list label input[type=checkbox]:visible:enabled', modal); | ||
| 194 | + var status = this.checked; | ||
| 195 | + cbs.each(function () { | ||
| 196 | + this.checked = status; | ||
| 197 | + }); | ||
| 198 | + }); | ||
| 140 | }); | 199 | }); |
| 141 | })(); | 200 | })(); |
| 142 | </script> | 201 | </script> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
| @@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
| 57 | <a id="addChildTaskBtn" data-uk-tooltip title="添加子任务"><i | 57 | <a id="addChildTaskBtn" data-uk-tooltip title="添加子任务"><i |
| 58 | class="uk-icon-plus"></i> </a> | 58 | class="uk-icon-plus"></i> </a> |
| 59 | </h3> | 59 | </h3> |
| 60 | - <div class="ct_table_wrap ct_table_no_border" style="height: 142px;"> | 60 | + <div class="ct_table_wrap ct_table_no_border sub_task_table_wrap" style="height: 142px;"> |
| 61 | <div class="ct_table sub-task-table"> | 61 | <div class="ct_table sub-task-table"> |
| 62 | <div class="ct_table_head"> | 62 | <div class="ct_table_head"> |
| 63 | <dl> | 63 | <dl> |
| @@ -159,8 +159,11 @@ | @@ -159,8 +159,11 @@ | ||
| 159 | 159 | ||
| 160 | $(modal).on('init', function (e, data) { | 160 | $(modal).on('init', function (e, data) { |
| 161 | e.stopPropagation(); | 161 | e.stopPropagation(); |
| 162 | - sch = data.sch; | 162 | + //初始化滚动条 |
| 163 | + $('.main-schedule-wrap', modal).perfectScrollbar({suppressScrollX: true}); | ||
| 164 | + $('.sub_task_table_wrap', modal).perfectScrollbar({suppressScrollX: true}); | ||
| 163 | 165 | ||
| 166 | + sch = data.sch; | ||
| 164 | f = $('.search-form', modal); | 167 | f = $('.search-form', modal); |
| 165 | //线路下拉框 | 168 | //线路下拉框 |
| 166 | var opts = ''; | 169 | var opts = ''; |
| @@ -192,6 +195,8 @@ | @@ -192,6 +195,8 @@ | ||
| 192 | list: list | 195 | list: list |
| 193 | }); | 196 | }); |
| 194 | $(m_t_body, modal).html(htmlBody); | 197 | $(m_t_body, modal).html(htmlBody); |
| 198 | + //更新主任务滚动条高度 | ||
| 199 | + $('.main-schedule-wrap', modal).perfectScrollbar('update'); | ||
| 195 | $(s_t_body, modal).empty(); | 200 | $(s_t_body, modal).empty(); |
| 196 | }); | 201 | }); |
| 197 | //班次点击 | 202 | //班次点击 |
| @@ -252,6 +257,8 @@ | @@ -252,6 +257,8 @@ | ||
| 252 | sch.cTasks.sort(sub_task_sort); | 257 | sch.cTasks.sort(sub_task_sort); |
| 253 | htmlStr = template('sub_task-table-temp', {list: sch.cTasks}); | 258 | htmlStr = template('sub_task-table-temp', {list: sch.cTasks}); |
| 254 | tbody.html(htmlStr); | 259 | tbody.html(htmlStr); |
| 260 | + //更新子任务滚动条高度 | ||
| 261 | + $('.sub_task_table_wrap', modal).perfectScrollbar('update'); | ||
| 255 | //字典转换 | 262 | //字典转换 |
| 256 | dictionaryUtils.transformDom($('.nt-dictionary', tbody)); | 263 | dictionaryUtils.transformDom($('.nt-dictionary', tbody)); |
| 257 | 264 | ||
| @@ -295,7 +302,7 @@ | @@ -295,7 +302,7 @@ | ||
| 295 | var sch = getActiveSch(); | 302 | var sch = getActiveSch(); |
| 296 | if (!sch || !sch.sflj) | 303 | if (!sch || !sch.sflj) |
| 297 | return notify_err('只能删除临加班次!'); | 304 | return notify_err('只能删除临加班次!'); |
| 298 | - var str = '<h3>确定要删除临加班次<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>?</h3>'; | 305 | + var str = '<h3>确定要删除临加班次<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>?</h3><h5 style="color: #6c6c6c;font-size: 12px;">如果删除失败,可能正处于调度指令下行上达瞬间,等几秒再删即可。班次删除后,调度指令会保留</h5>'; |
| 299 | alt_confirm(str, function () { | 306 | alt_confirm(str, function () { |
| 300 | gb_common.$del('/realSchedule/' + sch.id, function (rs) { | 307 | gb_common.$del('/realSchedule/' + sch.id, function (rs) { |
| 301 | //前端数据更新 | 308 | //前端数据更新 |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/multi_tzrc.html
| 1 | -<div class="uk-modal ct_move_modal" id="schedule-multi-tzrc-modal"> | 1 | +<div class="uk-modal" id="schedule-multi-tzrc-modal"> |
| 2 | <div class="drag-container"></div> | 2 | <div class="drag-container"></div> |
| 3 | <div class="uk-modal-dialog" style="width: 860px;"> | 3 | <div class="uk-modal-dialog" style="width: 860px;"> |
| 4 | <a href="" class="uk-modal-close uk-close"></a> | 4 | <a href="" class="uk-modal-close uk-close"></a> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/tzrc.html
| @@ -122,6 +122,8 @@ | @@ -122,6 +122,8 @@ | ||
| 122 | e.stopPropagation(); | 122 | e.stopPropagation(); |
| 123 | sch = data.sch; | 123 | sch = data.sch; |
| 124 | 124 | ||
| 125 | + //滚动条 | ||
| 126 | + $('.tzrc-table-wrap', modal).perfectScrollbar(); | ||
| 125 | //线路下拉框 | 127 | //线路下拉框 |
| 126 | var opts = ''; | 128 | var opts = ''; |
| 127 | $.each(gb_data_basic.activeLines, function () { | 129 | $.each(gb_data_basic.activeLines, function () { |
| @@ -146,6 +148,8 @@ | @@ -146,6 +148,8 @@ | ||
| 146 | list: list | 148 | list: list |
| 147 | }); | 149 | }); |
| 148 | $('.sch-tzrc-table .ct_table_body', modal).html(htmlBody); | 150 | $('.sch-tzrc-table .ct_table_body', modal).html(htmlBody); |
| 151 | + //更新滚动条高度 | ||
| 152 | + $('.tzrc-table-wrap', modal).perfectScrollbar('update'); | ||
| 149 | }); | 153 | }); |
| 150 | 154 | ||
| 151 | $(modal).on('click', '.sch-tzrc-table .ct_table_body dl input[type=checkbox]', function () { | 155 | $(modal).on('click', '.sch-tzrc-table .ct_table_body dl input[type=checkbox]', function () { |
src/main/resources/static/real_control_v2/fragments/north/nav/curr_date_schedule.html
| @@ -83,7 +83,10 @@ | @@ -83,7 +83,10 @@ | ||
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | #curr-date-schedule-modal .line_list_ul li.active{ | 85 | #curr-date-schedule-modal .line_list_ul li.active{ |
| 86 | - background: #93d1ff; | 86 | + background: #009dd8; |
| 87 | + color: #fff; | ||
| 88 | + box-shadow: inset 0 2px 4px rgba(0,0,0,.2); | ||
| 89 | + text-shadow: 0 -1px 0 rgba(0,0,0,.2); | ||
| 87 | } | 90 | } |
| 88 | </style> | 91 | </style> |
| 89 | 92 | ||
| @@ -98,7 +101,7 @@ | @@ -98,7 +101,7 @@ | ||
| 98 | </ul> | 101 | </ul> |
| 99 | </div> | 102 | </div> |
| 100 | <div class="uk-width-medium-9-10"> | 103 | <div class="uk-width-medium-9-10"> |
| 101 | - <div class="ct_table_wrap" style="height: 460px;"> | 104 | + <div class="ct_table_wrap" style="height: 520px;"> |
| 102 | <div class="ct_table curr-schedule-table"> | 105 | <div class="ct_table curr-schedule-table"> |
| 103 | <div class="ct_table_head"> | 106 | <div class="ct_table_head"> |
| 104 | <dl> | 107 | <dl> |
| @@ -192,6 +195,10 @@ | @@ -192,6 +195,10 @@ | ||
| 192 | 195 | ||
| 193 | //默认点击第一个 | 196 | //默认点击第一个 |
| 194 | $('.line_list_ul li:eq(0)', modal).trigger('click'); | 197 | $('.line_list_ul li:eq(0)', modal).trigger('click'); |
| 198 | + //滚动条 | ||
| 199 | + $('.ct_table_wrap', modal).perfectScrollbar(); | ||
| 200 | + //固定头部 | ||
| 201 | + gb_ct_table.fixedHead($('.ct_table_wrap', modal)); | ||
| 195 | }); | 202 | }); |
| 196 | 203 | ||
| 197 | $(modal).on('click', '.line_list_ul li', function () { | 204 | $(modal).on('click', '.line_list_ul li', function () { |
| @@ -203,7 +210,6 @@ | @@ -203,7 +210,6 @@ | ||
| 203 | var query = function (lineCode) { | 210 | var query = function (lineCode) { |
| 204 | $.get('/realSchedule/currSchedulePlanByLineCode', {lineCode: lineCode}, function (rs) { | 211 | $.get('/realSchedule/currSchedulePlanByLineCode', {lineCode: lineCode}, function (rs) { |
| 205 | 212 | ||
| 206 | - | ||
| 207 | var data=[]; | 213 | var data=[]; |
| 208 | //先按路牌分组 | 214 | //先按路牌分组 |
| 209 | var lpMapData = gb_common.groupBy(rs, 'lpName'); | 215 | var lpMapData = gb_common.groupBy(rs, 'lpName'); |
| @@ -214,6 +220,9 @@ | @@ -214,6 +220,9 @@ | ||
| 214 | 220 | ||
| 215 | var htmlStr = template('curr_schedule_list-temp', {list: data}); | 221 | var htmlStr = template('curr_schedule_list-temp', {list: data}); |
| 216 | $('.ct_table_body', modal).html(htmlStr); | 222 | $('.ct_table_body', modal).html(htmlStr); |
| 223 | + | ||
| 224 | + //更新滚动条 | ||
| 225 | + $('.ct_table_wrap', modal).perfectScrollbar('update'); | ||
| 217 | }); | 226 | }); |
| 218 | }; | 227 | }; |
| 219 | 228 |
src/main/resources/static/real_control_v2/fragments/north/nav/dataManager/cars_move.html
0 → 100644
| 1 | +<div class="uk-modal ct_move_modal" id="data_manager_car_move-modal"> | ||
| 2 | + <div class="uk-modal-dialog" style="width: 1100px;"> | ||
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | ||
| 4 | + <div class="uk-modal-header"> | ||
| 5 | + <h2>车辆设备数据迁移</h2></div> | ||
| 6 | + | ||
| 7 | + <div class="uk-alert uk-alert-warning"> | ||
| 8 | + 1、新老系统的车辆清单均基于线路配车,你必须保证新老系统的线路配车是一致的。<br> | ||
| 9 | + 2、只更新车辆当前的设备号,不同步历史的设备变迁记录。 | ||
| 10 | + </div> | ||
| 11 | + <div class="uk-grid"> | ||
| 12 | + <div class="uk-width-1-5"> | ||
| 13 | + <ul class="uk-nav uk-nav-side line_list" > | ||
| 14 | + </ul> | ||
| 15 | + </div> | ||
| 16 | + <div class="uk-width-4-5 uk-grid table-wrap" id="carDataTables" style="height: 450px;overflow: auto;position: relative;"> | ||
| 17 | + <div class="uk-width-1-2"> | ||
| 18 | + <div> | ||
| 19 | + <table class="uk-table uk-table-hover nowTable"> | ||
| 20 | + <caption style="color: #2795ed;" >新系统数据</caption> | ||
| 21 | + <thead> | ||
| 22 | + <tr> | ||
| 23 | + <th>车辆自编号</th> | ||
| 24 | + <th>设备编号</th> | ||
| 25 | + </tr> | ||
| 26 | + </thead> | ||
| 27 | + <tbody> | ||
| 28 | + </tbody> | ||
| 29 | + </table> | ||
| 30 | + </div> | ||
| 31 | + </div> | ||
| 32 | + <div class="uk-width-1-2"> | ||
| 33 | + <div> | ||
| 34 | + <table class="uk-table uk-table-hover oldTable"> | ||
| 35 | + <caption >老系统数据</caption> | ||
| 36 | + <thead> | ||
| 37 | + <tr> | ||
| 38 | + <th>车辆自编号</th> | ||
| 39 | + <th>设备编号</th> | ||
| 40 | + </tr> | ||
| 41 | + </thead> | ||
| 42 | + <tbody> | ||
| 43 | + </tbody> | ||
| 44 | + </table> | ||
| 45 | + </div> | ||
| 46 | + </div> | ||
| 47 | + </div> | ||
| 48 | + </div> | ||
| 49 | + | ||
| 50 | + <div class="uk-modal-footer uk-text-right"> | ||
| 51 | + <em style="margin-right: 15px;">设备号不同的车辆数:<span id="diffCount"></span></em> | ||
| 52 | + <button type="button" class="uk-button uk-modal-close">取消</button> | ||
| 53 | + <button type="button" class="uk-button uk-button-primary" id="synchroDevicesBtn">更新设备号有差异的数据</button> | ||
| 54 | + </div> | ||
| 55 | + </div> | ||
| 56 | + | ||
| 57 | + <script id="data_manager_car_move-table-temp" type="text/html"> | ||
| 58 | + {{each list as car i}} | ||
| 59 | + <tr data-nbbm="{{car.nbbm}}" data-device="{{car.device}}" {{if car.flag=='now_non-existent'}}style="color:red;"{{/if}}> | ||
| 60 | + <td>{{car.nbbm}}</td> | ||
| 61 | + <td {{if car.flag=='device_unequal'}}style="color:red;"{{/if}}>{{car.device}}</td> | ||
| 62 | + </tr> | ||
| 63 | + {{/each}} | ||
| 64 | + </script> | ||
| 65 | + | ||
| 66 | + <script> | ||
| 67 | + (function() { | ||
| 68 | + var modal = '#data_manager_car_move-modal', | ||
| 69 | + $ul = $('.line_list', modal), | ||
| 70 | + nowArray, oldArray; | ||
| 71 | + | ||
| 72 | + $(modal).on('init', function(e, data) { | ||
| 73 | + e.stopPropagation(); | ||
| 74 | + | ||
| 75 | + //左侧线路list | ||
| 76 | + var lis = ''; | ||
| 77 | + $.each(gb_data_basic.activeLines, function () { | ||
| 78 | + lis += '<li data-id="'+this.id+'"><a>'+this.name+'</a></li>'; | ||
| 79 | + }); | ||
| 80 | + $ul.html(lis); | ||
| 81 | + | ||
| 82 | + //线路点击事件 | ||
| 83 | + $('li', $ul).on('click', function () { | ||
| 84 | + if(loading) | ||
| 85 | + return; | ||
| 86 | + $('li.uk-active', $ul).removeClass('uk-active'); | ||
| 87 | + $(this).addClass('uk-active'); | ||
| 88 | + //加载车辆数据 | ||
| 89 | + queryCarInfo($(this).data('id')); | ||
| 90 | + }); | ||
| 91 | + | ||
| 92 | + //初始化滚动条 | ||
| 93 | + $('.table-wrap', modal).perfectScrollbar({suppressScrollX: true}); | ||
| 94 | + | ||
| 95 | + //默认点击第一条线路 | ||
| 96 | + $('li:eq(0)', $ul).trigger('click'); | ||
| 97 | + }); | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * 加载车辆数据 | ||
| 101 | + * @param lineCode | ||
| 102 | + */ | ||
| 103 | + var loading, deviceUnequalCount; | ||
| 104 | + function queryCarInfo(lineId) { | ||
| 105 | + loading = true; | ||
| 106 | + deviceUnequalCount = 0; | ||
| 107 | + gb_common.$get('/dataManager/cars/old_now', {lineId: lineId}, function (rs) { | ||
| 108 | + console.log('数据迁移 -车辆数据', rs); | ||
| 109 | + nowArray = rs.nows; | ||
| 110 | + oldArray = rs.olds; | ||
| 111 | + $.each(rs.olds, function () { | ||
| 112 | + var car = searchDevices(rs.nows, this.nbbm); | ||
| 113 | + if(!car) | ||
| 114 | + this.flag = 'now_non-existent';//在新系统不存在的车辆 | ||
| 115 | + else if(car.device != this.device){ | ||
| 116 | + car.flag = 'device_unequal'; | ||
| 117 | + deviceUnequalCount ++; | ||
| 118 | + } | ||
| 119 | + }); | ||
| 120 | + | ||
| 121 | + //按新系统数据车辆自编号排序 | ||
| 122 | + rs.nows.sort(function (a, b) { | ||
| 123 | + return a.nbbm.localeCompare(b.nbbm); | ||
| 124 | + }); | ||
| 125 | + | ||
| 126 | + //老系统数据对应新系统顺序,多的放后面 | ||
| 127 | + var ks = {}; | ||
| 128 | + $.each(rs.nows, function (i) { | ||
| 129 | + ks[this.nbbm] = i; | ||
| 130 | + }); | ||
| 131 | + rs.olds.sort(function (a, b) { | ||
| 132 | + return ks[a.nbbm] - ks[b.nbbm]; | ||
| 133 | + }); | ||
| 134 | + | ||
| 135 | + //渲染新系统表格 | ||
| 136 | + var htmlStr = template('data_manager_car_move-table-temp', {list: rs.nows}); | ||
| 137 | + $('.nowTable tbody', modal).html(htmlStr); | ||
| 138 | + | ||
| 139 | + //渲染老系统表格 | ||
| 140 | + var htmlStr = template('data_manager_car_move-table-temp', {list: rs.olds}); | ||
| 141 | + $('.oldTable tbody', modal).html(htmlStr); | ||
| 142 | + | ||
| 143 | + $('#diffCount', modal).text(deviceUnequalCount); | ||
| 144 | + if(deviceUnequalCount==0) | ||
| 145 | + $('#synchroDevicesBtn', modal).attr('disabled', 'disabled'); | ||
| 146 | + else | ||
| 147 | + $('#synchroDevicesBtn', modal).removeAttr('disabled'); | ||
| 148 | + loading = false; | ||
| 149 | + }); | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + function searchDevices(array, nbbm) { | ||
| 153 | + for(var i =0,item; item=array[i++];){ | ||
| 154 | + if(item.nbbm == nbbm) | ||
| 155 | + return item; | ||
| 156 | + } | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + /** | ||
| 160 | + * 同步数据 | ||
| 161 | + */ | ||
| 162 | + $('#synchroDevicesBtn', modal).on('click', function () { | ||
| 163 | + $(this).attr('disabled', 'disabled'); | ||
| 164 | + var data = []; | ||
| 165 | + $.each(oldArray, function () { | ||
| 166 | + var car = searchDevices(nowArray, this.nbbm); | ||
| 167 | + if(car.device != this.device){ | ||
| 168 | + data.push({ | ||
| 169 | + nbbm: this.nbbm, | ||
| 170 | + device: this.device | ||
| 171 | + }); | ||
| 172 | + } | ||
| 173 | + }); | ||
| 174 | + | ||
| 175 | + gb_common.$post('/dataManager/car/updateDevices', {jsonStr: JSON.stringify(data)}, function (rs) { | ||
| 176 | + notify_succ('成功更新' + rs.count + '辆车的设备号!'); | ||
| 177 | + //$(this).removeAttr('disabled'); | ||
| 178 | + //刷新表格 | ||
| 179 | + queryCarInfo($('li.uk-active', $ul).data('id')); | ||
| 180 | + }); | ||
| 181 | + }); | ||
| 182 | + })(); | ||
| 183 | + </script> | ||
| 184 | +</div> |
src/main/resources/static/real_control_v2/fragments/north/nav/dataManager/dataMoveAndVerification.html
0 → 100644
| 1 | +<div class="uk-modal" id="data-move-verification-modal"> | ||
| 2 | + <div class="uk-modal-dialog" style="width: 650px;"> | ||
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | ||
| 4 | + <h2>数据迁移和校验</h2> | ||
| 5 | + | ||
| 6 | + <div class="uk-grid" data-uk-grid-margin> | ||
| 7 | + <div class="uk-width-medium-1-3"> | ||
| 8 | + <a class="uk-panel uk-panel-hover detail_panel" data-href="/real_control_v2/fragments/north/nav/dataManager/cars_move.html"> | ||
| 9 | + <h3 class="uk-panel-title">车辆数据</h3> | ||
| 10 | + 对照老系统的车辆设备信息,并增量更新到新系统 | ||
| 11 | + </a> | ||
| 12 | + </div> | ||
| 13 | + <div class="uk-width-medium-1-3"> | ||
| 14 | + <a class="uk-panel uk-panel-hover" > | ||
| 15 | + <h3 class="uk-panel-title">人员数据</h3> | ||
| 16 | + 对照老系统的人员信息,并增量更新到新系统 <code>不可用</code> | ||
| 17 | + </a> | ||
| 18 | + </div> | ||
| 19 | + <div class="uk-width-medium-1-3"> | ||
| 20 | + <a class="uk-panel uk-panel-hover"> | ||
| 21 | + <h3 class="uk-panel-title">路单数据</h3> | ||
| 22 | + 将老系统指定日期的路单同步到新系统,全量覆盖 <code>不可用</code> | ||
| 23 | + </a> | ||
| 24 | + </div> | ||
| 25 | + </div> | ||
| 26 | + | ||
| 27 | + </div> | ||
| 28 | + | ||
| 29 | + | ||
| 30 | + <script> | ||
| 31 | + (function () { | ||
| 32 | + var modal = '#data-move-verification-modal'; | ||
| 33 | + $(modal).on('init', function (e, data) { | ||
| 34 | + e.stopPropagation(); | ||
| 35 | + | ||
| 36 | + $('.detail_panel', modal).on('click', function () { | ||
| 37 | + var href = $(this).data('href'); | ||
| 38 | + if(!href) | ||
| 39 | + return; | ||
| 40 | + | ||
| 41 | + open_modal(href, {}, {center: false, bgclose: false, modal: false}); | ||
| 42 | + }); | ||
| 43 | + }); | ||
| 44 | + })(); | ||
| 45 | + </script> | ||
| 46 | +</div> | ||
| 0 | \ No newline at end of file | 47 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/north/tabs.html
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <li class="uk-active" ><a>主页</a></li> | 4 | <li class="uk-active" ><a>主页</a></li> |
| 5 | <li id="north_tabs_map_btn"><a>地图</a></li> | 5 | <li id="north_tabs_map_btn"><a>地图</a></li> |
| 6 | {{each list as line i}} | 6 | {{each list as line i}} |
| 7 | - <li class="tab-line"><a>{{line.name}}(<span id="badge_untreated_num_{{line.lineCode}}">0</span>, <span id="badge_yfwf_num_{{line.lineCode}}">0</span>)</a></li> | 7 | + <li class="tab-line" data-code="{{line.lineCode}}"><a>{{line.name}}(<span id="badge_untreated_num_{{line.lineCode}}">0</span>, <span id="badge_yfwf_num_{{line.lineCode}}">0</span>)</a></li> |
| 8 | {{/each}} | 8 | {{/each}} |
| 9 | </ul> | 9 | </ul> |
| 10 | </script> | 10 | </script> |
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
| @@ -26,6 +26,15 @@ | @@ -26,6 +26,15 @@ | ||
| 26 | "id": 1.4, | 26 | "id": 1.4, |
| 27 | "text": "历史班次维护", | 27 | "text": "历史班次维护", |
| 28 | "event": "history_sch_maintain" | 28 | "event": "history_sch_maintain" |
| 29 | + }, | ||
| 30 | + { | ||
| 31 | + "id": 1.5, | ||
| 32 | + "divider": true | ||
| 33 | + }, | ||
| 34 | + { | ||
| 35 | + "id": 1.6, | ||
| 36 | + "text": "数据迁移和校验工具", | ||
| 37 | + "event": "data_move_and_verification" | ||
| 29 | } | 38 | } |
| 30 | ], | 39 | ], |
| 31 | [ | 40 | [ |
src/main/resources/static/real_control_v2/js/forms/wrap.html
| @@ -16,7 +16,6 @@ | @@ -16,7 +16,6 @@ | ||
| 16 | <link href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css" | 16 | <link href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css" |
| 17 | rel="stylesheet" type="text/css"/> | 17 | rel="stylesheet" type="text/css"/> |
| 18 | 18 | ||
| 19 | - | ||
| 20 | <!-- jQuery --> | 19 | <!-- jQuery --> |
| 21 | <script src="/metronic_v4.5.4/plugins/jquery.min.js"></script> | 20 | <script src="/metronic_v4.5.4/plugins/jquery.min.js"></script> |
| 22 | <script src="/assets/plugins/pinyin.js"></script> | 21 | <script src="/assets/plugins/pinyin.js"></script> |
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
| @@ -22,6 +22,10 @@ var gb_schedule_context_menu = (function () { | @@ -22,6 +22,10 @@ var gb_schedule_context_menu = (function () { | ||
| 22 | var list = schArray.filter(function (sch) { | 22 | var list = schArray.filter(function (sch) { |
| 23 | return sch.bcType != 'out' && sch.bcType != 'in' && sch.fcsjActual == null; | 23 | return sch.bcType != 'out' && sch.bcType != 'in' && sch.fcsjActual == null; |
| 24 | }); | 24 | }); |
| 25 | + if(list.length == 0){ | ||
| 26 | + notify_err('没有需要调整的班次!'); | ||
| 27 | + return; | ||
| 28 | + } | ||
| 25 | open_modal(folder + '/multi_dftz.html', { | 29 | open_modal(folder + '/multi_dftz.html', { |
| 26 | list: list | 30 | list: list |
| 27 | }, modal_opts); | 31 | }, modal_opts); |
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
| @@ -8,7 +8,32 @@ var gb_schedule_table = (function () { | @@ -8,7 +8,32 @@ var gb_schedule_table = (function () { | ||
| 8 | //车辆应发未发车辆数 | 8 | //车辆应发未发车辆数 |
| 9 | var car_yfwf_map = {}; | 9 | var car_yfwf_map = {}; |
| 10 | var schedule_sort = function (s1, s2) { | 10 | var schedule_sort = function (s1, s2) { |
| 11 | - return s1.dfsjT - s2.dfsjT; | 11 | + return s1.fcsjT - s2.fcsjT; |
| 12 | + }; | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * 检查是否存在重复班次 | ||
| 16 | + * @param list | ||
| 17 | + */ | ||
| 18 | + var isRepeatData = function (list) { | ||
| 19 | + try { | ||
| 20 | + var map = {}, reps = []; | ||
| 21 | + for(var i = 0,sch;sch=list[i++];){ | ||
| 22 | + if(map[sch.id]){ | ||
| 23 | + reps.push(sch.clZbh); | ||
| 24 | + } | ||
| 25 | + map[sch.id] = sch; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + //通知服务端数据有异常 | ||
| 29 | + $.each(reps, function () { | ||
| 30 | + $.post('/anomalyCheck/schRepeat', {nbbm: this}); | ||
| 31 | + }); | ||
| 32 | + }catch (e){ | ||
| 33 | + return list; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + return gb_common.get_vals(map); | ||
| 12 | }; | 37 | }; |
| 13 | 38 | ||
| 14 | var show = function (cb) { | 39 | var show = function (cb) { |
| @@ -17,9 +42,12 @@ var gb_schedule_table = (function () { | @@ -17,9 +42,12 @@ var gb_schedule_table = (function () { | ||
| 17 | lines: gb_data_basic.line_idx | 42 | lines: gb_data_basic.line_idx |
| 18 | }, function (rs) { | 43 | }, function (rs) { |
| 19 | for (var lineCode in rs) { | 44 | for (var lineCode in rs) { |
| 45 | + line2Schedule[lineCode] = {}; | ||
| 46 | + //------是否有重复班次 #临时代码,为服务端提供诊断信息已解决这个问题 | ||
| 47 | + rs[lineCode] = isRepeatData(rs[lineCode]); | ||
| 48 | + | ||
| 20 | //排序 | 49 | //排序 |
| 21 | rs[lineCode].sort(schedule_sort); | 50 | rs[lineCode].sort(schedule_sort); |
| 22 | - line2Schedule[lineCode] = {}; | ||
| 23 | //calc shift | 51 | //calc shift |
| 24 | $.each(rs[lineCode], function () { | 52 | $.each(rs[lineCode], function () { |
| 25 | calc_sch_real_shift(this); | 53 | calc_sch_real_shift(this); |
| @@ -54,7 +82,8 @@ var gb_schedule_table = (function () { | @@ -54,7 +82,8 @@ var gb_schedule_table = (function () { | ||
| 54 | list: dirData[upDown] | 82 | list: dirData[upDown] |
| 55 | }); | 83 | }); |
| 56 | 84 | ||
| 57 | - $('.schedule-wrap .card-panel:eq(' + upDown + ')', this).html(htmlStr); | 85 | + $('.schedule-wrap .card-panel:eq(' + upDown + ')', this) |
| 86 | + .html(htmlStr); | ||
| 58 | } | 87 | } |
| 59 | 88 | ||
| 60 | //标记车辆最后一个班次 | 89 | //标记车辆最后一个班次 |
| @@ -63,6 +92,8 @@ var gb_schedule_table = (function () { | @@ -63,6 +92,8 @@ var gb_schedule_table = (function () { | ||
| 63 | gb_sch_legend.init(this); | 92 | gb_sch_legend.init(this); |
| 64 | }); | 93 | }); |
| 65 | var content = $('.line_schedule .ct_table_wrap'); | 94 | var content = $('.line_schedule .ct_table_wrap'); |
| 95 | + //初始化滚动条 | ||
| 96 | + content.perfectScrollbar({suppressScrollX: true}); | ||
| 66 | //fixed table head | 97 | //fixed table head |
| 67 | gb_ct_table.fixedHead(content); | 98 | gb_ct_table.fixedHead(content); |
| 68 | //enable sort | 99 | //enable sort |
| @@ -153,27 +184,6 @@ var gb_schedule_table = (function () { | @@ -153,27 +184,6 @@ var gb_schedule_table = (function () { | ||
| 153 | 184 | ||
| 154 | //重新渲染表格 | 185 | //重新渲染表格 |
| 155 | reRenderTable(sch.xlBm); | 186 | reRenderTable(sch.xlBm); |
| 156 | - /*//重新渲染表格 | ||
| 157 | - var data = gb_common.get_vals(line2Schedule[sch.xlBm]).sort(schedule_sort), | ||
| 158 | - dirData = gb_common.groupBy(data, 'xlDir'), | ||
| 159 | - tabCont = $('li.line_schedule[data-id=' + sch.xlBm + ']'); | ||
| 160 | - | ||
| 161 | - for (var upDown in dirData) { | ||
| 162 | - htmlStr = temps['line-schedule-table-temp']({ | ||
| 163 | - dir: upDown, | ||
| 164 | - line: gb_data_basic.codeToLine[sch.xlBm], | ||
| 165 | - list: dirData[upDown] | ||
| 166 | - }); | ||
| 167 | - $('.schedule-wrap .card-panel:eq(' + upDown + ')', tabCont).html(htmlStr); | ||
| 168 | - } | ||
| 169 | - //图例相关 | ||
| 170 | - gb_sch_legend.init(tabCont); | ||
| 171 | - //标记末班 | ||
| 172 | - markerLastByLine(sch.xlBm); | ||
| 173 | - //计算应发未发 | ||
| 174 | - calc_yfwf_num(sch.xlBm); | ||
| 175 | - //重新固定表头 | ||
| 176 | - gb_ct_table.fixedHead($('.line_schedule .ct_table_wrap'));*/ | ||
| 177 | //定位到新添加的班次 | 187 | //定位到新添加的班次 |
| 178 | scroToDl(sch); | 188 | scroToDl(sch); |
| 179 | }; | 189 | }; |
| @@ -206,7 +216,16 @@ var gb_schedule_table = (function () { | @@ -206,7 +216,16 @@ var gb_schedule_table = (function () { | ||
| 206 | //计算应发未发 | 216 | //计算应发未发 |
| 207 | calc_yfwf_num(lineCode); | 217 | calc_yfwf_num(lineCode); |
| 208 | //重新固定表头 | 218 | //重新固定表头 |
| 209 | - gb_ct_table.fixedHead($('.line_schedule .ct_table_wrap')); | 219 | + gb_ct_table.fixedHead($('.schedule-wrap .ct_table_wrap', tabCont)); |
| 220 | + | ||
| 221 | + //重新初始化排序 | ||
| 222 | + gb_ct_table.enableSort($('.ct_table', tabCont), reset_seq_no, gb_schedule_table_dbclick.init); | ||
| 223 | + //重新初始化双击待发调整 | ||
| 224 | + gb_schedule_table_dbclick.init(); | ||
| 225 | + //重新初始化双击实发发车信息微调 | ||
| 226 | + gb_schedule_table_dbclick.sfsjCellClick($('dd.fcsjActualCell', tabCont)); | ||
| 227 | + //滚动条 | ||
| 228 | + $('.schedule-wrap .ct_table_wrap', tabCont).perfectScrollbar({suppressScrollX: true}); | ||
| 210 | } | 229 | } |
| 211 | }; | 230 | }; |
| 212 | 231 | ||
| @@ -518,7 +537,7 @@ var gb_schedule_table = (function () { | @@ -518,7 +537,7 @@ var gb_schedule_table = (function () { | ||
| 518 | } | 537 | } |
| 519 | } | 538 | } |
| 520 | }; | 539 | }; |
| 521 | - | 540 | + |
| 522 | /** 添加备注信息 */ | 541 | /** 添加备注信息 */ |
| 523 | var addRemarks = function (list, remarks) { | 542 | var addRemarks = function (list, remarks) { |
| 524 | //if(!list || list) | 543 | //if(!list || list) |
src/main/resources/static/real_control_v2/js/main.js
| @@ -49,7 +49,7 @@ var gb_main_ep = new EventProxy(), | @@ -49,7 +49,7 @@ var gb_main_ep = new EventProxy(), | ||
| 49 | $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html'); | 49 | $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html'); |
| 50 | }, 1000); | 50 | }, 1000); |
| 51 | //弹出更新说明 | 51 | //弹出更新说明 |
| 52 | - //showUpdateDescription(); | 52 | + showUpdateDescription(); |
| 53 | }); | 53 | }); |
| 54 | 54 | ||
| 55 | function g_emit(id) { | 55 | function g_emit(id) { |
| @@ -171,8 +171,8 @@ var disabled_submit_btn = function (form) { | @@ -171,8 +171,8 @@ var disabled_submit_btn = function (form) { | ||
| 171 | function showUpdateDescription() { | 171 | function showUpdateDescription() { |
| 172 | //更新说明 | 172 | //更新说明 |
| 173 | var updateDescription = { | 173 | var updateDescription = { |
| 174 | - date: '2017-01-07', | ||
| 175 | - text: '<h5>1、出场子任务开放使用。</h5><h5>2、班次直放调整后可再次修改班次类型。</h5><h5>3、双击实发,可打开发车信息微调,发车信息微调界面可以直接烂班。</h5><h5>4、主页模拟图可以省略、重命名站点。</h5>' | 174 | + date: '2017-04-18', |
| 175 | + text: '<h5>可在 菜单栏 数据&统计→ 数据迁移和校验→ 车辆数据 功能内同步老系统的车辆设备号</h5>' | ||
| 176 | }; | 176 | }; |
| 177 | 177 | ||
| 178 | var storage = window.localStorage | 178 | var storage = window.localStorage |
src/main/resources/static/real_control_v2/js/north/tabs.js
| @@ -24,6 +24,15 @@ var gb_tabs = (function() { | @@ -24,6 +24,15 @@ var gb_tabs = (function() { | ||
| 24 | } | 24 | } |
| 25 | }); | 25 | }); |
| 26 | 26 | ||
| 27 | + //班次选项卡第一次点击,更新滚动条高度 | ||
| 28 | + $('.north-tabs .uk-tab li.tab-line').one('click', function(e){ | ||
| 29 | + var code = $(this).data('code'); | ||
| 30 | + setTimeout(function () { | ||
| 31 | + $('.main-container .line_schedule[data-id='+code+'] .schedule-wrap .ct_table_wrap') | ||
| 32 | + .perfectScrollbar('update'); | ||
| 33 | + }, 200); | ||
| 34 | + }); | ||
| 35 | + | ||
| 27 | cb && cb(); | 36 | cb && cb(); |
| 28 | }); | 37 | }); |
| 29 | }; | 38 | }; |
src/main/resources/static/real_control_v2/js/north/toolbar.js
| @@ -191,6 +191,9 @@ var gb_northToolbar = (function () { | @@ -191,6 +191,9 @@ var gb_northToolbar = (function () { | ||
| 191 | }, | 191 | }, |
| 192 | safe_driving: function () { | 192 | safe_driving: function () { |
| 193 | open_modal('/real_control_v2/fragments/north/nav/safeDriving.html', {}, modal_opts); | 193 | open_modal('/real_control_v2/fragments/north/nav/safeDriving.html', {}, modal_opts); |
| 194 | + }, | ||
| 195 | + data_move_and_verification: function () { | ||
| 196 | + open_modal('/real_control_v2/fragments/north/nav/dataManager/dataMoveAndVerification.html', {}, modal_opts); | ||
| 194 | } | 197 | } |
| 195 | }; | 198 | }; |
| 196 | 199 |
src/main/resources/static/real_control_v2/main.html
| @@ -5,16 +5,17 @@ | @@ -5,16 +5,17 @@ | ||
| 5 | <meta charset="UTF-8"> | 5 | <meta charset="UTF-8"> |
| 6 | <title>线路调度 v2.0</title> | 6 | <title>线路调度 v2.0</title> |
| 7 | <!-- uikit core style--> | 7 | <!-- uikit core style--> |
| 8 | - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css" merge="uikit"/> | ||
| 9 | - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" merge="uikit"/> | ||
| 10 | - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" merge="uikit"/> | 8 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css" /> |
| 9 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" merge="plugins"/> | ||
| 10 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" merge="plugins"/> | ||
| 11 | <link rel="stylesheet" | 11 | <link rel="stylesheet" |
| 12 | - href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" merge="uikit"/> | ||
| 13 | - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css" merge="uikit"/> | ||
| 14 | - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css" merge="uikit"/> | 12 | + href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" merge="plugins"/> |
| 13 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css" merge="plugins"/> | ||
| 14 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css" merge="plugins"/> | ||
| 15 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.gradient.min.css" merge="plugins"/> | ||
| 15 | 16 | ||
| 16 | <!-- main style --> | 17 | <!-- main style --> |
| 17 | - <link rel="stylesheet" href="/real_control_v2/css/main.css" merge="custom_style"/> | 18 | + <link rel="stylesheet" href="/real_control_v2/css/main.css" /> |
| 18 | <!-- north style --> | 19 | <!-- north style --> |
| 19 | <link rel="stylesheet" href="/real_control_v2/css/north.css" merge="custom_style"/> | 20 | <link rel="stylesheet" href="/real_control_v2/css/north.css" merge="custom_style"/> |
| 20 | <!-- home style --> | 21 | <!-- home style --> |
| @@ -25,16 +26,18 @@ | @@ -25,16 +26,18 @@ | ||
| 25 | <!-- custom table --> | 26 | <!-- custom table --> |
| 26 | <link rel="stylesheet" href="/real_control_v2/css/ct_table.css" merge="custom_style"/> | 27 | <link rel="stylesheet" href="/real_control_v2/css/ct_table.css" merge="custom_style"/> |
| 27 | <!-- jquery contextMenu style --> | 28 | <!-- jquery contextMenu style --> |
| 28 | - <link rel="stylesheet" href="/real_control_v2/assets/css/jquery.contextMenu.min.css" /> | 29 | + <link rel="stylesheet" href="/real_control_v2/assets/css/jquery.contextMenu.min.css" merge="plugins"/> |
| 29 | <!-- formvalidation style --> | 30 | <!-- formvalidation style --> |
| 30 | - <link rel="stylesheet" href="/real_control_v2/assets/plugins/formvalidation/formValidation.min.css"/> | 31 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/formvalidation/formValidation.min.css" merge="plugins"/> |
| 31 | <!-- js tree --> | 32 | <!-- js tree --> |
| 32 | - <link rel="stylesheet" href="/real_control_v2/assets/plugins/jstree/default/style.min.css"/> | 33 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/jstree/default/style.css" merge="plugins"/> |
| 33 | <!-- tooltip css--> | 34 | <!-- tooltip css--> |
| 34 | - <link rel="stylesheet" href="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.css"/> | ||
| 35 | - <link rel="stylesheet" href="/real_control_v2/css/pace.css"/> | 35 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.css" merge="plugins"/> |
| 36 | + <link rel="stylesheet" href="/real_control_v2/css/pace.css" merge="plugins"/> | ||
| 36 | 37 | ||
| 37 | <link rel="stylesheet" href="/real_control_v2/css/modal_extend.css" merge="custom_style"/> | 38 | <link rel="stylesheet" href="/real_control_v2/css/modal_extend.css" merge="custom_style"/> |
| 39 | + <!-- perfect-scrollbar style --> | ||
| 40 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" merge="plugins"/> | ||
| 38 | </head> | 41 | </head> |
| 39 | 42 | ||
| 40 | <body> | 43 | <body> |
| @@ -43,7 +46,7 @@ | @@ -43,7 +46,7 @@ | ||
| 43 | <div class="uk-width-4-10"> | 46 | <div class="uk-width-4-10"> |
| 44 | <div class="uk-panel"> | 47 | <div class="uk-panel"> |
| 45 | <h2 class="north-logo"> | 48 | <h2 class="north-logo"> |
| 46 | - <i class="uk-icon-life-ring"></i> 闵行公交线路调度 | 49 | + <i class="uk-icon-life-ring"></i> 浦东公交线路调度 |
| 47 | </h2> | 50 | </h2> |
| 48 | </div> | 51 | </div> |
| 49 | </div> | 52 | </div> |
| @@ -93,22 +96,24 @@ | @@ -93,22 +96,24 @@ | ||
| 93 | <!-- 地图相关 --> | 96 | <!-- 地图相关 --> |
| 94 | <script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script> | 97 | <script src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script> |
| 95 | <script src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"></script> | 98 | <script src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"></script> |
| 96 | -<script src="/assets/js/baidu//MarkerClusterer.js"></script> | ||
| 97 | -<script src="/assets/js/TransGPS.js"></script> | 99 | +<script src="/assets/js/baidu//MarkerClusterer.js" merge="plugins"></script> |
| 100 | +<script src="/assets/js/TransGPS.js" merge="plugins"></script> | ||
| 98 | <!-- 高德 --> | 101 | <!-- 高德 --> |
| 99 | <script src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda"></script> | 102 | <script src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda"></script> |
| 100 | <!-- jquery --> | 103 | <!-- jquery --> |
| 101 | <script src="/real_control_v2/assets/js/jquery.min.js"></script> | 104 | <script src="/real_control_v2/assets/js/jquery.min.js"></script> |
| 102 | <!-- jquery actual --> | 105 | <!-- jquery actual --> |
| 103 | -<script src="/real_control_v2/assets/js/jquery.actual.min.js"></script> | 106 | +<script src="/real_control_v2/assets/js/jquery.actual.min.js" merge="plugins"></script> |
| 104 | <!-- jquery.serializejson JSON序列化插件 --> | 107 | <!-- jquery.serializejson JSON序列化插件 --> |
| 105 | -<script src="/assets/plugins/jquery.serializejson.js"></script> | 108 | +<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script> |
| 106 | <!-- moment.js 日期处理类库 --> | 109 | <!-- moment.js 日期处理类库 --> |
| 107 | <script src="/assets/plugins/moment-with-locales.js"></script> | 110 | <script src="/assets/plugins/moment-with-locales.js"></script> |
| 111 | +<!-- perfect-scrollbar --> | ||
| 112 | +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script> | ||
| 108 | <!-- common js --> | 113 | <!-- common js --> |
| 109 | <script src="/real_control_v2/js/common.js"></script> | 114 | <script src="/real_control_v2/js/common.js"></script> |
| 110 | <!-- art-template 模版引擎 --> | 115 | <!-- art-template 模版引擎 --> |
| 111 | -<script src="/assets/plugins/template.js"></script> | 116 | +<script src="/assets/plugins/template.js" merge="plugins"></script> |
| 112 | <!-- d3 --> | 117 | <!-- d3 --> |
| 113 | <script src="/assets/js/d3.min.js"></script> | 118 | <script src="/assets/js/d3.min.js"></script> |
| 114 | <!-- EventProxy --> | 119 | <!-- EventProxy --> |
| @@ -124,20 +129,22 @@ | @@ -124,20 +129,22 @@ | ||
| 124 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.min.js" merge="uikit_js"></script> | 129 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.min.js" merge="uikit_js"></script> |
| 125 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/timepicker.min.js" merge="uikit_js"></script> | 130 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/timepicker.min.js" merge="uikit_js"></script> |
| 126 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/lightbox.min.js" merge="uikit_js"></script> | 131 | <script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/lightbox.min.js" merge="uikit_js"></script> |
| 132 | +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/sticky.min.js" merge="uikit_js"></script> | ||
| 133 | + | ||
| 127 | 134 | ||
| 128 | <!-- jquery contextMenu --> | 135 | <!-- jquery contextMenu --> |
| 129 | -<script src="/real_control_v2/assets/js/jquery.contextMenu.min.js"></script> | ||
| 130 | -<script src="/real_control_v2/assets/js/jquery.ui.position.min.js"></script> | 136 | +<script src="/real_control_v2/assets/js/jquery.contextMenu.min.js" merge="plugins"></script> |
| 137 | +<script src="/real_control_v2/assets/js/jquery.ui.position.min.js" merge="plugins"></script> | ||
| 131 | <!-- formvalidation- --> | 138 | <!-- formvalidation- --> |
| 132 | -<script src="/real_control_v2/assets/plugins/formvalidation/formValidation.min.js"></script> | ||
| 133 | -<script src="/real_control_v2/assets/plugins/formvalidation/zh_CN.js"></script> | ||
| 134 | -<script src="/real_control_v2/assets/plugins/formvalidation/uikit.min.js"></script> | 139 | +<script src="/real_control_v2/assets/plugins/formvalidation/formValidation.min.js" merge="plugins"></script> |
| 140 | +<script src="/real_control_v2/assets/plugins/formvalidation/zh_CN.js" merge="plugins"></script> | ||
| 141 | +<script src="/real_control_v2/assets/plugins/formvalidation/uikit.min.js" merge="plugins"></script> | ||
| 135 | <!-- js tree --> | 142 | <!-- js tree --> |
| 136 | -<script src="/real_control_v2/assets/plugins/jstree/jstree.min.js"></script> | 143 | +<script src="/real_control_v2/assets/plugins/jstree/jstree.min.js" merge="plugins"></script> |
| 137 | <!-- simple pinyin --> | 144 | <!-- simple pinyin --> |
| 138 | -<script src="/assets/plugins/pinyin.js"></script> | 145 | +<script src="/assets/plugins/pinyin.js" merge="plugins"></script> |
| 139 | <!-- qtip --> | 146 | <!-- qtip --> |
| 140 | -<script src="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.js"></script> | 147 | +<script src="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.js" merge="plugins"></script> |
| 141 | 148 | ||
| 142 | <!-- 数据 --> | 149 | <!-- 数据 --> |
| 143 | <script src="/real_control_v2/js/data/data_basic.js" merge="custom_js"></script> | 150 | <script src="/real_control_v2/js/data/data_basic.js" merge="custom_js"></script> |
| @@ -175,9 +182,9 @@ | @@ -175,9 +182,9 @@ | ||
| 175 | <script src="/real_control_v2/js/utils/tts.js" merge="custom_js"></script> | 182 | <script src="/real_control_v2/js/utils/tts.js" merge="custom_js"></script> |
| 176 | 183 | ||
| 177 | <!-- echart --> | 184 | <!-- echart --> |
| 178 | -<script src="/real_control_v2/assets/echarts-3/echarts.js"></script> | 185 | +<script src="/real_control_v2/assets/echarts-3/echarts.js" merge="plugins"></script> |
| 179 | <!-- Geolib --> | 186 | <!-- Geolib --> |
| 180 | -<script src="/real_control_v2/geolib/geolib.js"></script> | 187 | +<script src="/real_control_v2/geolib/geolib.js" merge="plugins"></script> |
| 181 | 188 | ||
| 182 | <script src="/real_control_v2/js/signal_state/signal_state.js" merge="custom_js"></script> | 189 | <script src="/real_control_v2/js/signal_state/signal_state.js" merge="custom_js"></script> |
| 183 | <script src="/real_control_v2/js/utils/dispatch_pattern.js" merge="custom_js"></script> | 190 | <script src="/real_control_v2/js/utils/dispatch_pattern.js" merge="custom_js"></script> |
src/main/resources/static/real_control_v2/mapmonitor/real.html
| 1 | -<link href="/assets/css/TrafficControl.css" rel="stylesheet"/> | ||
| 2 | -<link rel="stylesheet" href="/real_control_v2/assets/plugins/jquery.ui/themes/base/all.css"/> | ||
| 3 | -<link rel="stylesheet" href="/real_control_v2/assets/plugins/spectrum/spectrum.css"/> | ||
| 4 | -<link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/form-advanced.gradient.min.css"/> | 1 | +<link href="/assets/css/TrafficControl.css" rel="stylesheet" merge="map_plugins"/> |
| 2 | +<link rel="stylesheet" href="/real_control_v2/assets/plugins/jquery.ui/themes/base/all.css" merge="map_plugins"/> | ||
| 3 | +<link rel="stylesheet" href="/real_control_v2/assets/plugins/spectrum/spectrum.css" merge="map_plugins"/> | ||
| 4 | +<link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/form-advanced.gradient.min.css" merge="map_plugins"/> | ||
| 5 | <link rel="stylesheet" href="/real_control_v2/mapmonitor/css/real.css"/> | 5 | <link rel="stylesheet" href="/real_control_v2/mapmonitor/css/real.css"/> |
| 6 | -<link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/progress.gradient.min.css"> | 6 | +<link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/progress.gradient.min.css" merge="map_plugins"> |
| 7 | 7 | ||
| 8 | <div class="map-system-msg flex-left"> | 8 | <div class="map-system-msg flex-left"> |
| 9 | <a class="z-depth-2" href="/pages/mapmonitor/alone/wrap.html" target="_blank"></a> | 9 | <a class="z-depth-2" href="/pages/mapmonitor/alone/wrap.html" target="_blank"></a> |
| @@ -50,21 +50,21 @@ | @@ -50,21 +50,21 @@ | ||
| 50 | </div> | 50 | </div> |
| 51 | </div> | 51 | </div> |
| 52 | 52 | ||
| 53 | -<script src="/real_control_v2/assets/js/GeoUtils_min.js"></script> | ||
| 54 | -<script src="/real_control_v2/mapmonitor/js/config.js" merge="custom_map_js"></script> | ||
| 55 | -<script src="/real_control_v2/mapmonitor/js/gps_tree.js" merge="custom_map_js"></script> | ||
| 56 | -<script src="/real_control_v2/mapmonitor/js/spatial_data.js" merge="custom_map_js"></script> | ||
| 57 | -<script src="/real_control_v2/mapmonitor/js/map_overlay_manager.js" merge="custom_map_js"></script> | ||
| 58 | -<script src="/real_control_v2/mapmonitor/js/real.js" merge="custom_map_js"></script> | ||
| 59 | -<script src="/real_control_v2/mapmonitor/js/map/iMap.js" merge="custom_map_js"></script> | ||
| 60 | -<script src="/real_control_v2/mapmonitor/js/map/platform/baidu.js" merge="custom_map_js"></script> | ||
| 61 | -<script src="/real_control_v2/mapmonitor/js/map/platform/gaode.js" merge="custom_map_js"></script> | 53 | +<script src="/real_control_v2/assets/js/GeoUtils_min.js" merge="map_plugins"></script> |
| 54 | +<script src="/real_control_v2/mapmonitor/js/config.js" merge="map_custom_js"></script> | ||
| 55 | +<script src="/real_control_v2/mapmonitor/js/gps_tree.js" merge="map_custom_js"></script> | ||
| 56 | +<script src="/real_control_v2/mapmonitor/js/spatial_data.js" merge="map_custom_js"></script> | ||
| 57 | +<script src="/real_control_v2/mapmonitor/js/map_overlay_manager.js" merge="map_custom_js"></script> | ||
| 58 | +<script src="/real_control_v2/mapmonitor/js/real.js" ></script> | ||
| 59 | +<script src="/real_control_v2/mapmonitor/js/map/iMap.js" merge="map_custom_js"></script> | ||
| 60 | +<script src="/real_control_v2/mapmonitor/js/map/platform/baidu.js" merge="map_custom_js"></script> | ||
| 61 | +<script src="/real_control_v2/mapmonitor/js/map/platform/gaode.js" merge="map_custom_js"></script> | ||
| 62 | <!-- jquery ui --> | 62 | <!-- jquery ui --> |
| 63 | -<script src="/real_control_v2/assets/plugins/jquery.ui/core.js"></script> | ||
| 64 | -<script src="/real_control_v2/assets/plugins/jquery.ui/widget.js"></script> | ||
| 65 | -<script src="/real_control_v2/assets/plugins/jquery.ui/mouse.js"></script> | ||
| 66 | -<script src="/real_control_v2/assets/plugins/jquery.ui/resizable.js"></script> | 63 | +<script src="/real_control_v2/assets/plugins/jquery.ui/core.js" merge="map_plugins"></script> |
| 64 | +<script src="/real_control_v2/assets/plugins/jquery.ui/widget.js" merge="map_plugins"></script> | ||
| 65 | +<script src="/real_control_v2/assets/plugins/jquery.ui/mouse.js" merge="map_plugins"></script> | ||
| 66 | +<script src="/real_control_v2/assets/plugins/jquery.ui/resizable.js" merge="map_plugins"></script> | ||
| 67 | <!-- 颜色选择器 --> | 67 | <!-- 颜色选择器 --> |
| 68 | -<script src="/real_control_v2/assets/plugins/spectrum/spectrum.js"></script> | 68 | +<script src="/real_control_v2/assets/plugins/spectrum/spectrum.js" merge="map_plugins"></script> |
| 69 | <!-- play back --> | 69 | <!-- play back --> |
| 70 | -<script src="/real_control_v2/mapmonitor/js/playback.js" merge="custom_map_js"></script> | ||
| 71 | \ No newline at end of file | 70 | \ No newline at end of file |
| 71 | +<script src="/real_control_v2/mapmonitor/js/playback.js" merge="map_custom_js"></script> | ||
| 72 | \ No newline at end of file | 72 | \ No newline at end of file |
src/test/java/com/bsth/service/schedule/rules/SchedulePlan1Test.java
0 → 100644
| 1 | +package com.bsth.service.schedule.rules; | ||
| 2 | + | ||
| 3 | +import com.bsth.service.schedule.BaseTest; | ||
| 4 | +import org.dbunit.database.DatabaseConnection; | ||
| 5 | +import org.dbunit.database.IDatabaseConnection; | ||
| 6 | +import org.dbunit.dataset.IDataSet; | ||
| 7 | +import org.dbunit.dataset.xml.FlatXmlDataSetBuilder; | ||
| 8 | +import org.dbunit.operation.DatabaseOperation; | ||
| 9 | +import org.junit.After; | ||
| 10 | +import org.junit.Before; | ||
| 11 | +import org.junit.Test; | ||
| 12 | +import org.slf4j.Logger; | ||
| 13 | +import org.slf4j.LoggerFactory; | ||
| 14 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 15 | +import org.springframework.core.io.ClassPathResource; | ||
| 16 | +import org.springframework.core.io.Resource; | ||
| 17 | + | ||
| 18 | +import javax.sql.DataSource; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * 排班计划测试(手工排班测试)。 | ||
| 22 | + */ | ||
| 23 | +public class SchedulePlan1Test extends BaseTest { | ||
| 24 | + /** 日志记录器 */ | ||
| 25 | + private static final Logger logger = LoggerFactory.getLogger(SchedulePlan1Test.class); | ||
| 26 | + | ||
| 27 | + @Autowired | ||
| 28 | + private DataSource dataSource; | ||
| 29 | + | ||
| 30 | + /** | ||
| 31 | + * 初始化数据。 | ||
| 32 | + */ | ||
| 33 | + @Before | ||
| 34 | + public void initData() throws Exception { | ||
| 35 | + logger.info("载入数据......"); | ||
| 36 | + | ||
| 37 | + // 获取数据库连接 | ||
| 38 | + IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection()); | ||
| 39 | + // 获取Dbunit数据源 | ||
| 40 | + Resource res = new ClassPathResource("testdata/d2.xml"); | ||
| 41 | + FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder(); | ||
| 42 | + flatXmlDataSetBuilder.setColumnSensing(false); | ||
| 43 | + flatXmlDataSetBuilder.setCaseSensitiveTableNames(false); | ||
| 44 | + IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream()); | ||
| 45 | + | ||
| 46 | + // 载入数据 | ||
| 47 | + DatabaseOperation.CLEAN_INSERT.execute(iDatabaseConnection, iDataSet); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 清除数据。 | ||
| 52 | + */ | ||
| 53 | + @After | ||
| 54 | + public void destoryData() throws Exception { | ||
| 55 | + logger.info("清除数据......"); | ||
| 56 | + // 获取数据库连接 | ||
| 57 | + IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection()); | ||
| 58 | + // 获取Dbunit数据源 | ||
| 59 | + Resource res = new ClassPathResource("testdata/d2.xml"); | ||
| 60 | + FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder(); | ||
| 61 | + flatXmlDataSetBuilder.setColumnSensing(false); | ||
| 62 | + flatXmlDataSetBuilder.setCaseSensitiveTableNames(false); | ||
| 63 | + IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream()); | ||
| 64 | + | ||
| 65 | + // 清除数据 | ||
| 66 | + DatabaseOperation.DELETE_ALL.execute(iDatabaseConnection, iDataSet); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + | ||
| 70 | + @Test | ||
| 71 | + public void t1() { | ||
| 72 | + | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + | ||
| 76 | + | ||
| 77 | + | ||
| 78 | + | ||
| 79 | + | ||
| 80 | + | ||
| 81 | + | ||
| 82 | + | ||
| 83 | + | ||
| 84 | + | ||
| 85 | + | ||
| 86 | + | ||
| 87 | + | ||
| 88 | + | ||
| 89 | + | ||
| 90 | + | ||
| 91 | + | ||
| 92 | + | ||
| 93 | + | ||
| 94 | +} |
src/test/java/com/bsth/service/schedule/rules/SchedulePlan2Test.java
0 → 100644
src/test/resources/testdata/new.txt
0 → 100644
| 1 | +1、车狼配置,每辆车都可以配置单独的停车点及相关数据,并提供两种设置模式(早晚,复驶) | ||
| 2 | +2、规则管理,修改规则的界面图形化,更加方便修改 | ||
| 3 | +3、时刻表管理,导入时刻表xls做严格数据判定,时刻表明细修改提供跟方便的图形化修改方式 | ||
| 4 | +4、排班计划管理,提供每次排班的操作信息,时间段,所使用的时刻表,可以查看具体的排班明细(细化到班次) | ||
| 5 | + 生成排班时,提供详细的时刻表统计信息,提供两种排班模式(历史排班优先,规则优先) | ||
| 6 | +5、调度值勤日报,列出每天的基于线路,路牌的排班统计,可以更换车辆,人员 | ||
| 7 | + 此功能从排班计划中抽取出来,单独列出,供调派人员使用 | ||
| 0 | \ No newline at end of file | 8 | \ No newline at end of file |
src/test/resources/testdata/test1.txt
0 → 100644
| 1 | +select * from jwgl_f_t_clxh_workflow_detail a where a.ID_LYSYLB = 36; | ||
| 2 | + | ||
| 3 | +select sum(amount - tl_amount) from jwgl_f_t_clxh_workflow_detail | ||
| 4 | +where | ||
| 5 | +to_date(statdateid, 'YYYYMMDD') >= to_date('20170301', 'YYYYMMDD') | ||
| 6 | +and to_date(statdateid, 'YYYYMMDD') <= to_date('20170331', 'YYYYMMDD') | ||
| 7 | + | ||
| 8 | +select * from JWGL_D_T_LYSYLB | ||
| 9 | + | ||
| 10 | +-- all xh | ||
| 11 | + | ||
| 12 | +select | ||
| 13 | +statdateid statdate | ||
| 14 | +, ssjc gs | ||
| 15 | +, xl xl | ||
| 16 | +, zbh cl | ||
| 17 | +, b.SYLB1 || '-' || b.SYLB2 as lylb | ||
| 18 | +, (sum(amount) - sum(tl_amount)) ch | ||
| 19 | +from JWGL_F_T_CLXH_WORKFLOW_DETAIL a, JWGL_D_T_LYSYLB b | ||
| 20 | +where | ||
| 21 | +to_date(statdateid, 'YYYYMMDD') >= to_date('20170301', 'YYYYMMDD') | ||
| 22 | +and to_date(statdateid, 'YYYYMMDD') <= to_date('20170331', 'YYYYMMDD') | ||
| 23 | +and a.ID_LYSYLB = b.ID(+) | ||
| 24 | +group by | ||
| 25 | +statdateid | ||
| 26 | +, ssjc | ||
| 27 | +, xl | ||
| 28 | +, zbh | ||
| 29 | +, b.SYLB1 || '-' || b.SYLB2 | ||
| 30 | + | ||
| 31 | +-- part1 | ||
| 32 | + | ||
| 33 | +select sum(ch) from | ||
| 34 | +( | ||
| 35 | +select | ||
| 36 | +statdateid statdate | ||
| 37 | +, ssjc gs | ||
| 38 | +, xl xl | ||
| 39 | +, zbh cl | ||
| 40 | +, b.SYLB1 || '-' || b.SYLB2 as lylb | ||
| 41 | +, (sum(amount) - sum(tl_amount)) ch | ||
| 42 | +from JWGL_F_T_CLXH_WORKFLOW_DETAIL a, JWGL_D_T_LYSYLB b | ||
| 43 | +where | ||
| 44 | +to_date(statdateid, 'YYYYMMDD') >= to_date('20170301', 'YYYYMMDD') | ||
| 45 | +and to_date(statdateid, 'YYYYMMDD') <= to_date('20170331', 'YYYYMMDD') | ||
| 46 | +and a.ID_LYSYLB = b.ID(+) | ||
| 47 | +group by | ||
| 48 | +statdateid | ||
| 49 | +, ssjc | ||
| 50 | +, xl | ||
| 51 | +, zbh | ||
| 52 | +, b.SYLB1 || '-' || b.SYLB2 | ||
| 53 | +) | ||
| 54 | +where lylb in ( | ||
| 55 | +'路救-路救', | ||
| 56 | +'小修-小修机工', | ||
| 57 | +'专项-安检', | ||
| 58 | +'专项-节检', | ||
| 59 | +'专项-水箱', | ||
| 60 | +'专项-电瓶', | ||
| 61 | +'小修-小修电工', | ||
| 62 | +'专项-电并', | ||
| 63 | +'小修-小修车身', | ||
| 64 | +'专项-镗固', | ||
| 65 | +'保养-一级保养', | ||
| 66 | +'小修-发动机', | ||
| 67 | +'专项-轮胎', | ||
| 68 | +'分摊-轮胎', | ||
| 69 | +'专项-润滑油', | ||
| 70 | +'总成-差变速', | ||
| 71 | +'总成-大泵', | ||
| 72 | +'总成-小总成', | ||
| 73 | +'总成-发动机', | ||
| 74 | +'保养-二级保养', | ||
| 75 | +'保养-三级保养', | ||
| 76 | +'整修-整修', | ||
| 77 | +'空调-保外', | ||
| 78 | +'空调-保内', | ||
| 79 | +'事故-事故' | ||
| 80 | +) | ||
| 81 | + | ||
| 82 | +-- part2 | ||
| 83 | + | ||
| 84 | +select sum(ch) from | ||
| 85 | +( | ||
| 86 | +select | ||
| 87 | +statdateid statdate | ||
| 88 | +, ssjc gs | ||
| 89 | +, xl xl | ||
| 90 | +, zbh cl | ||
| 91 | +, b.SYLB1 || '-' || b.SYLB2 as lylb | ||
| 92 | +, (sum(amount) - sum(tl_amount)) ch | ||
| 93 | +from JWGL_F_T_CLXH_WORKFLOW_DETAIL a, JWGL_D_T_LYSYLB b | ||
| 94 | +where | ||
| 95 | +to_date(statdateid, 'YYYYMMDD') >= to_date('20170301', 'YYYYMMDD') | ||
| 96 | +and to_date(statdateid, 'YYYYMMDD') <= to_date('20170331', 'YYYYMMDD') | ||
| 97 | +and a.ID_LYSYLB = b.ID(+) | ||
| 98 | +group by | ||
| 99 | +statdateid | ||
| 100 | +, ssjc | ||
| 101 | +, xl | ||
| 102 | +, zbh | ||
| 103 | +, b.SYLB1 || '-' || b.SYLB2 | ||
| 104 | +) | ||
| 105 | +where lylb in( | ||
| 106 | +'分摊-镗固', | ||
| 107 | +'专项-机油', | ||
| 108 | +'分摊-机油', | ||
| 109 | +'总成-其它', | ||
| 110 | +'分摊-工具', | ||
| 111 | +'分摊-辅助料', | ||
| 112 | +'分摊-设备', | ||
| 113 | +'车间经费-车间经费' | ||
| 114 | +) | ||
| 115 | + | ||
| 116 | + | ||
| 117 | + | ||
| 118 | + | ||
| 119 | + | ||
| 120 | + | ||
| 121 | + | ||
| 122 | + | ||
| 123 | + | ||
| 124 | + | ||
| 125 | + | ||
| 126 | + | ||
| 127 | + | ||
| 128 | + | ||
| 129 | + | ||
| 130 | + | ||
| 131 | + | ||
| 132 | + | ||
| 133 | + |
src/test/resources/testdata/test2.txt
0 → 100644
| 1 | + | ||
| 2 | +select * from JWGL_FR_T_CH_REPORT_DATA1; | ||
| 3 | + | ||
| 4 | +select * from JWGL_FR_T_CH_REPORT_DATA2; | ||
| 5 | + | ||
| 6 | +-- sum part1 | ||
| 7 | + | ||
| 8 | +select | ||
| 9 | +( | ||
| 10 | +sum(lj_lj) + sum(xx_xxjg) + sum(xx_xxdg) + sum(zx_db) + sum(xx_xxcs) + sum(zx_tg) + sum(by_b1) + | ||
| 11 | +sum(nvl(future_bx, 0)) + sum(xx_fdj) + sum(zx_lt) + sum(zx_rhy) + sum(zc_cbx) + sum(zc_db) + sum(zc_xzc) + | ||
| 12 | +sum(zc_fdj) + sum(by_b2) + sum(by_b3) + sum(nvl(future_wx_db, 0)) + sum(nvl(future_wxfy, 0)) + sum(nvl(future_ktwx, 0)) + sum(nvl(future_sx, 0)) + | ||
| 13 | +sum(nvl(future_dp, 0)) + sum(zx_zx) + sum(kt_bw) + sum(sg_sg) | ||
| 14 | +) as part1 | ||
| 15 | +from JWGL_FR_T_CH_REPORT_DATA1 | ||
| 16 | +where | ||
| 17 | +statdate >= to_date('20170301', 'YYYYMMDD') | ||
| 18 | +and statdate <= to_date('20170331', 'YYYYMMDD') | ||
| 19 | + | ||
| 20 | +-- sum part2 | ||
| 21 | + | ||
| 22 | +select | ||
| 23 | +( | ||
| 24 | +sum(zx_tg) + sum(jy) + sum(qt) + sum(zcfl) + sum(gj) + sum(sb) + sum(cjjf) | ||
| 25 | +) as part2 | ||
| 26 | +from JWGL_FR_T_CH_REPORT_DATA2 | ||
| 27 | +where statdate = to_date('20170331', 'YYYYMMDD') | ||
| 0 | \ No newline at end of file | 28 | \ No newline at end of file |