2023-4-26

master
19104468071 3 years ago
parent b4608ea6a1
commit c0080acd6c

@ -0,0 +1,273 @@
package com.ruoyi.web.controller.nanjing;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.config.Global;
import com.ruoyi.nanjing.domain.BaseFileInfo;
import com.ruoyi.nanjing.domain.BaseFileType;
import com.ruoyi.nanjing.domain.BaseScadaDeviceInfo;
import com.ruoyi.nanjing.service.IBaseFileTypeService;
import com.ruoyi.nanjing.service.IBaseScadaDeviceInfoService;
import com.ruoyi.nanjing.service.ISysFileInfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2022-03-17
*/
@Controller
@RequestMapping("/nanjing/fileinfo")
public class BaseFileInfoController extends BaseController {
private static final Logger log = LoggerFactory.getLogger(BaseFileInfoController.class);
private String prefix = "nanjing/base_fileinfo";
@Autowired
private ISysFileInfoService sysFileInfoService;
@Autowired
private IBaseFileTypeService baseFileTypeService;
@Autowired
private IBaseScadaDeviceInfoService baseScadaDeviceInfoService;
private List<BaseFileType> fileTypeList;
@RequiresPermissions("device:info:view")
@GetMapping()
public String info(ModelMap mmap) {
if (fileTypeList == null) {
fileTypeList = baseFileTypeService.selectBaseFileTypeList(null);
}
mmap.put("fileTypeList", fileTypeList);
System.out.println("=============================================================");
System.out.println("=======================filetypelist==========================");
System.out.println("=============================================================");
/* mmap.put("fileTypeId", typeId);*/
System.out.println(fileTypeList);
return prefix + "/info";
}
@GetMapping("/{typeId}")
public String info(@PathVariable(value = "typeId") Long typeId, ModelMap mmap) {
if (fileTypeList == null) {
fileTypeList = baseFileTypeService.selectBaseFileTypeList(null);
}
mmap.put("fileTypeList", fileTypeList);
mmap.put("fileTypeId", typeId);
return prefix + "/info";
}
/**
*
*/
@RequiresPermissions("device:info:list")
@PostMapping({"/list","/list/{deviceId}"})
@ResponseBody
public TableDataInfo list(@PathVariable(value = "deviceId",required = false) String deviceId, BaseFileInfo baseFileInfo) {
startPage();
if (deviceId !=null){
baseFileInfo.setDeviceId(deviceId);
}
List<BaseFileInfo> list = sysFileInfoService.selectSysFileInfoList(baseFileInfo);
System.out.println(list);
// for (int i=0;i<list.size();i++){
// String s = baseScadaDeviceInfoService.selectDeviceName(deviceId);
// list.get(i)
// }
return getDataTable(list);
}
// @PostMapping("/list222")
// @ResponseBody
// public TableDataInfo list2(Long test,ModelMap mmap){
// startPage();
// System.out.println("========================================");
// System.out.println(test);
// List<BaseFileInfo> list = sysFileInfoService.selectSysFileInfoListByfileType(test);
// mmap.put("fileTypeList2", list);
// return getDataTable(list);
//
// }
/**
*
*/
@RequiresPermissions("device:info:export")
@Log(title = "上传文档", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BaseFileInfo baseFileInfo) {
List<BaseFileInfo> list = sysFileInfoService.selectSysFileInfoList(baseFileInfo);
ExcelUtil<BaseFileInfo> util = new ExcelUtil<BaseFileInfo>(BaseFileInfo.class);
return util.exportExcel(list, "上传文档数据");
}
private List<BaseScadaDeviceInfo> baseScadaDeviceInfos;
/**
*
*/
@GetMapping("/add2/{typeId}")
public String add(@PathVariable("typeId") Long typeId, ModelMap mmap) {
if (baseScadaDeviceInfos == null || baseScadaDeviceInfos.isEmpty()) {
baseScadaDeviceInfos = baseScadaDeviceInfoService.selectAllBaseScadaDeviceInfoList();
}
mmap.put("baseScadaDeviceInfos", baseScadaDeviceInfos);
if (fileTypeList == null) {
fileTypeList = baseFileTypeService.selectBaseFileTypeList(null);
}
mmap.put("fileTypeList", fileTypeList);
mmap.put("fileTypeId", typeId);
return prefix + "/add";
}
@GetMapping("/adddevice/{deviceId}")
public String add1(@PathVariable("deviceId") String deviceId, ModelMap mmap) {
if (fileTypeList == null) {
fileTypeList = baseFileTypeService.selectBaseFileTypeList(null);
}
mmap.put("fileTypeList", fileTypeList);
mmap.put("deviceId", deviceId);
return prefix + "/add_device";
}
/**
*
*/
@RequiresPermissions("device:info:add")
@Log(title = "上传文档", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BaseFileInfo baseFileInfo, ModelMap mmap) {
// List<BaseScadaDeviceInfo> baseScadaDeviceInfos = baseScadaDeviceInfoService.selectAllBaseScadaDeviceInfoList();
// mmap.put("baseScadaDeviceInfos", baseScadaDeviceInfos);
return toAjax(1);
}
/**
*
*/
@RequiresPermissions("device:info:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap) {
if (fileTypeList == null) {
fileTypeList = baseFileTypeService.selectBaseFileTypeList(null);
}
mmap.put("fileTypeList", fileTypeList);
BaseFileInfo baseFileInfo = sysFileInfoService.selectSysFileInfoById(id);
mmap.put("sysFileInfo", baseFileInfo);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("device:info:edit")
@Log(title = "上传文档", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BaseFileInfo baseFileInfo) {
return toAjax(sysFileInfoService.updateSysFileInfo(baseFileInfo));
}
/**
*
*/
@RequiresPermissions("device:info:remove")
@Log(title = "上传文档", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(sysFileInfoService.deleteSysFileInfoByIds(ids));
}
/**
*
*/
@RequestMapping(value = "/uploadDocs", produces = "application/json;charset=utf-8")
@ResponseBody
public AjaxResult uploadDocs(String deviceCode, Long fileTypeId, String typeName, MultipartFile file) {
String uploadFileName = file.getOriginalFilename();
int index = uploadFileName.lastIndexOf('.');
if (index == -1 || index == uploadFileName.length()) {
return error();
}
int tagIndex = uploadFileName.indexOf("-");
if (tagIndex == -1) {
return error("文件格式不规范");
}
BaseFileInfo baseFileInfo = new BaseFileInfo();
baseFileInfo.setDeviceId(deviceCode);
baseFileInfo.setFileTypeId(fileTypeId);
baseFileInfo.setFileNum(uploadFileName.substring(0, tagIndex)); //文档编号
baseFileInfo.setFileName(uploadFileName.substring(tagIndex+1, index));//文档名称
String filePath = Global.getUploadPath() + "/devicefile";
baseFileInfo.setFilePath(filePath);
try {
// 上传并返回新文件地址
String pathName = FileUploadUtils.upload(filePath, file);
System.out.println("上传并返回新文件地址:" + pathName);
String str = Global.getUploadPathRecorrect() + pathName.replace("/profile/", "");
baseFileInfo.setFilePath(str);
sysFileInfoService.insertSysFileInfo(baseFileInfo);
return success();
} catch (IOException e) {
e.printStackTrace();
return error();
}
}
/**
*
*/
@GetMapping("/download/{id}")
public void resourceDownload(@PathVariable Long id, HttpServletRequest request, HttpServletResponse response)
throws Exception {
BaseFileInfo fileInfo = sysFileInfoService.selectSysFileInfoById(id);
String path=fileInfo.getFilePath();
System.out.println(path);
response.setCharacterEncoding("utf-8");
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition",
"attachment;fileName=" + FileUtils.setFileDownloadHeader(request,
fileInfo.getFileNum()+"-"+fileInfo.getFileName()+
path.substring(path.lastIndexOf("."),path.length())
)
);
FileUtils.writeBytes(path, response.getOutputStream());
}
}

@ -0,0 +1,160 @@
package com.ruoyi.web.controller.nanjing;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.nanjing.domain.BaseFileType;
import com.ruoyi.nanjing.service.IBaseFileTypeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller
*
* @author wangh
* @date 2022-03-30
*/
@Controller
@RequestMapping("/nanjing/base_filetype")
public class BaseFileTypeController extends BaseController
{
private String prefix = "nanjing/base_filetype";
@Autowired
private IBaseFileTypeService baseFileTypeService;
@RequiresPermissions("device:base_filetype:view")
@GetMapping()
public String base_filetype()
{
return prefix + "/base_filetype";
}
@GetMapping("/base_filetype1")
public String base_filetype1()
{
return prefix + "/base_filetype1";
}
/**
*
*/
@RequiresPermissions("device:base_filetype:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BaseFileType baseFileType)
{
startPage();
baseFileType.setFileTypeTag(0L);
List<BaseFileType> list = baseFileTypeService.selectBaseFileTypeList(baseFileType);
return getDataTable(list);
}
@PostMapping("/list1")
@ResponseBody
public TableDataInfo list1(BaseFileType baseFileType)
{
startPage();
baseFileType.setFileTypeTag(1L);
List<BaseFileType> list = baseFileTypeService.selectBaseFileTypeList(baseFileType);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("device:base_filetype:export")
@Log(title = "文件类型管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BaseFileType baseFileType)
{
List<BaseFileType> list = baseFileTypeService.selectBaseFileTypeList(baseFileType);
ExcelUtil<BaseFileType> util = new ExcelUtil<BaseFileType>(BaseFileType.class);
return util.exportExcel(list, "文件类型管理数据");
}
/**
*
*/
@GetMapping("/add/{id}")
public String add(@PathVariable("id")Long id,ModelMap mmap)
{
mmap.put("FileTypeTag",id);
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("device:base_filetype:add")
@Log(title = "文件类型管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BaseFileType baseFileType)
{
BaseFileType baseFileType1=new BaseFileType();
String name=baseFileType.getFileName();
baseFileType1.setFileName(name);
List<BaseFileType> list = baseFileTypeService.selectBaseFileTypeList(baseFileType1);
if (list==null||list.isEmpty()){
baseFileType.setCreateBy(ShiroUtils.getLoginName());
return toAjax(baseFileTypeService.insertBaseFileType(baseFileType));
}
return error("名称 '"+name+"' 重复");
}
/**
*
*/
@RequiresPermissions("device:base_filetype:edit")
@GetMapping("/edit/{objid}")
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
{
BaseFileType baseFileType = baseFileTypeService.selectBaseFileTypeByObjid(objid);
mmap.put("baseFileType", baseFileType);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("device:base_filetype:edit")
@Log(title = "文件类型管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BaseFileType baseFileType)
{
BaseFileType baseFileType1=new BaseFileType();
String name=baseFileType.getFileName();
baseFileType1.setFileName(name);
List<BaseFileType> list = baseFileTypeService.selectBaseFileTypeList(baseFileType1);
if (list==null||list.isEmpty()||list.get(0).getObjid().equals(baseFileType.getObjid())){
baseFileType.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(baseFileTypeService.updateBaseFileType(baseFileType));
}
return error("名称 '"+name+"' 重复");
}
/**
*
*/
@RequiresPermissions("device:base_filetype:remove")
@Log(title = "文件类型管理", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(baseFileTypeService.deleteBaseFileTypeByObjids(ids));
}
}

@ -15,6 +15,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.nanjing.domain.BaseScadaDeviceInfo;
//import com.ruoyi.nanjing.service.IBaseManufacturerService;
import com.ruoyi.nanjing.domain.RepairParts;
import com.ruoyi.nanjing.service.BaseDeviceStateService;
import com.ruoyi.nanjing.service.IBaseScadaDeviceInfoService;
import com.ruoyi.nanjing.service.IRepairPartsService;
@ -49,6 +50,7 @@ public class BaseScadaDeviceInfoController extends BaseController {
@Autowired
private ISysJobService jobService;
@Autowired
private IBaseScadaDeviceInfoService baseScadaDeviceInfoService;
@ -71,6 +73,7 @@ public class BaseScadaDeviceInfoController extends BaseController {
@PostMapping("/list")
@ResponseBody
public List<BaseScadaDeviceInfo> list(BaseScadaDeviceInfo baseScadaDeviceInfo) {
startPage();
List<BaseScadaDeviceInfo> list = baseScadaDeviceInfoService.selectBaseScadaDeviceInfoList(baseScadaDeviceInfo);
return list;
}
@ -202,6 +205,12 @@ public class BaseScadaDeviceInfoController extends BaseController {
// mmap.put("users", users);
return "nanjing/repair_parts/add";
}
// @PostMapping("/addweixiu/{deviceId}/{cron3}")
// public String addweixiu(@PathVariable("deviceId") Integer deviceId,@PathVariable("cron3") String cron3){
// System.out.println(cron3);
// System.out.println(deviceId);
// return "nanjing/repair_parts/add";
// }
/**
*
*/
@ -210,9 +219,10 @@ public class BaseScadaDeviceInfoController extends BaseController {
@PostMapping("/addweixiu")
@ResponseBody
public AjaxResult addSave(RepairParts repairParts) {
if (!CronUtils.isValid(repairParts.getRepairCron())) {
return error("Cron表达式不正确");
}
// if (!CronUtils.isValid(repairParts.getRepairCron())) {
// return error("Cron表达式不正确");
// }sout
// System.out.println("1ewqewq;ejwqoiehoiwqhyeoiwqeoiueoiwqe");
int row = repairPartsService.insertRepairParts(repairParts);
if (row > 0) {
Long partId = repairParts.getObjid();
@ -237,6 +247,10 @@ public class BaseScadaDeviceInfoController extends BaseController {
}
return error();
}
/**
*
* */
// /**
// * 查看保养
// * */

@ -0,0 +1,174 @@
package com.ruoyi.web.controller.nanjing;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.nanjing.domain.QsProduct;
import com.ruoyi.nanjing.domain.QtProduct;
import com.ruoyi.nanjing.service.ITBdProductinfoService;
import com.ruoyi.nanjing.service.ITBdProducttypeService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.schema.Model;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
/**
*
* */
@Controller
@RequestMapping("/nanjing/Kanban")
public class KanbanController {
private String prefix = "nanjing/broad";
@Autowired
private ITBdProducttypeService producttypeService;
@Autowired
private ITBdProductinfoService productinfoService;
//2023-03-01T00:00:00.000+0800
@GetMapping()
public String kanBan(){
return prefix + "/index";
}
//qtController
@PostMapping("/listKanBan")
@ResponseBody
public AjaxResult listKanBan(QtProduct qtProduct){
Date beginTime = qtProduct.getBeginTime();
// System.out.println(beginTime);
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
System.out.println(formatter.format(date));
Calendar calendar1 = Calendar.getInstance();
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
calendar1.add(Calendar.DATE, -7);
String three_days_ago = sdf1.format(calendar1.getTime());
System.out.println(three_days_ago);
Map map = new HashMap<String,Object>();
map.put("beginTime",three_days_ago);
// map.put("beginTime",null);
map.put("endTime",date);
// map.put("endTime",null);
map.put("productType","");
// map.put("productType",qtProduct.getProductType());
map.put("productId","");
map.put("shiftId","");
map.put("groupId","");
List<QtProduct> list = producttypeService.selectQtProductList(map);
// System.out.println("==================================================21321321321312");
return AjaxResult.success(list);
//查詢存儲過程,从中拿出所需参数
//domain qt查看参数
}
@RequiresPermissions("nanjing:QsProduct:export")
@Log(title = "时段统计", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(QsProduct qsProduct)
{
Map map = new HashMap<String,Object>();
map.put("beginTime",qsProduct.getBeginTime());
map.put("endTime",qsProduct.getEndTime());
map.put("productType",qsProduct.getProductType());
map.put("productId","");
List<QsProduct> list = producttypeService.selectQsProductList(map);
return AjaxResult.success(list);
/**
* domain qs
* */
}
@PostMapping("/listDay")
@ResponseBody
public AjaxResult listDay(String endTime,String beginTime){
Map map = new HashMap<String,Object>();
map.put("beginTime",beginTime);
map.put("endTime",endTime);
// System.out.println(beginTime);
// System.out.println(endTime);
// producttypeService.selectQtListDay(map);
Integer integer = producttypeService.selectQtListDay(map);
// System.out.println(integer);
return AjaxResult.success(integer);
}
@PostMapping("/tongji")
@ResponseBody
public AjaxResult tongJi(String arr){
Map map = new HashMap<String,Object>();
//查询一周内的生产数据
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
// System.out.println(formatter.format(date));
Calendar calendar1 = Calendar.getInstance();
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
calendar1.add(Calendar.DATE, -7);
String three_days_ago = sdf1.format(calendar1.getTime());
// System.out.println(three_days_ago);
map.put("beginTime",three_days_ago);
// map.put("beginTime",null);
// map.put("endTime",date);
map.put("ProductID",arr);
// map.put("ProductId",5);
List<Map<String, Integer>> map1 = producttypeService.selecttongji(map);
return AjaxResult.success(map1);
}
@PostMapping("/hege")
@ResponseBody
public AjaxResult hege(){
Map map = new HashMap<String,Object>();
//查询一周内的生产数据
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
// System.out.println(formatter.format(date));
Calendar calendar1 = Calendar.getInstance();
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
calendar1.add(Calendar.DATE, -1);
String three_days_ago = sdf1.format(calendar1.getTime());
map.put("beginTime",three_days_ago);
Integer hege = producttypeService.selecthege(map);
Integer all = producttypeService.selectAllstate(map);
double all2 = all;
double hegelv = hege/all2;
BigDecimal b1 = new BigDecimal(hegelv);
double b2 = b1.setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue();
// System.out.println(b2+"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
return AjaxResult.success(b2);
}
@PostMapping("/zhanshi")
@ResponseBody
public AjaxResult zhanshi(){
Map map = new HashMap<String,Object>();
//查询一周内的生产数据
Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
// System.out.println(formatter.format(date));
Calendar calendar1 = Calendar.getInstance();
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
calendar1.add(Calendar.DATE, -1);
String three_days_ago = sdf1.format(calendar1.getTime());
map.put("beginTime",three_days_ago);
Integer hege = producttypeService.selecthege(map);
Integer all = producttypeService.selectAllstate(map);
Map map1 = new HashMap<String,Integer>();
map1.put("shiji",hege);
map1.put("yuji",all);
return AjaxResult.success(map1);
}
}

@ -0,0 +1,85 @@
package com.ruoyi.web.controller.nanjing;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.nanjing.domain.MainTenance;
import com.ruoyi.nanjing.domain.uphold;
import com.ruoyi.nanjing.service.ItimeOEEService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Controller
@RequestMapping("/nanjing/maint")
public class MainTenanceController extends BaseController {
@Autowired
private ItimeOEEService itimeOEEService;
private String prefix = "nanjing/uphold";
@GetMapping
public String uphold(){
return prefix+"/index";
}
@PostMapping("/list")
@ResponseBody
public TableDataInfo selectlist(String field){
startPage();
List<MainTenance> list;
System.out.println(field);
if (field!=""){
System.out.println(field+"isnotnull");
list = itimeOEEService.selectMainTListByfield(field);
}else
{
System.out.println(field+"==============null");
list=itimeOEEService.selectMainTList();
}
return getDataTable(list);
}
@GetMapping("/add")
public String add(){
return prefix+"/add";
}
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(MainTenance maint){
int i = itimeOEEService.insertmaint(maint);
return AjaxResult.success(i);
}
/**
*
*/
@GetMapping("/edit/{objid}")
public String edit(@PathVariable("objid") Integer objid, ModelMap mmap )
{
MainTenance mainTenance =itimeOEEService.selectMainTListById(objid);
mmap.put("maintenance",mainTenance);
return prefix + "/edit";
}
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(MainTenance mainTenance)
{
int i = itimeOEEService.updatemaint(mainTenance);
return AjaxResult.success(i);
}
/**
*
*/
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(Integer ids) {
System.out.println(ids);
return toAjax(itimeOEEService.deletemaintById(ids));
}
}

@ -63,7 +63,7 @@ public class SelectProRpListController extends BaseController
@ResponseBody
public TableDataInfo list(ProRpList proRpList)
{
// startPage();
startPage();
Map map = new HashMap<String,Object>();
map.put("beginTime",proRpList.getBeginTime());
map.put("endTime",proRpList.getEndTime());

@ -62,7 +62,9 @@ public class SelectProductChangeInfoController extends BaseController
public TableDataInfo list(TRpProductchangeinfo tRpProductchangeinfo)
{
startPage();
// System.out.println(tRpProductchangeinfo);
List<TRpProductchangeinfo> list = tRpProductchangeinfoService.selectChangeInfo(tRpProductchangeinfo);
System.out.println(list);
return getDataTable(list);
}
@ -75,6 +77,7 @@ public class SelectProductChangeInfoController extends BaseController
@ResponseBody
public AjaxResult export(TRpProductchangeinfo tRpProductchangeinfo)
{
List<TRpProductchangeinfo> list = tRpProductchangeinfoService.selectChangeInfo(tRpProductchangeinfo);
ExcelUtil<TRpProductchangeinfo> util = new ExcelUtil<TRpProductchangeinfo>(TRpProductchangeinfo.class);
return util.exportExcel(list, "SelectProductChangeInfo");

@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import oshi.jna.platform.mac.SystemB;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -44,28 +45,54 @@ public class StationParaInfoController extends BaseController {
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(HttpServletRequest request) {
String productBarcode=request.getParameter("productBarcode");
Map<String, Object> map = new HashMap<String, Object>();
String stationCode = request.getParameter("stationCode");
String semiBarcode = request.getParameter("semiBarcode");
String beginTime = request.getParameter("beginTime");
String endTime = request.getParameter("endTime");
Map<String, Object> map = new HashMap<String, Object>();
String s = tracestateService.selectSemi(productBarcode);
if (s==null&& productBarcode.length()!=0){
System.out.println(productBarcode.length());
System.out.println("nulllllllllllllllllllllllllllllllllllllllllllllll");
map.put("SemiBarcode", "qqqqqqqqqqqqqqqqqqqqqqqqqqqq");
}
else {
map.put("SemiBarcode", s);
System.out.println("s=="+s);
System.out.println("notnull");
}
map.put("beginTime", beginTime);
map.put("endTime", endTime);
map.put("StationID", stationCode);
map.put("Barcode", "");
map.put("SemiBarcode", semiBarcode);
map.put("StateID", "");
// s200 210 230 240直接查产品码 5 6 8 9 11 12
// s300 320
if (stationCode.equals("5")||stationCode.equals("6")||stationCode.equals("8")
||stationCode.equals("9")||stationCode.equals("11")||stationCode.equals("12")
){
map.put("ScanBarcode",productBarcode);
List<Map<String, Object>> list = tracestateService.selectStationPara2(map);
return getDataTable(list);
}
else{
List<Map<String, Object>> list = tracestateService.selectStationPara(map);
for (int i = 0; i < list.size(); i++) {
if (list.get(i).containsKey("产品码")) {
if (list.get(i).containsKey("系统主条码")) {
continue;
} else {
list.get(i).put("产品码", "-");
list.get(i).put("系统主条码", "-");
}
}
return getDataTable(list);
}
}
// @RequiresPermissions("nanjing:StationPara:export")

@ -48,7 +48,7 @@ public class StatisticQ1ProductController extends BaseController {
map.put("endTime",qsProduct.getEndTime());
map.put("productType",qsProduct.getProductType());
map.put("productId","");
List<QsProduct> list = producttypeService.selectQsProductList(map);
List<QsProduct> list = producttypeService.selectQ1ProductList(map);
return getDataTable(list);
}

@ -54,7 +54,7 @@ public class StatisticQsProductController extends BaseController {
map.put("endTime",qsProduct.getEndTime());
map.put("productType",qsProduct.getProductType());
map.put("productId","");
List<QsProduct> list = producttypeService.selectQ1ProductList(map);
List<QsProduct> list = producttypeService.selectQsProductList(map);
return getDataTable(list);
}

@ -3,8 +3,11 @@ package com.ruoyi.web.controller.nanjing;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.nanjing.domain.QsStation;
import com.ruoyi.nanjing.domain.TBdProductinfo;
import com.ruoyi.nanjing.domain.TRpShiftInfo;
import com.ruoyi.nanjing.service.ITBdProductinfoService;
import com.ruoyi.nanjing.service.ITBdProducttypeService;
import com.ruoyi.nanjing.service.ITBdSubstationService;
import com.ruoyi.nanjing.service.TRpShiftInfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -24,8 +27,11 @@ public class StatisticStProductController extends BaseController {
private String prefix = "nanjing/Statistic";
@Autowired
private ITBdSubstationService substationService;
@Autowired
private ITBdProducttypeService producttypeService;
@Autowired
private ITBdProductinfoService productinfoService;
@RequiresPermissions("nanjing:stationStatistic:view")
@ -68,8 +74,13 @@ public class StatisticStProductController extends BaseController {
map.put("end",end);
map.put("stationId",node);
map.put("stationType",1);
map.put("productId",productid);
// map.put("productId",productid);
List<QsStation> qsStations = producttypeService.selectNodeQs(map);
QsStation qsStation = qsStations.get(0);
qsStation.setStationCode(substationService.selectSubNameCode(node));
qsStation.setStationName(substationService.selectSubName(node));
return qsStations;
}
}

@ -10,15 +10,12 @@ import com.ruoyi.nanjing.domain.TBdProductinfo;
import com.ruoyi.nanjing.domain.TBdStationtype;
import com.ruoyi.nanjing.service.ITBdLinetypeService;
import com.ruoyi.nanjing.service.ITBdStationtypeService;
import org.apache.poi.ss.formula.ptg.TblPtg;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.nanjing.domain.TBdSubstation;
@ -32,7 +29,7 @@ import javax.servlet.http.HttpServletRequest;
/**
* Controller
*
*
* @author limy
* @date 2021-01-22
*/
@ -72,6 +69,12 @@ public class TBdSubstationController extends BaseController
List<TBdSubstation> list = tBdSubstationService.selectTBdSubstationList(tBdSubstation);
return getDataTable(list);
}
@GetMapping("/shangyi")
@ResponseBody
public String shang(Integer value){
System.out.println(value);
return tBdSubstationService.selectshang(value);
}
/**
*
@ -137,6 +140,11 @@ public class TBdSubstationController extends BaseController
List<TBdStationtype> stationtypes = stationtypeService.selectTBdStationtypeList(new TBdStationtype());
map.addAttribute("linename",linetypes);
map.addAttribute("stationtype",stationtypes);
TBdSubstation tBdSubstation = null;
List<TBdSubstation> list3 = tBdSubstationService.selectTBdSubstationList(tBdSubstation);
map.addAttribute("pr",list3);
return prefix + "/add";
}
@ -178,6 +186,9 @@ public class TBdSubstationController extends BaseController
mmap.addAttribute("stationtype",stationtypes);
TBdSubstation tBdSubstation = tBdSubstationService.selectTBdSubstationById(ID);
mmap.put("tBdSubstation", tBdSubstation);
TBdSubstation tBdSubstation1 = null;
List<TBdSubstation> list3 = tBdSubstationService.selectTBdSubstationList(tBdSubstation1);
mmap.addAttribute("pr",list3);
return prefix + "/edit";
}
@ -223,5 +234,14 @@ public class TBdSubstationController extends BaseController
// tBdSubstationService.deleteTBdSubstationByIds(ids)
return toAjax(1);
}
/**
*
* */
@PostMapping("/deviceState")
@ResponseBody
public AjaxResult deviceState(){
List<TBdSubstation> tBdSubstations = tBdSubstationService.selectDeviceState();
return AjaxResult.success(tBdSubstations);
}
}

@ -0,0 +1,34 @@
package com.ruoyi.web.controller.nanjing;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.nanjing.domain.TRpShiftInfo;
import com.ruoyi.nanjing.service.TRpShiftInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/nanjing/TRpShiftInfo")
public class TRpShiftInfoController extends BaseController {
@Autowired
private TRpShiftInfoService tRpShiftInfoService;
@PostMapping("/nodeClick2")
@ResponseBody
public AjaxResult nodeClick2(String begin, String end)
{
Map map = new HashMap<String,Object>();
List<TRpShiftInfo> selectplan = tRpShiftInfoService.selectplan();
return AjaxResult.success(selectplan);
}
}

@ -0,0 +1,140 @@
package com.ruoyi.web.controller.nanjing;
import com.github.pagehelper.PageHelper;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.nanjing.domain.timeOEE;
import com.ruoyi.nanjing.service.ItimeOEEService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.*;
@Controller
@RequestMapping("/nanjing/timeOEE")
public class timeOEEController extends BaseController {
@Autowired
private ItimeOEEService itimeOEEService;
private String prefix = "nanjing/timeOEE";
@GetMapping
public String timeOEE(Model model){
// int curr = 1;
// int pageSize = 10;
// PageHelper.startPage(curr,pageSize);
List<timeOEE> list = itimeOEEService.selectTimeOEEList();
List<BigDecimal> list2 =new ArrayList<>();
BigDecimal a;
BigDecimal b;
BigDecimal c = BigDecimal.valueOf(0.00);
System.out.println(list);
model.addAttribute("timeOEE",list);
for (int i=0;i<list.size();i++){
a = list.get(i).getTimeValueRun();
// System.out.println(a);
b = list.get(i).getTimeLoad();
// System.out.println(b);
if (a.compareTo(BigDecimal.ZERO)!=0 && b.compareTo(BigDecimal.ZERO)!=0){
list2.add(a.divide(b,2));
System.out.println(c);}
else {list2.add(c);}
}
System.out.println(list2);
model.addAttribute("bd",list2);
return prefix+"/test";
}
// @GetMapping("/page")
// public String page(Model model,int curr){
//
// int pageSize = 10;
// PageHelper.startPage(curr,pageSize);
// List<timeOEE> list = itimeOEEService.selectTimeOEEList();
// System.out.println(list);
// model.addAttribute("timeOEE",list);
// return prefix+"/test";
// }
@GetMapping("/biaoge")
public String biaoge(Model model,String begintime,String endtime){
System.out.println("========================");
System.out.println(begintime);
System.out.println(endtime);
Map<String,Object> map = new HashMap();
map.put("begintime",begintime);
map.put("endtime",endtime);
List<timeOEE> list = itimeOEEService.selectbiaoge(map);
List<BigDecimal> list2 =new ArrayList<>();
// System.out.println("========================================================");
// System.out.println("========================================================");
// System.out.println("========================================================");
System.out.println(list);
BigDecimal a;
BigDecimal b;
BigDecimal c = BigDecimal.valueOf(0.00);
for (int i=0;i<list.size();i++){
a = list.get(i).getTimeValueRun();
// System.out.println(a);
b = list.get(i).getTimeLoad();
// System.out.println(b);
if (a.compareTo(BigDecimal.ZERO)!=0 && b.compareTo(BigDecimal.ZERO)!=0){
list2.add(a.divide(b,2));
System.out.println(c);}
else {list2.add(c);}
}
model.addAttribute("bd",list2);
model.addAttribute("timeOEE2",list);
return prefix+"/test2";
// return prefix+"/test3";
}
@PostMapping("/biaoge")
@ResponseBody
public AjaxResult biaoge2(Model model, @RequestParam String begintime, @RequestParam String endtime){
System.out.println("========================");
System.out.println(begintime);
System.out.println(endtime);
Map<String,Object> map = new HashMap();
map.put("begintime",begintime);
map.put("endtime",endtime);
List<timeOEE> list = itimeOEEService.selectbiaoge(map);
List<BigDecimal> list2 =new ArrayList<>();
// System.out.println("========================================================");
// System.out.println("========================================================");
// System.out.println("========================================================");
System.out.println(list);
BigDecimal a;
BigDecimal b;
BigDecimal c = BigDecimal.valueOf(0.00);
for (int i=0;i<list.size();i++){
a = list.get(i).getTimeValueRun();
// System.out.println(a);
b = list.get(i).getTimeLoad();
// System.out.println(b);
if (a.compareTo(BigDecimal.ZERO)!=0 && b.compareTo(BigDecimal.ZERO)!=0){
list2.add(a.divide(b,2));
System.out.println(c);}
else {list2.add(c);}
}
model.addAttribute("bd",list2);
model.addAttribute("timeOEE",list);
// return prefix+"/test2";
// return prefix+"/test3";
return AjaxResult.success(list);
}
@GetMapping("/lists")
@ResponseBody
public AjaxResult selectList(ModelMap model){
List<timeOEE> list = itimeOEEService.selectTimeOEEList();
// System.out.println("=====");
// System.out.println(list);
// model.add("timeOEE",list);
model.put("timeOEE",list);
return AjaxResult.success(list);
}
}

@ -0,0 +1,99 @@
package com.ruoyi.web.controller.nanjing;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.nanjing.domain.*;
import com.ruoyi.nanjing.service.ItimeOEEService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/nanjing/uphold")
public class upholdController extends BaseController {
private static double jiepai = 0.45;
@Autowired
private ItimeOEEService itimeOEEService;
private String prefix = "nanjing/uphold";
@GetMapping
public String uphold(){
return prefix+"/index";
}
@PostMapping("/list")
@ResponseBody
public TableDataInfo selectlist(Integer StationID){
startPage();
if (StationID!=null){
List<uphold> list = itimeOEEService.selectupholdListById(StationID);
return getDataTable(list);
}
else {
List<uphold> list = itimeOEEService.selectupholdList();
// System.out.println("====================================================");
// System.out.println("====================================================");
// System.out.println(list);
// System.out.println("====================================================");
// System.out.println("====================================================");
return getDataTable(list);
}
}
@GetMapping("/add")
public String add(){
return prefix+"/add";
}
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(uphold uphold){
itimeOEEService.insertuphold(uphold);
String s = JSON.toJSONString(uphold);
Map map2 = itimeOEEService.time(uphold);
Map map1 = JSON.parseObject(s,Map.class);
map1.putAll(map2);
System.out.println("=========================================================================================");
System.out.println(map1);
itimeOEEService.insertTimeOEE(map1);
return AjaxResult.success("ok");
}
/**
*
*/
@GetMapping("/edit/{objid}")
public String edit(@PathVariable("objid") Long objid,ModelMap mmap )
{
uphold uphold = itimeOEEService.selectUpholdById(objid);
mmap.put("upload",uphold);
return prefix + "/edit";
}
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(uphold uphold)
{
int i = itimeOEEService.updateUphold(uphold);
return AjaxResult.success(i);
}
/**
*
*/
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(Integer ids) {
System.out.println(ids);
return toAjax(itimeOEEService.deleteUpholdById(ids));
}
}

@ -25,7 +25,7 @@ import com.ruoyi.system.service.ISysUserService;
/**
*
*
*
* @author ruoyi
*/
@Controller
@ -38,7 +38,7 @@ public class SysProfileController extends BaseController
@Autowired
private ISysUserService userService;
@Autowired
private SysPasswordService passwordService;
@ -117,7 +117,7 @@ public class SysProfileController extends BaseController
{
SysUser user = ShiroUtils.getSysUser();
mmap.put("user", userService.selectUserById(user.getUserId()));
return prefix + "/avatar";
return prefix + "/edit";
}
/**

@ -5,13 +5,17 @@ spring:
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
druid:
# 主库数据源
master:
url: jdbc:sqlserver://121.36.58.109:1433;SelectMethod=cursor;DatabaseName=JYD_shengjie
username: sa
password: haiwei@123
# master:
# url: jdbc:sqlserver://121.36.58.109:1433;SelectMethod=cursor;DatabaseName=JYD_shengjie
# username: sa
# password: haiwei@123
# url: jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=JYD_shengjie
# username: sa
# password: 123456
## password: 123456
master:
url: jdbc:sqlserver://192.168.3.109:1433;SelectMethod=cursor;DatabaseName=JYD_shengjie
username: sa
password: 123456
# 从库数据源
slave:
# 从数据源开关/默认关闭

@ -0,0 +1,108 @@
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
*/
var Utils = $.fn.bootstrapTable.utils
$.extend($.fn.bootstrapTable.defaults, {
customView: false,
showCustomView: false,
showCustomViewButton: false
})
$.extend($.fn.bootstrapTable.defaults.icons, {
customView: {
bootstrap3: 'glyphicon glyphicon-eye-open',
bootstrap5: 'bi-eye',
bootstrap4: 'fa fa-eye',
semantic: 'fa fa-eye',
foundation: 'fa fa-eye',
bulma: 'fa fa-eye',
materialize: 'remove_red_eye'
}[$.fn.bootstrapTable.theme] || 'fa-eye'
})
$.extend($.fn.bootstrapTable.defaults, {
onCustomViewPostBody () {
return false
},
onCustomViewPreBody () {
return false
}
})
$.extend($.fn.bootstrapTable.locales, {
formatToggleCustomView () {
return 'Toggle custom view'
}
})
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales)
$.fn.bootstrapTable.methods.push('toggleCustomView')
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
'custom-view-post-body.bs.table': 'onCustomViewPostBody',
'custom-view-pre-body.bs.table': 'onCustomViewPreBody'
})
$.BootstrapTable = class extends $.BootstrapTable {
init () {
this.showCustomView = this.options.showCustomView
super.init()
}
initToolbar (...args) {
if (this.options.customView && this.options.showCustomViewButton) {
this.buttons = Object.assign(this.buttons, {
customView: {
text: this.options.formatToggleCustomView(),
icon: this.options.icons.customView,
event: this.toggleCustomView,
attributes: {
'aria-label': this.options.formatToggleCustomView(),
title: this.options.formatToggleCustomView()
}
}
})
}
super.initToolbar(...args)
}
initBody () {
super.initBody()
if (!this.options.customView) {
return
}
const $table = this.$el
const $customViewContainer = this.$container.find('.fixed-table-custom-view')
$table.hide()
$customViewContainer.hide()
if (!this.options.customView || !this.showCustomView) {
$table.show()
return
}
const data = this.getData().slice(this.pageFrom - 1, this.pageTo)
const value = Utils.calculateObjectValue(this, this.options.customView, [data], '')
this.trigger('custom-view-pre-body', data, value)
if ($customViewContainer.length === 1) {
$customViewContainer.show().html(value)
} else {
this.$tableBody.after(`<div class="fixed-table-custom-view">${value}</div>`)
}
this.trigger('custom-view-post-body', data, value)
}
toggleCustomView () {
this.showCustomView = !this.showCustomView
this.initBody()
}
}

@ -0,0 +1,108 @@
/**
* @author zhixin wen <wenzhixin2010@gmail.com>
*/
var Utils = $.fn.bootstrapTable.utils
$.extend($.fn.bootstrapTable.defaults, {
customView: false,
showCustomView: false,
showCustomViewButton: false
})
$.extend($.fn.bootstrapTable.defaults.icons, {
customView: {
bootstrap3: 'glyphicon glyphicon-eye-open',
bootstrap5: 'bi-eye',
bootstrap4: 'fa fa-eye',
semantic: 'fa fa-eye',
foundation: 'fa fa-eye',
bulma: 'fa fa-eye',
materialize: 'remove_red_eye'
}[$.fn.bootstrapTable.theme] || 'fa-eye'
})
$.extend($.fn.bootstrapTable.defaults, {
onCustomViewPostBody () {
return false
},
onCustomViewPreBody () {
return false
}
})
$.extend($.fn.bootstrapTable.locales, {
formatToggleCustomView () {
return 'Toggle custom view'
}
})
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales)
$.fn.bootstrapTable.methods.push('toggleCustomView')
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
'custom-view-post-body.bs.table': 'onCustomViewPostBody',
'custom-view-pre-body.bs.table': 'onCustomViewPreBody'
})
$.BootstrapTable = class extends $.BootstrapTable {
init () {
this.showCustomView = this.options.showCustomView
super.init()
}
initToolbar (...args) {
if (this.options.customView && this.options.showCustomViewButton) {
this.buttons = Object.assign(this.buttons, {
customView: {
text: this.options.formatToggleCustomView(),
icon: this.options.icons.customView,
event: this.toggleCustomView,
attributes: {
'aria-label': this.options.formatToggleCustomView(),
title: this.options.formatToggleCustomView()
}
}
})
}
super.initToolbar(...args)
}
initBody () {
super.initBody()
if (!this.options.customView) {
return
}
const $table = this.$el
const $customViewContainer = this.$container.find('.fixed-table-custom-view')
$table.hide()
$customViewContainer.hide()
if (!this.options.customView || !this.showCustomView) {
$table.show()
return
}
const data = this.getData().slice(this.pageFrom - 1, this.pageTo)
const value = Utils.calculateObjectValue(this, this.options.customView, [data], '')
this.trigger('custom-view-pre-body', data, value)
if ($customViewContainer.length === 1) {
$customViewContainer.show().html(value)
} else {
this.$tableBody.after(`<div class="fixed-table-custom-view">${value}</div>`)
}
this.trigger('custom-view-post-body', data, value)
}
toggleCustomView () {
this.showCustomView = !this.showCustomView
this.initBody()
}
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,242 @@
/** layui-v2.5.7 MIT License */
;layui.define("layer", function (e) {
"use strict";
var t = layui.$, i = layui.layer, n = layui.hint(), o = layui.device(), a = {
config: {}, set: function (e) {
var i = this;
return i.config = t.extend({}, i.config, e), i
}, on: function (e, t) {
return layui.onevent.call(this, r, e, t)
}
}, l = function () {
var e = this;
return {
upload: function (t) {
e.upload.call(e, t)
}, reload: function (t) {
e.reload.call(e, t)
}, config: e.config
}
}, r = "upload", u = "layui-upload-file", c = "layui-upload-form", f = "layui-upload-iframe",
s = "layui-upload-choose", p = function (e) {
var i = this;
i.config = t.extend({}, i.config, a.config, e), i.render()
};
p.prototype.config = {
accept: "images",
exts: "",
auto: !0,
bindAction: "",
url: "",
field: "file",
acceptMime: "",
method: "post",
data: {},
drag: !0,
size: 0,
number: 0,
multiple: !1
}, p.prototype.render = function (e) {
var i = this, e = i.config;
e.elem = t(e.elem), e.bindAction = t(e.bindAction), i.file(), i.events()
}, p.prototype.file = function () {
var e = this, i = e.config,
n = e.elemFile = t(['<input class="' + u + '" type="file" accept="' + i.acceptMime + '" name="' + i.field + '"', i.multiple ? " multiple" : "", ">"].join("")),
a = i.elem.next();
(a.hasClass(u) || a.hasClass(c)) && a.remove(), o.ie && o.ie < 10 && i.elem.wrap('<div class="layui-upload-wrap"></div>'), e.isFile() ? (e.elemFile = i.elem, i.field = i.elem[0].name) : i.elem.after(n), o.ie && o.ie < 10 && e.initIE()
}, p.prototype.initIE = function () {
var e = this, i = e.config,
n = t('<iframe id="' + f + '" class="' + f + '" name="' + f + '" frameborder="0"></iframe>'),
o = t(['<form target="' + f + '" class="' + c + '" method="post" key="set-mine" enctype="multipart/form-data" action="' + i.url + '">', "</form>"].join(""));
t("#" + f)[0] || t("body").append(n), i.elem.next().hasClass(c) || (e.elemFile.wrap(o), i.elem.next("." + c).append(function () {
var e = [];
return layui.each(i.data, function (t, i) {
i = "function" == typeof i ? i() : i, e.push('<input type="hidden" name="' + t + '" value="' + i + '">')
}), e.join("")
}()))
}, p.prototype.msg = function (e) {
return i.msg(e, {icon: 2, shift: 6})
}, p.prototype.isFile = function () {
var e = this.config.elem[0];
if (e) return "input" === e.tagName.toLocaleLowerCase() && "file" === e.type
}, p.prototype.preview = function (e) {
var t = this;
window.FileReader && layui.each(t.chooseFiles, function (t, i) {
var n = new FileReader;
n.readAsDataURL(i), n.onload = function () {
e && e(t, i, this.result)
}
})
}, p.prototype.upload = function (e, i) {
var n, a = this, l = a.config, r = a.elemFile[0], u = function () {
var i = 0, n = 0, o = e || a.files || a.chooseFiles || r.files, u = function () {
l.multiple && i + n === a.fileLength && "function" == typeof l.allDone && l.allDone({
total: a.fileLength,
successful: i,
aborted: n
})
};
layui.each(o, function (e, o) {
var r = new FormData;
r.append(l.field, o), layui.each(l.data, function (e, t) {
t = "function" == typeof t ? t() : t, r.append(e, t)
});
var c = {
url: l.url,
type: "post",
data: r,
contentType: !1,
processData: !1,
dataType: "json",
headers: l.headers || {},
success: function (t) {
i++, d(e, t), u()
},
error: function () {
n++, a.msg("请求上传接口出现异常"), m(e), u()
}
};
"function" == typeof l.progress && (c.xhr = function () {
var e = t.ajaxSettings.xhr();
return e.upload.addEventListener("progress", function (e) {
if (e.lengthComputable) {
var t = Math.floor(e.loaded / e.total * 100);
l.progress(t, l.item[0], e)
}
}), e
}), t.ajax(c)
})
}, c = function () {
var e = t("#" + f);
a.elemFile.parent().submit(), clearInterval(p.timer), p.timer = setInterval(function () {
var t, i = e.contents().find("body");
try {
t = i.text()
} catch (n) {
a.msg("获取上传后的响应信息出现异常"), clearInterval(p.timer), m()
}
t && (clearInterval(p.timer), i.html(""), d(0, t))
}, 30)
}, d = function (e, t) {
if (a.elemFile.next("." + s).remove(), r.value = "", "object" != typeof t) try {
t = JSON.parse(t)
} catch (i) {
return t = {}, a.msg("请对上传接口返回有效JSON")
}
"function" == typeof l.done && l.done(t, e || 0, function (e) {
a.upload(e)
})
}, m = function (e) {
l.auto && (r.value = ""), "function" == typeof l.error && l.error(e || 0, function (e) {
a.upload(e)
})
}, h = l.exts, v = function () {
var t = [];
return layui.each(e || a.chooseFiles, function (e, i) {
t.push(i.name)
}), t
}(), g = {
preview: function (e) {
a.preview(e)
}, upload: function (e, t) {
var i = {};
i[e] = t, a.upload(i)
}, pushFile: function () {
return a.files = a.files || {}, layui.each(a.chooseFiles, function (e, t) {
a.files[e] = t
}), a.files
}, resetFile: function (e, t, i) {
var n = new File([t], i);
a.files = a.files || {}, a.files[e] = n
}
}, y = function () {
if ("choose" !== i && !l.auto || (l.choose && l.choose(g), "choose" !== i)) return l.before && l.before(g), o.ie ? o.ie > 9 ? u() : c() : void u()
};
if (v = 0 === v.length ? r.value.match(/[^\/\\]+\..+/g) || [] || "" : v, 0 !== v.length) {
switch (l.accept) {
case"file":
if (h && !RegExp("\\w\\.(" + h + ")$", "i").test(escape(v))) return a.msg("选择的文件中包含不支持的格式"), r.value = "";
break;
case"video":
if (!RegExp("\\w\\.(" + (h || "avi|mp4|wma|rmvb|rm|flash|3gp|flv") + ")$", "i").test(escape(v))) return a.msg("选择的视频中包含不支持的格式"), r.value = "";
break;
case"audio":
if (!RegExp("\\w\\.(" + (h || "mp3|wav|mid") + ")$", "i").test(escape(v))) return a.msg("选择的音频中包含不支持的格式"), r.value = "";
break;
default:
if (layui.each(v, function (e, t) {
RegExp("\\w\\.(" + (h || "jpg|png|gif|bmp|jpeg$") + ")", "i").test(escape(t)) || (n = !0)
}), n) return a.msg("选择的图片中包含不支持的格式"), r.value = ""
}
if (a.fileLength = function () {
var t = 0, i = e || a.files || a.chooseFiles || r.files;
return layui.each(i, function () {
t++
}), t
}(), l.number && a.fileLength > l.number) return a.msg("同时最多只能上传的数量为:" + l.number);
if (l.size > 0 && !(o.ie && o.ie < 10)) {
var F;
if (layui.each(a.chooseFiles, function (e, t) {
if (t.size > 1024 * l.size) {
var i = l.size / 1024;
i = i >= 1 ? i.toFixed(2) + "MB" : l.size + "KB", r.value = "", F = i
}
}), F) return a.msg("文件不能超过" + F)
}
y()
}
}, p.prototype.reload = function (e) {
e = e || {}, delete e.elem, delete e.bindAction;
var i = this, e = i.config = t.extend({}, i.config, a.config, e), n = e.elem.next();
n.attr({name: e.name, accept: e.acceptMime, multiple: e.multiple})
}, p.prototype.events = function () {
var e = this, i = e.config, a = function (t) {
e.chooseFiles = {}, layui.each(t, function (t, i) {
var n = (new Date).getTime();
e.chooseFiles[n + "-" + t] = i
})
}, l = function (t, n) {
var o = e.elemFile,
a = t.length > 1 ? t.length + "个文件" : (t[0] || {}).name || o[0].value.match(/[^\/\\]+\..+/g) || [] || "";
o.next().hasClass(s) && o.next().remove(), e.upload(null, "choose"), e.isFile() || i.choose || o.after('<span class="layui-inline ' + s + '">' + a + "</span>")
};
i.elem.off("upload.start").on("upload.start", function () {
var o = t(this), a = o.attr("lay-data");
if (a) try {
a = new Function("return " + a)(), e.config = t.extend({}, i, a)
} catch (l) {
n.error("Upload element property lay-data configuration item has a syntax error: " + a)
}
e.config.item = o, e.elemFile[0].click()
}), o.ie && o.ie < 10 || i.elem.off("upload.over").on("upload.over", function () {
var e = t(this);
e.attr("lay-over", "")
}).off("upload.leave").on("upload.leave", function () {
var e = t(this);
e.removeAttr("lay-over")
}).off("upload.drop").on("upload.drop", function (n, o) {
var r = t(this), u = o.originalEvent.dataTransfer.files || [];
r.removeAttr("lay-over"), a(u), i.auto ? e.upload(u) : l(u)
}), e.elemFile.off("upload.change").on("upload.change", function () {
var t = this.files || [];
a(t), i.auto ? e.upload() : l(t)
}), i.bindAction.off("upload.action").on("upload.action", function () {
e.upload()
}), i.elem.data("haveEvents") || (e.elemFile.on("change", function () {
t(this).trigger("upload.change")
}), i.elem.on("click", function () {
e.isFile() || t(this).trigger("upload.start")
}), i.drag && i.elem.on("dragover", function (e) {
e.preventDefault(), t(this).trigger("upload.over")
}).on("dragleave", function (e) {
t(this).trigger("upload.leave")
}).on("drop", function (e) {
e.preventDefault(), t(this).trigger("upload.drop", e)
}), i.bindAction.on("click", function () {
t(this).trigger("upload.action")
}), i.elem.data("haveEvents", !0))
}, a.render = function (e) {
var t = new p(e);
return l.call(t)
}, e(r, a)
});

File diff suppressed because one or more lines are too long

@ -0,0 +1,242 @@
/** layui-v2.5.7 MIT License */
;layui.define("layer", function (e) {
"use strict";
var t = layui.$, i = layui.layer, n = layui.hint(), o = layui.device(), a = {
config: {}, set: function (e) {
var i = this;
return i.config = t.extend({}, i.config, e), i
}, on: function (e, t) {
return layui.onevent.call(this, r, e, t)
}
}, l = function () {
var e = this;
return {
upload: function (t) {
e.upload.call(e, t)
}, reload: function (t) {
e.reload.call(e, t)
}, config: e.config
}
}, r = "upload", u = "layui-upload-file", c = "layui-upload-form", f = "layui-upload-iframe",
s = "layui-upload-choose", p = function (e) {
var i = this;
i.config = t.extend({}, i.config, a.config, e), i.render()
};
p.prototype.config = {
accept: "images",
exts: "",
auto: !0,
bindAction: "",
url: "",
field: "file",
acceptMime: "",
method: "post",
data: {},
drag: !0,
size: 0,
number: 0,
multiple: !1
}, p.prototype.render = function (e) {
var i = this, e = i.config;
e.elem = t(e.elem), e.bindAction = t(e.bindAction), i.file(), i.events()
}, p.prototype.file = function () {
var e = this, i = e.config,
n = e.elemFile = t(['<input class="' + u + '" type="file" accept="' + i.acceptMime + '" name="' + i.field + '"', i.multiple ? " multiple" : "", ">"].join("")),
a = i.elem.next();
(a.hasClass(u) || a.hasClass(c)) && a.remove(), o.ie && o.ie < 10 && i.elem.wrap('<div class="layui-upload-wrap"></div>'), e.isFile() ? (e.elemFile = i.elem, i.field = i.elem[0].name) : i.elem.after(n), o.ie && o.ie < 10 && e.initIE()
}, p.prototype.initIE = function () {
var e = this, i = e.config,
n = t('<iframe id="' + f + '" class="' + f + '" name="' + f + '" frameborder="0"></iframe>'),
o = t(['<form target="' + f + '" class="' + c + '" method="post" key="set-mine" enctype="multipart/form-data" action="' + i.url + '">', "</form>"].join(""));
t("#" + f)[0] || t("body").append(n), i.elem.next().hasClass(c) || (e.elemFile.wrap(o), i.elem.next("." + c).append(function () {
var e = [];
return layui.each(i.data, function (t, i) {
i = "function" == typeof i ? i() : i, e.push('<input type="hidden" name="' + t + '" value="' + i + '">')
}), e.join("")
}()))
}, p.prototype.msg = function (e) {
return i.msg(e, {icon: 2, shift: 6})
}, p.prototype.isFile = function () {
var e = this.config.elem[0];
if (e) return "input" === e.tagName.toLocaleLowerCase() && "file" === e.type
}, p.prototype.preview = function (e) {
var t = this;
window.FileReader && layui.each(t.chooseFiles, function (t, i) {
var n = new FileReader;
n.readAsDataURL(i), n.onload = function () {
e && e(t, i, this.result)
}
})
}, p.prototype.upload = function (e, i) {
var n, a = this, l = a.config, r = a.elemFile[0], u = function () {
var i = 0, n = 0, o = e || a.files || a.chooseFiles || r.files, u = function () {
l.multiple && i + n === a.fileLength && "function" == typeof l.allDone && l.allDone({
total: a.fileLength,
successful: i,
aborted: n
})
};
layui.each(o, function (e, o) {
var r = new FormData;
r.append(l.field, o), layui.each(l.data, function (e, t) {
t = "function" == typeof t ? t() : t, r.append(e, t)
});
var c = {
url: l.url,
type: "post",
data: r,
contentType: !1,
processData: !1,
dataType: "json",
headers: l.headers || {},
success: function (t) {
i++, d(e, t), u()
},
error: function () {
n++, a.msg("请求上传接口出现异常"), m(e), u()
}
};
"function" == typeof l.progress && (c.xhr = function () {
var e = t.ajaxSettings.xhr();
return e.upload.addEventListener("progress", function (e) {
if (e.lengthComputable) {
var t = Math.floor(e.loaded / e.total * 100);
l.progress(t, l.item[0], e)
}
}), e
}), t.ajax(c)
})
}, c = function () {
var e = t("#" + f);
a.elemFile.parent().submit(), clearInterval(p.timer), p.timer = setInterval(function () {
var t, i = e.contents().find("body");
try {
t = i.text()
} catch (n) {
a.msg("获取上传后的响应信息出现异常"), clearInterval(p.timer), m()
}
t && (clearInterval(p.timer), i.html(""), d(0, t))
}, 30)
}, d = function (e, t) {
if (a.elemFile.next("." + s).remove(), r.value = "", "object" != typeof t) try {
t = JSON.parse(t)
} catch (i) {
return t = {}, a.msg("请对上传接口返回有效JSON")
}
"function" == typeof l.done && l.done(t, e || 0, function (e) {
a.upload(e)
})
}, m = function (e) {
l.auto && (r.value = ""), "function" == typeof l.error && l.error(e || 0, function (e) {
a.upload(e)
})
}, h = l.exts, v = function () {
var t = [];
return layui.each(e || a.chooseFiles, function (e, i) {
t.push(i.name)
}), t
}(), g = {
preview: function (e) {
a.preview(e)
}, upload: function (e, t) {
var i = {};
i[e] = t, a.upload(i)
}, pushFile: function () {
return a.files = a.files || {}, layui.each(a.chooseFiles, function (e, t) {
a.files[e] = t
}), a.files
}, resetFile: function (e, t, i) {
var n = new File([t], i);
a.files = a.files || {}, a.files[e] = n
}
}, y = function () {
if ("choose" !== i && !l.auto || (l.choose && l.choose(g), "choose" !== i)) return l.before && l.before(g), o.ie ? o.ie > 9 ? u() : c() : void u()
};
if (v = 0 === v.length ? r.value.match(/[^\/\\]+\..+/g) || [] || "" : v, 0 !== v.length) {
switch (l.accept) {
case"file":
if (h && !RegExp("\\w\\.(" + h + ")$", "i").test(escape(v))) return a.msg("选择的文件中包含不支持的格式"), r.value = "";
break;
case"video":
if (!RegExp("\\w\\.(" + (h || "avi|mp4|wma|rmvb|rm|flash|3gp|flv") + ")$", "i").test(escape(v))) return a.msg("选择的视频中包含不支持的格式"), r.value = "";
break;
case"audio":
if (!RegExp("\\w\\.(" + (h || "mp3|wav|mid") + ")$", "i").test(escape(v))) return a.msg("选择的音频中包含不支持的格式"), r.value = "";
break;
default:
if (layui.each(v, function (e, t) {
RegExp("\\w\\.(" + (h || "jpg|png|gif|bmp|jpeg$") + ")", "i").test(escape(t)) || (n = !0)
}), n) return a.msg("选择的图片中包含不支持的格式"), r.value = ""
}
if (a.fileLength = function () {
var t = 0, i = e || a.files || a.chooseFiles || r.files;
return layui.each(i, function () {
t++
}), t
}(), l.number && a.fileLength > l.number) return a.msg("同时最多只能上传的数量为:" + l.number);
if (l.size > 0 && !(o.ie && o.ie < 10)) {
var F;
if (layui.each(a.chooseFiles, function (e, t) {
if (t.size > 1024 * l.size) {
var i = l.size / 1024;
i = i >= 1 ? i.toFixed(2) + "MB" : l.size + "KB", r.value = "", F = i
}
}), F) return a.msg("文件不能超过" + F)
}
y()
}
}, p.prototype.reload = function (e) {
e = e || {}, delete e.elem, delete e.bindAction;
var i = this, e = i.config = t.extend({}, i.config, a.config, e), n = e.elem.next();
n.attr({name: e.name, accept: e.acceptMime, multiple: e.multiple})
}, p.prototype.events = function () {
var e = this, i = e.config, a = function (t) {
e.chooseFiles = {}, layui.each(t, function (t, i) {
var n = (new Date).getTime();
e.chooseFiles[n + "-" + t] = i
})
}, l = function (t, n) {
var o = e.elemFile,
a = t.length > 1 ? t.length + "个文件" : (t[0] || {}).name || o[0].value.match(/[^\/\\]+\..+/g) || [] || "";
o.next().hasClass(s) && o.next().remove(), e.upload(null, "choose"), e.isFile() || i.choose || o.after('<span class="layui-inline ' + s + '">' + a + "</span>")
};
i.elem.off("upload.start").on("upload.start", function () {
var o = t(this), a = o.attr("lay-data");
if (a) try {
a = new Function("return " + a)(), e.config = t.extend({}, i, a)
} catch (l) {
n.error("Upload element property lay-data configuration item has a syntax error: " + a)
}
e.config.item = o, e.elemFile[0].click()
}), o.ie && o.ie < 10 || i.elem.off("upload.over").on("upload.over", function () {
var e = t(this);
e.attr("lay-over", "")
}).off("upload.leave").on("upload.leave", function () {
var e = t(this);
e.removeAttr("lay-over")
}).off("upload.drop").on("upload.drop", function (n, o) {
var r = t(this), u = o.originalEvent.dataTransfer.files || [];
r.removeAttr("lay-over"), a(u), i.auto ? e.upload(u) : l(u)
}), e.elemFile.off("upload.change").on("upload.change", function () {
var t = this.files || [];
a(t), i.auto ? e.upload() : l(t)
}), i.bindAction.off("upload.action").on("upload.action", function () {
e.upload()
}), i.elem.data("haveEvents") || (e.elemFile.on("change", function () {
t(this).trigger("upload.change")
}), i.elem.on("click", function () {
e.isFile() || t(this).trigger("upload.start")
}), i.drag && i.elem.on("dragover", function (e) {
e.preventDefault(), t(this).trigger("upload.over")
}).on("dragleave", function (e) {
t(this).trigger("upload.leave")
}).on("drop", function (e) {
e.preventDefault(), t(this).trigger("upload.drop", e)
}), i.bindAction.on("click", function () {
t(this).trigger("upload.action")
}), i.elem.data("haveEvents", !0))
}, a.render = function (e) {
var t = new p(e);
return l.call(t)
}, e(r, a)
});

@ -0,0 +1,163 @@
@charset "utf-8";
*{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box}
*,body{padding:0px; margin:0px;color: #222;font-family: "微软雅黑";}
body{ background:#000d4a url(../img/bg.jpg) center top; background-size:cover;color:#666; padding-bottom: 30px;font-size: .1rem;}
li{ list-style-type:none;}
table{}
i{ margin:0px; padding:0px; text-indent:0px;}
img{ border:none; max-width: 100%;}
a{ text-decoration:none; color:#399bff;}
a.active,a:focus{ outline:none!important; text-decoration:none;}
ol,ul,p,h1,h2,h3,h4,h5,h6{ padding:0; margin:0}
a:hover{ color:#06c; text-decoration: none!important}
.clearfix:after, .clearfix:before {
display: table;
content: " "
}
.clearfix:after {
clear: both
}
.pulll_left{float:left;}
.pulll_right{float:right;}
/*谷哥滚动条样式*/
::-webkit-scrollbar {width:5px;height:5px;position:absolute}
::-webkit-scrollbar-thumb {background-color:#5bc0de}
::-webkit-scrollbar-track {background-color:#ddd}
/***/
.loading{position:fixed; left:0; top:0; font-size:.3rem; z-index:100000000;width:100%; height:100%; background:#1a1a1c; text-align:center;}
.loadbox{position:absolute; width:160px;height:150px; color: #324e93; left:50%; top:50%; margin-top:-100px; margin-left:-75px;}
.loadbox img{ margin:10px auto; display:block; width:40px;}
.copyright{ background:rgba(19,31,64,.32); border: 1px solid rgba(255,255,255,.05); line-height:.5rem; text-align: center; padding-right: 15px; bottom: 0; color:rgba(255,255,255,.7); font-size: .16rem; }
.head{ height:1.05rem; background: url(../img/head_bg.png) no-repeat center center; background-size: 100% 100%; position: relative}
.head h1{ color:#fff; text-align: center; font-size: .42rem; line-height:.75rem;}
.head h1 img{ width:1.5rem; display: inline-block; vertical-align: middle; margin-right: .2rem}
.weather{ position:absolute; right:.3rem; top:0; line-height: .75rem;}
.weather img{ width:.37rem; display: inline-block; vertical-align: middle;}
.weather span{color:rgba(255,255,255,.7); font-size: .18rem; padding-right: .1rem;}
.mainbox{position: relative; padding:.4rem .4rem 0rem .4rem;}
.mainbox>ul{ margin-left:-.4rem; margin-right:-.4rem; }
.mainbox>ul>li{ float: left; padding: 0 .4rem}
.mainbox>ul>li{ width: 30%}
.mainbox>ul>li:nth-child(2){ width: 40%}
/*border: 1px solid rgba(25,186,139,.17);*/
/* margin-bottom: .3rem;*/
.boxall{ background: rgba(255,255,255,.04) url(../img/line.png); background-size: 100% auto; position: relative; z-index: 0; }
.boxall:before,
.boxall:after{ position:absolute; width: .1rem; height: .1rem; content: ""; border-top: 2px solid #02a6b5; top: 0;}
.boxall:before,.boxfoot:before{border-left: 2px solid #02a6b5;left: 0;}
.boxall:after,.boxfoot:after{border-right: 2px solid #02a6b5; right: 0;}
.alltitle{ font-size:.24rem; color:#fff; text-align: center; line-height: .6rem; border-bottom:0px solid rgba(255,255,255,.2)}
.boxfoot{ position:absolute; bottom: 0; width: 100%; left: 0;}
.boxfoot:before,
.boxfoot:after{ position:absolute; width: .1rem; height: .1rem; content: "";border-bottom: 2px solid #02a6b5; bottom: 0;}
.bar{background:rgba(101,132,226,.1); padding: .15rem;}
.barbox li,.barbox2 li{ width:33%; text-align: center; position: relative;}
.barbox:before,
.barbox:after{ position:absolute; width: .3rem; height: .1rem; content: ""; }
.barbox:before{border-left: 2px solid #02a6b5;left: 0;border-top: 2px solid #02a6b5; }
.barbox:after{border-right: 2px solid #02a6b5; right: 0; bottom: 0;border-bottom: 2px solid #02a6b5; }
.barbox li:first-child:before{ position:absolute; content: ""; height:50%; width: 1px; background: rgba(255,255,255,.2); right: 0; top: 25%;}
.barbox{ border: 1px solid rgba(25,186,139,.17); position: relative;}
.barbox li{ font-size: .6rem; color: #ffeb7b; padding: .05rem 0; font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif"; font-weight: bold;}
.barbox2 li{ font-size: .19rem; color: #637c9f; padding-top: .1rem;}
.map{ position:relative; height: 7.2rem; z-index: 9;}
.map4{ width: 200%; height:7rem; position: relative; left: -50%; top: 4%; margin-top: .2rem; z-index: 5;}
.map1,.map2,.map3{ position:absolute;}
.map1{ width:6.43rem; z-index: 2;top:.45rem; left: .4rem; animation: myfirst2 15s infinite linear;}
.map2{ width:5.66rem; top:.85rem; left: .77rem; z-index: 3; opacity: 0.2; animation: myfirst 10s infinite linear;}
.map3{ width:5.18rem; top:1.07rem; left: 1.13rem; z-index: 1;}
.barbox3 li{ font-size: .5rem; padding-left: .53rem;padding-right: 1rem; color: #36bee0; padding-top: .1rem;}
#echarts1,#echarts2,#echarts3,#echarts6,#echarts7,#echarts8{ position:relative;}
#echarts1:before,
#echarts2:before,
#echarts3:before,
#echarts6:before,
#echarts7:before,
#echarts8:before{ position:absolute; content: "23124"; width: 100%; text-align: center; bottom: .15rem; color: #fff; opacity: .7; font-size: .18rem;}
#echarts1:before{ content: "平均单客价"}
#echarts2:before{ content: "男消费"}
#echarts3:before{ content: "女消费"}
#echarts6:before{ content: "新增会员"}
#echarts7:before{ content: "新增领卡会员"}
#echarts8:before{ content: "新增消费会员"}
/*width: 20rem;height: 15rem*/
.tabs { text-align: center; height: 6rem}
.tabs a {
position: relative;
display: inline-block;
margin-left: 1px;
padding:.05rem .2rem;
color: #898989;
transition: all .3s ease-out 0s;
font-size: 14px;
}
.tabs li{ display:inline-block;}
.tabs a:after {
position: absolute;
width: 1px;
height: 10px;
background-color: rgba(255,255,255,.1);
content: '';
margin-left:0; right:-1px; margin-top: 7px;
}
.tabs li a.active {border: 1px solid rgba(25,186,139,.17); background: rgba(255,255,255,.05); color:#fff;}
.tit02{ text-align:center; margin: .1rem 0; position: relative}
.tit02 span{border: 1px solid rgba(25,186,139,.17); letter-spacing: 2px; padding: .01rem .2rem; background: rgba(255,255,255,.05); font-size: .18rem; color: #49bcf7;}
.tit02:before,.tit02:after{ position:absolute; width:26%; height: 1px;background: rgba(25,186,139,.2); content: ""; top: .12rem;}
.tit02:after{ right:0;}
.tit02:before{ left:0;}
.wrap{ height:2.54rem; overflow: hidden;}
.wrap li{ line-height:.42rem; height:.42rem; font-size: .18rem; text-indent: .24rem; margin-bottom: .1rem; }
.wrap li p{border: 1px solid rgba(25,186,139,.17);color: rgba(255,255,255,.6); }
.sy{ float:left; width: 33%; height: 2.2rem; margin-top: -.25rem;}
.adduser{ height:1.5rem; overflow: hidden;}
.adduser li{height:.5rem;}
.adduser img{ width: .40rem; border-radius: .5rem; margin-right: .1rem; display: inline-block; vertical-align: middle;}
.adduser span{ line-height:.5rem; font-size: .18rem;color: rgba(255,255,255,.6); }
.sycm ul{ margin-left:-.5rem;margin-right:-.5rem; padding: .16rem 0;}
.sycm li{ float: left; width: 25%; text-align: center; position: relative}
.sycm li:before{ position:absolute; content: ""; height:30%; width: 1px; background: rgba(255,255,255,.1); right: 0; top: 15%;}
.sycm li:last-child:before{ width: 0;}
.sycm li h2{ font-size:.25rem; color: #c5ccff;}
.sycm li h1{ font-size:.2rem; color: #c5ccff;}
.sycm li span{ font-size:.18rem; color: #fff; opacity: .5;}
@keyframes myfirst2
{
from {transform: rotate(0deg);}
to {transform: rotate(359deg);}
}
@keyframes myfirst
{
from {transform: rotate(0deg);}
to {transform: rotate(-359deg);}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,97 @@
*{
margin: 0;
padding: 0;
white-space: nowrap;
}
body {
background: url(../img/backgroundImg.jpg) no-repeat fixed center center;
background-size: 100% 100%;
font-weight: 400;
letter-spacing: 1px
}
.th {
font-size: 0.8vw;
}
.td {
font-size: 0.6vw;
}
.scrollTable {
position: absolute;
top: 14.9%;
left: 3.8%;
width: 22.8%;
height: 50%;
}
.gauge {
position: absolute;
top: 43.9%;
left: 84.8%;
width: 23.2%;
aspect-ratio: 2;
transform: translateX(-50%);
}
.bar {
position: absolute;
/*top: 14.5%;*/
/*left: 72.9%;*/
/*width: 23.2%;*/
/*height: 21%;*/
top: 14.5%;
left: 72.9%;
width: 23.2%;
height: 21%;
}
.line {
position: absolute;
top: 73.5%;
left: 3.5%;
width: 93%;
height: 21%;
}
.num {
position: absolute;
top: 16.8%;
transform: translate(-50%, -50%);
font-size: 2vw;
}
.aState{
position: absolute;
top: 29.7%;
left: 41%;
width: 1.5vw;
height: 1.5vw;
transform: translate(-50%, -50%);
background-color: #17e137;
border-radius: 50%;
}
.bState{
position: absolute;
top: 29.7%;
left: 51%;
width: 1.5vw;
height: 1.5vw;
transform: translate(-50%, -50%);
background-color: #17e137;
border-radius: 50%;
}
.cState{
position: absolute;
top: 29.7%;
left: 62%;
width: 1.5vw;
height: 1.5vw;
transform: translate(-50%, -50%);
background-color: #17e137;
border-radius: 50%;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -0,0 +1,355 @@
/* */
$.getJSON('js/map.json', function(data){
$.each(data, function (infoIndex, info){
var city = info.children;
for(var i =0;i<city.length;i++){
var citydetail = new Array();
var name = city[i].name;
geoCoordMap[name]= citydetail;
var lat = parseFloat(city[i].lat);
var log = parseFloat(city[i].log);
citydetail.push(log);
citydetail.push(lat);
}
})
map_1_option.series[0].data = convertData(data2.sort(function (a, b) {
return b.value - a.value;
})),
/* }).slice(0, 6)),
*/ map_1.setOption(map_1_option);
});
var geoCoordMap = {
};
var data2 = [
{name: '商丘', value: 9},
{name: '鄂尔多斯', value: 12},
{name: '招远', value: 12},
{name: '舟山', value: 12},
{name: '齐齐哈尔', value: 14},
{name: '盐城', value: 15},
{name: '赤峰', value: 16},
{name: '青岛', value: 18},
{name: '乳山', value: 18},
{name: '金昌', value: 19},
{name: '泉州', value: 21},
{name: '莱西', value: 21},
{name: '日照', value: 21},
{name: '胶南', value: 22},
{name: '南通', value: 23},
{name: '拉萨', value: 24},
{name: '云浮', value: 24},
{name: '梅州', value: 25},
{name: '文登', value: 25},
{name: '上海', value: 25},
{name: '攀枝花', value: 25},
{name: '威海', value: 25},
{name: '承德', value: 25},
{name: '厦门', value: 26},
{name: '汕尾', value: 26},
{name: '潮州', value: 26},
{name: '丹东', value: 27},
{name: '太仓', value: 27},
{name: '曲靖', value: 27},
{name: '烟台', value: 28},
{name: '福州', value: 29},
{name: '瓦房店', value: 30},
{name: '即墨', value: 30},
{name: '抚顺', value: 31},
{name: '玉溪', value: 31},
{name: '张家口', value: 31},
{name: '阳泉', value: 31},
{name: '莱州', value: 32},
{name: '湖州', value: 32},
{name: '汕头', value: 32},
{name: '昆山', value: 33},
{name: '宁波', value: 33},
{name: '湛江', value: 33},
{name: '揭阳', value: 34},
{name: '荣成', value: 34},
{name: '连云港', value: 35},
{name: '葫芦岛', value: 35},
{name: '常熟', value: 36},
{name: '东莞', value: 36},
{name: '河源', value: 36},
{name: '淮安', value: 36},
{name: '泰州', value: 36},
{name: '南宁', value: 37},
{name: '营口', value: 37},
{name: '惠州', value: 37},
{name: '江阴', value: 37},
{name: '蓬莱', value: 37},
{name: '韶关', value: 38},
{name: '嘉峪关', value: 38},
{name: '广州', value: 38},
{name: '延安', value: 38},
{name: '太原', value: 39},
{name: '清远', value: 39},
{name: '中山', value: 39},
{name: '昆明', value: 39},
{name: '寿光', value: 40},
{name: '盘锦', value: 40},
{name: '长治', value: 41},
{name: '深圳', value: 41},
{name: '珠海', value: 42},
{name: '宿迁', value: 43},
{name: '咸阳', value: 43},
{name: '铜川', value: 44},
{name: '平度', value: 44},
{name: '佛山', value: 44},
{name: '海口', value: 44},
{name: '江门', value: 45},
{name: '章丘', value: 45},
{name: '肇庆', value: 46},
{name: '大连', value: 47},
{name: '临汾', value: 47},
{name: '吴江', value: 47},
{name: '石嘴山', value: 49},
{name: '沈阳', value: 50},
{name: '苏州', value: 50},
{name: '茂名', value: 50},
{name: '嘉兴', value: 51},
{name: '长春', value: 51},
{name: '胶州', value: 52},
{name: '银川', value: 52},
{name: '张家港', value: 52},
{name: '三门峡', value: 53},
{name: '锦州', value: 54},
{name: '南昌', value: 54},
{name: '柳州', value: 54},
{name: '三亚', value: 54},
{name: '自贡', value: 56},
{name: '吉林', value: 56},
{name: '阳江', value: 57},
{name: '泸州', value: 57},
{name: '西宁', value: 57},
{name: '宜宾', value: 58},
{name: '呼和浩特', value: 58},
{name: '成都', value: 58},
{name: '大同', value: 58},
{name: '镇江', value: 59},
{name: '桂林', value: 59},
{name: '张家界', value: 59},
{name: '宜兴', value: 59},
{name: '北海', value: 60},
{name: '西安', value: 61},
{name: '金坛', value: 62},
{name: '东营', value: 62},
{name: '牡丹江', value: 63},
{name: '遵义', value: 63},
{name: '绍兴', value: 63},
{name: '扬州', value: 64},
{name: '常州', value: 64},
{name: '潍坊', value: 65},
{name: '重庆', value: 66},
{name: '台州', value: 67},
{name: '南京', value: 67},
{name: '滨州', value: 70},
{name: '贵阳', value: 71},
{name: '无锡', value: 71},
{name: '本溪', value: 71},
{name: '克拉玛依', value: 72},
{name: '渭南', value: 72},
{name: '马鞍山', value: 72},
{name: '宝鸡', value: 72},
{name: '焦作', value: 75},
{name: '句容', value: 75},
{name: '北京', value: 79},
{name: '徐州', value: 79},
{name: '衡水', value: 80},
{name: '包头', value: 80},
{name: '绵阳', value: 80},
{name: '乌鲁木齐', value: 84},
{name: '枣庄', value: 84},
{name: '杭州', value: 84},
{name: '淄博', value: 85},
{name: '鞍山', value: 86},
{name: '溧阳', value: 86},
{name: '库尔勒', value: 86},
{name: '安阳', value: 90},
{name: '开封', value: 90},
{name: '济南', value: 92},
{name: '德阳', value: 93},
{name: '温州', value: 95},
{name: '九江', value: 96},
{name: '邯郸', value: 98},
{name: '临安', value: 99},
{name: '兰州', value: 99},
{name: '沧州', value: 100},
{name: '临沂', value: 103},
{name: '南充', value: 104},
{name: '天津', value: 105},
{name: '富阳', value: 106},
{name: '泰安', value: 112},
{name: '诸暨', value: 112},
{name: '郑州', value: 113},
{name: '哈尔滨', value: 114},
{name: '聊城', value: 116},
{name: '芜湖', value: 117},
{name: '唐山', value: 119},
{name: '平顶山', value: 119},
{name: '邢台', value: 119},
{name: '德州', value: 120},
{name: '济宁', value: 120},
{name: '荆州', value: 127},
{name: '宜昌', value: 130},
{name: '义乌', value: 132},
{name: '丽水', value: 133},
{name: '洛阳', value: 134},
{name: '秦皇岛', value: 136},
{name: '株洲', value: 143},
{name: '石家庄', value: 147},
{name: '莱芜', value: 148},
{name: '常德', value: 152},
{name: '保定', value: 153},
{name: '湘潭', value: 154},
{name: '金华', value: 157},
{name: '岳阳', value: 169},
{name: '长沙', value: 175},
{name: '衢州', value: 177},
{name: '廊坊', value: 193},
{name: '菏泽', value: 194},
{name: '合肥', value: 229},
{name: '武汉', value: 273},
{name: '大庆', value: 279}
];
var convertData = function (data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name];
if (geoCoord) {
res.push({
name: data[i].name,
value: geoCoord.concat(data[i].value)
});
}
}
return res;
};
//地图容器
// var map_1 = echarts.init(document.getElementById('map_1'));
//地图容器
//34个省、市、自治区的名字拼音映射数组
//网络零售当期分布
var map_1_option = {
/* title: {
text: '全国主要城市空气质量',
subtext: 'data from PM25.in',
left: 'center',
textStyle: {
color: '#fff'
}
},*/
grid: {
top: '0',
left: '0',
right: '0',
bottom: '0',
containLabel: true
},
tooltip : {
trigger: 'item'
},
/* legend: {
orient: 'vertical',
y: 'bottom',
x:'right',
data:['pm2.5'],
textStyle: {
color: '#fff'
}
},*/
geo: {
map: 'china',
label: {
emphasis: {
show: false
}
},
roam: false,
itemStyle: {
normal: {
areaColor: '#4c60ff',
borderColor: '#000f4c',
},
emphasis: {
areaColor: '#293fff'
}
}
},
series : [
{
name: 'pm2.5',
type: 'scatter',
coordinateSystem: 'geo',
data: convertData(data2),
symbolSize: function (val) {
return val[2] / 20;
},
label: {
normal: {
formatter: '{b}',
position: 'right',
show: false
},
emphasis: {
show: true
}
},
itemStyle: {
normal: {
color: '#ecf500'
}
}
},
{
name: 'Top 5',
type: 'effectScatter',
coordinateSystem: 'geo',
symbolSize: function (val) {
return val[2] / 10;
},
showEffectOn: 'render',
rippleEffect: {
brushType: 'stroke'
},
hoverAnimation: true,
/* label: {
normal: {
formatter: '{b}',
position: 'right',
show: true,
color:'#333'
},
emphasis:{
color:'#333'
}
},*/
itemStyle: {
normal: {
color: '#f75749',
shadowBlur: 10,
shadowColor: '#333'
}
},
zlevel: 1
}
]
};
$(document).ready(function(){
  map_1.resize();
})
window.addEventListener("resize", function () {
  map_1.resize();
});

@ -0,0 +1,117 @@
/**
* Minified by jsDelivr using Terser v5.3.5.
* Original file: /npm/js-base64@3.6.0/base64.min.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function (e, t) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : function () {
const r = e.Base64, o = t();
o.noConflict = () => (e.Base64 = r, o), e.Meteor && (Base64 = o), e.Base64 = o
}()
}("undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : this, (function () {
"use strict";
const e = "3.6.0", t = "function" == typeof atob, r = "function" == typeof btoa, o = "function" == typeof Buffer,
n = "function" == typeof TextDecoder ? new TextDecoder : void 0,
a = "function" == typeof TextEncoder ? new TextEncoder : void 0,
f = [..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="], i = (e => {
let t = {};
return e.forEach(((e, r) => t[e] = r)), t
})(f), c = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,
u = String.fromCharCode.bind(String),
s = "function" == typeof Uint8Array.from ? Uint8Array.from.bind(Uint8Array) : (e, t = (e => e)) => new Uint8Array(Array.prototype.slice.call(e, 0).map(t)),
d = e => e.replace(/[+\/]/g, (e => "+" == e ? "-" : "_")).replace(/=+$/m, ""),
l = e => e.replace(/[^A-Za-z0-9\+\/]/g, ""), h = e => {
let t, r, o, n, a = "";
const i = e.length % 3;
for (let i = 0; i < e.length;) {
if ((r = e.charCodeAt(i++)) > 255 || (o = e.charCodeAt(i++)) > 255 || (n = e.charCodeAt(i++)) > 255) throw new TypeError("invalid character found");
t = r << 16 | o << 8 | n, a += f[t >> 18 & 63] + f[t >> 12 & 63] + f[t >> 6 & 63] + f[63 & t]
}
return i ? a.slice(0, i - 3) + "===".substring(i) : a
}, p = r ? e => btoa(e) : o ? e => Buffer.from(e, "binary").toString("base64") : h,
y = o ? e => Buffer.from(e).toString("base64") : e => {
let t = [];
for (let r = 0, o = e.length; r < o; r += 4096) t.push(u.apply(null, e.subarray(r, r + 4096)));
return p(t.join(""))
}, A = (e, t = !1) => t ? d(y(e)) : y(e), b = e => {
if (e.length < 2) return (t = e.charCodeAt(0)) < 128 ? e : t < 2048 ? u(192 | t >>> 6) + u(128 | 63 & t) : u(224 | t >>> 12 & 15) + u(128 | t >>> 6 & 63) + u(128 | 63 & t);
var t = 65536 + 1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320);
return u(240 | t >>> 18 & 7) + u(128 | t >>> 12 & 63) + u(128 | t >>> 6 & 63) + u(128 | 63 & t)
}, g = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g, B = e => e.replace(g, b),
x = o ? e => Buffer.from(e, "utf8").toString("base64") : a ? e => y(a.encode(e)) : e => p(B(e)),
C = (e, t = !1) => t ? d(x(e)) : x(e), m = e => C(e, !0),
U = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, F = e => {
switch (e.length) {
case 4:
var t = ((7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3)) - 65536;
return u(55296 + (t >>> 10)) + u(56320 + (1023 & t));
case 3:
return u((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
default:
return u((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1))
}
}, w = e => e.replace(U, F), S = e => {
if (e = e.replace(/\s+/g, ""), !c.test(e)) throw new TypeError("malformed base64.");
e += "==".slice(2 - (3 & e.length));
let t, r, o, n = "";
for (let a = 0; a < e.length;) t = i[e.charAt(a++)] << 18 | i[e.charAt(a++)] << 12 | (r = i[e.charAt(a++)]) << 6 | (o = i[e.charAt(a++)]), n += 64 === r ? u(t >> 16 & 255) : 64 === o ? u(t >> 16 & 255, t >> 8 & 255) : u(t >> 16 & 255, t >> 8 & 255, 255 & t);
return n
}, E = t ? e => atob(l(e)) : o ? e => Buffer.from(e, "base64").toString("binary") : S,
v = o ? e => s(Buffer.from(e, "base64")) : e => s(E(e), (e => e.charCodeAt(0))), D = e => v(z(e)),
R = o ? e => Buffer.from(e, "base64").toString("utf8") : n ? e => n.decode(v(e)) : e => w(E(e)),
z = e => l(e.replace(/[-_]/g, (e => "-" == e ? "+" : "/"))), T = e => R(z(e)),
Z = e => ({value: e, enumerable: !1, writable: !0, configurable: !0}), j = function () {
const e = (e, t) => Object.defineProperty(String.prototype, e, Z(t));
e("fromBase64", (function () {
return T(this)
})), e("toBase64", (function (e) {
return C(this, e)
})), e("toBase64URI", (function () {
return C(this, !0)
})), e("toBase64URL", (function () {
return C(this, !0)
})), e("toUint8Array", (function () {
return D(this)
}))
}, I = function () {
const e = (e, t) => Object.defineProperty(Uint8Array.prototype, e, Z(t));
e("toBase64", (function (e) {
return A(this, e)
})), e("toBase64URI", (function () {
return A(this, !0)
})), e("toBase64URL", (function () {
return A(this, !0)
}))
}, O = {
version: e,
VERSION: "3.6.0",
atob: E,
atobPolyfill: S,
btoa: p,
btoaPolyfill: h,
fromBase64: T,
toBase64: C,
encode: C,
encodeURI: m,
encodeURL: m,
utob: B,
btou: w,
decode: T,
isValid: e => {
if ("string" != typeof e) return !1;
const t = e.replace(/\s+/g, "").replace(/=+$/, "");
return !/[^\s0-9a-zA-Z\+/]/.test(t) || !/[^\s0-9a-zA-Z\-_]/.test(t)
},
fromUint8Array: A,
toUint8Array: D,
extendString: j,
extendUint8Array: I,
extendBuiltins: () => {
j(), I()
},
Base64: {}
};
return Object.keys(O).forEach((e => O.Base64[e] = O[e])), O
}));
//# sourceMappingURL=/sm/8bca8602e2256d240cef904e1c1df432ccfdd2a2a73f6911c60be79e526e3e1e.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,345 @@
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
const gauge = (data, id) => {
let charts = echarts.init(id)
let option = {
title: [
{
text: "合格",
y: "70%",
x: "center",
textStyle: {
fontWeight: "bold",
fontSize: vw*0.7,
color: "#ffffff",
},
},
],
series: [
{
name: "",
type: "gauge",
splitNumber: 1, //刻度数量
min: 0,
max: 100,
radius: "140%", //图表尺寸
center: ["50%", "80%"],
startAngle: 180,
endAngle: 0,
axisTick: {
show: true,
lineStyle: {
color: "#042653",
width: 3,
},
length: vw,
splitNumber: 50,
distance:10,
},
axisLine: {
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
detail: {
show: false,
},
},
{
type: "gauge",
radius: "140%",
startAngle: 180,
endAngle: 0,
center: ["50%", "80%"],
min: 0,
max: 100,
title: {
show: false,
},
detail: {
formatter: function (params) {
return data + "%";
},
color: "#2755F7",
fontSize: 2*vw,
offsetCenter: [0, -2*vw],
},
axisLine: {
show: true,
lineStyle: {
width: vw*0.7,
color: [
[data / 100, new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#08f38a",
},
{
offset: 1,
color: "#09ecdb",
},
])],
[1, "rgba(225,225,225,0.4)"],
],
},
},
axisTick: {
show: false,
},
splitLine: {
show: false,
},
axisLabel: {
show: false,
},
pointer: {
show: false,
},
itemStyle: {
normal: {
color: "#54F200",
},
},
data: [data],
},
{
type: "pie",
startAngle: 180,
center: ["50%", "80%"],
radius: ["131%", "133%"],
labelLine: {
show: false,
},
data: [
{
name: "",
value: data,
itemStyle: {
normal: {
show: true,
color: 'rgba(0,0,0,0)',
},
},
},
{
//画中间的图标
name: "",
value: 0,
label: {
position: "inside",
backgroundColor: "#fff",
borderRadius: 12,
padding: vw*0.5, // 可以控制圆的大小
borderWidth: 3,
borderColor: "#43f0d2",
},
},
{
name: "",
value: 100 - data,
itemStyle: {
color: "rgba(0,0,0,0)",
},
},
{
name: "",
value: 100,
itemStyle: {
color: "rgba(0,0,0,0)",
},
},
],
},
],
};
charts.setOption(option)
$(window).resize(charts.resize);
}
const bar = (data,id) =>{
let charts = echarts.init(id)
let option ={
tooltip: {},
grid: {
top:'10%',
bottom:'10%',
left:'10%',
right:'5%',
},
xAxis: [
{
type: "category",
data: data.x,
axisTick: {
alignWithLabel: true,
},
nameTextStyle: {
color: "#82b0ec",
},
axisLine: {
lineStyle: {
color: "#82b0ec",
},
},
axisLabel: {
textStyle: {
color: "#82b0ec",
},
},
},
],
yAxis: [
{
type: "value",
axisLabel: {
textStyle: {
color: "#82b0ec",
},
},
splitLine: {
lineStyle: {
color: "#0c2c5a",
},
},
axisLine: {
show: false,
},
},
],
series: [
{
name: "",
type: "pictorialBar",
symbolSize: [20, 5],
symbolOffset: [0, '-50%'],
symbolPosition: "end",
z: 12,
label: {
normal: {
show: true,
color:'#63ccfe',
position: "top",
},
},
data: data.y,
},
{
type: "bar",
itemStyle: {
normal: {
opacity: 0.7,
borderWidth:1,
borderColor:'#3babf3',
color:new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#0e8bd6",
},
{
offset: 1,
color: "#0b2bd8",
},
])
},
},
barWidth: "20",
data: data.y,
},
],
}
charts.setOption(option)
$(window).resize(charts.resize);
}
const line = (data,id) =>{
let charts = echarts.init(id)
let option = {
grid: {
left: "1%",
right: "1%",
top: "10%",
bottom: "5%",
containLabel: true,
},
tooltip: {
show: true,
trigger: "axis",
},
xAxis: [
{
type: "category",
boundaryGap: false,
axisLabel: {
color: '#30eee9',
},
axisLine: {
show: true,
lineStyle: {
color: "#397cbc",
},
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: "#195384",
type :'dashed'
},
},
data: data.x,
},
],
yAxis: [
{
type: "value",
axisLabel: {
color: '#30eee9',
},
axisLine: {
lineStyle: {
color: "#186afe",
},
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: "#11366e",
type :'dashed'
},
},
},
],
series: [
{
name: "产量",
type: "line",
stack: "总量",
symbol: "circle",
symbolSize: 8,
itemStyle: {
normal: {
color: "#aecb56",
borderWidth:2,
borderColor:'#fff',
lineStyle: {
color: "#aecb56",
width: 2,
},
},
},
data: data.y,
},
],
};
charts.setOption(option)
$(window).resize(charts.resize);
}

@ -0,0 +1,239 @@
//当班统计记得加上时间型号汇总有一个爆undefine
//进七日产量要考虑没有结束时间的问题
$(() => {
(function(){
var str1 = [];
//当班统计与实际产量
$.ajax({
url:"/nanjing/Kanban/zhanshi",
type:'post',
async:false,
success:function (data){
// console.log("当班统计"+data);
str1[0] = data.data.yuji;
str1[1] = data.data.shiji;
str1[2] = data.data.shiji;
setNum(str1)
}
});
var str2 = [];
var str4 = [];
var str9 = [];
var arr=[1,2,3,5,6,7,8];
for (i=0;i<4;i++) {
$.ajax({
type: 'post',
async: false,
url: "/nanjing/Kanban/tongji",
data:{'arr':arr[i]},
success: function (data) {
// console.log("柱状图" + data.data)
if (data.data[0]==null)
{
console.log(i+"not")
str2[i] = 1000;
str4[i] = "CESHI";
}
else{
console.log(i);
console.log(data)
// str2[i] = data.data[0].okNum;
str2[i] = data.data[0].okNum;
// str4[i] = data.data[0].ProductName;
// alert(data.data[0].ProductName.length)
if (data.data[0].ProductName.length>5){
str4[i] = data.data[0].ProductName.substring(0,4)+'..';
}else {
str4[i] = data.data[0].ProductName;
}
}
},
});
}
bar({
// str2[0] = data.data
x: str4,
y: str2
}, document.getElementById('bar'))
//合格率
$.ajax({
type : 'post',
url: "/nanjing/Kanban/hege",
async : false,
success: function (data) {
if (data){
// nums2.push((data.data[0].okNum)/(data.data[0].finNum)*100)
// console.log(data)
var int = data.data*100;
gauge(int, document.getElementById('gauge'))
}
},
})
//最下方折线图
var names3 = [];
var nums3 = [];
var time = [];
var yesterday = [];
var month = [];
var day = [];
var beginTime = [];
var endTime = [];
var endTime1 = [];
var chuo = 24 * 60 * 60 * 1000;
var xiabiao = [];
for (i = 7;i>=0;i--) {
time[i] = (new Date).getTime() - (chuo*6)+(chuo*i);
yesterday[i]= new Date(time[i]);
month[i]= yesterday[i].getMonth();
day[i] = yesterday[i].getDate();
endTime[i] = yesterday[i].getFullYear() + "-" + (yesterday[i].getMonth() > 9 ? (yesterday[i].getMonth() + 1) : "0" + (yesterday[i].getMonth() + 1)) + "-" + (yesterday[i].getDate() > 9 ? (yesterday[i].getDate()) : "0" + (yesterday[i].getDate()));
// console.log(endTime[i])
} for (i = 7;i>=0;i--) {
time[i] = (new Date).getTime() - (chuo*7)+(chuo*i);
yesterday[i]= new Date(time[i]);
month[i]= yesterday[i].getMonth();
day[i] = yesterday[i].getDate();
beginTime[i] = yesterday[i].getFullYear() + "-" + (yesterday[i].getMonth() > 9 ? (yesterday[i].getMonth() + 1) : "0" + (yesterday[i].getMonth() + 1)) + "-" + (yesterday[i].getDate() > 9 ? (yesterday[i].getDate()) : "0" + (yesterday[i].getDate()));
xiabiao[i] = (yesterday[i].getMonth() > 9 ? (yesterday[i].getMonth() + 1) : "0" + (yesterday[i].getMonth() + 1)) + "-" + (yesterday[i].getDate() > 9 ? (yesterday[i].getDate()) : "0" + (yesterday[i].getDate()));
// console.log(beginTime[i])
}
// console.log(endTime)
var str3 = [];
for (i = 1;i<8;i++){
$.ajax({
type : 'post',
async : false,
url: "/nanjing/Kanban/listDay",
data:{'beginTime':beginTime[i],'endTime':endTime[i]},
success: function (data) {
str3[i-1] = data.data;
endTime1[i-1] = endTime[i];
console.log("str3==============="+str3[i-1])
},
})}
line({
x: endTime1,
y: str3,
}, document.getElementById('line'))
//显示线的颜色
$.ajax({
url: "/nanjing/SubStation/deviceState",
type:'post',
async:false,
success:function (data){
// console.log("qwewqewqewqeqwewqewq")
// console.log(data.data)
setState({
aState: data.data[0].deviceState,
bState: data.data[1].deviceState,
cState: data.data[2].deviceState,
})
}
})
// for (i=0;i<9;i++){
let arr1 = [];
let arr2= [];
let arr3= [];
let arr4 = [];
let arr5 = [];
$.ajax(
{
url:"/nanjing/TRpShiftInfo/nodeClick2",
type:'post',
async:false,
// data:{'i':i},
success:function (data){
console.log(data.data.length)
for (i=0;i<data.data.length;i++){
arr1[i] = 1+i;
arr2[i] = data.data[i].machineNo;
arr3[i] = data.data[i].planAmount;
arr4[i] = data.data[i].realAmount;
arr5[i]= (data.data[i].realAmount/data.data[i].planAmount).toFixed(4)*100;
dynamicTable({
el: '#scrollTable',
rowNum: 9,
timeout: 0,
theadHeight: 9,
header: ['序号', '型号', '计划数', '完成数', '进度'],
// data: [[1, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, 6]],
data:[[arr1[i],arr2[i],arr3[i],arr4[i],arr5[i]+'%']],
index: false,
fontColor: '#60afe2',
indexBGC: '#86F3FF',
headerBGC: 'rgba(255,255,255,0.05)',
oddRowBGC: 'rgba(255,255,255,0.01)',
evenRowBGC: 'rgba(255,255,255,0.05)',
});
}
// arr1[0] = 1;
// arr2[0] = data.data[0].machineNo;
// arr3[0] = data.data[0].planAmount;
// arr4[0] = data.data[0].realAmount;
// arr5[0] = (data.data[0].realAmount/data.data[0].planAmount).toFixed(4)*100;
[1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9].length < 9 ? clearInterval(timeOne) : timeOne = tableAnimation('#scrollTable')
}
}
)
// }
})()
})
let timeOne = null
timeOne ? clearInterval(timeOne) : null
let setNum = (data) => {
let data1 = [data?.[0].toString().split('').at(-4) || '0', data?.[0].toString().split('').at(-3) || '0', data?.[0].toString().split('').at(-2) || '0', data?.[0].toString().split('').at(-1) || '0'] || Array(4).fill('0')
let data2 = [data?.[1].toString().split('').at(-4) || '0', data?.[1].toString().split('').at(-3) || '0', data?.[1].toString().split('').at(-2) || '0', data?.[1].toString().split('').at(-1) || '0'] || Array(4).fill('0')
let data3 = [data?.[2].toString().split('').at(-4) || '0', data?.[2].toString().split('').at(-3) || '0', data?.[2].toString().split('').at(-2) || '0', data?.[2].toString().split('').at(-1) || '0'] || Array(4).fill('0')
data1.forEach((e, index) => {
$('#statistics .num' + (index + 1)).html(e)
})
data2.forEach((e, index) => {
$('#actualOutput .num' + (index + 1)).html(e)
})
data3.forEach((e, index) => {
$('#NumberOfDownLines .num' + (index + 1)).html(e)
})
}
let setState = (data) => {
let data1 = data?.aState || false
let data2 = data?.bState || false
let data3 = data?.cState || false
$("#aState").css({backgroundColor: data1 ? '#17e137' : '#ff0000'})
$("#bState").css({backgroundColor: data2 ? '#17e137' : '#ff0000'})
$("#cState").css({backgroundColor: data3 ? '#17e137' : '#ff0000'})
}

@ -0,0 +1 @@
!function(t){"use strict";t.fn.countUp=function(e){var a=t.extend({time:2e3,delay:10},e);return this.each(function(){var e=t(this),n=a,u=function(){e.data("counterupTo")||e.data("counterupTo",e.text());var t=parseInt(e.data("counter-time"))>0?parseInt(e.data("counter-time")):n.time,a=parseInt(e.data("counter-delay"))>0?parseInt(e.data("counter-delay")):n.delay,u=t/a,r=e.data("counterupTo"),o=[r],c=/[0-9]+,[0-9]+/.test(r);r=r.replace(/,/g,"");for(var d=(/^[0-9]+$/.test(r),/^[0-9]+\.[0-9]+$/.test(r)),s=d?(r.split(".")[1]||[]).length:0,i=u;i>=1;i--){var p=parseInt(Math.round(r/u*i));if(d&&(p=parseFloat(r/u*i).toFixed(s)),c)for(;/(\d+)(\d{3})/.test(p.toString());)p=p.toString().replace(/(\d+)(\d{3})/,"$1,$2");o.unshift(p)}e.data("counterup-nums",o),e.text("0");var f=function(){e.text(e.data("counterup-nums").shift()),e.data("counterup-nums").length?setTimeout(e.data("counterup-func"),a):(delete e.data("counterup-nums"),e.data("counterup-nums",null),e.data("counterup-func",null))};e.data("counterup-func",f),setTimeout(e.data("counterup-func"),a)};e.waypoint(u,{offset:"100%",triggerOnce:!0})})}}(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -0,0 +1,30 @@
/* */
$(window).load(function(){
$(".loading").fadeOut()
})
/****/
$(document).ready(function(){
var whei=$(window).width()
$("html").css({fontSize:whei/20})
$(window).resize(function(){
var whei=$(window).width()
$("html").css({fontSize:whei/20})
});
});
//
//
//

@ -0,0 +1,58 @@
$(() => {
(function(){
timeOne ? clearInterval(timeOne) : null
dynamicTable({
el: '#scrollTable',
rowNum: 9,
timeout: 0,
theadHeight: 9,
header: ['序号', '型号', '计划数', '完成数', '进度'],
data: [[1, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, '100%'], [2, 'a12345', 6666, 5555, 6]],
index: false,
fontColor: '#60afe2',
indexBGC: '#86F3FF',
headerBGC: 'rgba(255,255,255,0.05)',
oddRowBGC: 'rgba(255,255,255,0.01)',
evenRowBGC: 'rgba(255,255,255,0.05)',
});
[1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9].length < 9 ? clearInterval(timeOne) : timeOne = tableAnimation('#scrollTable')
})()
gauge(80, document.getElementById('gauge'))
bar({
x: [111, 222, 333, 444],
y: [111, 222, 333, 444]
}, document.getElementById('bar'))
line({
x: ['1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7'],
y: [123, 345, 1, 78, 34, 69, 23],
}, document.getElementById('line'))
setNum([1234, 2345, 3456])
setState({
aState: true,
bState: false,
cState: true,
})
})
let timeOne = null
let setNum = (data) => {
let data1 = [data?.[0].toString().split('').at(-4) || '0', data?.[0].toString().split('').at(-3) || '0', data?.[0].toString().split('').at(-2) || '0', data?.[0].toString().split('').at(-1) || '0'] || Array(4).fill('0')
let data2 = [data?.[1].toString().split('').at(-4) || '0', data?.[1].toString().split('').at(-3) || '0', data?.[1].toString().split('').at(-2) || '0', data?.[1].toString().split('').at(-1) || '0'] || Array(4).fill('0')
let data3 = [data?.[2].toString().split('').at(-4) || '0', data?.[2].toString().split('').at(-3) || '0', data?.[2].toString().split('').at(-2) || '0', data?.[2].toString().split('').at(-1) || '0'] || Array(4).fill('0')
data1.forEach((e, index) => {
$('#statistics .num' + (index + 1)).html(e)
})
data2.forEach((e, index) => {
$('#actualOutput .num' + (index + 1)).html(e)
})
data3.forEach((e, index) => {
$('#NumberOfDownLines .num' + (index + 1)).html(e)
})
}
let setState = (data) => {
let data1 = data?.aState || false
let data2 = data?.bState || false
let data3 = data?.cState || false
$("#aState").css({backgroundColor: data1 ? '#17e137' : '#ff0000'})
$("#bState").css({backgroundColor: data2 ? '#17e137' : '#ff0000'})
$("#cState").css({backgroundColor: data3 ? '#17e137' : '#ff0000'})
}

@ -0,0 +1,231 @@
/**
* dynamicTable 动态表格
* @param { Object } resource
* @param { String } el : 指定元素
* @param { Array } header : 表头
* @param { Array } data : 数据行
* @param { Number } rowNum : 显示行数
* @param { Boolean } index : 是否显示索引列
* @param { Number } timeout : 滚动动画延时
* @param { String } headerBGC : 标题栏背景颜色
* @param { String } oddRowBGC : 奇数行背景颜色
* @param { String } evenRowBGC : 偶数行背景颜色
* @param { String } fontColor : 字体颜色
* @param { String } indexBGC : 索引列背景颜色
* @param { Array } colWidth : 每列的宽度
*/
let dynamicTable = resource => {
'use strict';
//检查参数类型
if (typeof resource !== 'object') {
console.error('未传入参数,或者参数不是Object类型');
return
}
// 检查是否传入元素
const ele = resource.el;
if (!ele) {
console.error('元素获取不正确!');
return
}
/**
* 检查是否传入动画触发时长
* 当时间小于 10 计算为秒级单位
* 大于 10 计算为毫秒级单位
*/
let timeout = resource.timeout;
if (!timeout) {
timeout = 2000
} else if (timeout < 10) {
timeout = timeout * 1000
}
// 检查 配置元素是否传入数据
const colName = resource.header === undefined ? '' : resource.header;
const rowData = resource.data === undefined ? '' : resource.data;
const rowNum = resource.rowNum === undefined ? '20%' : `calc(100% / ${resource.rowNum} - 6px)`;
const headerBGC = resource.headerBGC === undefined ? '#999' : resource.headerBGC;
const oddRowBGC = resource.oddRowBGC === undefined ? '#bbb' : resource.oddRowBGC;
const evenRowBGC = resource.evenRowBGC === undefined ? '#ddd' : resource.evenRowBGC;
const fontColor = resource.fontColor === undefined ? 'black' : resource.fontColor;
const indexBGC = resource.indexBGC === undefined ? '#555' : resource.indexBGC;
const colIndex = resource.index === undefined ? true : resource.index;
const colWidth = resource.colWidth === undefined ? false : resource.colWidth;
const indexColor = fontColor.search(/('black')|(0{3,6})/) ? "white" : fontColor;
//基本table html
const html = `
<div class="table">
<div class="thead">
<div class="tr"></div>
</div>
<div class="tbody"></div>
</div>
`;
//Css样式集
const boxCSS = {
overflow: 'hidden'
};
const tableCSS = {
color: fontColor,
width: '100%',
height: '100%'
};
const theadCSS = {
width: '100%',
height: resource.theadHeight? `${resource.theadHeight}%` : '9%'
};
const thead_trCSS = {
display: "flex",
flexWrap: "nowrap",
width: "100%",
height: "100%",
background: headerBGC,
backgroundSize: '100% 100%',
justifyContent: "space-around"
};
const thCSS = {
justifyContent: "space-around",
fontWeight: "bold"
};
const tbodyCSS = {
width: "100%",
height: resource.theadHeight? `${100 - resource.theadHeight}%` : '9%',
boxSizing: 'border-box'
};
const tbody_trCSS = {
flexWrap: "nowrap",
width: "100%",
height: rowNum,
margin: '6px 0 ',
justifyContent: "space-around"
};
const trOddCSS = {
display: "flex",
background: oddRowBGC
};
const trEvenCSS = {
display: "flex",
margin: '6px 0 ',
background: evenRowBGC
};
const th_tdCSS = {
color: fontColor,
margin: 'auto 0',
whiteSpace: 'nowrap',
overflow: "hidden",
textOverflow: 'ellipsis',
textAlign: 'center',
padding: '0 4px 0 4px'
};
const indexCSS = {
display: 'inline-block',
width: '90%',
height: "90%",
background: indexBGC,
color: indexColor,
borderRadius: '20%',
margin: 'auto'
};
//插入table元素
$(ele).append(html);
//核心代码
//遍历插入数据 表头
if (colIndex) {
$(ele + '>.table>.thead>.tr').append('<div class="th"><span class="index">#</span></div>')
}
colName.forEach(element => {
$(ele + '>.table>.thead>.tr').append(`<div class="th">${element}</div>`)
});
//遍历插入数据 数据行
for (let i = 0; i < rowData.length; i++) {
$(ele + '>.table>.tbody').append('<div class="tr"></div>');
if (colIndex) {
$(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(
`<div class="td"><span class="index">${i + 1}</span></div>`)
}
rowData[i].forEach(element => {
$(ele + '>.table>.tbody>.tr:eq(' + i + ')').append(`<div class="td">${element}</div>`)
})
}
//设置CSS样式
$(ele).css(boxCSS);
$(ele + '>.table').css(tableCSS);
$(ele + '>.table>.thead').css(theadCSS);
$(ele + '>.table>.thead>.tr').css(thead_trCSS);
$(ele + '>.table>.thead>.tr>.th').css(th_tdCSS).css(thCSS);
$(ele + '>.table>.tbody').css(tbodyCSS);
$(ele + '>.table>.tbody>.tr').css(tbody_trCSS);
$(ele + '>.table>.tbody>.tr:odd').css(trOddCSS);
$(ele + '>.table>.tbody>.tr:even').css(trEvenCSS);
$(ele + '>.table>.tbody>.tr>.td').css(th_tdCSS);
$(ele + '>.table span.index').css(indexCSS)
//统一计量单位
const emptyUnit = element => element.replace(/[^0-9]/g, '');
const hendlen = $(`${ele} > .table > .thead > .tr > .th`).length;
const bodylen = $(`${ele} > .table > .tbody > .tr:nth-child(1) > .td`).length;
const ceil = Math.ceil;
/**
* 设置每列的宽度
* eq() 是在匹配的元素中取下标为n的元素
* nth-child() 是在匹配元素的父元素中选择第n个元素
*/
if (!colWidth) {
$(`${ele} > .table > .thead > .tr > .th`).css({
width: ceil(100 / hendlen) + '%'
});
$(`${ele} > .table > .tbody > .tr > .td`).css({
width: ceil(100 / bodylen) + '%'
});
} else {
for (let i = 0; i < colWidth.length; i++) {
let emptyUnitColWidth = emptyUnit(colWidth[i]);
$(`${ele} > .table > .thead > .tr > .th:nth-child(${i + 1})`).width(`${emptyUnitColWidth}%`);
$(`${ele} > .table > .tbody > .tr > .td:nth-child(${i + 1})`).width(`${emptyUnitColWidth}%`);
}
}
// 组件销毁钩子
$(`${ele}`).bind('DOMNodeRemoved', (e) => {
if (e.target.classList[0] === 'asit-table') {
clearInterval(animation);
}
});
}
const tableAnimation = (el) => {
const evenRowBGC = 'rgba(6,25,57,0.2)' === undefined ? '#ddd' : 'rgba(6,25,57,0.2)';
const oddRowBGC = 'rgba(8,36,75,0.2)' === undefined ? '#bbb' : 'rgba(8,36,75,0.2)';
const trEvenCSS = {
display: "flex",
};
const trOddCSS = {
display: "flex",
};
let oddORevenCheck = $(`${el} > .table > .tbody > .tr`).length % 2 == 0 ? 'even' : 'odd';
return setInterval(function () {
$(el + '>.table>.tbody>.tr:eq(0)').slideToggle(100, function () {
switch (oddORevenCheck) {
case 'even':
$(this).clone().css(trEvenCSS).appendTo(el + '>.table>.tbody');
oddORevenCheck = 'odd';
break;
case 'odd':
$(this).clone().css(trOddCSS).appendTo(el + '>.table>.tbody');
oddORevenCheck = 'even';
break;
}
$(this).remove();
});
}, 2000);
}

@ -0,0 +1,134 @@
(function() {
selectMultip = {
register: function(id) {
//大致思路是:为下拉选创建一个隐藏的子选项,每次单选之后将单选的值追加到隐藏的子选项中,并将子选项选中显示即可
//全局查找所有标记multip的select
document.querySelectorAll("[multip]").forEach(function(e) {
render(e);
})
},
reload: function(id, data, setData) {
var htm = "";
for(var i = 0; i < data.length; i++) {
htm += '<option value="' + data[i].value + '">' + data[i].text + '</option>'
}
var e = document.getElementById(id);
e.innerHTML = htm;
render(e);
this.setVal(id, setData);
},
setVal: function(id, str) {
var type = Object.prototype.toString.call(str);
switch(type) {
case "[object String]":
document.getElementById(id).val = str;
break;
case "[object Array]":
document.getElementById(id).val = str.toString();
break;
default:
break;
}
},
getVal: function(id) {
return document.getElementById(id).val;
},
}
function render(e) {
e.param = {
arr: [],
valarr: [],
opts: []
};
var choosevalue = "",
op;
for(var i = 0; i < e.length; i++) {
op = e.item(i);
e.param.opts.push(op);
if(op.hasAttribute("choose")) {
if(choosevalue == "") {
choosevalue = op.value
} else {
choosevalue += "," + op.value;
}
}
}
//创建一个隐藏的option标签用来存储多选的值其中的值为一个数组
var option = document.createElement("option");
option.hidden = true;
e.appendChild(option);
e.removeEventListener("input", selchange);
e.addEventListener("input", selchange);
//重新定义标签基础属性的get和set方法实现取值和赋值的功能
Object.defineProperty(e, "val", {
get: function() {
return this.querySelector("[hidden]").value;
},
set: function(value) {
e.param.valarr = [];
var valrealarr = value == "" ? [] : value.split(",");
e.param.arr = [];
e.param.opts.filter(function(o) {
o.style = "";
});
if(valrealarr.toString()) {
for(var i = 0; i < valrealarr.length; i++) {
e.param.opts.filter(function(o) {
if(o.value == valrealarr[i]) {
o.style = "color: blue;";
e.param.arr.push(o.text);
e.param.valarr.push(o.value)
}
});
}
this.options[e.length - 1].text = e.param.arr.toString();
this.options[e.length - 1].value = e.param.valarr.toString();
this.options[e.length - 1].selected = true;
} else {
this.options[0].selected = true;
}
},
configurable: true
})
//添加属性choose 此属性添加到option中用来指定默认值
e.val = choosevalue;
//添加属性tip 此属性添加到select标签上
if(e.hasAttribute("tip") && !e.tiped) {
e.tiped = true;
e.insertAdjacentHTML('afterend', '<i style="color: red;font-size: 12px">*可多选</i>');
}
}
function selchange() {
var text = this.options[this.selectedIndex].text;
var value = this.options[this.selectedIndex].value;
this.options[this.selectedIndex].style = "color: blue;";
var ind = this.param.arr.indexOf(text);
if(ind > -1) {
this.param.arr.splice(ind, 1);
this.param.valarr.splice(ind, 1);
this.param.opts.filter(function(o) {
if(o.value == value) {
o.style = "";
}
});
} else {
this.param.arr.push(text);
this.param.valarr.push(value);
}
this.options[this.length - 1].text = this.param.arr.toString();
this.options[this.length - 1].value = this.param.valarr.toString();
if(this.param.arr.length > 0) {
this.options[this.length - 1].selected = true;
} else {
this.options[0].selected = true;
}
}
})();

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-view{display:block;position:relative;margin:10px 0;padding:0;border:1px solid #eee;border-left-width:6px;background-color:#fafafa;color:#333;font-family:Courier New;font-size:13px}.layui-code-title{position:relative;padding:0 10px;height:40px;line-height:40px;border-bottom:1px solid #eee;font-size:12px}.layui-code-title>.layui-code-about{position:absolute;right:10px;top:0;color:#b7b7b7}.layui-code-about>a{padding-left:10px}.layui-code-view>.layui-code-ol,.layui-code-view>.layui-code-ul{position:relative;overflow:auto}.layui-code-view>.layui-code-ol>li{position:relative;margin-left:45px;line-height:20px;padding:0 10px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view>.layui-code-ol>li:first-child,.layui-code-view>.layui-code-ul>li:first-child{padding-top:10px}.layui-code-view>.layui-code-ol>li:last-child,.layui-code-view>.layui-code-ul>li:last-child{padding-bottom:10px}.layui-code-view>.layui-code-ul>li{position:relative;line-height:20px;padding:0 10px;list-style-type:none;*list-style-type:none;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-dark{border:1px solid #0c0c0c;border-left-color:#3f3f3f;background-color:#0c0c0c;color:#c2be9e}.layui-code-dark>.layui-code-title{border-bottom:none}.layui-code-dark>.layui-code-ol>li,.layui-code-dark>.layui-code-ul>li{background-color:#3f3f3f;border-left:none}.layui-code-dark>.layui-code-ul>li{margin-left:6px}.layui-code-demo .layui-code{visibility:visible!important;margin:-15px;border-top:none;border-right:none;border-bottom:none}.layui-code-demo .layui-tab-content{padding:15px;border-top:none}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 299 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

@ -47,7 +47,7 @@ var table = {
paginationLoop: false,
pageSize: 10,
pageNumber: 1,
pageList: [10, 25, 50],
pageList: [10, 25],
toolbar: "toolbar",
loadingFontSize: 13,
striped: false,
@ -91,7 +91,7 @@ var table = {
pagination: options.pagination, // 是否显示分页(*
paginationLoop: options.paginationLoop, // 是否启用分页条无限循环的功能
pageNumber: 1, // 初始化加载第一页,默认第一页
pageSize: options.pageSize, // 每页的记录行数(*
pageSize: options.pageSize, // 每页的记录行数(*
pageList: options.pageList, // 可供选择的每页的行数(*
firstLoad: options.firstLoad, // 是否首次请求加载数据对于数据较大可以配置false
escape: options.escape, // 转义HTML字符串
@ -141,7 +141,7 @@ var table = {
// 获取实例ID如存在多个返回#id1,#id2 delimeter分隔符
getOptionsIds: function(separator) {
var _separator = $.common.isEmpty(separator) ? "," : separator;
var optionsIds = "";
var optionsIds = "";
$.each(table.config, function(key, value){
optionsIds += "#" + key + _separator;
});
@ -158,7 +158,7 @@ var table = {
isAsc: params.order
};
var currentId = $.common.isEmpty(table.options.formId) ? $('form').attr('id') : table.options.formId;
return $.extend(curParams, $.common.formToJSON(currentId));
return $.extend(curParams, $.common.formToJSON(currentId));
},
// 请求获取数据后处理回调函数
responseHandler: function(res) {
@ -803,9 +803,9 @@ var table = {
},
// 弹出层指定参数选项
openOptions: function (options) {
var _url = $.common.isEmpty(options.url) ? "/404.html" : options.url;
var _title = $.common.isEmpty(options.title) ? "系统窗口" : options.title;
var _width = $.common.isEmpty(options.width) ? "800" : options.width;
var _url = $.common.isEmpty(options.url) ? "/404.html" : options.url;
var _title = $.common.isEmpty(options.title) ? "系统窗口" : options.title;
var _width = $.common.isEmpty(options.width) ? "800" : options.width;
var _height = $.common.isEmpty(options.height) ? ($(window).height() - 50) : options.height;
var _btn = ['<i class="fa fa-check"></i> 确认', '<i class="fa fa-close"></i> 关闭'];
if ($.common.isEmpty(options.yes)) {
@ -955,7 +955,7 @@ var table = {
detail: function(id, width, height) {
table.set();
var _url = $.operate.detailUrl(id);
var _width = $.common.isEmpty(width) ? "800" : width;
var _width = $.common.isEmpty(width) ? "800" : width;
var _height = $.common.isEmpty(height) ? ($(window).height() - 50) : height;
//如果是移动端,就使用自适应大小弹窗
if ($.common.isMobile()) {
@ -967,7 +967,7 @@ var table = {
width: _width,
height: _height,
url: _url,
skin: 'layui-layer-gray',
skin: 'layui-layer-gray',
btn: ['关闭'],
yes: function (index, layero) {
layer.close(index);
@ -1002,7 +1002,7 @@ var table = {
$.operate.submit(url, "post", "json", data);
}
});
},
// 批量删除信息
removeAll: function() {
@ -1661,4 +1661,4 @@ modal_status = {
SUCCESS: "success",
FAIL: "error",
WARNING: "warning"
};
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

@ -7,9 +7,11 @@
<meta name="description" content="">
<title th:text="${title}"></title>
<link rel="shortcut icon" href="favicon.ico">
<link th:href="@{/css/layui.css}" rel="stylesheet"/>
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<!-- bootstrap-table 表格插件样式 -->
<!-- <link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20200727}" rel="stylesheet"/>-->
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20200727}" rel="stylesheet"/>
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css?v=20200727}" rel="stylesheet"/>
@ -21,6 +23,7 @@
<a id="scroll-up" href="#" class="btn btn-sm display"><i class="fa fa-angle-double-up"></i></a>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<!-- <script th:src="@{/js/base64.min.js}"></script>-->
<!-- bootstrap-table 表格插件 -->
<script th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=20200727}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=20200727}"></script>
@ -205,3 +208,8 @@
<div th:fragment="bootstrap-table-print-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.min.js?v=20200729}"></script>
</div>
<!--&lt;!&ndash; 表格视图分页插件 &ndash;&gt;-->
<!--<div th:fragment="bootstrap-table-custom-view-js">-->
<!-- <script th:src="@{/ajax/libs/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js?v=1.18.3}"></script>-->
<!--</div>-->

@ -250,7 +250,7 @@
<!--右侧部分结束-->
</div>
<!-- 全局js -->
<script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.3.1/jquery.min.js"></script>
<!--<script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.3.1/jquery.min.js"></script>-->
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
@ -262,7 +262,7 @@
<script th:src="@{/ruoyi/js/common.js?v=4.3.1}"></script>
<script th:src="@{/ruoyi/index.js}"></script>
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.js"></script>-->
<script th:inline="javascript">
var ctx = [[@{/}]];
// 皮肤缓存
@ -361,7 +361,7 @@ $.ajax({
})
}
window.onload = function (){setInterval(selectAll,10000);}
// window.onload = function (){setInterval(selectAll,10000);}
// $(
// //向后台长轮询消息
// function longPolling(){

@ -37,10 +37,10 @@
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>产品条码:</label>
<input type="text" name="semiBarcode"/>
</li>
<!-- <li>-->
<!-- <label>产品码:</label>-->
<!-- <input type="text" name="semiBarcode"/>-->
<!-- </li>-->
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;查询全部</a>-->
@ -79,10 +79,10 @@
field: 'productName',
title: '机种名称'
},
{
field: 'semiBarcode',
title: '产品条码'
},
// {
// field: 'semiBarcode',
// title: '产品条码'
// },
{
field: 'state',
title: '状态'
@ -121,4 +121,4 @@
});
</script>
</body>
</html>
</html>

@ -125,10 +125,43 @@
return $.table.selectDictLabel(machineDatas, value);
}
},
{
field: 'mPTemplate',
title: '铭牌模板'
},
{
field: 'template',
title: '标签模板'
field: 'tMTemplate',
title: '条码模板'
},
{
field: 'ahopID',
title: '车间代号'
},
{
field: 'codeType',
title: '编码方式'
},
{
field: 'hasDate',
title: '是否包含日期',
formatter:function (value, row, index){
if (value==1){
return "是";
}
else if(value==0){
return "否";
}
}
},
{
field: 'prefix',
title: '条码前缀'
},
{
field: 'suffix',
title: '条码后缀'
},
{
field: 'printType',
title: '标签形式',
@ -151,4 +184,4 @@
});
</script>
</body>
</html>
</html>

@ -6,19 +6,19 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-ProductInfo-add">
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">机种ID</label>
<div class="col-sm-8">
<input name="productID" class="form-control" th:each="pt:${pt}" th:value="${pt.ProductID}" readonly="readonly">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">机种型号:</label>
<div class="col-sm-8">
<input name="productName" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">机种类型:</label>
<div class="col-sm-8">
<select name="productType" class="form-control m-b" th:with="type=${@dict.getType('productType')}">
@ -26,13 +26,13 @@
</select>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">制具车条码:</label>
<div class="col-sm-8">
<input name="toolCarNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">标签有无:</label>
<div class="col-sm-8">
<select name="machine" class="form-control m-b" th:with="type=${@dict.getType('ifLable')}">
@ -40,20 +40,78 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标签模板:</label>
<div class="form-group">
<div class="col-sm-11" align="center"><h4>《铭牌信息打印》</h4></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">车间代号:</label>
<div class="col-sm-8">
<input name="template" class="form-control" type="text">
<input name="ahopID" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标签形式:</label>
<div class="form-group">
<label class="col-sm-3 control-label">铭牌模板:</label>
<div class="col-sm-8">
<input name="mPTemplate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否包含日期:</label>
<div class="col-sm-8">
<select name="hasDate" class="form-control m-b" >
<option value="1"></option>
<option value="0"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否有A</label>
<div class="col-sm-8">
<select name="hasA" class="form-control m-b" >
<option value="1"></option>
<option value="0"></option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-11" align="center"><h4>《条码信息打印》</h4></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">条码前缀:</label>
<div class="col-sm-8">
<input name="prefix" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">条码后缀:</label>
<div class="col-sm-8">
<input name="suffix" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">编码方式:</label>
<div class="col-sm-8">
<input name="codeType" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">条码模板:</label>
<div class="col-sm-8">
<input name="tMTemplate" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">条码形式:</label>
<div class="col-sm-8">
<select name="printType" class="form-control m-b" th:with="type=${@dict.getType('pringtType')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
@ -70,4 +128,4 @@
}
</script>
</body>
</html>
</html>

@ -7,19 +7,19 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-ProductInfo-edit" th:object="${tBdProductinfo}">
<input name="ID" th:field="*{ID}" type="hidden">
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">机种ID</label>
<div class="col-sm-8">
<input name="productID" th:field="*{productID}" class="form-control" readonly="readonly">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">机种型号:</label>
<div class="col-sm-8">
<input name="productName" th:field="*{productName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">机种类型:</label>
<div class="col-sm-8">
<select name="productType" class="form-control m-b" th:with="type=${@dict.getType('productType')}">
@ -27,13 +27,13 @@
</select>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">制具车条码:</label>
<div class="col-sm-8">
<input name="toolCarNo" th:field="*{toolCarNo}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">标签有无:</label>
<div class="col-sm-8">
<select name="machine" class="form-control m-b" th:with="type=${@dict.getType('ifLable')}">
@ -41,13 +41,69 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标签模板:</label>
<div class="form-group">
<div class="col-sm-11" align="center"><h4>《铭牌信息打印》</h4></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">车间代号:</label>
<div class="col-sm-8">
<input name="template" th:field="*{template}" class="form-control" type="text">
<input name="ahopID" th:field="*{ahopID}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">铭牌模板:</label>
<div class="col-sm-8">
<input name="mPTemplate" th:field="*{mPTemplate}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否包含日期:</label>
<div class="col-sm-8">
<select name="hasDate" th:field="*{hasDate}" class="form-control m-b" >
<option value="1"></option>
<option value="0"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否有A</label>
<div class="col-sm-8">
<select name="hasA" th:field="*{hasA}" class="form-control m-b" >
<option value="1"></option>
<option value="0"></option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-11" align="center"><h4>《条码信息打印》</h4></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">条码前缀:</label>
<div class="col-sm-8">
<input name="prefix" class="form-control" th:field="*{prefix}" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">条码后缀:</label>
<div class="col-sm-8">
<input name="suffix" th:field="*{suffix}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">编码方式:</label>
<div class="col-sm-8">
<input name="codeType" class="form-control" th:field="*{codeType}" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">条码模板:</label>
<div class="col-sm-8">
<input name="tMTemplate" th:field="*{tMTemplate}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标签形式:</label>
<div class="col-sm-8">
<select name="printType" class="form-control m-b" th:with="type=${@dict.getType('pringtType')}">
@ -71,4 +127,4 @@
}
</script>
</body>
</html>
</html>

@ -17,7 +17,7 @@
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
</li>
<li>
<label>产品码:</label>
<label>产品码:</label>
<input type="text" id="barcode" name="barcode"/>
</li>
<li>
@ -185,4 +185,4 @@
}
</script>
</body>
</html>
</html>

@ -22,7 +22,7 @@
<!-- <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime" required="required"/>-->
</li>
<li>
<label> 工位代码</label>
<label> 工位名称</label>
<select name="substation.TableName" id="stationCode" required>
<option th:each="ls : ${list}" th:text="${ls.StationCode}" th:value="${ls.StationID}"></option>
</select>
@ -58,7 +58,7 @@
formData.append("stationCode",$("#stationCode").val());
formData.append("beginTime",$("#beginTime").val());
formData.append("endTime",$("#endTime").val());
formData.append("semiBarcode",$("#semiBarcode").val());
formData.append("productBarcode",$("#semiBarcode").val());
$.ajax({
type: "post",
url: prefix + "/list",
@ -74,8 +74,8 @@
console.log(json);
var columnsArray1 = [];
//
// columnsArray1.push({field : "序号",title : "序号",colspan: 1,rowspan: 1});
columnsArray1.push({field : "产品码",title : "产品码",colspan: 1,rowspan: 1});
columnsArray1.push({field : "序号",title : "序号",colspan: 1,rowspan: 1});
columnsArray1.push({field : "系统主条码",title : "系统主条码",colspan: 1,rowspan: 1});
columnsArray1.push({field : "状态",title : "状态",colspan: 1,rowspan: 1});
columnsArray1.push({field : "记录时间",title : "记录时间",colspan: 1,rowspan: 1});
columnsArray1.push({field : "工位名称",title : "工位名称",colspan: 1,rowspan: 1});
@ -206,4 +206,4 @@
</script>
</body>
</html>
</html>

@ -117,7 +117,7 @@
function searchAll(){
// console.log("点击查询按钮事件执行...");
var url = ctx + "nanjing/StatisticStation/listAll";
var url = ctx + "nanjing/StatisticStation/nodeClick";
// queryList(url);
$('#bootstrap-table').bootstrapTable('destroy');
$('#bootstrap-table').bootstrapTable({
@ -128,35 +128,64 @@
contentType : "application/x-www-form-urlencoded",
queryParams: {
begin:$('#startTime').val(),
end:$('#endTime').val()
end:$('#endTime').val(),
node:$('#stationId').val(),
productid:$('#product').val()
},
modalName: "工位合格率统计",
// columns: [
// {
// field: 'productTp',
// title: '机种类型'
// },
// {
// field: 'inputNum',
// title: '投入量'
// },
// {
// field: 'okNum',
// title: '合格品'
// },
// {
// field:'noNum',
// title:'不合格品'
// },
// {
// field:'ero',
// title:'异常'
// },
// {
// field: 'allRate',
// title: '综合合格率',
// }
// ]
columns: [
{
field: 'productTp',
title: '机种类型'
},
{
field: 'inputNum',
title: '投入量'
},
{
field: 'okNum',
title: '合格品'
},
{
field:'noNum',
title:'不合格品'
},
{
field:'ero',
title:'异常'
},
{
field: 'allRate',
title: '综合合格率',
}
{
field: 'stationCode',
title: '工位代码'
},
{
field: 'stationName',
title: '工位名称'
},
{
field: 'inputNum',
title: '总数量'
},
{
field: 'okNum',
title: '合格数量'
},
{
field:'ero',
title:'异常数量'
},
{
field: 'allRate',
title: '合格率',
}
]
})
}
@ -246,4 +275,4 @@
});
</script>
</body>
</html>
</html>

@ -54,7 +54,13 @@
var editFlag = [[${@permission.hasPermi('nanjing:SubStation:edit')}]];
var removeFlag = [[${@permission.hasPermi('nanjing:SubStation:remove')}]];
var paramFlag = [[${@permission.hasPermi('nanjing:SubStation:param')}]];
// var datas = [[${@dict.getType('T_BD_SubStation')}]];
var prefix = ctx + "nanjing/SubStation";
function shifou(isng){
if (isng==0){
return
}
}
$(function() {
var options = {
@ -92,7 +98,16 @@
},
{
field: 'isNGStation',
title: '是否ng'
title: '是否ng工位',
align: 'center',
formatter:function (value, row, index){
if (value==1){
return "是";
}
else if(value==0){
return "否";
}
}
},
{
field: 'plcname',
@ -102,8 +117,42 @@
field: 'plcblock',
title: 'PLC块号'
},
{
field: 'isShow',
title: '是否启用MES控制',
formatter:function (value, row, index){
if (value==1){
return "是";
}
else if(value==0){
return "否";
}
}
},
// {新增字段 PreStationID 自连接查询 返回一个string },
{
field:'preStationID',
title:'上一个工位',
formatter:function (value,row,index){
if (value!=null){
var data2;
$.ajax({
url:prefix+"/shangyi/?value="+value,
type:'get',
async : false,
success:function (result){
// console.log(result)
data2 = result;
}
})
return data2;
}
else if(value==null || value == undefined){
return "无";
}
}
},
{
title: '操作',
align: 'center',
@ -113,12 +162,16 @@
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
actions.push('<a class="btn btn-info btn-xs ' + paramFlag + '" href="javascript:void(0)" onclick="jmpParam(\'' + row.id + '\')"><i class="fa fa-anchor"></i>参数设置</a>');
return actions.join('');
}
}]
};
$.table.init(options);
console.log(options)
});
function jmpParam(id) {
var url = table.options.editParamUrl.replace("{id}", id);
// console.log(url);
@ -126,4 +179,4 @@
}
</script>
</body>
</html>
</html>

@ -7,7 +7,7 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-SubStation-add">
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">工位序号:</label>
<div class="col-sm-8">
<input name="StationID" class="form-control" th:each="si:${si}" th:value="${si.StationID}" readonly="readonly">
@ -25,7 +25,7 @@
<input id="stationCode" name="StationCode" class="form-control" type="text" onchange="fillTableName()">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">工位类型:</label>
<div class="col-sm-8">
<select name="StationType" class="form-control m-b">
@ -33,13 +33,13 @@
</select>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">系统数据表:</label>
<div class="col-sm-8">
<input id="tableName" name="TableName" class="form-control" readonly="readonly">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">参数个数:</label>
<div class="col-sm-8">
<input name="paraCount" class="form-control" type="text">
@ -51,7 +51,7 @@
<input name="OrderID" class="form-control" th:each="oi:${oi}" th:value="${oi.OrderID}" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">上下限是否显示:</label>
<div class="col-sm-8">
<select name="LimitID" class="form-control m-b" th:with="type=${@dict.getType('limitshow')}">
@ -87,6 +87,27 @@
<!-- <input name="isNGStation" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否启用MES控制</label>
<div class="col-sm-8">
<select name="isShow" class="form-control m-b">
<option value="1"></option>
<option value="0"></option>
</select>
<!-- <input name="isNGStation" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">上一个工位:</label>
<div class="col-sm-8">
<select name="PreStationID" class="form-control m-b">
<option value=""></option>
<option th:each="pr:${pr}" th:value="${pr.stationID}" th:text="${pr.stationName}"></option>
</select>
<!-- <input name="isNGStation" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">PLC名称</label>
<div class="col-sm-8">
@ -158,4 +179,4 @@
}
</script>
</body>
</html>
</html>

@ -7,7 +7,7 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-SubStation-edit" th:object="${tBdSubstation}">
<input name="ID" th:field="*{ID}" type="hidden">
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">工位序号:</label>
<div class="col-sm-8">
<input name="StationID" th:field="*{StationID}" class="form-control" readonly="readonly">
@ -19,13 +19,13 @@
<input name="StationName" th:field="*{StationName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">工位代码:</label>
<div class="col-sm-8">
<input name="StationCode" th:field="*{StationCode}" class="form-control" readonly="readonly">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">工位类型:</label>
<div class="col-sm-8">
<select name="StationType" class="form-control m-b" th:field="*{StationType}">
@ -33,25 +33,25 @@
</select>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">系统数据表:</label>
<div class="col-sm-8">
<input name="TableName" th:field="*{TableName}" class="form-control" readonly="readonly">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">参数个数:</label>
<div class="col-sm-8">
<input name="paraCount" th:field="*{paraCount}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">排序id</label>
<div class="col-sm-8">
<input name="OrderID" th:field="*{OrderID}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">上下限是否显示:</label>
<div class="col-sm-8">
<select name="LimitID" class="form-control m-b" th:field="*{LimitID}" th:with="type=${@dict.getType('limitshow')}">
@ -59,7 +59,7 @@
</select>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">线路类型:</label>
<div class="col-sm-8">
<select name="LineID" class="form-control" th:field="*{LineID}">
@ -67,16 +67,46 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">上一个工位:</label>
<div class="col-sm-8">
<select name="PreStationID" class="form-control m-b" th:field="*{PreStationID}">
<option value=""></option>
<option th:each="pr:${pr}" th:value="${pr.stationID}" th:text="${pr.stationName}"></option>
</select>
<!-- <input name="isNGStation" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">PLC名称</label>
<div class="col-sm-8">
<input name="PLCName" th:field="*{PLCName}" class="form-control" type="text">
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">是否ng</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="isNGStation" th:field="*{isNGStation}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">是否ng</label>
<div class="col-sm-8">
<input name="isNGStation" th:field="*{isNGStation}" class="form-control" type="text">
<select name="isNGStation" th:field="*{isNGStation}" class="form-control m-b">
<option value="1"></option>
<option value="0"></option>
</select>
<!-- <input name="isNGStation" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否启用MES系统</label>
<div class="col-sm-8">
<select name="isShow" th:field="*{isShow}" class="form-control m-b">
<option value="1"></option>
<option value="0"></option>
</select>
<!-- <input name="isNGStation" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
@ -102,4 +132,4 @@
}
</script>
</body>
</html>
</html>

@ -27,7 +27,7 @@
<input type="text" name="rfidNO" id="rfidno"/>
</li>
<li>
<label> 部件码:</label>
<label> 产品码:</label>
<input type="text" class="text-input" id="productBarcode" name="productBarcode"/>
</li>
<li>
@ -91,7 +91,7 @@
},
{
field: 'barcoderelationship.productBarcode',
title: '部件码'
title: '产品码'
},
{
field: 'stationpara.state',
@ -124,4 +124,4 @@
});
</script>
</body>
</html>
</html>

@ -63,7 +63,7 @@
},
{
field: 'semiBarcode',
title: 'SemiBarcode'
title: '主线条码'
},
{
field: 'insertTime',
@ -139,4 +139,4 @@
}
</script>
</body>
</html>
</html>

@ -7,7 +7,7 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-WorkTrayRealTimeInfo-add">
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">托盘条码:</label>
<div class="col-sm-8">
<input name="rfidNum" class="form-control" type="text">
@ -19,12 +19,12 @@
<input name="barCode" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">SemiBarcode-add</label>
<div class="col-sm-8">
<input name="SemiBarcode" class="form-control" type="text">
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">SemiBarcode-add</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="SemiBarcode" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<th:block th:include="include :: footer" />
@ -43,4 +43,4 @@
</script>
</body>
</html>
</html>

@ -0,0 +1,135 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
$(function () {
var options = {
code: "deviceId",
parentCode: "deviceParentId",
expandColumn: "2",
uniqueId: "deviceId",
url: prefix + "/list",
createUrl: prefix + "/add/{id}",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove/{id}",
exportUrl: prefix + "/export",
addPartsurl:prefix + "/addweixiu/{id}",
modalName: "scada设备信息",
detailView: true,
onExpandRow: function (index, row, $detail) {
initChildTable(index, row, $detail);
},
columns: [
{
field: 'selectItem',
radio: true
},
{
field: 'deviceId',
title: '设备编号',
align: 'left',
},
{
field: 'deviceName',
title: '设备名称',
align: 'left',
width: '265',
},
{
field: 'deviceSpe',
title: '规格',
align: 'left',
width: '230'
},
{
field: 'deviceType',
title: '设备类型',
align: 'left'
// formatter: function (value, row, index) {
// return $.table.selectDictLabel(deviceType, value);
// }
},
// {
// field: 'manufacturerId',
// title: '生产ID',
// visible: false,
// align: 'left'
// },
// {
// field: 'baseManufacturer.manufacturerName',
// title: '生产厂家',
// align: 'left'
// },
{
field: 'fristDate',
title: '出厂日期',
align: 'left'
},
{
field: 'deviceParentId',
title: '看板位置',
},
{
field: 'deviceIp',
title: '设备IP',
align: 'left'
},
{
field: 'createBy',
title: '创建人',
align: 'left'
},
{
field: 'createTime',
title: '创建时间',
align: 'left'
},
// {
// field: 'updateBy',
// title: '更新人',
//
// },
// {
// field: 'updateTime',
// title: '更新时间',
//
// },
{
title: '操作',
align: 'center',
align: 'left',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-primary btn-xs " href="javascript:void(0)" onclick="authUsers(\'' + row.deviceId + '\')"><i class="fa fa-upload"></i>上传文档</a> ');
// actions.push('<a class="btn btn-paeameter btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="selectUsersToParent(\'' + row.deviceId + '\')"><i class="fa fa-plus"></i>参数</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="addParts(\'' + row.uuid + '\')"><i class="fa fa-edit"></i>新增保养部位</a> ');
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="selectPart(\'' + row.uuid + '\')"><i class="fa fa-eye"></i>查看保养部位</a>\t');
// actions.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authUser(\'' + row.deviceId + '\')'><i class='fa fa-user'></i>上传文档</a>");
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.deviceId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="addParts(\'' + row.uuid + '\')"><i class="fa fa-plus"></i>保养部位</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.deviceId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.treeTable.init(options);
});

@ -62,7 +62,7 @@
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
function addParts(deviceId) {
$.modal.open("维修部位", '/nanjing/scadaDeviceInfo/addweixiu/' + deviceId);
$.modal.open("新增保养部位", '/nanjing/scadaDeviceInfo/addweixiu/' + deviceId);
}
function selectPart(deviceId) {
$.modal.openTab("保养部位", '/nanjing/parts/' + deviceId);
@ -186,6 +186,7 @@
align: 'left',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-primary btn-xs " href="javascript:void(0)" onclick="authUsers(\'' + row.deviceId + '\')"><i class="fa fa-upload"></i>上传文档</a> ');
// actions.push('<a class="btn btn-paeameter btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="selectUsersToParent(\'' + row.deviceId + '\')"><i class="fa fa-plus"></i>参数</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="addParts(\'' + row.uuid + '\')"><i class="fa fa-edit"></i>新增保养部位</a> ');
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="selectPart(\'' + row.uuid + '\')"><i class="fa fa-eye"></i>查看保养部位</a>\t');
@ -200,6 +201,9 @@
};
$.treeTable.init(options);
});
function authUsers(deviceId) {
$.modal.open("设备档案上传", "/nanjing/fileinfo/adddevice/" + deviceId);
}
// 根据当前激活的选项卡获取(方式一)
function selectUsersToParent(deviceId) {
@ -251,4 +255,4 @@
</script>
</body>
</html>
</html>

@ -0,0 +1,164 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('新增上传文档')"/>
<th:block th:include="include :: select2-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-info-add">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="col-sm-3 control-label">设备编号:</label>
<div class="col-sm-8">
<select id="baseScadaDeviceInfo" class="form-control select2-multiple">
<option th:each="baseScadaDeviceInfo:${baseScadaDeviceInfos}"
th:value="${baseScadaDeviceInfo.deviceId}"
th:text="${baseScadaDeviceInfo.deviceId}"></option>
</select>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="col-sm-3 control-label">文件类型:</label>
<div class="col-sm-8">
<select id="fileTypeId" class="form-control">
<option th:each="BaseFileType:${fileTypeList}" th:text="${BaseFileType.fileName}"
th:value="${BaseFileType.objid}" th:selected="${BaseFileType.objid==fileTypeId}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="layui-upload">
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择多文件</button>
<!-- <button type="button" id="testList"></button>-->
<h6 style="color: coral">文件名称按照【编号-文件】的规则上传例如IS9001-资质认证.pdf</h6>
<div class="layui-upload-list">
<table class="layui-table">
<thead>
<tr>
<th>文件名</th>
<th>大小</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody id="demoList"></tbody>
</table>
</div>
<button type="button" class="layui-btn" id="testListAction">开始上传</button>
</div>
</form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<!--<script type="text/javascript" th:src="@{/ajax/libs/layui/moudules/upload.js}"></script>-->
<script th:inline="javascript">
var prefix = ctx + "nanjing/fileinfo"
$("#form-info-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-info-add').serialize());
}
}
layui.use('upload', function () {
var $ = layui.jquery
, upload = layui.upload;
//多文件列表示例
var demoListView = $('#demoList')
, uploadListIns = upload.render({
elem: '#testList'
, url: prefix + "/uploadDocs" //改成您自己的上传接口
, data: {
deviceCode: function () {
return $('#baseScadaDeviceInfo').select2('val');
},
fileTypeId:function () {
return $('#fileTypeId').select2('val');
},
//生成的文件夹名称
typeName:function () {
return $('#fileTypeId').select2('data')[0].text;
}
}
, accept: 'file'
, multiple: true
, auto: false
, bindAction: '#testListAction'
, choose: function (obj) {
var files = obj.pushFile(); //将每次选择的文件追加到文件队列
//读取本地文件
obj.preview(function (index, file, result) {
var tr = $(['<tr id="upload-' + index + '">'
, '<td>' + file.name + '</td>'
, '<td>' + (file.size / 1024).toFixed(1) + 'kb</td>'
, '<td>等待上传</td>'
, '<td>'
// , '<button class="layui-btn layui-btn-xs demo-reload ">重传</button>'
, '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
, '</td>'
, '</tr>'].join(''));
//单个重传
tr.find('.demo-reload').on('click', function () {
console.log("单个重传");
var tr = demoListView.find('tr#upload-' + index)
, tds = tr.children();
// console.log(document.getElementById("fileName-" + index).value)
obj.upload(index, file);
});
//删除
tr.find('.demo-delete').on('click', function () {
console.log("删除");
var tr = demoListView.find('tr#upload-' + index)
, tds = tr.children();
delete files[index]; //删除对应的文件
tr.remove();
uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
});
demoListView.append(tr);
});
}
, alldone: function () {
}
, done: function (res, index, upload) {
console.log("上传成功"+JSON.stringify(res))
if (res.code == 0) { //上传成功
var tr = demoListView.find('tr#upload-' + index), tds = tr.children();
tds.eq(2).html('<span style="color: #5FB878;">上传成功</span>');
tds.eq(3).html(''); //清空操作
return delete this.files[index]; //删除文件队列已经上传成功的文件
}else {
this.error(index, upload);
}
}, error: function (index, upload) {
var tr = demoListView.find('tr#upload-' + index)
var tds = tr.children();
tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
// tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
}
});
});
</script>
</body>
</html>

@ -0,0 +1,163 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('新增上传文档')"/>
<th:block th:include="include :: select2-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-info-add">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="col-sm-3 control-label">设备编号2</label>
<div class="col-sm-8">
<select id="baseScadaDeviceInfo" class="form-control select2-multiple">
<option th:each="baseScadaDeviceInfo:${baseScadaDeviceInfos}"
th:value="${baseScadaDeviceInfo.deviceId}"
th:text="${baseScadaDeviceInfo.deviceName}"></option>
</select>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="col-sm-3 control-label">文件类型:</label>
<div class="col-sm-8">
<select id="fileTypeId" class="form-control">
<option th:each="BaseFileType:${fileTypeList}" th:text="${BaseFileType.fileName}"
th:value="${BaseFileType.objid}" th:selected="${BaseFileType.objid==fileTypeId}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="layui-upload">
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择多文件</button>
<h6 style="color: coral">文件名称按照【编号-文件】的规则上传例如IS9001-资质认证.pdf</h6>
<div class="layui-upload-list">
<table class="layui-table">
<thead>
<tr>
<th>文件名</th>
<th>大小</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody id="demoList"></tbody>
</table>
</div>
<button type="button" class="layui-btn" id="testListAction">开始上传</button>
</div>
</form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script th:inline="javascript">
var prefix = ctx + "nanjing/fileinfo"
$("#form-info-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-info-add').serialize());
}
}
layui.use('upload', function () {
var $ = layui.jquery
, upload = layui.upload;
//多文件列表示例
var demoListView = $('#demoList')
, uploadListIns = upload.render({
elem: '#testList'
, url: prefix + "/uploadDocs" //改成您自己的上传接口
, data: {
deviceCode: function () {
return $('#baseScadaDeviceInfo').select2('val');
},
fileTypeId:function () {
return $('#fileTypeId').select2('val');
},
//生成的文件夹名称
typeName:function () {
return $('#fileTypeId').select2('data')[0].text;
}
}
, accept: 'file'
, multiple: true
, auto: false
, bindAction: '#testListAction'
, choose: function (obj) {
var files = obj.pushFile(); //将每次选择的文件追加到文件队列
//读取本地文件
obj.preview(function (index, file, result) {
var tr = $(['<tr id="upload-' + index + '">'
, '<td>' + file.name + '</td>'
, '<td>' + (file.size / 1024).toFixed(1) + 'kb</td>'
, '<td>等待上传</td>'
, '<td>'
// , '<button class="layui-btn layui-btn-xs demo-reload ">重传</button>'
, '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
, '</td>'
, '</tr>'].join(''));
//单个重传
tr.find('.demo-reload').on('click', function () {
console.log("单个重传");
var tr = demoListView.find('tr#upload-' + index)
, tds = tr.children();
// console.log(document.getElementById("fileName-" + index).value)
obj.upload(index, file);
});
//删除
tr.find('.demo-delete').on('click', function () {
console.log("删除");
var tr = demoListView.find('tr#upload-' + index)
, tds = tr.children();
delete files[index]; //删除对应的文件
tr.remove();
uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
});
demoListView.append(tr);
});
}
, alldone: function () {
}
, done: function (res, index, upload) {
console.log("上传成功"+JSON.stringify(res))
if (res.code == 0) { //上传成功
var tr = demoListView.find('tr#upload-' + index), tds = tr.children();
tds.eq(2).html('<span style="color: #5FB878;">上传成功</span>');
tds.eq(3).html(''); //清空操作
return delete this.files[index]; //删除文件队列已经上传成功的文件
}else {
this.error(index, upload);
}
}, error: function (index, upload) {
var tr = demoListView.find('tr#upload-' + index)
var tds = tr.children();
tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
// tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
}
});
});
</script>
</body>
</html>

@ -0,0 +1,150 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('新增上传文档')"/>
<th:block th:include="include :: select2-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-info-add">
<div class="row">
<input type="hidden" id="baseScadaDeviceInfo" th:value="${deviceId}"/>
<div class="col-sm-12">
<div class="form-group">
<label class="col-sm-3 control-label">文件类型:</label>
<div class="col-sm-8">
<select id="fileTypeId" class="form-control">
<option th:each="BaseFileType:${fileTypeList}" th:text="${BaseFileType.fileName}"
th:value="${BaseFileType.objid}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="layui-upload">
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择多文件</button>
<h6 style="color: coral">文件名称按照【编号-文件】的规则上传例如IS9001-资质认证.pdf</h6>
<div class="layui-upload-list">
<table class="layui-table">
<thead>
<tr>
<th>文件名</th>
<th>大小</th>
<th>状态</th>
<th>操作</th>
</tr>
</thead>
<tbody id="demoList"></tbody>
</table>
</div>
<button type="button" class="layui-btn" id="testListAction">开始上传</button>
</div>
</form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script th:inline="javascript">
var prefix = ctx + "nanjing/fileinfo"
$("#form-info-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-info-add').serialize());
}
}
layui.use('upload', function () {
var $ = layui.jquery
, upload = layui.upload;
//多文件列表示例
var demoListView = $('#demoList')
, uploadListIns = upload.render({
elem: '#testList'
, url: prefix + "/uploadDocs" //改成您自己的上传接口
, data: {
deviceCode: function () {
return $('#baseScadaDeviceInfo').val();
},
fileTypeId:function () {
return $('#fileTypeId').select2('val');
},
//生成的文件夹名称
typeName:function () {
return $('#fileTypeId').select2('data')[0].text;
}
}
, accept: 'file'
, multiple: true
, auto: false
, bindAction: '#testListAction'
, choose: function (obj) {
var files = obj.pushFile(); //将每次选择的文件追加到文件队列
//读取本地文件
obj.preview(function (index, file, result) {
var tr = $(['<tr id="upload-' + index + '">'
, '<td>' + file.name + '</td>'
, '<td>' + (file.size / 1024).toFixed(1) + 'kb</td>'
, '<td>等待上传</td>'
, '<td>'
// , '<button class="layui-btn layui-btn-xs demo-reload ">重传</button>'
, '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
, '</td>'
, '</tr>'].join(''));
//单个重传
tr.find('.demo-reload').on('click', function () {
console.log("单个重传");
var tr = demoListView.find('tr#upload-' + index)
, tds = tr.children();
// console.log(document.getElementById("fileName-" + index).value)
obj.upload(index, file);
});
//删除
tr.find('.demo-delete').on('click', function () {
console.log("删除");
var tr = demoListView.find('tr#upload-' + index)
, tds = tr.children();
delete files[index]; //删除对应的文件
tr.remove();
uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
});
demoListView.append(tr);
});
}
, alldone: function () {
}
, done: function (res, index, upload) {
console.log("上传成功"+JSON.stringify(res))
if (res.code == 0) { //上传成功
var tr = demoListView.find('tr#upload-' + index), tds = tr.children();
tds.eq(2).html('<span style="color: #5FB878;">上传成功</span>');
tds.eq(3).html(''); //清空操作
return delete this.files[index]; //删除文件队列已经上传成功的文件
}else {
this.error(index, upload);
}
}, error: function (index, upload) {
var tr = demoListView.find('tr#upload-' + index)
var tds = tr.children();
tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
// tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
}
});
});
</script>
</body>
</html>

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改上传文档')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-info-edit" th:object="${sysFileInfo}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">设备ID</label>
<div class="col-sm-8">
<input name="deviceId" th:field="*{deviceId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">文件名称:</label>
<div class="col-sm-8">
<!-- <input name="fileName" th:field="*{fileName}" class="form-control" type="text">-->
<select name="fileName" class="form-control select2-multiple">
<option th:each="BaseFileType:${fileTypeList}" th:text="${BaseFileType.fileName}"
th:value="${BaseFileType.objid}"
th:selected="${BaseFileType.objid==fileTypeId}"></option>
</select>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">文件名称:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <option th:each="BaseFileType:${sysFileInfo}"-->
<!-- th:text="${BaseFileType.fileName}"-->
<!-- th:value="${BaseFileType.objid}"-->
<!-- th:selected="${BaseFileType.objid==fileTypeId}"></option>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">文件路径:</label>
<div class="col-sm-8">
<input name="filePath" th:field="*{filePath}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">文件编号:</label>
<div class="col-sm-8">
<input name="fileNum" th:field="*{fileNum}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "nanjing/fileinfo";
$("#form-info-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
}
}
</script>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save