Commit a5f11ba0 authored by yaobaizheng's avatar yaobaizheng

轮播图展示、提交时间 上传多张轮播图

parent a30a5216
...@@ -15,4 +15,5 @@ public class DevelopmentInfoDetailVO { ...@@ -15,4 +15,5 @@ public class DevelopmentInfoDetailVO {
List<DevelopmentIndustryPolicyInfo> developmentIndustryPolicyInfos; List<DevelopmentIndustryPolicyInfo> developmentIndustryPolicyInfos;
List<DevelopmentIndustryFundInfo> developmentIndustryFundInfos; List<DevelopmentIndustryFundInfo> developmentIndustryFundInfos;
List<DevelopmentIndustrialLandInfo> developmentIndustrialLandInfos; List<DevelopmentIndustrialLandInfo> developmentIndustrialLandInfos;
List<SysCarouselInfo> sysCarouselInfos;
} }
...@@ -9,14 +9,8 @@ import com.ruoyi.common.enums.BusinessType; ...@@ -9,14 +9,8 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.VO.BaseInfoParam; import com.ruoyi.system.VO.BaseInfoParam;
import com.ruoyi.system.VO.BaseInfoVO; import com.ruoyi.system.VO.BaseInfoVO;
import com.ruoyi.system.domain.DevelopmentInfo; import com.ruoyi.system.domain.*;
import com.ruoyi.system.domain.MegalopolisInfo; import com.ruoyi.system.service.*;
import com.ruoyi.system.domain.ParkInfo;
import com.ruoyi.system.domain.SysCarouselInfo;
import com.ruoyi.system.service.IDevelopmentInfoService;
import com.ruoyi.system.service.IMegalopolisInfoService;
import com.ruoyi.system.service.IParkInfoService;
import com.ruoyi.system.service.ISysCarouselInfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -53,6 +47,12 @@ public class SysCarouselInfoController extends BaseController ...@@ -53,6 +47,12 @@ public class SysCarouselInfoController extends BaseController
@Autowired @Autowired
private IMegalopolisInfoService megalopolisInfoService; private IMegalopolisInfoService megalopolisInfoService;
@Autowired
private IDevelopmentIndustrialLandInfoService developmentIndustrialLandInfoService;
@Autowired
private ICarrierInfoService carrierInfoService;
@RequiresPermissions("carousel:info:view") @RequiresPermissions("carousel:info:view")
@GetMapping() @GetMapping()
public String info() public String info()
...@@ -219,6 +219,29 @@ public class SysCarouselInfoController extends BaseController ...@@ -219,6 +219,29 @@ public class SysCarouselInfoController extends BaseController
}).collect(Collectors.toList()); }).collect(Collectors.toList());
rspData.setRows(list); rspData.setRows(list);
rspData.setTotal(new PageInfo(parkInfos).getTotal()); rspData.setTotal(new PageInfo(parkInfos).getTotal());
}else if(type == 4){
DevelopmentIndustrialLandInfo info = new DevelopmentIndustrialLandInfo();
info.setName(baseInfoParam.getName());
List<DevelopmentIndustrialLandInfo> infos = developmentIndustrialLandInfoService.selectDevelopmentIndustrialLandInfoList(info);
list = infos.stream().map(e -> {
BaseInfoVO baseInfoVO = new BaseInfoVO();
BeanUtils.copyProperties(e, baseInfoVO);
return baseInfoVO;
}).collect(Collectors.toList());
rspData.setRows(list);
rspData.setTotal(new PageInfo(infos).getTotal());
}else if(type == 5){
CarrierInfo info = new CarrierInfo();
info.setBuildingNumber(baseInfoParam.getName());
List<CarrierInfo> infos = carrierInfoService.selectCarrierInfoList(info);
list = infos.stream().map(e -> {
BaseInfoVO baseInfoVO = new BaseInfoVO();
BeanUtils.copyProperties(e, baseInfoVO);
baseInfoVO.setName(e.getBuildingNumber());
return baseInfoVO;
}).collect(Collectors.toList());
rspData.setRows(list);
rspData.setTotal(new PageInfo(infos).getTotal());
} }
rspData.setCode(0); rspData.setCode(0);
return rspData; return rspData;
......
package com.ruoyi.system.controller;
import com.github.pagehelper.PageInfo;
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.poi.ExcelUtil;
import com.ruoyi.system.VO.BaseInfoParam;
import com.ruoyi.system.VO.BaseInfoVO;
import com.ruoyi.system.domain.*;
import com.ruoyi.system.service.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 轮播图信息Controller
*
* @author ruoyi
* @date 2023-10-19
*/
@Controller
@RequestMapping("/carousel/VRinfo")
public class SysCarouselVRInfoController extends BaseController
{
private String prefix = "carousel/VRinfo";
@Autowired
private ISysCarouselInfoService sysCarouselInfoService;
@Autowired
private IParkInfoService parkInfoService;
@Autowired
private IDevelopmentInfoService developmentInfoService;
@Autowired
private IMegalopolisInfoService megalopolisInfoService;
@Autowired
private IDevelopmentIndustrialLandInfoService developmentIndustrialLandInfoService;
@Autowired
private ICarrierInfoService carrierInfoService;
@RequiresPermissions("carousel:VRinfo:view")
@GetMapping()
public String info()
{
return prefix + "/info";
}
@GetMapping("/videoCover")
public String industry(HttpServletRequest request, ModelMap mmap)
{
String id = request.getParameter("videoId");
SysCarouselInfo sysCarouselInfo = sysCarouselInfoService.selectSysCarouselInfoById(Long.parseLong(id));
mmap.put("sysCarouselInfo", sysCarouselInfo);
mmap.put("id",id);
return prefix + "/video_cover";
}
/**
* 查询轮播图信息列表
*/
@RequiresPermissions("carousel:VRinfo:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysCarouselInfo sysCarouselInfo)
{
startPage();
List<SysCarouselInfo> list = sysCarouselInfoService.selectSysCarouselInfoListVR(sysCarouselInfo);
return getDataTable(list);
}
/**
* 导出轮播图信息列表
*/
@RequiresPermissions("carousel:VRinfo:export")
@Log(title = "轮播图信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysCarouselInfo sysCarouselInfo)
{
List<SysCarouselInfo> list = sysCarouselInfoService.selectSysCarouselInfoList(sysCarouselInfo);
ExcelUtil<SysCarouselInfo> util = new ExcelUtil<SysCarouselInfo>(SysCarouselInfo.class);
return util.exportExcel(list, "轮播图信息数据");
}
/**
* 新增轮播图信息
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存轮播图信息
*/
@RequiresPermissions("carousel:VRinfo:add")
@Log(title = "轮播图信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysCarouselInfo sysCarouselInfo)
{
return toAjax(sysCarouselInfoService.insertSysCarouselInfo(sysCarouselInfo));
}
/**
* 修改轮播图信息
*/
@RequiresPermissions("carousel:VRinfo:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
SysCarouselInfo sysCarouselInfo = sysCarouselInfoService.selectSysCarouselInfoById(id);
mmap.put("sysCarouselInfo", sysCarouselInfo);
return prefix + "/edit";
}
/**
* 保存封面
*/
@Log(title = "保存封面", businessType = BusinessType.UPDATE)
@PostMapping("/editVideoCover")
@ResponseBody
public AjaxResult editVideoCover(SysCarouselInfo sysCarouselInfo)
{
return toAjax(sysCarouselInfoService.updateVideoCover(sysCarouselInfo));
}
/**
* 修改保存轮播图信息
*/
@RequiresPermissions("carousel:VRinfo:edit")
@Log(title = "轮播图信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysCarouselInfo sysCarouselInfo)
{
return toAjax(sysCarouselInfoService.updateSysCarouselInfo(sysCarouselInfo));
}
/**
* 删除轮播图信息
*/
@RequiresPermissions("carousel:VRinfo:remove")
@Log(title = "轮播图信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysCarouselInfoService.deleteSysCarouselInfoByIds(ids));
}
@GetMapping( "/selectType")
public String selectType(HttpServletRequest httpServletRequest, ModelMap mmap)
{
String type = httpServletRequest.getParameter("type");
mmap.put("type",type);
return prefix + "/selectType";
}
// @PostMapping("/listSelectType/{type}/{name}")
@PostMapping("/listSelectType")
@ResponseBody
// public TableDataInfo listSelectType(@PathVariable Integer type,@PathVariable String name)
public TableDataInfo listSelectType(BaseInfoParam baseInfoParam)
{
startPage();
List<BaseInfoVO> list = new ArrayList<>();
TableDataInfo rspData = new TableDataInfo();
Integer type = baseInfoParam.getType();
if(type == 0){
MegalopolisInfo megalopolisInfo = new MegalopolisInfo();
megalopolisInfo.setName(baseInfoParam.getName());
List<MegalopolisInfo> megalopolisInfos = megalopolisInfoService.selectMegalopolisInfoList(megalopolisInfo);
list = megalopolisInfos.stream().map(e -> {
BaseInfoVO baseInfoVO = new BaseInfoVO();
BeanUtils.copyProperties(e, baseInfoVO);
return baseInfoVO;
}).collect(Collectors.toList());
rspData.setRows(list);
rspData.setTotal(new PageInfo(megalopolisInfos).getTotal());
}else if(type == 1){
DevelopmentInfo developmentInfo = new DevelopmentInfo();
developmentInfo.setName(baseInfoParam.getName());
List<DevelopmentInfo> developmentInfos = developmentInfoService.selectDevelopmentInfoList(developmentInfo);
list = developmentInfos.stream().map(e -> {
BaseInfoVO baseInfoVO = new BaseInfoVO();
BeanUtils.copyProperties(e, baseInfoVO);
return baseInfoVO;
}).collect(Collectors.toList());
rspData.setRows(list);
rspData.setTotal(new PageInfo(developmentInfos).getTotal());
}else if(type == 2){
ParkInfo parkInfo = new ParkInfo();
parkInfo.setName(baseInfoParam.getName());
List<ParkInfo> parkInfos = parkInfoService.selectParkInfoList(parkInfo);
list = parkInfos.stream().map(e -> {
BaseInfoVO baseInfoVO = new BaseInfoVO();
BeanUtils.copyProperties(e, baseInfoVO);
return baseInfoVO;
}).collect(Collectors.toList());
rspData.setRows(list);
rspData.setTotal(new PageInfo(parkInfos).getTotal());
}else if(type == 4){
DevelopmentIndustrialLandInfo info = new DevelopmentIndustrialLandInfo();
info.setName(baseInfoParam.getName());
List<DevelopmentIndustrialLandInfo> infos = developmentIndustrialLandInfoService.selectDevelopmentIndustrialLandInfoList(info);
list = infos.stream().map(e -> {
BaseInfoVO baseInfoVO = new BaseInfoVO();
BeanUtils.copyProperties(e, baseInfoVO);
return baseInfoVO;
}).collect(Collectors.toList());
rspData.setRows(list);
rspData.setTotal(new PageInfo(infos).getTotal());
}else if(type == 5){
CarrierInfo info = new CarrierInfo();
info.setBuildingNumber(baseInfoParam.getName());
List<CarrierInfo> infos = carrierInfoService.selectCarrierInfoList(info);
list = infos.stream().map(e -> {
BaseInfoVO baseInfoVO = new BaseInfoVO();
BeanUtils.copyProperties(e, baseInfoVO);
baseInfoVO.setName(e.getBuildingNumber());
return baseInfoVO;
}).collect(Collectors.toList());
rspData.setRows(list);
rspData.setTotal(new PageInfo(infos).getTotal());
}
rspData.setCode(0);
return rspData;
}
}
package com.ruoyi.system.controller; package com.ruoyi.system.controller;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.config.LyyConfig; import com.ruoyi.system.config.LyyConfig;
import com.ruoyi.system.service.UploadService; import com.ruoyi.system.service.UploadService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -11,6 +13,9 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -11,6 +13,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.List;
/** /**
* 文件上传下载处理 * 文件上传下载处理
* @author yaobaizheng * @author yaobaizheng
...@@ -26,6 +31,8 @@ public class SysFileController { ...@@ -26,6 +31,8 @@ public class SysFileController {
@Autowired @Autowired
UploadService uploadService; UploadService uploadService;
private static final String FILE_DELIMETER = ",";
@PostMapping("/uploadFile") @PostMapping("/uploadFile")
@ResponseBody @ResponseBody
// @ApiOperation(value = "华为OBS文件上传",notes = "") // @ApiOperation(value = "华为OBS文件上传",notes = "")
...@@ -53,6 +60,21 @@ public class SysFileController { ...@@ -53,6 +60,21 @@ public class SysFileController {
return ajax; return ajax;
} }
@PostMapping("/uploadImgHuaweis")
@ResponseBody
// @ApiOperation(value = "华为OBS图片上传",notes = "")
public AjaxResult uploadImgHuaweis(List<MultipartFile> files) throws Exception {
String filePath = lyyConfig.getObsPath() + "/";
List<String> urls = new ArrayList<String>();
for (MultipartFile file : files) {
String url = filePath + uploadService.uploadFile(file,"lyy/img");
urls.add(url);
}
AjaxResult ajax = AjaxResult.success();
ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
return ajax;
}
@PostMapping("/uploadFileHuawei") @PostMapping("/uploadFileHuawei")
@ResponseBody @ResponseBody
// @ApiOperation(value = "华为OBS文件上传",notes = "") // @ApiOperation(value = "华为OBS文件上传",notes = "")
......
...@@ -7,6 +7,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; ...@@ -7,6 +7,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
/** /**
* parkinfo对象 park_info * parkinfo对象 park_info
...@@ -278,7 +279,8 @@ public class ParkInfo extends BaseEntity ...@@ -278,7 +279,8 @@ public class ParkInfo extends BaseEntity
private Long userId; private Long userId;
/** 提交时间 */ /** 提交时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date submitTime; private Date submitTime;
......
...@@ -27,6 +27,10 @@ public interface SysCarouselInfoMapper ...@@ -27,6 +27,10 @@ public interface SysCarouselInfoMapper
*/ */
public List<SysCarouselInfo> selectSysCarouselInfoList(SysCarouselInfo sysCarouselInfo); public List<SysCarouselInfo> selectSysCarouselInfoList(SysCarouselInfo sysCarouselInfo);
public List<SysCarouselInfo> selectSysCarouselInfoListVR(SysCarouselInfo sysCarouselInfo);
/** /**
* 新增轮播图信息 * 新增轮播图信息
* *
......
...@@ -28,6 +28,14 @@ public interface ISysCarouselInfoService ...@@ -28,6 +28,14 @@ public interface ISysCarouselInfoService
*/ */
public List<SysCarouselInfo> selectSysCarouselInfoList(SysCarouselInfo sysCarouselInfo); public List<SysCarouselInfo> selectSysCarouselInfoList(SysCarouselInfo sysCarouselInfo);
/**
* 查询轮播图信息列表
*
* @param sysCarouselInfo 轮播图信息
* @return 轮播图信息集合
*/
public List<SysCarouselInfo> selectSysCarouselInfoListVR(SysCarouselInfo sysCarouselInfo);
/** /**
* 新增轮播图信息 * 新增轮播图信息
* *
......
...@@ -177,6 +177,9 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService { ...@@ -177,6 +177,9 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService {
@Autowired @Autowired
DevelopmentIndustryFundInfoServiceImpl fundInfoService; DevelopmentIndustryFundInfoServiceImpl fundInfoService;
@Autowired
private SysCarouselInfoMapper sysCarouselInfoMapper;
@Override @Override
public DevelopmentInfoDetailVO detail(Long developmentInfoId) { public DevelopmentInfoDetailVO detail(Long developmentInfoId) {
DevelopmentInfo developmentInfo = this.selectDevelopmentInfoById(developmentInfoId); DevelopmentInfo developmentInfo = this.selectDevelopmentInfoById(developmentInfoId);
...@@ -222,6 +225,11 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService { ...@@ -222,6 +225,11 @@ public class DevelopmentInfoServiceImpl implements IDevelopmentInfoService {
List<DevelopmentIndustryFundInfo> developmentIndustryFundInfos = fundInfoService.selectDevelopmentIndustryFundInfoList(developmentIndustryFundInfo); List<DevelopmentIndustryFundInfo> developmentIndustryFundInfos = fundInfoService.selectDevelopmentIndustryFundInfoList(developmentIndustryFundInfo);
developmentInfoDetailVO.setDevelopmentIndustryFundInfos(developmentIndustryFundInfos); developmentInfoDetailVO.setDevelopmentIndustryFundInfos(developmentIndustryFundInfos);
SysCarouselInfo sysCarouselInfo = new SysCarouselInfo();
sysCarouselInfo.setAssociationId(developmentInfoId);
sysCarouselInfo.setType(SysCollectionTypeEnum.KAIFAQU.getCode());
List<SysCarouselInfo> sysCarouselInfos = sysCarouselInfoMapper.selectSysCarouselInfoList(sysCarouselInfo);
developmentInfoDetailVO.setSysCarouselInfos(sysCarouselInfos);
return developmentInfoDetailVO; return developmentInfoDetailVO;
} }
......
...@@ -44,6 +44,11 @@ public class SysCarouselInfoServiceImpl implements ISysCarouselInfoService { ...@@ -44,6 +44,11 @@ public class SysCarouselInfoServiceImpl implements ISysCarouselInfoService {
return sysCarouselInfoMapper.selectSysCarouselInfoList(sysCarouselInfo); return sysCarouselInfoMapper.selectSysCarouselInfoList(sysCarouselInfo);
} }
@Override
public List<SysCarouselInfo> selectSysCarouselInfoListVR(SysCarouselInfo sysCarouselInfo) {
return sysCarouselInfoMapper.selectSysCarouselInfoListVR(sysCarouselInfo);
}
/** /**
* 新增轮播图信息 * 新增轮播图信息
* *
...@@ -54,8 +59,11 @@ public class SysCarouselInfoServiceImpl implements ISysCarouselInfoService { ...@@ -54,8 +59,11 @@ public class SysCarouselInfoServiceImpl implements ISysCarouselInfoService {
public int insertSysCarouselInfo(SysCarouselInfo sysCarouselInfo) { public int insertSysCarouselInfo(SysCarouselInfo sysCarouselInfo) {
sysCarouselInfo.setCreateTime(DateUtils.getNowDate()); sysCarouselInfo.setCreateTime(DateUtils.getNowDate());
setLinkType(sysCarouselInfo); setLinkType(sysCarouselInfo);
for (String s : sysCarouselInfo.getImgUrl().split(",")) {
return sysCarouselInfoMapper.insertSysCarouselInfo(sysCarouselInfo); sysCarouselInfo.setImgUrl(s);
sysCarouselInfoMapper.insertSysCarouselInfo(sysCarouselInfo);
}
return 1;
} }
private static void setLinkType(SysCarouselInfo sysCarouselInfo) { private static void setLinkType(SysCarouselInfo sysCarouselInfo) {
...@@ -66,8 +74,6 @@ public class SysCarouselInfoServiceImpl implements ISysCarouselInfoService { ...@@ -66,8 +74,6 @@ public class SysCarouselInfoServiceImpl implements ISysCarouselInfoService {
sysCarouselInfo.setUrlType(1); sysCarouselInfo.setUrlType(1);
} else if (videoFile) { } else if (videoFile) {
sysCarouselInfo.setUrlType(2); sysCarouselInfo.setUrlType(2);
} else {
sysCarouselInfo.setUrlType(3);
} }
} }
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<select id="selectSysCarouselInfoList" parameterType="SysCarouselInfo" resultMap="SysCarouselInfoResult"> <select id="selectSysCarouselInfoList" parameterType="SysCarouselInfo" resultMap="SysCarouselInfoResult">
<include refid="selectSysCarouselInfoVo"/> <include refid="selectSysCarouselInfoVo"/>
<where> <where>
url_type != 3
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if> <if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
<if test="description != null and description != ''"> and description = #{description}</if> <if test="description != null and description != ''"> and description = #{description}</if>
<if test="status != null "> and status = #{status}</if> <if test="status != null "> and status = #{status}</if>
...@@ -40,6 +41,23 @@ ...@@ -40,6 +41,23 @@
</where> </where>
</select> </select>
<select id="selectSysCarouselInfoListVR" parameterType="SysCarouselInfo" resultMap="SysCarouselInfoResult">
<include refid="selectSysCarouselInfoVo"/>
<where>
url_type = 3
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="status != null "> and status = #{status}</if>
<if test="type != null "> and type = #{type}</if>
<if test="orderNumber != null "> and order_number = #{orderNumber}</if>
<if test="associationId != null "> and association_id = #{associationId}</if>
<if test="associationName != null and associationName != ''"> and association_name like concat('%', #{associationName}, '%')</if>
<if test="linkUrl != null and linkUrl != ''"> and link_url = #{linkUrl}</if>
<if test="videoCover != null and videoCover != ''"> and video_cover = #{videoCover}</if>
</where>
</select>
<select id="selectSysCarouselInfoById" parameterType="Long" resultMap="SysCarouselInfoResult"> <select id="selectSysCarouselInfoById" parameterType="Long" resultMap="SysCarouselInfoResult">
<include refid="selectSysCarouselInfoVo"/> <include refid="selectSysCarouselInfoVo"/>
where id = #{id} where id = #{id}
......
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增轮播图信息')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-info-add">
<input type="hidden" name ='urlType' id="urlType" value="3">
<div class="form-group">
<label class="col-sm-3 control-label">图片地址链接:</label>
<div class="col-sm-8">
<input id ='imgUrl' name="imgUrl" class="form-control" type="text">
<!-- <input type="hidden" name="imgUrl" id ='imgUrl'>-->
<!-- <div class="file-loading">-->
<!-- <input class="form-control img-upload" id="files" name="files" type="file" multiple>-->
<!-- </div>-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">图片描述:</label>
<div class="col-sm-8">
<input name="description" 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="status" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">资源类型:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select id="urlType" name="urlType" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_urltype')}">-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">业务类型:</label>
<div class="col-sm-8">
<select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">排序:</label>
<div class="col-sm-8">
<input name="orderNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联id:</label>
<div class="col-sm-8">
<input id="associationId" name="associationId" class="form-control" type="text" readonly="readonly">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">名称:</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="text" id="associationName" name="associationName" onclick="selectType()" >
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
<!-- <input name="associationName" 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="linkUrl" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript">
var prefix = ctx + "carousel/info"
$("#form-info-add").validate({
focusCleanup: true
});
function submitHandler() {// && $("#files")
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-info-add').serialize());
}
}
// 根据当前激活的选项卡获取(方式一)
function selectType(){
if($("#type").val() == null || $("#type").val() == undefined){
return;
}
if($("#type").val() == '0' || $("#type").val() == '1' || $("#type").val() == '2'
|| $("#type").val() == '4' || $("#type").val() == '5'){
// $.modal.open("选择", prefix + "/selectType?type="+$("#type").val());
var options = {
title: '选择',
url: prefix + "/selectType?type="+$("#type").val(),
callBack: doSubmit2
};
$.modal.openOptions(options);
}
}
function doSubmit2(index, layero){
var rows = layero.find("iframe")[0].contentWindow.getSelections();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
// $('#userids').html('我是通过方式二来的:' + rows.join())
$('#associationName').val(rows.name);
$('#associationId').val(rows.id);
$.modal.close(index);
}
//
// $(".img-upload").fileinput({
// uploadUrl: ctx + 'sysFile/uploadImgHuawei',
// initialPreviewAsData: true,
// initialPreview: [val],
// maxFileCount: 1,
// autoReplace: true
// }).on('filebatchuploadsuccess', function (event, data, previewId, index) {
// // var rsp = data.response;
// $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
// }).on('fileremoved', function (event, id, index) {
// $("input[name='" + event.currentTarget.id + "']").val('')
// })
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改轮播图信息')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
</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="${sysCarouselInfo}">
<input name="id" th:field="*{id}" type="hidden">
<input name="urlType" th:field="*{urlType}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">图片地址链接:</label>
<div class="col-sm-8">
<input name="imgUrl" th:field="*{imgUrl}" class="form-control" type="text">
<!-- <input type="hidden" name="imgUrl" th:field="*{imgUrl}">-->
<!-- <div class="file-loading">-->
<!-- <input class="form-control img-upload" id="imgUrl" name="file" type="file">-->
<!-- </div>-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8">
<input name="description" th:field="*{description}" 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 id="selectId" name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
</select>
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">资源类型:</label>-->
<!-- <div class="col-sm-8">-->
<!-- <select id="urlType" name="urlType" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_urltype')}">-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{urlType}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="col-sm-3 control-label">业务类型:</label>
<div class="col-sm-8">
<select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">排序:</label>
<div class="col-sm-8">
<input name="orderNumber" th:field="*{orderNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联id:</label>
<div class="col-sm-8">
<input id="associationId" name="associationId" th:field="*{associationId}" class="form-control" type="text" readonly="readonly">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">名称:</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="text" id="associationName" name="associationName" onclick="selectType()" th:field="*{associationName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
<!-- <input name="associationName" th:field="*{associationName}" 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="linkUrl" th:field="*{linkUrl}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript">
var prefix = ctx + "carousel/info";
$("#form-info-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
}
}
// 根据当前激活的选项卡获取(方式一)
function selectType(){
if($("#type").val() == null || $("#type").val() == undefined){
return;
}
if($("#type").val() == '0' || $("#type").val() == '1' || $("#type").val() == '2'
|| $("#type").val() == '4' || $("#type").val() == '5'){
// $.modal.open("选择", prefix + "/selectType?type="+$("#type").val());
var options = {
title: '选择',
url: prefix + "/selectType?type="+$("#type").val(),
callBack: doSubmit2
};
$.modal.openOptions(options);
}
}
function doSubmit2(index, layero){
var rows = layero.find("iframe")[0].contentWindow.getSelections();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
$('#associationName').val(rows.name);
$('#associationId').val(rows.id);
$.modal.close(index);
}
// $(".img-upload").each(function (i) {
// var val = $("input[name='" + this.id + "']").val()
// $(this).fileinput({
// // 'uploadUrl': ctx + 'common/upload',
// 'uploadUrl': ctx + 'sysFile/uploadImgHuawei',
// initialPreviewAsData: true,
// initialPreview: [val],
// maxFileCount: 1,
// autoReplace: true
// }).on('fileuploaded', function (event, data, previewId, index) {
// $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
// }).on('fileremoved', function (event, id, index) {
// $("input[name='" + event.currentTarget.id + "']").val('')
// })
// $(this).fileinput('_initFileActions');
// });
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('轮播图信息列表')"/>
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<!-- <li>-->
<!-- <label>图片地址链接:</label>-->
<!-- <input type="text" name="imgUrl"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>图片描述:</label>-->
<!-- <input type="text" name="description"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>排序:</label>-->
<!-- <input type="text" name="orderNumber"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>关联id:</label>-->
<!-- <input type="text" name="associationId"/>-->
<!-- </li>-->
<li>
<label>名称:</label>
<input type="text" name="associationName"/>
</li>
<li>
<!-- <label>类型:</label>-->
<!-- <input type="type" name="type"/>-->
类型:<select name="type" th:with="type=${@dict.getType('lyy_business_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<!-- <li>-->
<!-- <label>转跳链接:</label>-->
<!-- <input type="text" name="linkUrl"/>-->
<!-- </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>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="carousel:info:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
shiro:hasPermission="carousel:info:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
shiro:hasPermission="carousel:info:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="carousel:info:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('carousel:info:edit')}]];
var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]];
var datas = [[${@dict.getType('sys_carousel_status')}]];
var datasType = [[${@dict.getType('lyy_business_type')}]];
var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]];
var prefix = ctx + "carousel/VRinfo";
$(function () {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "轮播图信息",
sortName: "id",
sortOrder: "desc",
columns: [{
checkbox: true
},
{
field: 'id',
title: '主键id',
visible: false
},
{
field: 'imgUrl',
title: '链接地址'
}, {
field: 'urlType',
title: '资源类型',
formatter: function (value, row, index) {
return $.table.selectDictLabel(datasUrlType, value);
}
},
{
field: 'description',
title: '图片描述'
},
{
field: 'status',
title: '图片状态',
formatter: function (value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field: 'type',
title: '类型',
formatter: function (value, row, index) {
return $.table.selectDictLabel(datasType, value);
}
},
{
field: 'orderNumber',
title: '排序'
},
// {
// field: 'associationId',
// title: '关联id'
// },
{
field: 'associationName',
title: '名称'
},
// {
// field: 'linkUrl',
// title: '转跳链接'
// },
{
title: '操作',
align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
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>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
\ No newline at end of file
...@@ -8,8 +8,17 @@ ...@@ -8,8 +8,17 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-info-edit" th:object="${sysCarouselInfo}"> <form class="form-horizontal m" id="form-info-edit" th:object="${sysCarouselInfo}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<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">
<select id="urlType" name="urlType" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_urltype')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{urlType}"></option>
</select>
</div>
</div>
<div id="upload" class="form-group">
<label class="col-sm-3 control-label">地址链接:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<!-- <input name="imgUrl" th:field="*{imgUrl}" class="form-control" type="text">--> <!-- <input name="imgUrl" th:field="*{imgUrl}" class="form-control" type="text">-->
<input type="hidden" name="imgUrl" th:field="*{imgUrl}"> <input type="hidden" name="imgUrl" th:field="*{imgUrl}">
...@@ -19,31 +28,25 @@ ...@@ -19,31 +28,25 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">图片描述:</label> <label class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="description" th:field="*{description}" class="form-control" type="text"> <input name="description" th:field="*{description}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">图片状态:</label> <label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="selectId" name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_status')}"> <select id="selectId" name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">资源类型:</label>
<div class="col-sm-8">
<select id="urlType" name="urlType" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_urltype')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{urlType}"></option>
</select>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">业务类型:</label> <label class="col-sm-3 control-label">业务类型:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}"> <select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}">
<option value="" >所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
</select> </select>
</div> </div>
...@@ -86,7 +89,28 @@ ...@@ -86,7 +89,28 @@
focusCleanup: true focusCleanup: true
}); });
//
// $("#urlType").on("change", function () {
// let urlType = $("#urlType").val();
// if (urlType == 1 || urlType == 2) {
// $("#upload").css("display", "block")
// $("#write").css("display", "none")
// } else if (urlType == 3) {
// $("#upload").css("display", "none")
// $("#write").css("display", "block")
// }
// });
function submitHandler() { function submitHandler() {
if(!$("#imgUrl").val()){
$.modal.msgWarning('请点击上传按钮上传文件')
return;
}
let urlType = $("#urlType").val();
if (urlType == 3) {
$.modal.msgWarning('VR不在此处上传')
return;
}
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-info-edit').serialize()); $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
} }
...@@ -96,7 +120,8 @@ ...@@ -96,7 +120,8 @@
if($("#type").val() == null || $("#type").val() == undefined){ if($("#type").val() == null || $("#type").val() == undefined){
return; return;
} }
if($("#type").val() == '0' || $("#type").val() == '1' || $("#type").val() == '2'){ if($("#type").val() == '0' || $("#type").val() == '1' || $("#type").val() == '2'
|| $("#type").val() == '4' || $("#type").val() == '4'){
// $.modal.open("选择", prefix + "/selectType?type="+$("#type").val()); // $.modal.open("选择", prefix + "/selectType?type="+$("#type").val());
var options = { var options = {
title: '选择', title: '选择',
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('轮播信息列表')"/> <th:block th:include="include :: header('轮播信息列表')"/>
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]]; var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]];
var datas = [[${@dict.getType('sys_carousel_status')}]]; var datas = [[${@dict.getType('sys_carousel_status')}]];
var datasType = [[${@dict.getType('lyy_business_type')}]]; var datasType = [[${@dict.getType('lyy_business_type')}]];
var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]];
var prefix = ctx + "carousel/info"; var prefix = ctx + "carousel/info";
$(function () { $(function () {
...@@ -90,7 +91,7 @@ ...@@ -90,7 +91,7 @@
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
modalName: "轮播信息", modalName: "轮播信息",
sortName: "id", sortName: "id",
sortOrder: "desc", sortOrder: "desc",
columns: [{ columns: [{
...@@ -123,24 +124,16 @@ ...@@ -123,24 +124,16 @@
field: 'urlType', field: 'urlType',
title: '资源类型', title: '资源类型',
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; return $.table.selectDictLabel(datasUrlType, value);
if (value == 1) {
actions.push('图片');
} else if (value == 2) {
actions.push('视频');
} else {
actions.push('其他');
}
return actions.join('');
} }
}, },
{ {
field: 'description', field: 'description',
title: '图片描述' title: '描述'
}, },
{ {
field: 'status', field: 'status',
title: '图片状态', title: '状态',
formatter: function (value, row, index) { formatter: function (value, row, index) {
return $.table.selectDictLabel(datas, value); return $.table.selectDictLabel(datas, value);
} }
...@@ -174,7 +167,7 @@ ...@@ -174,7 +167,7 @@
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];
let urlType = row.urlType; let urlType = row.urlType;
if (urlType == 2) { if (urlType == 2 || urlType == 3 ) {
var title = "\'编辑封面\'"; var title = "\'编辑封面\'";
var url = "\'/carousel/info/videoCover?videoId=" + row.id + "\'"; var url = "\'/carousel/info/videoCover?videoId=" + row.id + "\'";
actions.push( actions.push(
......
...@@ -576,32 +576,22 @@ ...@@ -576,32 +576,22 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">天然气:</label> <label class="col-sm-3 control-label">天然气:</label>
<!-- <div id="hasgasdiv">-->
<div class="col-sm-7"> <div class="col-sm-7">
<input id="gas" name="gas" th:field="*{naturalGasPrice}" class="form-control" type="text"> <input id="gas" name="gas" th:field="*{naturalGasPrice}" class="form-control" type="text">
</div> </div>
<label class="col-sm-1 control-label">元/m³</label> <label class="col-sm-1 control-label">元/m³</label>
<!-- </div>-->
<!-- <div class="col-sm-8" id="nohasgasdiv">-->
<!-- <input type="radio" value="有" th:text="有" disabled="disabled">-->
<!-- <input type="radio" value="无" th:text="无" checked="checked">-->
<!-- </div>-->
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">图片链接:</label> <div class="form-group ">
<div class="col-sm-8"> <label class="col-sm-3 control-label">提交时间:</label>
<!-- <input name="imgUrl" th:field="*{imgUrl}" class="form-control" type="text">--> <div class="col-sm-8 date">
<!-- <input type="hidden" name="imgUrl" th:field="*{imgUrl}">--> <input name="submitTime" th:value="${#dates.format(developmentInfoDetailVO.developmentInfo.submitTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" >
<img th:src="*{imgUrl}" style="width: 100px;height: 100px">
<!-- <div class="file-loading">-->
<!-- <input class="form-control img-upload" id="imgUrl" name="file" type="file">-->
<!-- </div>-->
</div> </div>
</div> </div>
<!-- <div class="form-group">--> <!-- <div class="form-group">-->
<!-- <label class="col-sm-3 control-label">用户id:</label>--> <!-- <label class="col-sm-3 control-label">用户id:</label>-->
<!-- <div class="col-sm-8">--> <!-- <div class="col-sm-8">-->
...@@ -935,6 +925,20 @@ ...@@ -935,6 +925,20 @@
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">封面图片:</label>
<div class="col-sm-8">
<img th:src="*{imgUrl}" style="width: 300px;height: 300px">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">图片:</label>
<div class="col-sm-8">
<img th:each="parkPolicyInfo,stat:${developmentInfoDetailVO.sysCarouselInfos}"
th:src="${parkPolicyInfo.imgUrl}"
style="width: 300px;height: 300px; margin: 10px">
</div>
</div>
<div id="lastDiv" class="form-group"> <div id="lastDiv" class="form-group">
......
...@@ -684,15 +684,11 @@ ...@@ -684,15 +684,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">封面图片:</label>
<div class="col-sm-8">
<img th:src="*{imgUrl}" style="width: 100px;height: 100px"> <div class="form-group ">
<!-- <input type="hidden" name="imgUrl" th:field="*{imgUrl}">--> <label class="col-sm-3 control-label">提交时间:</label>
<!-- <div class="file-loading">--> <div class="col-sm-8 date">
<!-- <input class="form-control img-upload" id="imgUrl" name="file" type="file">--> <input name="submitTime" th:value="${#dates.format(parkInfoAllVO.parkInfo.submitTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" >
<!-- </div>-->
</div> </div>
</div> </div>
...@@ -883,18 +879,31 @@ ...@@ -883,18 +879,31 @@
<td th:text="${carrierInfo.singleArea}"></td> <td th:text="${carrierInfo.singleArea}"></td>
<td th:text="${carrierInfo.distance}"></td> <td th:text="${carrierInfo.distance}"></td>
<td th:text="${carrierInfo.elevatorType}"></td> <td th:text="${carrierInfo.elevatorType}"></td>
<td th:text="${carrierInfo.fireProtectionLevel}"></td> <td th:text="${carrierInfo.fireProtectionLevel}"></td>
<td th:text="${carrierInfo.fireResistant}"></td> <td th:text="${carrierInfo.fireResistant}"></td>
</tr> </tr>
</table> </table>
</div> </div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">封面图片:</label>
<div class="col-sm-8">
<img th:src="*{imgUrl}" style="width: 300px;height: 300px">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">图片:</label>
<div class="col-sm-8">
<img th:each="parkPolicyInfo,stat:${parkInfoAllVO.sysCarouselInfos}"
th:src="${parkPolicyInfo.imgUrl}"
style="width: 300px;height: 300px; margin: 10px">
</div>
</div> </div>
<div id="lastDiv" class="form-group"> <div id="lastDiv" class="form-group">
</div> </div>
...@@ -906,6 +915,11 @@ ...@@ -906,6 +915,11 @@
<script th:src="@{/js/jquery.tmpl.js}"></script> <script th:src="@{/js/jquery.tmpl.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
// $("input[name='submitTime']").datetimepicker({
// format: "yyyy-mm-dd",
// minView: "month",
// autoclose: true
// });
$(function () { $(function () {
$("input[type=text]").attr("readonly", "readonly"); $("input[type=text]").attr("readonly", "readonly");
...@@ -951,11 +965,7 @@ ...@@ -951,11 +965,7 @@
// } // }
// } // }
// //
// $("input[name='submitTime']").datetimepicker({
// format: "yyyy-mm-dd",
// minView: "month",
// autoclose: true
// });
// //
// $(".img-upload").each(function (i) { // $(".img-upload").each(function (i) {
// var val = $("input[name='" + this.id + "']").val() // var val = $("input[name='" + this.id + "']").val()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment