基础管理
This commit is contained in:
parent
21a1d0243c
commit
877a520c8c
|
|
@ -28,7 +28,7 @@ import java.util.List;
|
|||
/**
|
||||
* 用户相关接口
|
||||
*/
|
||||
@Api(tags = "用户")
|
||||
@Api(tags = "班组")
|
||||
@RestController
|
||||
@RequestMapping("/teams/")
|
||||
public class TeamController {
|
||||
|
|
@ -122,10 +122,14 @@ public class TeamController {
|
|||
@PreAuthorize("@pms.hasPermission('base:team:del')")
|
||||
public ServerResponse delTeam(EncryptedReq<BaseTeam> data) {
|
||||
try {
|
||||
if (teamService.delTeam(data.getData().getTeamId())== 1){
|
||||
return ServerResponse.createBySuccessMsg("注销成功");
|
||||
}else {
|
||||
return ServerResponse.createErroe("注销失败");
|
||||
if(data.getData().getCountuser()!=0){
|
||||
return ServerResponse.createBySuccessMsg("该班组人数不为0,无法删除");
|
||||
}else{
|
||||
if (teamService.delTeam(data.getData().getTeamId())== 1){
|
||||
return ServerResponse.createBySuccessMsg("删除成功");
|
||||
}else {
|
||||
return ServerResponse.createErroe("删除失败");
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ public class BaseTeam extends PageEntity {
|
|||
|
||||
private int delFlag;
|
||||
|
||||
private int countuser;
|
||||
|
||||
public interface Status {
|
||||
int DISABLED = 0;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,139 @@
|
|||
package com.bonus.aqgqj.exper.contoller;
|
||||
|
||||
import com.bonus.aqgqj.annotation.DecryptAndVerify;
|
||||
import com.bonus.aqgqj.annotation.LogAnnotation;
|
||||
import com.bonus.aqgqj.exper.dao.DeviceDao;
|
||||
import com.bonus.aqgqj.exper.entity.vo.ExperDevice;
|
||||
import com.bonus.aqgqj.exper.service.DeviceService;
|
||||
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
@Api(tags = "实验")
|
||||
@RestController
|
||||
@RequestMapping("/expers/")
|
||||
public class DeviceController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger("adminLogger");
|
||||
|
||||
@Autowired
|
||||
private DeviceService deviceService;
|
||||
@Resource
|
||||
private DeviceDao deviceDao;
|
||||
|
||||
/**
|
||||
* 根据关键词获取实验设备列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "getList")
|
||||
@DecryptAndVerify(decryptedClass = ExperDevice.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "实验管理-实验设备管理", operation = "查询实验设备列表", operDesc = "系统级事件",operType="查询")
|
||||
@PreAuthorize("@pms.hasPermission('exper:device:query')" )
|
||||
public ServerResponse listDevices(EncryptedReq<ExperDevice> data) {
|
||||
PageHelper.startPage(data.getData().getPage(), data.getData().getLimit());
|
||||
try {
|
||||
List<ExperDevice> list = deviceService.list(data.getData());
|
||||
PageInfo<ExperDevice> pageInfo = new PageInfo<>(list);
|
||||
return ServerResponse.createSuccessPage(pageInfo,data.getData().getPage(),data.getData().getLimit());
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createErrorPage(data.getData().getPage(),data.getData().getLimit());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据实验设备id获取信息
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "getDeviceId")
|
||||
@DecryptAndVerify(decryptedClass = ExperDevice.class)//加解密统一管理
|
||||
@PreAuthorize("@pms.hasPermission('exper:device:query')" )
|
||||
public ServerResponse getDeviceId(EncryptedReq<ExperDevice> data) {
|
||||
return deviceService.getDeviceId(data.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改实验设备
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "updateDevice")
|
||||
@DecryptAndVerify(decryptedClass = ExperDevice.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "实验管理-实验设备管理", operation = "修改实验设备", operDesc = "系统级事件",operType="修改")
|
||||
@PreAuthorize("@pms.hasPermission('exper:device:update')")
|
||||
public ServerResponse updateDevice(EncryptedReq<ExperDevice> data) {
|
||||
try {
|
||||
ExperDevice u = deviceService.getDevice(data.getData().getDevName(),data.getData().getDevId());
|
||||
if (u != null) {
|
||||
return ServerResponse.createErroe("设备名称 “"+data.getData().getDevName() + "” 已存在");
|
||||
}
|
||||
deviceService.updateDevice(data.getData());
|
||||
return ServerResponse.createBySuccessMsg("操作成功");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createErroe("操作失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增实验设备
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "addDevice")
|
||||
@DecryptAndVerify(decryptedClass = ExperDevice.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "实验管理-实验设备管理", operation = "新增实验设备", operDesc = "系统级事件",operType="新增")
|
||||
@PreAuthorize("@pms.hasPermission('exper:device:add')")
|
||||
public ServerResponse addDevice(EncryptedReq<ExperDevice> data) {
|
||||
try {
|
||||
ExperDevice u = deviceService.getAdd(data.getData().getDevName());
|
||||
if (u != null) {
|
||||
return ServerResponse.createErroe("设备名称 “"+data.getData().getDevName() + "” 已存在");
|
||||
}
|
||||
deviceService.add(data.getData());
|
||||
return ServerResponse.createBySuccessMsg("操作成功");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createErroe("操作失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除实验设备
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "delById")
|
||||
@DecryptAndVerify(decryptedClass = ExperDevice.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "实验管理-实验设备管理", operation = "删除实验设备", operDesc = "系统级事件",operType="删除")
|
||||
@PreAuthorize("@pms.hasPermission('exper:device:del')")
|
||||
public ServerResponse delDevice(EncryptedReq<ExperDevice> data) {
|
||||
try {
|
||||
if (deviceService.delDevice(data.getData().getDevId())== 1){
|
||||
return ServerResponse.createBySuccessMsg("删除成功");
|
||||
}else {
|
||||
return ServerResponse.createErroe("删除失败");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createErroe("操作失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.aqgqj.exper.dao;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseCustom;
|
||||
|
||||
import com.bonus.aqgqj.exper.entity.vo.ExperDevice;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface DeviceDao {
|
||||
|
||||
/**
|
||||
* 获取实验设备列表
|
||||
* @param device
|
||||
* @return
|
||||
*/
|
||||
List<ExperDevice> list(ExperDevice device);
|
||||
|
||||
/**
|
||||
* 根据实验设备id获取信息
|
||||
* @param device
|
||||
* @return
|
||||
*/
|
||||
ExperDevice getDeviceId(ExperDevice device);
|
||||
|
||||
/**
|
||||
* 根据设备id查询是否重名
|
||||
* @param devName
|
||||
* @param devId
|
||||
* @return
|
||||
*/
|
||||
ExperDevice getDevice(String devName,Long devId);
|
||||
|
||||
/**
|
||||
* 修改该条设备数据
|
||||
* @param device
|
||||
* @return
|
||||
*/
|
||||
int update(ExperDevice device);
|
||||
|
||||
/**
|
||||
* 根据设备名称查是否重名
|
||||
* @param devName
|
||||
* @return
|
||||
*/
|
||||
ExperDevice getAdd(String devName);
|
||||
|
||||
/**
|
||||
* 新增该条数据
|
||||
* @param device
|
||||
* @return
|
||||
*/
|
||||
int add(ExperDevice device);
|
||||
/**
|
||||
* 删除该条数据
|
||||
* @param devId
|
||||
* @return
|
||||
*/
|
||||
int delDevice(Long devId);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.bonus.aqgqj.exper.entity.vo;
|
||||
|
||||
import com.bonus.aqgqj.base.entity.PageEntity;
|
||||
import com.bonus.aqgqj.utils.UserUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.sql.Date;
|
||||
|
||||
/**
|
||||
* @className:ExperDeviceVo
|
||||
* @author:cwchen
|
||||
* @date:2024-07-19-13:29
|
||||
* @version:1.0
|
||||
* @description:试验设备-vo
|
||||
*/
|
||||
@Data
|
||||
public class ExperDevice extends PageEntity {
|
||||
|
||||
/**
|
||||
* 关键词
|
||||
*/
|
||||
private String keyWord;
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private Long devId;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String devName;
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String devModule;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String devCode;
|
||||
/**
|
||||
* 合同生效日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private java.util.Date contractDate;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
private java.sql.Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
|
||||
private java.sql.Date updateTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
||||
private Long createUser = UserUtil.getLoginUser().getId();
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
private Long updateUser = UserUtil.getLoginUser().getId();
|
||||
/**
|
||||
* 数据来源 0 新增 1 实验配置
|
||||
*/
|
||||
|
||||
private Integer dataSource ;
|
||||
/**
|
||||
* 删除状态 0正常 1删除
|
||||
*/
|
||||
|
||||
private Integer delFlag ;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.bonus.aqgqj.exper.service;
|
||||
|
||||
import com.bonus.aqgqj.exper.entity.vo.ExperDevice;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DeviceService {
|
||||
|
||||
/**
|
||||
* 获取实验设备列表
|
||||
* @param device
|
||||
* @return
|
||||
*/
|
||||
List<ExperDevice> list(ExperDevice device);
|
||||
|
||||
/**
|
||||
* 根据实验设备id获取信息
|
||||
* @param device
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getDeviceId(ExperDevice device);
|
||||
|
||||
/**
|
||||
* 根据设备id查询是否重名
|
||||
* @param devName
|
||||
* @param devId
|
||||
* @return
|
||||
*/
|
||||
ExperDevice getDevice(String devName,Long devId);
|
||||
|
||||
/**
|
||||
* 修改该条设备数据
|
||||
* @param device
|
||||
* @return
|
||||
*/
|
||||
ExperDevice updateDevice(ExperDevice device);
|
||||
|
||||
/**
|
||||
* 根据设备名称查是否重名
|
||||
* @param devName
|
||||
* @return
|
||||
*/
|
||||
ExperDevice getAdd(String devName);
|
||||
|
||||
/**
|
||||
* 新增该条数据
|
||||
* @param device
|
||||
* @return
|
||||
*/
|
||||
ExperDevice add(ExperDevice device);
|
||||
|
||||
/**
|
||||
* 删除该条数据
|
||||
* @param devId
|
||||
* @return
|
||||
*/
|
||||
int delDevice(Long devId);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.bonus.aqgqj.exper.service.impl;
|
||||
|
||||
import com.bonus.aqgqj.basis.dao.CustomDao;
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseCustom;
|
||||
import com.bonus.aqgqj.basis.service.CustomService;
|
||||
import com.bonus.aqgqj.exper.dao.DeviceDao;
|
||||
import com.bonus.aqgqj.exper.entity.vo.ExperDevice;
|
||||
import com.bonus.aqgqj.exper.service.DeviceService;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
import com.bonus.aqgqj.utils.StringHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DeviceServiceImpl implements DeviceService {
|
||||
|
||||
|
||||
@Resource
|
||||
private DeviceDao deviceDao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<ExperDevice> list(ExperDevice device) {
|
||||
return deviceDao.list(device);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getDeviceId(ExperDevice device) {
|
||||
try{
|
||||
ExperDevice vo= deviceDao.getDeviceId(device);
|
||||
return ServerResponse.createSuccess(vo);
|
||||
}catch (Exception e){
|
||||
return ServerResponse.createSuccess("修改成功");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExperDevice getDevice(String devName,Long devId) {
|
||||
try{
|
||||
return deviceDao.getDevice(devName,devId);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ExperDevice updateDevice(ExperDevice device) {
|
||||
deviceDao.update(device);
|
||||
return device;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExperDevice getAdd(String devName) {
|
||||
try{
|
||||
return deviceDao.getAdd(devName);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ExperDevice add(ExperDevice device) {
|
||||
deviceDao.add(device);
|
||||
return device;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delDevice(Long devId) {
|
||||
return deviceDao.delDevice(devId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.bonus.aqgqj.primaryData.controller;
|
||||
|
||||
import com.bonus.aqgqj.annotation.DecryptAndVerify;
|
||||
import com.bonus.aqgqj.annotation.LogAnnotation;
|
||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalVo;
|
||||
import com.bonus.aqgqj.exper.dao.DeviceDao;
|
||||
import com.bonus.aqgqj.exper.entity.vo.ExperDevice;
|
||||
import com.bonus.aqgqj.exper.service.DeviceService;
|
||||
import com.bonus.aqgqj.primaryData.dao.PrimaryDataDao;
|
||||
import com.bonus.aqgqj.primaryData.service.PrimaryDataService;
|
||||
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Api(tags = "实验")
|
||||
@RestController
|
||||
@RequestMapping("/primaryDatas/")
|
||||
public class PrimaryDataController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger("adminLogger");
|
||||
|
||||
@Autowired
|
||||
private PrimaryDataService primarydataService;
|
||||
@Resource
|
||||
private PrimaryDataDao primarydataDao;
|
||||
|
||||
/**
|
||||
* 根据关键词获取实验设备列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "getList")
|
||||
@DecryptAndVerify(decryptedClass = ParamsDto.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "原始数据管理-原始数据管理", operation = "查询原始数据列表", operDesc = "系统级事件",operType="查询")
|
||||
@PreAuthorize("@pms.hasPermission('primaryData:primary:query')" )
|
||||
public ServerResponse listPrimaryDatas(EncryptedReq<ParamsDto> data) {
|
||||
PageHelper.startPage(data.getData().getPage(), data.getData().getLimit());
|
||||
List<ExperimentalVo> list = primarydataService.getList(data.getData());
|
||||
PageInfo<ExperimentalVo> pageInfo = new PageInfo<>(list);
|
||||
return ServerResponse.createSuccessPage(pageInfo, data.getData().getPage(), data.getData().getLimit());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.aqgqj.primaryData.dao;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalVo;
|
||||
import com.bonus.aqgqj.exper.entity.vo.ExperDevice;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface PrimaryDataDao {
|
||||
|
||||
/**
|
||||
* 原始数据列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<ExperimentalVo> getList(ParamsDto data);
|
||||
|
||||
// /**
|
||||
// * 根据实验设备id获取信息
|
||||
// * @param device
|
||||
// * @return
|
||||
// */
|
||||
// ExperDevice getDeviceId(ExperDevice device);
|
||||
//
|
||||
// /**
|
||||
// * 根据设备id查询是否重名
|
||||
// * @param devName
|
||||
// * @param devId
|
||||
// * @return
|
||||
// */
|
||||
// ExperDevice getDevice(String devName,Long devId);
|
||||
//
|
||||
// /**
|
||||
// * 修改该条设备数据
|
||||
// * @param device
|
||||
// * @return
|
||||
// */
|
||||
// int update(ExperDevice device);
|
||||
//
|
||||
// /**
|
||||
// * 根据设备名称查是否重名
|
||||
// * @param devName
|
||||
// * @return
|
||||
// */
|
||||
// ExperDevice getAdd(String devName);
|
||||
//
|
||||
// /**
|
||||
// * 新增该条数据
|
||||
// * @param device
|
||||
// * @return
|
||||
// */
|
||||
// int add(ExperDevice device);
|
||||
// /**
|
||||
// * 删除该条数据
|
||||
// * @param devId
|
||||
// * @return
|
||||
// */
|
||||
// int delDevice(Long devId);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.bonus.aqgqj.primaryData.service;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalVo;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PrimaryDataService {
|
||||
|
||||
/**
|
||||
* 原始数据列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<ExperimentalVo> getList(ParamsDto data);
|
||||
|
||||
// /**
|
||||
// * 根据实验设备id获取信息
|
||||
// * @param device
|
||||
// * @return
|
||||
// */
|
||||
// ServerResponse getDeviceId(ExperDevice device);
|
||||
//
|
||||
// /**
|
||||
// * 根据设备id查询是否重名
|
||||
// * @param devName
|
||||
// * @param devId
|
||||
// * @return
|
||||
// */
|
||||
// ExperDevice getDevice(String devName,Long devId);
|
||||
//
|
||||
// /**
|
||||
// * 修改该条设备数据
|
||||
// * @param device
|
||||
// * @return
|
||||
// */
|
||||
// ExperDevice updateDevice(ExperDevice device);
|
||||
//
|
||||
// /**
|
||||
// * 根据设备名称查是否重名
|
||||
// * @param devName
|
||||
// * @return
|
||||
// */
|
||||
// ExperDevice getAdd(String devName);
|
||||
//
|
||||
// /**
|
||||
// * 新增该条数据
|
||||
// * @param device
|
||||
// * @return
|
||||
// */
|
||||
// ExperDevice add(ExperDevice device);
|
||||
//
|
||||
// /**
|
||||
// * 删除该条数据
|
||||
// * @param devId
|
||||
// * @return
|
||||
// */
|
||||
// int delDevice(Long devId);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.bonus.aqgqj.primaryData.service.impl;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalVo;
|
||||
import com.bonus.aqgqj.primaryData.dao.PrimaryDataDao;
|
||||
import com.bonus.aqgqj.primaryData.service.PrimaryDataService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PrimaryDataServiceImpl implements PrimaryDataService {
|
||||
|
||||
|
||||
@Resource
|
||||
private PrimaryDataDao primarydataDao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<ExperimentalVo> getList(ParamsDto dto) {
|
||||
List<ExperimentalVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = primarydataDao.getList(dto);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ServerResponse getDeviceId(ExperDevice device) {
|
||||
// try{
|
||||
// ExperDevice vo= deviceDao.getDeviceId(device);
|
||||
// return ServerResponse.createSuccess(vo);
|
||||
// }catch (Exception e){
|
||||
// return ServerResponse.createSuccess("修改成功");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ExperDevice getDevice(String devName,Long devId) {
|
||||
// try{
|
||||
// return deviceDao.getDevice(devName,devId);
|
||||
// }catch (Exception e){
|
||||
// log.error(e.toString(),e);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public ExperDevice updateDevice(ExperDevice device) {
|
||||
// deviceDao.update(device);
|
||||
// return device;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public ExperDevice getAdd(String devName) {
|
||||
// try{
|
||||
// return deviceDao.getAdd(devName);
|
||||
// }catch (Exception e){
|
||||
// log.error(e.toString(),e);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public ExperDevice add(ExperDevice device) {
|
||||
// deviceDao.add(device);
|
||||
// return device;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int delDevice(Long devId) {
|
||||
// return deviceDao.delDevice(devId);
|
||||
// }
|
||||
//
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.aqgqj.exper.dao.DeviceDao">
|
||||
<resultMap type="com.bonus.aqgqj.exper.entity.vo.ExperDevice" id="ExperDeviceResult">
|
||||
<id property="devId" column="dev_id" />
|
||||
<result property="devName" column="dev_name" />
|
||||
<result property="devModule" column="dev_module" />
|
||||
<result property="devCode" column="dev_code" />
|
||||
<result property="contractDate" column="contract_date" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="dataSource" column="data_source" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
<select id="list" parameterType="com.bonus.aqgqj.exper.entity.vo.ExperDevice" resultMap="ExperDeviceResult">
|
||||
select dev_id,dev_name,dev_module,dev_code,contract_date,create_time,update_time,data_source
|
||||
from tb_exper_device
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
INSTR(dev_name,#{keyWord}) > 0 OR
|
||||
INSTR(dev_module,#{keyWord}) > 0 OR
|
||||
INSTR(dev_code,#{keyWord}) > 0 OR
|
||||
INSTR(contract_date,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
order by dev_id ASC
|
||||
</select>
|
||||
|
||||
<select id="getDeviceId" parameterType="com.bonus.aqgqj.exper.entity.vo.ExperDevice" resultMap="ExperDeviceResult">
|
||||
select dev_id,dev_name,dev_module,dev_code,contract_date,create_time,update_time,data_source
|
||||
from tb_exper_device
|
||||
where del_flag=0 and dev_id=#{devId}
|
||||
</select>
|
||||
|
||||
<select id="getDevice" resultMap="ExperDeviceResult">
|
||||
select dev_id,dev_name,dev_module,dev_code,contract_date,create_time,update_time,data_source
|
||||
from tb_exper_device
|
||||
where dev_name = #{devName} and dev_id != #{devId}
|
||||
</select>
|
||||
|
||||
<select id="getAdd" resultMap="ExperDeviceResult">
|
||||
select dev_id,dev_name,dev_module,dev_code,contract_date,create_time,update_time,data_source
|
||||
from tb_exper_device
|
||||
where dev_name = #{devName}
|
||||
</select>
|
||||
|
||||
|
||||
<update id="update">
|
||||
update tb_exper_device
|
||||
set dev_name = #{devName},
|
||||
dev_module = #{devModule},
|
||||
dev_code = #{devCode},
|
||||
contract_date = #{contractDate},
|
||||
update_time = now(),
|
||||
data_source = #{dataSource}
|
||||
where dev_id = #{devId}
|
||||
</update>
|
||||
|
||||
<insert id="add" parameterType="com.bonus.aqgqj.exper.entity.vo.ExperDevice" >
|
||||
insert into tb_exper_device(dev_name,dev_module,dev_code,contract_date,create_time,data_source,del_flag
|
||||
)values (
|
||||
#{devName},#{devModule},#{devCode},#{contractDate},now(),#{dataSource},0
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="delDevice">
|
||||
update tb_exper_device
|
||||
set del_flag = 1
|
||||
where dev_id = #{devId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.aqgqj.primaryData.dao.PrimaryDataDao">
|
||||
|
||||
<select id="getList" resultType="com.bonus.aqgqj.basis.entity.vo.ExperimentalVo">
|
||||
SELECT ts.id,
|
||||
tc.custom_name AS customName,
|
||||
DATE_FORMAT(ts.sample_time, '%Y-%m-%d') AS sampleTime,
|
||||
IFNULL(tsd.num,0) AS customNum,
|
||||
tsd.sampleDev,
|
||||
su.user_name AS sampleUserName,
|
||||
DATE_FORMAT(ts.sample_date, '%Y-%m-%d') AS sampleDate,
|
||||
tt.team_name AS teamName,
|
||||
te.exper_time AS experTime
|
||||
FROM tb_sample ts
|
||||
LEFT JOIN tb_custom tc ON ts.custom_id = tc.id
|
||||
LEFT JOIN sys_user su ON ts.create_user = su.id AND su.del_flag = 0
|
||||
LEFT JOIN sys_user su2 ON ts.update_user = su2.id AND su2.del_flag = 0
|
||||
LEFT JOIN tb_team tt ON ts.team_id = tt.id AND tt.del_flag = 0
|
||||
LEFT JOIN tb_exper te on ts.id = te.id AND te.del_flag = 0
|
||||
LEFT JOIN (
|
||||
SELECT sample_id,COUNT(sample_id) AS num,ANY_VALUE(GROUP_CONCAT(DISTINCT dev_type_name)) AS sampleDev,ANY_VALUE(GROUP_CONCAT(DISTINCT dev_type_code)) AS sampleDevCode
|
||||
FROM tb_sample_device
|
||||
WHERE del_falg = 0
|
||||
GROUP BY sample_id
|
||||
) tsd ON tsd.sample_id = ts.id
|
||||
WHERE ts.del_flag = 0 and ts.process_status = 4 and ts.audti_status = 1
|
||||
<if test="keyWord != null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(tt.team_name,#{keyWord}) > 0 OR
|
||||
INSTR(su2.user_name,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
<if test="sampleUserName != null and sampleUserName!=''">
|
||||
AND INSTR(su.user_name,#{sampleUserName}) > 0
|
||||
</if>
|
||||
<if test="startTime != null and endTime!=''">
|
||||
AND DATE_FORMAT(te.exper_time, '%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
<if test="devTypeCode != null and devTypeCode!=''">
|
||||
AND INSTR(tsd.sampleDevCode,#{devTypeCode})
|
||||
</if>
|
||||
<if test="roleCode != 'administrators'">
|
||||
<if test="roleCode == 'experimentalTeamMember' and teamId != null">
|
||||
AND ts.team_id = #{teamId}
|
||||
</if>
|
||||
<if test="(roleCode != 'experimentalTeamMember') or (roleCode == 'experimentalTeamMember' and teamId == null)">
|
||||
AND ts.team_id = -1
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY dispatch_time ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,199 +0,0 @@
|
|||
let form, layer, table, tableIns;
|
||||
let pageNum = 1, limitSize = 10; // 默认第一页,分页数量为10
|
||||
layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
layui.form.render();
|
||||
pages(1, 10, 1);
|
||||
})
|
||||
|
||||
|
||||
function pages(pageNum, pageSize, typeNum) {
|
||||
let params = getReqParams(pageNum, pageSize, typeNum);
|
||||
let url = dataUrl + "/teamconfigs/getListTemp"
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
console.log(result);
|
||||
if (result.code === 200) {
|
||||
if (result.data) {
|
||||
initTable(result.data, result.limit, result.curr)
|
||||
laypages(result.count, result.curr, result.limit)
|
||||
}
|
||||
} else if (result.code === 500) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
}, function (xhr) {
|
||||
error(xhr)
|
||||
});
|
||||
}
|
||||
|
||||
function laypages(total, page, limit) {
|
||||
layui.use(['laypage'], function () {
|
||||
let laypage = layui.laypage;
|
||||
laypage.render({
|
||||
elem: 'voi-page',
|
||||
count: total,
|
||||
curr: page,
|
||||
limit: limit,
|
||||
limits: [10, 20, 50, 100, 200, 500],
|
||||
layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],
|
||||
groups: 5,
|
||||
jump: function (obj, first) {
|
||||
if (!first) {
|
||||
pageNum = obj.curr, limitSize = obj.limit;
|
||||
pages(obj.curr, obj.limit, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/*初始化表格*/
|
||||
function initTable(dataList, limit, page) {
|
||||
let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
||||
tableIns = table.render({
|
||||
elem: "#table_data",
|
||||
height: "full-130",
|
||||
data: dataList,
|
||||
limit: limit,
|
||||
cols: [
|
||||
[
|
||||
{type: 'checkbox', width: '5%', fixed: 'left'},
|
||||
//表头
|
||||
{title: "序号", width: 80, unresize: true, align: "center",
|
||||
templet: function (d) {
|
||||
return (page - 1) * limit + d.LAY_INDEX;
|
||||
}
|
||||
},
|
||||
{field: "teamConfigId", title: "ID", unresize: true, align: "center",hide:true},
|
||||
{field: "teamConfigName", title: "姓名", unresize: true, align: "center"},
|
||||
{field: "teamConfigJobNumber", title: "工号", unresize: true, align: "center"},
|
||||
{field: "teamConfigSex", title: "性别", unresize: true, align: "center",
|
||||
templet: function (d) {
|
||||
if (d.teamConfigSex == 0) {
|
||||
return "女";
|
||||
} else if (d.teamConfigSex == 1) {
|
||||
return "男";
|
||||
}
|
||||
}
|
||||
},
|
||||
// {field: "teamConfigTeamId", title: "班组id", unresize: true, align: "center"},
|
||||
{field: "teamConfigPhone", title: "联系电话", unresize: true, align: "center"},
|
||||
{title: "操作", unresize: true, width: 300, align: "center",
|
||||
templet: function (d) {
|
||||
|
||||
let html = '';
|
||||
let add="<a class=\"layui-icon layui-icon-edit\" style='cursor:pointer;' title='添加到该班组' onclick=\"addData('" + areaIdParam + "','" + d.teamConfigId + "')\"></a>"
|
||||
html=add;
|
||||
return html;
|
||||
}
|
||||
},
|
||||
],
|
||||
],
|
||||
done: function (res, curr, count) {
|
||||
layer.close(loadingMsg);
|
||||
table.resize("table_data");
|
||||
count || this.elem.next(".layui-table-view").find(".layui-table-header").css("display", "inline-block");
|
||||
count || this.elem.next(".layui-table-view").find(".layui-table-box").css("overflow", "auto");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 获取参数
|
||||
function getReqParams(page, limit, type) {
|
||||
let obj = {};
|
||||
if (!type) {
|
||||
obj = {
|
||||
page: page + "",
|
||||
limit: limit + "",
|
||||
keyWord: $('#keyWord').val(),
|
||||
};
|
||||
} else {
|
||||
obj = {
|
||||
page: '1',
|
||||
limit: '10',
|
||||
keyWord: '',
|
||||
};
|
||||
}
|
||||
console.log(obj)
|
||||
obj={
|
||||
encryptedData:encryptCBC(JSON.stringify(obj))
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// 查询/重置
|
||||
function query() {
|
||||
let pattern = new RegExp("[%_<>]");
|
||||
pageNum = 1;
|
||||
pages(1, limitSize);
|
||||
}
|
||||
|
||||
function reloadData() {
|
||||
pages(pageNum, limitSize);
|
||||
}
|
||||
|
||||
// 获取选中的数据
|
||||
function getCheckedValues() {
|
||||
let data = table.checkStatus("table_data").data;
|
||||
let ids = []
|
||||
if (data.length === 0) {
|
||||
return ids;
|
||||
}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
ids.push(data[i].teamConfigId);
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
// 批量添加
|
||||
function batchAddData() {
|
||||
let ids = getCheckedValues();
|
||||
console.log(ids);
|
||||
let id = areaIdParam;
|
||||
if (ids.length === 0) {
|
||||
return layer.msg('至少添加一行数据', {icon: 7})
|
||||
} else {
|
||||
addTeamConfigData(ids.toString(),id);
|
||||
}
|
||||
}
|
||||
|
||||
/*修改用户*/
|
||||
function addData(id,teamConfigId) {
|
||||
layer.confirm("确定添加到该班组吗?", {
|
||||
move: false
|
||||
}, function () {
|
||||
let loadingMsg = layer.msg('数据添加中,请稍候...', {icon: 16, scrollbar: false, time: 0});
|
||||
let url = dataUrl + "/teamconfigs/addById";
|
||||
let params = {
|
||||
'id':id,
|
||||
'teamConfigId': teamConfigId
|
||||
}
|
||||
console.log(params);
|
||||
params={
|
||||
encryptedData:encryptCBC(JSON.stringify(params))
|
||||
}
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.code === 200) {
|
||||
parent.layer.msg(result.msg, {icon: 1})
|
||||
query()
|
||||
} else if (result.code === 500) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
}, function (xhr) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
error(xhr)
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function setParams(params){
|
||||
let obj = JSON.parse(params)
|
||||
console.log(obj)
|
||||
areaIdParam = obj.id
|
||||
}
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
let form, layer, dtree, util, idParam, phoneParam,statusParam;
|
||||
let arr = ['background', 'web', 'mobile', 'wx'];
|
||||
let background, web, mobile, wx;
|
||||
let data = [], appResList = [];
|
||||
// 角色下拉选
|
||||
let roleList;
|
||||
getTeamSelected();
|
||||
function setParams(params) {
|
||||
idParam = JSON.parse(params).customId;
|
||||
// statusParam = 0;
|
||||
console.log(idParam)
|
||||
layui.config({
|
||||
base: "../../../js/layui-v2.6.8/dtree/", //此处路径请自行处理, 可以使用绝对路径
|
||||
}).extend({
|
||||
dtree: 'dtree'
|
||||
}).use(['form', 'layer', 'util'], function () {
|
||||
layer = layui.layer;
|
||||
form = layui.form;
|
||||
util = layui.util;
|
||||
form.on('submit(formData)', function (data) {
|
||||
data.field.id = $('#id').val();
|
||||
// data.field.customStatus = $('#customStatus').val();
|
||||
// data.field.type = !$('#id').val() ? '1' : '2';
|
||||
saveData(data);
|
||||
});
|
||||
// form.on('switch',function(data){
|
||||
// if(data.elem.checked==true){
|
||||
// statusParam = 1;
|
||||
// }
|
||||
//
|
||||
// });
|
||||
form.verify(
|
||||
{
|
||||
required: function (value, item) {
|
||||
let customPhone = $('#customPhone').val();
|
||||
if(customPhone){
|
||||
if (!(/^1[3456789]\d{9}$/.test(customPhone))) {
|
||||
return '请输入正确的手机号';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
// if (idParam) {
|
||||
// getFormbyId();
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
// 根据id获取用户信息
|
||||
function getFormbyId() {
|
||||
let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
||||
let url = dataUrl + "/customs/getCustomId?token=" + tokens;
|
||||
let params = {
|
||||
customId: idParam
|
||||
}
|
||||
params={
|
||||
encryptedData:encryptCBC(JSON.stringify(params))
|
||||
}
|
||||
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.code === 200) {
|
||||
setFormData(result.data);
|
||||
} else {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
}, function (xhr) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
error(xhr)
|
||||
});
|
||||
}
|
||||
|
||||
// 设置表单内容
|
||||
function setFormData(data) {
|
||||
if (data) {
|
||||
form.val('formInfo',data)
|
||||
// if(data.customStatus == 1){
|
||||
// $("#customStatus").prop("checked", 1);
|
||||
// }else{
|
||||
// $("#customStatus").prop("checked", 0);
|
||||
//
|
||||
// }
|
||||
deptId = data.deptId;
|
||||
pid = data.pid
|
||||
console.log(data)
|
||||
form.render();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function saveData2() {
|
||||
$('#formSubmit').trigger('click')
|
||||
}
|
||||
|
||||
// 保存数据
|
||||
function saveData(data) {
|
||||
let loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0});
|
||||
|
||||
let params = data.field;
|
||||
params.customId = idParam;
|
||||
// params.customStatus = statusParam;
|
||||
let path_url = '';
|
||||
path_url = 'addDeptCustom';
|
||||
|
||||
let url = dataUrl + "/customs/" + path_url + "?token=" + tokens;
|
||||
|
||||
params = {
|
||||
encryptedData: encryptCBC(JSON.stringify(params))
|
||||
}
|
||||
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
$('.save').addClass("layui-btn-disabled").attr("disabled", true);
|
||||
$('.cancel').addClass("layui-btn-disabled").attr("disabled", true);
|
||||
}, function (result) {
|
||||
console.log(result)
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.code === 200) {
|
||||
parent.layer.msg(result.msg, {icon: 1,time:1000},function (){
|
||||
closePage(1);
|
||||
})
|
||||
// closePage(1);
|
||||
// parent.layer.msg(result.data, {icon: 1});
|
||||
} else if (result.code === 500) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
} else if (result.code === 204) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
}
|
||||
}, function (xhr) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
$('.save').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
|
||||
error(xhr)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 关闭页面
|
||||
function closePage(type) {
|
||||
let index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
if (type === 1) {
|
||||
parent.reloadData()
|
||||
}
|
||||
}
|
||||
function getTeamSelected() {
|
||||
debugger
|
||||
let url = dataUrl + '/customs/all';
|
||||
ajaxRequest(url, "POST", null, true, function () {
|
||||
}, function (result) {
|
||||
if (result.code === 200) {
|
||||
setSelectValue(result.data, 'pid');
|
||||
// return result.data
|
||||
} else {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
}, function (xhr) {
|
||||
error(xhr)
|
||||
});
|
||||
}
|
||||
|
||||
/*下拉选表单赋值*/
|
||||
// function setSelectValue(list, selectName) {
|
||||
// let html = '<option value="" selected>请选择</option>';
|
||||
// $.each(list, function (index, item) {
|
||||
// html += '<option value="' + item.pid + '">' + item.customName + '</option>';
|
||||
// })
|
||||
// $('#' + selectName).empty().append(html);
|
||||
// layui.form.render();
|
||||
// }
|
||||
|
|
@ -4,10 +4,10 @@ let background, web, mobile, wx;
|
|||
let data = [], appResList = [];
|
||||
// 角色下拉选
|
||||
let roleList;
|
||||
|
||||
getTeamSelected();
|
||||
function setParams(params) {
|
||||
idParam = JSON.parse(params).customId;
|
||||
statusParam = 0;
|
||||
// statusParam = 0;
|
||||
console.log(idParam)
|
||||
layui.config({
|
||||
base: "../../../js/layui-v2.6.8/dtree/", //此处路径请自行处理, 可以使用绝对路径
|
||||
|
|
@ -76,12 +76,15 @@ function getFormbyId() {
|
|||
function setFormData(data) {
|
||||
if (data) {
|
||||
form.val('formInfo',data)
|
||||
if(data.customStatus == 1){
|
||||
$("#customStatus").prop("checked", 1);
|
||||
}else{
|
||||
$("#customStatus").prop("checked", 0);
|
||||
|
||||
}
|
||||
// if(data.customStatus == 1){
|
||||
// $("#customStatus").prop("checked", 1);
|
||||
// }else{
|
||||
// $("#customStatus").prop("checked", 0);
|
||||
//
|
||||
// }
|
||||
deptId = data.deptId;
|
||||
pid = data.pid
|
||||
console.log(data)
|
||||
form.render();
|
||||
|
||||
|
||||
|
|
@ -98,7 +101,7 @@ function saveData(data) {
|
|||
|
||||
let params = data.field;
|
||||
params.customId = idParam;
|
||||
params.customStatus = statusParam;
|
||||
// params.customStatus = statusParam;
|
||||
let path_url='';
|
||||
if(params.customId==null || params.customId ==''){
|
||||
path_url='addCustom';
|
||||
|
|
@ -145,4 +148,28 @@ function closePage(type) {
|
|||
if (type === 1) {
|
||||
parent.reloadData()
|
||||
}
|
||||
}
|
||||
}
|
||||
function getTeamSelected() {
|
||||
let url = dataUrl + '/customs/all';
|
||||
ajaxRequest(url, "POST", null, true, function () {
|
||||
}, function (result) {
|
||||
if (result.code === 200) {
|
||||
setSelectValue(result.data, 'pid');
|
||||
// return result.data
|
||||
} else {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
}, function (xhr) {
|
||||
error(xhr)
|
||||
});
|
||||
}
|
||||
|
||||
/*下拉选表单赋值*/
|
||||
function setSelectValue(list, selectName) {
|
||||
let html = '<option value="" selected>请选择</option>';
|
||||
$.each(list, function (index, item) {
|
||||
html += '<option value="' + item.pid + '">' + item.customName + '</option>';
|
||||
})
|
||||
$('#' + selectName).empty().append(html);
|
||||
layui.form.render();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,31 +5,7 @@ layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
|||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
layui.form.render();
|
||||
getRoleSelected();
|
||||
pages(1, 10, 1);
|
||||
form.on('switch(is-state)', function (obj) {
|
||||
console.log(obj);
|
||||
// let url = dataUrl + "/sys/task/updaetTaskState";
|
||||
// let params = {
|
||||
// 'id': this.value,
|
||||
// 'taskStatus': obj.elem.checked ? 1 : 0,
|
||||
// 'taskCode':this.taskCode
|
||||
// }
|
||||
// params={
|
||||
// encryptedData:encryptCBC(JSON.stringify(params))
|
||||
// }
|
||||
// ajaxRequest(url, "POST", params, true, function () {}, function (result) {
|
||||
// console.log(result)
|
||||
// reloadData();
|
||||
// if (result.status === 200) {
|
||||
// parent.layer.msg(result.data, {icon: 1})
|
||||
// } else if (result.status === 204) {
|
||||
// parent.layer.alert(result.msg, {icon: 2})
|
||||
// }
|
||||
// }, function (xhr) {
|
||||
// error(xhr)
|
||||
// });
|
||||
});
|
||||
})
|
||||
|
||||
function pages(pageNum, pageSize, typeNum) {
|
||||
|
|
@ -49,28 +25,6 @@ function pages(pageNum, pageSize, typeNum) {
|
|||
}, function (xhr) {
|
||||
error(xhr)
|
||||
});
|
||||
// $.ajax({
|
||||
// url: dataUrl + "/sys/user/getUserList",
|
||||
// headers: {
|
||||
// "token": tokens
|
||||
// },
|
||||
// data: params,
|
||||
// type: 'POST',
|
||||
// async: false,
|
||||
// success: function (result) {
|
||||
// console.log(result);
|
||||
// if (result.code === 200) {
|
||||
// if (result.data) {
|
||||
// initTable(result.data, result.limit, result.curr)
|
||||
// laypages(result.count, result.curr, result.limit)
|
||||
// }
|
||||
// } else if (result.code === 500) {
|
||||
// layer.alert(result.msg, {icon: 2})
|
||||
// }
|
||||
// }, error: function (xhr) {
|
||||
// error(xhr);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
function laypages(total, page, limit) {
|
||||
|
|
@ -115,13 +69,13 @@ function initTable(dataList, limit, page) {
|
|||
{field: "teamTypeName", title: "班组类型", unresize: true, align: "center"},
|
||||
{field: "teamLeader", title: "班组负责人", unresize: true, align: "center"},
|
||||
{field: "teamLeaderPhone", title: "联系方式", unresize: true, align: "center"},
|
||||
{field: "countuser", title: "班组人数", unresize: true, align: "center"},
|
||||
{field: "createTime", title: "创建时间", unresize: true, align: "center"},
|
||||
{field: "updateTime", title: "更新时间", unresize: true, align: "center"},
|
||||
{title: "操作", unresize: true, width: 300, align: "center",
|
||||
templet: function (d) {
|
||||
|
||||
let html = '';
|
||||
let del="<a class=\"layui-icon layui-icon-delete\" style='cursor:pointer;' title='删除' onclick=\"delData('" + d.teamId + "')\"></a>"
|
||||
let del="<a class=\"layui-icon layui-icon-delete\" style='cursor:pointer;' title='删除' onclick=\"delData('" + d.teamId + "','"+ d.countuser + "')\"></a>"
|
||||
let edit="<a class=\"layui-icon layui-icon-edit\" style='cursor:pointer;' title='修改' onclick=\"addData('" + d.teamId + "')\"></a>";
|
||||
html=edit+del;
|
||||
return html;
|
||||
|
|
@ -201,14 +155,15 @@ function addData(teamId) {
|
|||
}
|
||||
|
||||
/*删除用户*/
|
||||
function delData(teamId) {
|
||||
function delData(teamId,countuser) {
|
||||
layer.confirm("确定删除吗?", {
|
||||
move: false
|
||||
}, function () {
|
||||
let loadingMsg = layer.msg('数据删除中,请稍候...', {icon: 16, scrollbar: false, time: 0});
|
||||
let url = dataUrl + "/teams/delById";
|
||||
let params = {
|
||||
'teamId': teamId
|
||||
'teamId': teamId,
|
||||
'countuser':countuser
|
||||
}
|
||||
params={
|
||||
encryptedData:encryptCBC(JSON.stringify(params))
|
||||
|
|
@ -217,7 +172,11 @@ function delData(teamId) {
|
|||
}, function (result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.code === 200) {
|
||||
parent.layer.msg(result.msg, {icon: 1})
|
||||
if(result.msg=="删除成功"){
|
||||
parent.layer.msg(result.msg, {icon: 1})
|
||||
}else{
|
||||
parent.layer.msg(result.msg, {icon: 2})
|
||||
}
|
||||
query()
|
||||
} else if (result.code === 500) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
|
|
@ -229,59 +188,6 @@ function delData(teamId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 启用/停用/解除锁定
|
||||
function editUserAccountStatus(id, status, type) {
|
||||
let url = dataUrl + "/sys/user/editUserAccountStatus?token=" + token;
|
||||
let params = {
|
||||
'id': id,
|
||||
'accountStatus': status,
|
||||
'type': type
|
||||
}
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
if (result.code === 200) {
|
||||
if(type){
|
||||
reloadData();
|
||||
}
|
||||
parent.layer.msg(result.msg, {icon: 1})
|
||||
} else if (result.code === 500) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
}, function (xhr) {
|
||||
error(xhr)
|
||||
});
|
||||
}
|
||||
|
||||
// 管理员修改密码
|
||||
function resetPwd(id) {
|
||||
let param = {
|
||||
'id': id,
|
||||
'type': '1'
|
||||
}
|
||||
openIframe2("addOrEditUnifyUser", '修改密码', "password.html", '770px', '400px', param);
|
||||
}
|
||||
|
||||
function getRoleSelected() {
|
||||
let url = dataUrl + '/roles/all';
|
||||
ajaxRequest(url, "POST", null, true, function () {
|
||||
}, function (result) {
|
||||
if (result.code === 200) {
|
||||
setSelectValue(result.data, 'roleId');
|
||||
// return result.data
|
||||
} else {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
}, function (xhr) {
|
||||
error(xhr)
|
||||
});
|
||||
}
|
||||
|
||||
/*下拉选表单赋值*/
|
||||
function setSelectValue(list, selectName) {
|
||||
let html = '<option value="" selected>请选择角色</option>';
|
||||
$.each(list, function (index, item) {
|
||||
html += '<option value="' + item.id + '">' + item.name + '</option>';
|
||||
})
|
||||
$('#' + selectName).empty().append(html);
|
||||
layui.form.render();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../../../js/layui-v2.6.8/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="../../../css/dataForm.css">
|
||||
<script src="../../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../../js/layui-v2.6.8/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../../js/my/aes.js"></script>
|
||||
<script src="../../../js/publicJs.js"></script>
|
||||
<script src="../../../js/select.js"></script>
|
||||
<script src="../../../js/ajaxRequest.js"></script>
|
||||
<script src="../../../js/openIframe.js"></script>
|
||||
<script src="../../../js/commonUtils.js"></script>
|
||||
<title>成员-新增</title>
|
||||
<style>
|
||||
.layui-form-itemTemp .layui-input-inline {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main-box">
|
||||
<form class="layui-form" onsubmit="return false;" >
|
||||
<div class="layui-form-itemTemp">
|
||||
<div class="layui-inline" style="padding: 6px 0 0 0;">
|
||||
<div class="layui-input-inline" >
|
||||
<input type="text" id="keyWord" maxlength="30" class="layui-input" autocomplete="off" placeholder="请输入关键字">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline btns">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(1)">查询
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm btn-2" onclick=" batchAddData()">
|
||||
<div class="layout" style="justify-content: space-around;"><img
|
||||
src="../../../img/form/add_icon3.png">
|
||||
<p>添加</p></div></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="table-box" table-responsive style="z-index: 1;">
|
||||
<table id="table_data" class="table" lay-filter="table_data"></table>
|
||||
<div id="voi-page" class="layout"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<script src="../../../js/basis/child/teamConfigDataFormTable.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../../js/basis/teamConfigAjax.js" charset="UTF-8" type="text/javascript"></script>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/dtree/dtree.css">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/dtree/font/dtreefont.css">
|
||||
<link rel="stylesheet" href="../../css/dataForm.css">
|
||||
<script src="../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/layui-v2.6.8/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/publicJs.js"></script>
|
||||
<script src="../../js/my/aes.js"></script>
|
||||
<script src="../../js/select.js"></script>
|
||||
<script src="../../js/ajaxRequest.js"></script>
|
||||
<title>用户-新增/修改</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main-box">
|
||||
<form class="layui-form" onsubmit="return false;" lay-filter="formInfo">
|
||||
<input hidden id="id" name="id">
|
||||
|
||||
<!-- <div class="layui-form-item" style="margin-top: 2%;">-->
|
||||
<!-- <label class="layui-form-label"><i style="padding: 0 10px;">*</i>上级菜单</label>-->
|
||||
<!-- <div class="layui-input-inline">-->
|
||||
<!-- <select class="form-control input-sm" name="pid" id="pid">-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>客户名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="customName" name="customName" autocomplete="off"
|
||||
lay-verify="required" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="layui-form-item" style="margin-top: 2%;">-->
|
||||
<!-- <label class="layui-form-label"><i style="padding: 0 10px;">*</i>组织类型</label>-->
|
||||
<!-- <div class="layui-input-inline">-->
|
||||
<!-- <select class="form-control input-sm" name="deptId" id="deptId">-->
|
||||
<!-- <option value="0">单位</option>-->
|
||||
<!-- <option value="1">部门</option>-->
|
||||
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>客户类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="customType" name="customType" autocomplete="off"
|
||||
lay-verify="required" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>联系人</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="customUser" name="customUser" autocomplete="off"
|
||||
lay-verify="required" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>联系电话</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="customPhone" name="customPhone" autocomplete="off"
|
||||
lay-verify="required" maxlength="11">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-form-item" style="margin-top: 2%;">-->
|
||||
<!-- <label class="layui-form-label"><i style="padding: 0 10px;">*</i>状态是否开启</label>-->
|
||||
<!-- <div class="layui-input-inline">-->
|
||||
<!-- <input type="checkbox" name="customStatus" id='customStatus' title="开启|关闭" lay-skin="switch">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
|
||||
style="display: none;"></button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-btn-norma save" onclick="saveData2()">确定</button>
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">取消</button>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../js/basis/customAddDeptForm.js" charset="UTF-8" type="text/javascript"></script>
|
||||
</html>
|
||||
|
|
@ -18,6 +18,15 @@
|
|||
<div id="main-box">
|
||||
<form class="layui-form" onsubmit="return false;" lay-filter="formInfo">
|
||||
<input hidden id="id" name="id">
|
||||
|
||||
<!-- <div class="layui-form-item" style="margin-top: 2%;">-->
|
||||
<!-- <label class="layui-form-label"><i style="padding: 0 10px;">*</i>上级菜单</label>-->
|
||||
<!-- <div class="layui-input-inline">-->
|
||||
<!-- <select class="form-control input-sm" name="pid" id="pid">-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>客户名称</label>
|
||||
<div class="layui-input-inline">
|
||||
|
|
@ -25,6 +34,18 @@
|
|||
lay-verify="required" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="layui-form-item" style="margin-top: 2%;">-->
|
||||
<!-- <label class="layui-form-label"><i style="padding: 0 10px;">*</i>组织类型</label>-->
|
||||
<!-- <div class="layui-input-inline">-->
|
||||
<!-- <select class="form-control input-sm" name="deptId" id="deptId">-->
|
||||
<!-- <option value="0">单位</option>-->
|
||||
<!-- <option value="1">部门</option>-->
|
||||
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>客户类型</label>
|
||||
<div class="layui-input-inline">
|
||||
|
|
@ -46,12 +67,12 @@
|
|||
lay-verify="required" maxlength="11">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>状态是否开启</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="checkbox" name="customStatus" id='customStatus' title="开启|关闭" lay-skin="switch">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-form-item" style="margin-top: 2%;">-->
|
||||
<!-- <label class="layui-form-label"><i style="padding: 0 10px;">*</i>状态是否开启</label>-->
|
||||
<!-- <div class="layui-input-inline">-->
|
||||
<!-- <input type="checkbox" name="customStatus" id='customStatus' title="开启|关闭" lay-skin="switch">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
|
||||
style="display: none;"></button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/dtree/dtree.css">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/dtree/font/dtreefont.css">
|
||||
<link rel="stylesheet" href="../../css/dataForm.css">
|
||||
<script src="../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/layui-v2.6.8/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/publicJs.js"></script>
|
||||
<script src="../../js/my/aes.js"></script>
|
||||
<script src="../../js/select.js"></script>
|
||||
<script src="../../js/ajaxRequest.js"></script>
|
||||
<title>实验设备-新增/修改</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main-box">
|
||||
<form class="layui-form" onsubmit="return false;" lay-filter="formInfo">
|
||||
<input hidden id="id" name="id">
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>设备名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="devName" name="devName" autocomplete="off"
|
||||
lay-verify="required" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>设备型号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="devModule" name="devModule" autocomplete="off"
|
||||
lay-verify="required" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>设备编号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="devCode" name="devCode" autocomplete="off"
|
||||
lay-verify="required" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>合同生效日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" id="contractDate" name="contractDate" readonly
|
||||
lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>数据来源</label>
|
||||
<div class="layui-input-inline">
|
||||
<select class="form-control input-sm" name="dataSource" id="dataSource">
|
||||
<option value="0">新增</option>
|
||||
<option value="1">实验配置</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" id="formSubmit" class="layui-btn" lay-submit="" lay-filter="formData"
|
||||
style="display: none;"></button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="btn-box">
|
||||
<button class="layui-btn layui-btn-norma save" onclick="saveData2()">确定</button>
|
||||
<button class="layui-btn layui-btn-primary cancel" onclick="closePage()">取消</button>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../js/exper/deviceAddForm.js" charset="UTF-8" type="text/javascript"></script>
|
||||
</html>
|
||||
|
|
@ -2,49 +2,37 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/dtree/dtree.css">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/dtree/font/dtreefont.css">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/css/layui.css">
|
||||
<link rel="stylesheet" href="../../css/table-common2.css">
|
||||
<script src="../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/layui-v2.6.8/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/publicJs.js"></script>
|
||||
<script src="../../js/dict.js"></script>
|
||||
<script src="../../js/commonUtils.js"></script>
|
||||
<script src="../../js/openIframe.js"></script>
|
||||
<script src="../../js/my/aes.js"></script>
|
||||
<script src="../../js/ajaxRequest.js"></script>
|
||||
<title>检测报告管理</title>
|
||||
<title>实验管理</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<div class="basic-search-box layout">
|
||||
<form class="layui-form basic-form" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<select id="sampleTools" name="sampleTools" class="form-control input-sm">
|
||||
</select>
|
||||
<input type="text" id="keyWord" maxlength="50" class="layui-input" autocomplete="off" placeholder="请输入关键词">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="collectSamplesUser" maxlength="30" class="layui-input" autocomplete="off" placeholder="请输入收样人">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="keyWord" maxlength="30" class="layui-input" autocomplete="off" placeholder="请输入关键字">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-inline btns">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(1)">查询
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary layui-btn-sm btn-2"
|
||||
onclick="addData(null)">
|
||||
<div class="layout" style="justify-content: space-around;"><img
|
||||
src="../../img/form/add_icon3.png">
|
||||
<p>新增</p></div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -59,10 +47,7 @@
|
|||
.layui-table-init {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.layui-form-selected dl {
|
||||
height: 150px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="../../js/testReport/testReportMge.js" charset="UTF-8" type="text/javascript"></script>
|
||||
</html>
|
||||
<script src="../../js/exper/device.js" charset="UTF-8" type="text/javascript"></script>
|
||||
</html>
|
||||
|
|
@ -2,9 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../../../js/layui-v2.6.8/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="../../../js/layui-v2.6.8/dtree/dtree.css">
|
||||
<link rel="stylesheet" href="../../../js/layui-v2.6.8/dtree/font/dtreefont.css">
|
||||
<link rel="stylesheet" href="../../../js/layui-v2.6.8/css/layui.css">
|
||||
<link rel="stylesheet" href="../../../css/table-common2.css">
|
||||
<script src="../../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../../js/layui-v2.6.8/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||
|
|
@ -13,28 +11,20 @@
|
|||
<script src="../../../js/openIframe.js"></script>
|
||||
<script src="../../../js/my/aes.js"></script>
|
||||
<script src="../../../js/ajaxRequest.js"></script>
|
||||
<title>详情</title>
|
||||
<title>试验</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<div class="basic-search-box layout">
|
||||
<form class="layui-form basic-form" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<select id="sampleTools" name="sampleTools" class="form-control input-sm">
|
||||
<select id="devId" name="devId" class="form-control input-sm">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="keyWord" maxlength="30" class="layui-input" autocomplete="off" placeholder="请输入关键字">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-inline btns">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(1)">查询
|
||||
</button>
|
||||
|
|
@ -48,5 +38,5 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../../js/testReport/child/testReportForm.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../../js/primaryData/child/primaryDataList.js" charset="UTF-8" type="text/javascript"></script>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.6.8/css/layui.css">
|
||||
<link rel="stylesheet" href="../../css/table-common2.css">
|
||||
<script src="../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/layui-v2.6.8/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/publicJs.js"></script>
|
||||
<script src="../../js/commonUtils.js"></script>
|
||||
<script src="../../js/openIframe.js"></script>
|
||||
<script src="../../js/my/aes.js"></script>
|
||||
<script src="../../js/ajaxRequest.js"></script>
|
||||
<title>原始数据管理</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<div class="basic-search-box layout">
|
||||
<form class="layui-form basic-form" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<select id="devId" name="devId" class="form-control input-sm">
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="sampleUserName" maxlength="50" class="layui-input" autocomplete="off" placeholder="请输入收样人">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="keyWord" maxlength="50" class="layui-input" autocomplete="off" placeholder="请输入关键字">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline" id="ID-laydate-rangeLinked">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" autocomplete="off" readonly id="startTime" class="layui-input"
|
||||
placeholder="开始日期">
|
||||
</div>
|
||||
<div class="layui-form-mid">-</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" autocomplete="off" readonly id="endTime" class="layui-input"
|
||||
placeholder="结束日期">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline btns">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" permission="sys:experimental:query" onclick="query(1)">查询
|
||||
</button>
|
||||
<!-- <button type="button" class="layui-btn layui-btn-primary layui-btn-sm btn-2"-->
|
||||
<!-- onclick="commitCheckTestData()">-->
|
||||
<!-- <div class="layout" style="justify-content: space-around;">-->
|
||||
<!-- <p>审查</p></div>-->
|
||||
<!-- </button>-->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="table-box" table-responsive style="z-index: 1;">
|
||||
<table id="table_data" class="table" lay-filter="table_data"></table>
|
||||
<div id="voi-page" class="layout"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../js/primaryData/primary.js" charset="UTF-8" type="text/javascript"></script>
|
||||
</html>
|
||||
Loading…
Reference in New Issue