用户栏目新增app接口
This commit is contained in:
parent
2b15c42b78
commit
49aaf3c3e6
@ -55,43 +55,29 @@ public class UserColumnDataAppController extends DefaultBaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "用户栏目数据详情(通过ID)", notes = "用户栏目数据详情(通过ID)接口")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "删除用户栏目数据(id列表)", notes = "删除用户栏目数据(id列表)接口")
|
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
@ApiImplicitParam(name = "userColumnDataId", value = "用户数据ID", paramType = "path")
|
||||||
})
|
})
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@DeleteMapping("remove/{ids}")
|
@GetMapping("get/{userColumnDataId}")
|
||||||
public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) {
|
public UserColumnDataDTO get(@RequestHeader("token") String token, @PathVariable("userColumnDataId") String userColumnDataId) {
|
||||||
userColumnDataService.remove(token, Arrays.asList(ids.split("\\_")));
|
return userColumnDataService.get(userColumnDataId);
|
||||||
return new SuccessResult();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "修改用户栏目数据", notes = "修改用户栏目数据接口")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
|
||||||
@ApiImplicitParam(name = "userColumnDataId", value = "用户栏目数据ID", paramType = "path")
|
|
||||||
})
|
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
|
||||||
@PutMapping("updateusercolumndata/{userColumnDataId}")
|
|
||||||
@CheckRequestBodyAnnotation
|
|
||||||
public SuccessResult updateUserColumnData(@RequestHeader("token") String token, @PathVariable("userColumnDataId") String userColumnDataId, @RequestBody UserColumnDataVO userColumnDataVO) {
|
|
||||||
userColumnDataService.update(token, userColumnDataId, userColumnDataVO);
|
|
||||||
return new SuccessResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "用户栏目数据列表", notes = "用户栏目数据列表接口")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "用户栏目数据列表", notes = "用户栏目数据列表接口(默认每个栏目返回最新三条数据)")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||||
})
|
})
|
||||||
|
@ -46,6 +46,14 @@ public interface IUserColumnDao {
|
|||||||
*/
|
*/
|
||||||
void delete(Map<String, Object> params) throws RemoveException;
|
void delete(Map<String, Object> params) throws RemoveException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户栏目表(物理)
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @throws RemoveException
|
||||||
|
*/
|
||||||
|
void deleteByCreator(Map<String, Object> params) throws RemoveException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户栏目表
|
* 修改用户栏目表
|
||||||
*
|
*
|
||||||
|
@ -19,6 +19,10 @@ public class UserColumnDataDTO extends MaterialDataDTO {
|
|||||||
private String userColumnDataId;
|
private String userColumnDataId;
|
||||||
@ApiModelProperty(name = "columnId", value = "栏目ID")
|
@ApiModelProperty(name = "columnId", value = "栏目ID")
|
||||||
private String columnId;
|
private String columnId;
|
||||||
|
@ApiModelProperty(name = "columnName", value = "栏目名称")
|
||||||
|
private String columnName;
|
||||||
|
@ApiModelProperty(name = "columnEnement", value = "栏目元素")
|
||||||
|
private String columnEnement;
|
||||||
@ApiModelProperty(name = "creatorName", value = "创建人名称")
|
@ApiModelProperty(name = "creatorName", value = "创建人名称")
|
||||||
private String creatorName;
|
private String creatorName;
|
||||||
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||||
@ -40,6 +44,22 @@ public class UserColumnDataDTO extends MaterialDataDTO {
|
|||||||
this.columnId = columnId;
|
this.columnId = columnId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getColumnName() {
|
||||||
|
return columnName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColumnEnement() {
|
||||||
|
return columnEnement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColumnEnement(String columnEnement) {
|
||||||
|
this.columnEnement = columnEnement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColumnName(String columnName) {
|
||||||
|
this.columnName = columnName;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCreatorName() {
|
public String getCreatorName() {
|
||||||
return creatorName;
|
return creatorName;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ public class UserColumnDataListDTO{
|
|||||||
private String columnId;
|
private String columnId;
|
||||||
@ApiModelProperty(name = "columnName", value = "栏目名称")
|
@ApiModelProperty(name = "columnName", value = "栏目名称")
|
||||||
private String columnName;
|
private String columnName;
|
||||||
|
@ApiModelProperty(name = "columnEnement", value = "栏目元素")
|
||||||
|
private String columnEnement;
|
||||||
@ApiModelProperty(name = "data", value = "栏目数据")
|
@ApiModelProperty(name = "data", value = "栏目数据")
|
||||||
private List<UserColumnDataDTO> data;
|
private List<UserColumnDataDTO> data;
|
||||||
|
|
||||||
@ -42,6 +44,14 @@ public class UserColumnDataListDTO{
|
|||||||
this.columnName = columnName;
|
this.columnName = columnName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getColumnEnement() {
|
||||||
|
return columnEnement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColumnEnement(String columnEnement) {
|
||||||
|
this.columnEnement = columnEnement;
|
||||||
|
}
|
||||||
|
|
||||||
public List<UserColumnDataDTO> getData() {
|
public List<UserColumnDataDTO> getData() {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package cn.com.tenlion.service.usercolumn.impl;
|
package cn.com.tenlion.service.usercolumn.impl;
|
||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import ink.wgink.util.ReflectUtil;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import cn.com.tenlion.dao.usercolumn.IUserColumnDao;
|
import cn.com.tenlion.dao.usercolumn.IUserColumnDao;
|
||||||
@ -36,6 +38,12 @@ public class UserColumnServiceImpl extends DefaultBaseService implements IUserCo
|
|||||||
|
|
||||||
|
|
||||||
public void saveMore(String token,UserColumnVO userColumnVO){
|
public void saveMore(String token,UserColumnVO userColumnVO){
|
||||||
|
try {
|
||||||
|
this.deleteByCreator(securityComponent.getAppTokenUser(token).getId());
|
||||||
|
} catch (ReflectUtil.ReflectException e) {
|
||||||
|
throw new SaveException("系统错误");
|
||||||
|
}
|
||||||
|
|
||||||
String[] columnIds = userColumnVO.getColumnId().split(",");
|
String[] columnIds = userColumnVO.getColumnId().split(",");
|
||||||
for (String columnId : columnIds) {
|
for (String columnId : columnIds) {
|
||||||
UserColumnVO vo =new UserColumnVO();
|
UserColumnVO vo =new UserColumnVO();
|
||||||
@ -45,7 +53,11 @@ public class UserColumnServiceImpl extends DefaultBaseService implements IUserCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void deleteByCreator(String creator){
|
||||||
|
Map<String, Object> params = new HashMap<>(1);
|
||||||
|
params.put("creator",creator);
|
||||||
|
userColumnDao.deleteByCreator(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package cn.com.tenlion.service.usercolumndata.impl;
|
package cn.com.tenlion.service.usercolumndata.impl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import cn.com.tenlion.materialstore.pojo.dtos.materialdata.MaterialDataDTO;
|
import cn.com.tenlion.materialstore.pojo.dtos.materialdata.MaterialDataDTO;
|
||||||
import cn.com.tenlion.materialstore.pojo.vos.materialdata.MaterialDataVO;
|
import cn.com.tenlion.materialstore.pojo.vos.materialdata.MaterialDataVO;
|
||||||
import cn.com.tenlion.materialstore.service.materialdata.MaterialDataService;
|
import cn.com.tenlion.materialstore.service.materialdata.MaterialDataService;
|
||||||
@ -12,10 +14,10 @@ import ink.wgink.pojo.result.SuccessResultList;
|
|||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import cn.com.tenlion.dao.usercolumndata.IUserColumnDataDao;
|
import cn.com.tenlion.dao.usercolumndata.IUserColumnDataDao;
|
||||||
import cn.com.tenlion.pojo.dtos.usercolumndata.UserColumnDataDTO;
|
|
||||||
import cn.com.tenlion.pojo.vos.usercolumndata.UserColumnDataVO;
|
|
||||||
import cn.com.tenlion.pojo.bos.usercolumndata.UserColumnDataBO;
|
import cn.com.tenlion.pojo.bos.usercolumndata.UserColumnDataBO;
|
||||||
|
import cn.com.tenlion.pojo.dtos.usercolumndata.UserColumnDataDTO;
|
||||||
import cn.com.tenlion.pojo.pos.usercolumndata.UserColumnDataPO;
|
import cn.com.tenlion.pojo.pos.usercolumndata.UserColumnDataPO;
|
||||||
|
import cn.com.tenlion.pojo.vos.usercolumndata.UserColumnDataVO;
|
||||||
import cn.com.tenlion.service.usercolumndata.IUserColumnDataService;
|
import cn.com.tenlion.service.usercolumndata.IUserColumnDataService;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
@ -60,7 +62,7 @@ public class UserColumnDataServiceImpl extends DefaultBaseService implements IUs
|
|||||||
dto.setData(listSuccessResultList.getRows());
|
dto.setData(listSuccessResultList.getRows());
|
||||||
dto.setColumnName(userColumnDTO.getColumnName());
|
dto.setColumnName(userColumnDTO.getColumnName());
|
||||||
dto.setColumnId(userColumnDTO.getColumnId());
|
dto.setColumnId(userColumnDTO.getColumnId());
|
||||||
|
dto.setColumnEnement(userColumnDTO.getColumnEnement());
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@ -188,10 +190,6 @@ public class UserColumnDataServiceImpl extends DefaultBaseService implements IUs
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<UserColumnDataDTO> list(Map<String, Object> params) {
|
public List<UserColumnDataDTO> list(Map<String, Object> params) {
|
||||||
String columnId = params.get("columnId").toString();
|
|
||||||
if(StringUtils.isBlank(columnId)){
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
List<UserColumnDataDTO> list = userColumnDataDao.list(params);
|
List<UserColumnDataDTO> list = userColumnDataDao.list(params);
|
||||||
for (UserColumnDataDTO userColumnDataDTO : list) {
|
for (UserColumnDataDTO userColumnDataDTO : list) {
|
||||||
MaterialDataDTO materialDataDTO = materialDataService.getByMaterialId(userColumnDataDTO.getUserColumnDataId());
|
MaterialDataDTO materialDataDTO = materialDataService.getByMaterialId(userColumnDataDTO.getUserColumnDataId());
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
<resultMap id="userColumnDTO" type="cn.com.tenlion.pojo.dtos.usercolumn.UserColumnDTO">
|
<resultMap id="userColumnDTO" type="cn.com.tenlion.pojo.dtos.usercolumn.UserColumnDTO">
|
||||||
<result column="column_id" property="columnId"/>
|
<result column="column_id" property="columnId"/>
|
||||||
|
<result column="column_name" property="columnName"/>
|
||||||
|
<result column="column_enement" property="columnEnement"/>
|
||||||
<result column="creator" property="creator"/>
|
<result column="creator" property="creator"/>
|
||||||
<result column="gmt_create" property="gmtCreate"/>
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@ -75,6 +77,18 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 删除用户栏目表(物理) -->
|
||||||
|
<update id="deleteByCreator" parameterType="map">
|
||||||
|
DELETE FROM
|
||||||
|
card_user_column
|
||||||
|
WHERE
|
||||||
|
creator = #{creator}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 修改用户栏目表 -->
|
<!-- 修改用户栏目表 -->
|
||||||
<update id="update" parameterType="map">
|
<update id="update" parameterType="map">
|
||||||
UPDATE
|
UPDATE
|
||||||
@ -108,8 +122,13 @@
|
|||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="userColumnId != null and userColumnId != ''">
|
<if test="userColumnId != null and userColumnId != ''">
|
||||||
AND
|
AND t1.user_column_id = #{userColumnId}
|
||||||
t1.user_column_id = #{userColumnId}
|
</if>
|
||||||
|
<if test="column_id != null and column_id != ''">
|
||||||
|
AND t1.column_id = #{columnId}
|
||||||
|
</if>
|
||||||
|
<if test="creator != null and creator != ''">
|
||||||
|
AND t1.creator = #{creator}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -158,15 +177,19 @@
|
|||||||
SELECT
|
SELECT
|
||||||
t1.column_id,
|
t1.column_id,
|
||||||
t1.creator,
|
t1.creator,
|
||||||
t1.gmt_create
|
t1.gmt_create,
|
||||||
|
t2.column_name,
|
||||||
|
t2.resource_type AS column_enement
|
||||||
FROM
|
FROM
|
||||||
card_user_column t1
|
card_user_column t1
|
||||||
|
LEFT JOIN card_column_mng t2
|
||||||
|
ON t1.column_id = t2.column_id
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
AND (
|
AND (
|
||||||
<!-- 这里添加其他条件 -->
|
<!-- 这里添加其他条件 -->
|
||||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
t2.column_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
<resultMap id="userColumnDataDTO" type="cn.com.tenlion.pojo.dtos.usercolumndata.UserColumnDataDTO">
|
<resultMap id="userColumnDataDTO" type="cn.com.tenlion.pojo.dtos.usercolumndata.UserColumnDataDTO">
|
||||||
<result column="user_column_data_id" property="userColumnDataId"/>
|
<result column="user_column_data_id" property="userColumnDataId"/>
|
||||||
<result column="column_id" property="columnId"/>
|
<result column="column_id" property="columnId"/>
|
||||||
<result column="creator" property="creator"/>
|
<result column="column_name" property="columnName"/>
|
||||||
|
<result column="column_enement" property="columnEnement"/>
|
||||||
|
<result column="creator_name" property="creatorName"/>
|
||||||
<result column="gmt_create" property="gmtCreate"/>
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -95,9 +97,15 @@
|
|||||||
<select id="get" parameterType="map" resultMap="userColumnDataDTO">
|
<select id="get" parameterType="map" resultMap="userColumnDataDTO">
|
||||||
SELECT
|
SELECT
|
||||||
t1.column_id,
|
t1.column_id,
|
||||||
t1.user_column_data_id
|
t1.user_column_data_id,
|
||||||
|
u.user_name AS creator_name,
|
||||||
|
t2.resource_type AS column_enement
|
||||||
FROM
|
FROM
|
||||||
card_user_column_data t1
|
card_user_column_data t1
|
||||||
|
LEFT JOIN card_column_mng t2
|
||||||
|
ON t1.column_id = t2.column_id
|
||||||
|
LEFT JOIN sys_user u
|
||||||
|
ON t1.creator = u.user_id
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="userColumnDataId != null and userColumnDataId != ''">
|
<if test="userColumnDataId != null and userColumnDataId != ''">
|
||||||
@ -151,10 +159,16 @@
|
|||||||
SELECT
|
SELECT
|
||||||
t1.user_column_data_id,
|
t1.user_column_data_id,
|
||||||
t1.column_id,
|
t1.column_id,
|
||||||
t1.creator,
|
t1.gmt_create,
|
||||||
t1.gmt_create
|
t2.column_name,
|
||||||
|
u.user_name AS creator_name,
|
||||||
|
t2.resource_type AS column_enement
|
||||||
FROM
|
FROM
|
||||||
card_user_column_data t1
|
card_user_column_data t1
|
||||||
|
LEFT JOIN card_column_mng t2
|
||||||
|
ON t1.column_id = t2.column_id
|
||||||
|
LEFT JOIN sys_user u
|
||||||
|
ON t1.creator = u.user_id
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
@ -174,6 +188,7 @@
|
|||||||
<if test="columnId != null and columnId != ''">
|
<if test="columnId != null and columnId != ''">
|
||||||
AND t1.column_id = #{columnId}
|
AND t1.column_id = #{columnId}
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY t1.gmt_create DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 用户栏目数据列表 -->
|
<!-- 用户栏目数据列表 -->
|
||||||
|
@ -34,11 +34,11 @@
|
|||||||
<!-- 表头按钮组 -->
|
<!-- 表头按钮组 -->
|
||||||
<script type="text/html" id="headerToolBar">
|
<script type="text/html" id="headerToolBar">
|
||||||
<div class="layui-btn-group">
|
<div class="layui-btn-group">
|
||||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
|
||||||
<i class="fa fa-lg fa-plus"></i> 新增
|
<!--<i class="fa fa-lg fa-plus"></i> 新增-->
|
||||||
</button>
|
<!--</button>-->
|
||||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="showEvent">
|
||||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
<i class="fa fa-lg fa-edit"></i> 查看
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||||
<i class="fa fa-lg fa-trash"></i> 删除
|
<i class="fa fa-lg fa-trash"></i> 删除
|
||||||
@ -86,16 +86,7 @@
|
|||||||
[
|
[
|
||||||
{type:'checkbox', fixed: 'left'},
|
{type:'checkbox', fixed: 'left'},
|
||||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
{field: 'userColumnDataId', width: 180, title: '用户数据ID', align:'center',
|
{field: 'columnName', width: 180, title: '栏目名称', align:'center',
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'columnId', width: 180, title: '栏目ID', align:'center',
|
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
@ -247,6 +238,25 @@
|
|||||||
}
|
}
|
||||||
removeData(ids);
|
removeData(ids);
|
||||||
}
|
}
|
||||||
|
} else if(layEvent === 'showEvent'){
|
||||||
|
if(checkDatas.length === 0) {
|
||||||
|
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||||
|
} else if(checkDatas.length > 1) {
|
||||||
|
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||||
|
} else {
|
||||||
|
top.layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: false,
|
||||||
|
closeBtn: 1,
|
||||||
|
area: ['40%', '90%'],
|
||||||
|
shadeClose: true,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/materialdata/list?materialId={userColumnDataId}', [checkDatas[0].userColumnDataId]),
|
||||||
|
end: function() {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user