Commit 0d4218e0 authored by lixinglin's avatar lixinglin

css

parent da7b02f4
...@@ -6,132 +6,160 @@ import com.ruoyi.common.annotation.Excel; ...@@ -6,132 +6,160 @@ import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
/** /**
* 星级扩展信息对象 star_object_extension_info * 【请填写功能名称】对象 star_object_extension_info
* *
* @author ruoyi * @author ruoyi
* @date 2023-11-24 * @date 2023-11-27
*/ */
public class StarObjectExtensionInfo extends BaseEntity public class StarObjectExtensionInfo extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** */ /** $column.columnComment */
private Long id; private Long id;
/** 排序 */ /** 排序 */
@Excel(name = "排序") @Excel(name = "排序")
private Long sortNumber; private Long sortNumber;
/** */ /** $column.columnComment */
@Excel(name = "") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String title; private String title;
/** */ /** $column.columnComment */
@Excel(name = "") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String coverUrl; private String coverUrl;
/** 介绍 */ /** 介绍 */
@Excel(name = "介绍") @Excel(name = "介绍")
private String titleIntroduce; private String titleIntroduce;
/** */ /** $column.columnComment */
@Excel(name = "") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String objectType; private String objectType;
/** */ /** $column.columnComment */
@Excel(name = "") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long objectId; private Long objectId;
/** */ /** $column.columnComment */
@Excel(name = "") @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String objectName;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String titleOfType; private String titleOfType;
public void setId(Long id) /** 0-禁用 1-正常 */
@Excel(name = "0-禁用 1-正常")
private Integer status;
public void setId(Long id)
{ {
this.id = id; this.id = id;
} }
public Long getId() public Long getId()
{ {
return id; return id;
} }
public void setSortNumber(Long sortNumber) public void setSortNumber(Long sortNumber)
{ {
this.sortNumber = sortNumber; this.sortNumber = sortNumber;
} }
public Long getSortNumber() public Long getSortNumber()
{ {
return sortNumber; return sortNumber;
} }
public void setTitle(String title) public void setTitle(String title)
{ {
this.title = title; this.title = title;
} }
public String getTitle() public String getTitle()
{ {
return title; return title;
} }
public void setCoverUrl(String coverUrl) public void setCoverUrl(String coverUrl)
{ {
this.coverUrl = coverUrl; this.coverUrl = coverUrl;
} }
public String getCoverUrl() public String getCoverUrl()
{ {
return coverUrl; return coverUrl;
} }
public void setTitleIntroduce(String titleIntroduce) public void setTitleIntroduce(String titleIntroduce)
{ {
this.titleIntroduce = titleIntroduce; this.titleIntroduce = titleIntroduce;
} }
public String getTitleIntroduce() public String getTitleIntroduce()
{ {
return titleIntroduce; return titleIntroduce;
} }
public void setObjectType(String objectType) public void setObjectType(String objectType)
{ {
this.objectType = objectType; this.objectType = objectType;
} }
public String getObjectType() public String getObjectType()
{ {
return objectType; return objectType;
} }
public void setObjectId(Long objectId) public void setObjectId(Long objectId)
{ {
this.objectId = objectId; this.objectId = objectId;
} }
public Long getObjectId() public Long getObjectId()
{ {
return objectId; return objectId;
} }
public void setTitleOfType(String titleOfType) public void setObjectName(String objectName)
{
this.objectName = objectName;
}
public String getObjectName()
{
return objectName;
}
public void setTitleOfType(String titleOfType)
{ {
this.titleOfType = titleOfType; this.titleOfType = titleOfType;
} }
public String getTitleOfType() public String getTitleOfType()
{ {
return titleOfType; return titleOfType;
} }
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("sortNumber", getSortNumber()) .append("sortNumber", getSortNumber())
.append("title", getTitle()) .append("title", getTitle())
.append("coverUrl", getCoverUrl()) .append("coverUrl", getCoverUrl())
.append("titleIntroduce", getTitleIntroduce()) .append("titleIntroduce", getTitleIntroduce())
.append("objectType", getObjectType()) .append("objectType", getObjectType())
.append("objectId", getObjectId()) .append("objectId", getObjectId())
.append("titleOfType", getTitleOfType()) .append("objectName", getObjectName())
.toString(); .append("titleOfType", getTitleOfType())
.append("status", getStatus())
.toString();
} }
} }
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.StarObjectExtensionInfoMapper"> <mapper namespace="com.ruoyi.system.mapper.StarObjectExtensionInfoMapper">
<resultMap type="StarObjectExtensionInfo" id="StarObjectExtensionInfoResult"> <resultMap type="StarObjectExtensionInfo" id="StarObjectExtensionInfoResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
...@@ -14,31 +14,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -14,31 +14,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="titleIntroduce" column="title_introduce" /> <result property="titleIntroduce" column="title_introduce" />
<result property="objectType" column="object_type" /> <result property="objectType" column="object_type" />
<result property="objectId" column="object_Id" /> <result property="objectId" column="object_Id" />
<result property="objectName" column="object_name" />
<result property="titleOfType" column="title_of_type" /> <result property="titleOfType" column="title_of_type" />
<result property="status" column="status" />
</resultMap> </resultMap>
<sql id="selectStarObjectExtensionInfoVo"> <sql id="selectStarObjectExtensionInfoVo">
select id, create_time, update_time, sort_number, title, cover_url, title_introduce, object_type, object_Id, title_of_type from star_object_extension_info select id, create_time, update_time, sort_number, title, cover_url, title_introduce, object_type, object_Id, object_name, title_of_type, status from star_object_extension_info
</sql> </sql>
<select id="selectStarObjectExtensionInfoList" parameterType="StarObjectExtensionInfo" resultMap="StarObjectExtensionInfoResult"> <select id="selectStarObjectExtensionInfoList" parameterType="StarObjectExtensionInfo" resultMap="StarObjectExtensionInfoResult">
<include refid="selectStarObjectExtensionInfoVo"/> <include refid="selectStarObjectExtensionInfoVo"/>
<where> <where>
<if test="sortNumber != null "> and sort_number = #{sortNumber}</if> <if test="sortNumber != null "> and sort_number = #{sortNumber}</if>
<if test="title != null and title != ''"> and title = #{title}</if> <if test="title != null and title != ''"> and title = #{title}</if>
<if test="coverUrl != null and coverUrl != ''"> and cover_url = #{coverUrl}</if> <if test="coverUrl != null and coverUrl != ''"> and cover_url = #{coverUrl}</if>
<if test="titleIntroduce != null and titleIntroduce != ''"> and title_introduce = #{titleIntroduce}</if> <if test="titleIntroduce != null and titleIntroduce != ''"> and title_introduce = #{titleIntroduce}</if>
<if test="objectType != null and objectType != ''"> and object_type = #{objectType}</if> <if test="objectType != null and objectType != ''"> and object_type = #{objectType}</if>
<if test="objectId != null "> and object_Id = #{objectId}</if> <if test="objectId != null "> and object_Id = #{objectId}</if>
<if test="objectName != null and objectName != ''"> and object_name like concat('%', #{objectName}, '%')</if>
<if test="titleOfType != null and titleOfType != ''"> and title_of_type = #{titleOfType}</if> <if test="titleOfType != null and titleOfType != ''"> and title_of_type = #{titleOfType}</if>
<if test="status != null "> and status = #{status}</if>
</where> </where>
</select> </select>
<select id="selectStarObjectExtensionInfoById" parameterType="Long" resultMap="StarObjectExtensionInfoResult"> <select id="selectStarObjectExtensionInfoById" parameterType="Long" resultMap="StarObjectExtensionInfoResult">
<include refid="selectStarObjectExtensionInfoVo"/> <include refid="selectStarObjectExtensionInfoVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertStarObjectExtensionInfo" parameterType="StarObjectExtensionInfo" useGeneratedKeys="true" keyProperty="id"> <insert id="insertStarObjectExtensionInfo" parameterType="StarObjectExtensionInfo" useGeneratedKeys="true" keyProperty="id">
insert into star_object_extension_info insert into star_object_extension_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -50,8 +54,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -50,8 +54,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="titleIntroduce != null">title_introduce,</if> <if test="titleIntroduce != null">title_introduce,</if>
<if test="objectType != null">object_type,</if> <if test="objectType != null">object_type,</if>
<if test="objectId != null">object_Id,</if> <if test="objectId != null">object_Id,</if>
<if test="objectName != null">object_name,</if>
<if test="titleOfType != null">title_of_type,</if> <if test="titleOfType != null">title_of_type,</if>
</trim> <if test="status != null">status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
...@@ -61,8 +67,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -61,8 +67,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="titleIntroduce != null">#{titleIntroduce},</if> <if test="titleIntroduce != null">#{titleIntroduce},</if>
<if test="objectType != null">#{objectType},</if> <if test="objectType != null">#{objectType},</if>
<if test="objectId != null">#{objectId},</if> <if test="objectId != null">#{objectId},</if>
<if test="objectName != null">#{objectName},</if>
<if test="titleOfType != null">#{titleOfType},</if> <if test="titleOfType != null">#{titleOfType},</if>
</trim> <if test="status != null">#{status},</if>
</trim>
</insert> </insert>
<update id="updateStarObjectExtensionInfo" parameterType="StarObjectExtensionInfo"> <update id="updateStarObjectExtensionInfo" parameterType="StarObjectExtensionInfo">
...@@ -76,7 +84,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -76,7 +84,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="titleIntroduce != null">title_introduce = #{titleIntroduce},</if> <if test="titleIntroduce != null">title_introduce = #{titleIntroduce},</if>
<if test="objectType != null">object_type = #{objectType},</if> <if test="objectType != null">object_type = #{objectType},</if>
<if test="objectId != null">object_Id = #{objectId},</if> <if test="objectId != null">object_Id = #{objectId},</if>
<if test="objectName != null">object_name = #{objectName},</if>
<if test="titleOfType != null">title_of_type = #{titleOfType},</if> <if test="titleOfType != null">title_of_type = #{titleOfType},</if>
<if test="status != null">status = #{status},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
...@@ -86,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -86,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteStarObjectExtensionInfoByIds" parameterType="String"> <delete id="deleteStarObjectExtensionInfoByIds" parameterType="String">
delete from star_object_extension_info where id in delete from star_object_extension_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('新增星级扩展信息')"/> <th:block th:include="include :: header('新增星级扩展信息')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<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-add"> <form class="form-horizontal m" id="form-info-add">
<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="sortNumber" class="form-control" type="text"> <div class="col-sm-8">
</div> <input name="titleOfType" 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="title" class="form-control" type="text">
</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="coverUrl" class="form-control" type="text"> <div class="col-sm-8">
<!-- <input name="coverUrl" class="form-control" type="text">-->
<input type="hidden" name="coverUrl" >
<div class="file-loading">
<input class="form-control img-upload" id="coverUrl" name="file" type="file">
</div>
</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="title" class="form-control" type="text">
<input name="titleIntroduce" 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"> <input name="titleIntroduce" class="form-control" type="text">
<select name="objectType" class="form-control m-b" </div>
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> <div class="form-group">
<div class="form-group"> <label class="col-sm-3 control-label">图片状态:</label>
<label class="col-sm-3 control-label">对象id:</label> <div class="col-sm-8">
<div class="col-sm-8"> <select name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_status')}">
<input name="objectId" class="form-control" type="text"> <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="objectType" name="objectType" 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">
<div class="input-group">
<input class="form-control" type="text" id="objectName" name="objectName" onclick="selectType()" >
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
<!-- <input name="objectName" 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="sortNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label">关联id:</label>
<div class="col-sm-8">
<input id="objectId" name="objectId" class="form-control" type="text" readonly="readonly">
</div>
</div> </div>
</div> </form>
</form> </div>
</div> <th:block th:include="include :: footer" />
<th:block th:include="include :: footer"/> <th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "star_object/info" var prefix = ctx + "star_object/info";
$("#form-info-add").validate({
focusCleanup: true var carousel_prefix = ctx + "carousel/info";
});
$("#form-info-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-info-add').serialize());
}
}
// 根据当前激活的选项卡获取(方式一)
function selectType(){
console.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@"+$("#objectType").val());
if($("#objectType").val() == null || $("#objectType").val() == undefined){
return;
}
if($("#objectType").val() == '0' || $("#objectType").val() == '1' || $("#objectType").val() == '2'){
// $.modal.open("选择", prefix + "/selectType?type="+$("#objectType").val());
var options = {
title: '选择',
url: carousel_prefix + "/selectType?type="+$("#objectType").val(),
callBack: doSubmit2
};
$.modal.openOptions(options);
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-info-add').serialize());
} }
}
</script> function doSubmit2(index, layero){
var rows = layero.find("iframe")[0].contentWindow.getSelections();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
// $('#userids').html('我是通过方式二来的:' + rows.join())
$('#objectName').val(rows.name);
$('#objectId').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> </body>
</html> </html>
\ No newline at end of file
...@@ -2,27 +2,34 @@ ...@@ -2,27 +2,34 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org"> <html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<th:block th:include="include :: header('修改星级扩展信息')"/> <th:block th:include="include :: header('修改星级扩展信息')"/>
<th:block th:include="include :: bootstrap-fileinput-css"/>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<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="${starObjectExtensionInfo}"> <form class="form-horizontal m" id="form-info-edit" th:object="${starObjectExtensionInfo}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<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="sortNumber" th:field="*{sortNumber}" class="form-control" type="text"> <input name="titleOfType" class="form-control" type="text" th:field="*{titleOfType}">
</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="title" th:field="*{title}" class="form-control" type="text"> <!-- <input name="coverUrl" th:field="*{coverUrl}" class="form-control" type="text">-->
<input type="hidden" name="coverUrl" th:field="*{coverUrl}">
<div class="file-loading">
<input class="form-control img-upload" id="coverUrl" name="file" type="file">
</div>
</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="coverUrl" th:field="*{coverUrl}" class="form-control" type="text"> <input name="title" th:field="*{title}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
...@@ -31,11 +38,20 @@ ...@@ -31,11 +38,20 @@
<input name="titleIntroduce" th:field="*{titleIntroduce}" class="form-control" type="text"> <input name="titleIntroduce" th:field="*{titleIntroduce}" 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">
<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"> <div class="col-sm-8">
<select name="objectType" class="form-control m-b" <select id="objectType" name="objectType" class="form-control m-b"
th:with="type=${@dict.getType('lyy_business_type')}"> th:with="type=${@dict.getType('lyy_business_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
th:field="*{objectType}"></option> th:field="*{objectType}"></option>
...@@ -43,16 +59,43 @@ ...@@ -43,16 +59,43 @@
</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">名称:</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="text" id="objectName" name="objectName" onclick="selectType()"
th:field="*{objectName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
<!-- <input name="objectName" th:field="*{objectName}" 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="sortNumber" th:field="*{sortNumber}" class="form-control" type="text">
</div>
</div>
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label">关联id:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="objectId" th:field="*{objectId}" class="form-control" type="text"> <input id="objectId" name="objectId" th:field="*{objectId}" class="form-control" type="text"
readonly="readonly">
</div> </div>
</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> </form>
</div> </div>
<th:block th:include="include :: footer"/> <th:block th:include="include :: footer"/>
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "star_object/info"; var prefix = ctx + "star_object/info";
var carousel_prefix = ctx + "carousel/info";
$("#form-info-edit").validate({ $("#form-info-edit").validate({
focusCleanup: true focusCleanup: true
}); });
...@@ -62,6 +105,50 @@ ...@@ -62,6 +105,50 @@
$.operate.save(prefix + "/edit", $('#form-info-edit').serialize()); $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
} }
} }
// 根据当前激活的选项卡获取(方式一)
function selectType() {
if ($("#objectType").val() == null || $("#objectType").val() == undefined) {
return;
}
if ($("#objectType").val() == '0' || $("#objectType").val() == '1' || $("#objectType").val() == '2') {
// $.modal.open("选择", prefix + "/selectType?type="+$("#objectType").val());
var options = {
title: '选择',
url: carousel_prefix + "/selectType?type=" + $("#objectType").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;
}
$('#objectName').val(rows.name);
$('#objectId').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> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
</li> </li>
<li> <li>
<label>对象类型</label> <label>对象类型</label>
<!-- <input type="text" name="objectType"/>--> <!-- <input type="text" name="objectType"/>-->
<select id="objectType" name="objectType" class="form-control m-b"
th:with="type=${@dict.getType('lyy_business_type')}">
<select id="objectType" name="objectType" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select> </select>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
var editFlag = [[${@permission.hasPermi('star_object:info:edit')}]]; var editFlag = [[${@permission.hasPermi('star_object:info:edit')}]];
var removeFlag = [[${@permission.hasPermi('star_object:info:remove')}]]; var removeFlag = [[${@permission.hasPermi('star_object:info:remove')}]];
var prefix = ctx + "star_object/info"; var prefix = ctx + "star_object/info";
var datasType = [[${@dict.getType('lyy_business_type')}]];
$(function () { $(function () {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
...@@ -93,6 +93,10 @@ ...@@ -93,6 +93,10 @@
// title: '', // title: '',
// visible: false // visible: false
// }, // },
{
field: 'titleOfType',
title: '模块名称'
},
{ {
field: 'sortNumber', field: 'sortNumber',
title: '排序' title: '排序'
...@@ -101,26 +105,33 @@ ...@@ -101,26 +105,33 @@
field: 'title', field: 'title',
title: '标题' title: '标题'
}, },
{
field: 'coverUrl',
title: '封面'
},
{ {
field: 'titleIntroduce', field: 'titleIntroduce',
title: '标题介绍' title: '标题介绍'
}, },
{ {
field: 'objectType', field: 'coverUrl',
title: '对象类型' title: '封面',
formatter: function (value, row, index) {
var actions = [];
actions.push('<img style="width:50px;height:50px" src='+value+'>');
return actions.join('');
}
}, },
{ {
field: 'objectId', field: 'objectType',
title: '对象id' title: '类型',
formatter: function (value, row, index) {
return $.table.selectDictLabel(datasType, value);
}
}, },
{ {
field: 'titleOfType', field: 'objectName',
title: '模块名称' title: '名称'
}, },
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
......
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