Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
cfld-liyeyun-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cfld-backend
cfld-liyeyun-admin
Commits
0d4218e0
Commit
0d4218e0
authored
Nov 27, 2023
by
lixinglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
css
parent
da7b02f4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
348 additions
and
130 deletions
+348
-130
StarObjectExtensionInfo.java
...java/com/ruoyi/system/domain/StarObjectExtensionInfo.java
+69
-41
StarObjectExtensionInfoMapper.xml
...rces/mapper/star_object/StarObjectExtensionInfoMapper.xml
+20
-10
add.html
...em/src/main/resources/templates/star_object/info/add.html
+133
-52
edit.html
...m/src/main/resources/templates/star_object/info/edit.html
+99
-11
info.html
...m/src/main/resources/templates/star_object/info/info.html
+27
-16
No files found.
ruoyi-system/src/main/java/com/ruoyi/system/domain/StarObjectExtensionInfo.java
View file @
0d4218e0
...
...
@@ -6,132 +6,160 @@ import com.ruoyi.common.annotation.Excel;
import
com.ruoyi.common.core.domain.BaseEntity
;
/**
*
星级扩展信息
对象 star_object_extension_info
*
*
【请填写功能名称】
对象 star_object_extension_info
*
* @author ruoyi
* @date 2023-11-2
4
* @date 2023-11-2
7
*/
public
class
StarObjectExtensionInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** */
/**
$column.columnComment
*/
private
Long
id
;
/** 排序 */
@Excel
(
name
=
"排序"
)
private
Long
sortNumber
;
/** */
@Excel
(
name
=
""
)
/**
$column.columnComment
*/
@Excel
(
name
=
"
${comment}"
,
readConverterExp
=
"$column.readConverterExp()
"
)
private
String
title
;
/** */
@Excel
(
name
=
""
)
/**
$column.columnComment
*/
@Excel
(
name
=
"
${comment}"
,
readConverterExp
=
"$column.readConverterExp()
"
)
private
String
coverUrl
;
/** 介绍 */
@Excel
(
name
=
"介绍"
)
private
String
titleIntroduce
;
/** */
@Excel
(
name
=
""
)
/**
$column.columnComment
*/
@Excel
(
name
=
"
${comment}"
,
readConverterExp
=
"$column.readConverterExp()
"
)
private
String
objectType
;
/** */
@Excel
(
name
=
""
)
/**
$column.columnComment
*/
@Excel
(
name
=
"
${comment}"
,
readConverterExp
=
"$column.readConverterExp()
"
)
private
Long
objectId
;
/** */
@Excel
(
name
=
""
)
/** $column.columnComment */
@Excel
(
name
=
"${comment}"
,
readConverterExp
=
"$column.readConverterExp()"
)
private
String
objectName
;
/** $column.columnComment */
@Excel
(
name
=
"${comment}"
,
readConverterExp
=
"$column.readConverterExp()"
)
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
;
}
public
Long
getId
()
public
Long
getId
()
{
return
id
;
}
public
void
setSortNumber
(
Long
sortNumber
)
public
void
setSortNumber
(
Long
sortNumber
)
{
this
.
sortNumber
=
sortNumber
;
}
public
Long
getSortNumber
()
public
Long
getSortNumber
()
{
return
sortNumber
;
}
public
void
setTitle
(
String
title
)
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getTitle
()
public
String
getTitle
()
{
return
title
;
}
public
void
setCoverUrl
(
String
coverUrl
)
public
void
setCoverUrl
(
String
coverUrl
)
{
this
.
coverUrl
=
coverUrl
;
}
public
String
getCoverUrl
()
public
String
getCoverUrl
()
{
return
coverUrl
;
}
public
void
setTitleIntroduce
(
String
titleIntroduce
)
public
void
setTitleIntroduce
(
String
titleIntroduce
)
{
this
.
titleIntroduce
=
titleIntroduce
;
}
public
String
getTitleIntroduce
()
public
String
getTitleIntroduce
()
{
return
titleIntroduce
;
}
public
void
setObjectType
(
String
objectType
)
public
void
setObjectType
(
String
objectType
)
{
this
.
objectType
=
objectType
;
}
public
String
getObjectType
()
public
String
getObjectType
()
{
return
objectType
;
}
public
void
setObjectId
(
Long
objectId
)
public
void
setObjectId
(
Long
objectId
)
{
this
.
objectId
=
objectId
;
}
public
Long
getObjectId
()
public
Long
getObjectId
()
{
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
;
}
public
String
getTitleOfType
()
public
String
getTitleOfType
()
{
return
titleOfType
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getStatus
()
{
return
status
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"sortNumber"
,
getSortNumber
())
.
append
(
"title"
,
getTitle
())
.
append
(
"coverUrl"
,
getCoverUrl
())
.
append
(
"titleIntroduce"
,
getTitleIntroduce
())
.
append
(
"objectType"
,
getObjectType
())
.
append
(
"objectId"
,
getObjectId
())
.
append
(
"titleOfType"
,
getTitleOfType
())
.
toString
();
.
append
(
"id"
,
getId
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"sortNumber"
,
getSortNumber
())
.
append
(
"title"
,
getTitle
())
.
append
(
"coverUrl"
,
getCoverUrl
())
.
append
(
"titleIntroduce"
,
getTitleIntroduce
())
.
append
(
"objectType"
,
getObjectType
())
.
append
(
"objectId"
,
getObjectId
())
.
append
(
"objectName"
,
getObjectName
())
.
append
(
"titleOfType"
,
getTitleOfType
())
.
append
(
"status"
,
getStatus
())
.
toString
();
}
}
ruoyi-system/src/main/resources/mapper/star_object/StarObjectExtensionInfoMapper.xml
View file @
0d4218e0
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ruoyi.system.mapper.StarObjectExtensionInfoMapper"
>
<resultMap
type=
"StarObjectExtensionInfo"
id=
"StarObjectExtensionInfoResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
...
...
@@ -14,31 +14,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"titleIntroduce"
column=
"title_introduce"
/>
<result
property=
"objectType"
column=
"object_type"
/>
<result
property=
"objectId"
column=
"object_Id"
/>
<result
property=
"objectName"
column=
"object_name"
/>
<result
property=
"titleOfType"
column=
"title_of_type"
/>
<result
property=
"status"
column=
"status"
/>
</resultMap>
<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>
<select
id=
"selectStarObjectExtensionInfoList"
parameterType=
"StarObjectExtensionInfo"
resultMap=
"StarObjectExtensionInfoResult"
>
<include
refid=
"selectStarObjectExtensionInfoVo"
/>
<where>
<where>
<if
test=
"sortNumber != null "
>
and sort_number = #{sortNumber}
</if>
<if
test=
"title != null and title != ''"
>
and title = #{title}
</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=
"objectType != null and objectType != ''"
>
and object_type = #{objectType}
</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=
"status != null "
>
and status = #{status}
</if>
</where>
</select>
<select
id=
"selectStarObjectExtensionInfoById"
parameterType=
"Long"
resultMap=
"StarObjectExtensionInfoResult"
>
<include
refid=
"selectStarObjectExtensionInfoVo"
/>
where id = #{id}
</select>
<insert
id=
"insertStarObjectExtensionInfo"
parameterType=
"StarObjectExtensionInfo"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into star_object_extension_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -50,8 +54,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"titleIntroduce != null"
>
title_introduce,
</if>
<if
test=
"objectType != null"
>
object_type,
</if>
<if
test=
"objectId != null"
>
object_Id,
</if>
<if
test=
"objectName != null"
>
object_name,
</if>
<if
test=
"titleOfType != null"
>
title_of_type,
</if>
</trim>
<if
test=
"status != null"
>
status,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
...
...
@@ -61,8 +67,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"titleIntroduce != null"
>
#{titleIntroduce},
</if>
<if
test=
"objectType != null"
>
#{objectType},
</if>
<if
test=
"objectId != null"
>
#{objectId},
</if>
<if
test=
"objectName != null"
>
#{objectName},
</if>
<if
test=
"titleOfType != null"
>
#{titleOfType},
</if>
</trim>
<if
test=
"status != null"
>
#{status},
</if>
</trim>
</insert>
<update
id=
"updateStarObjectExtensionInfo"
parameterType=
"StarObjectExtensionInfo"
>
...
...
@@ -76,7 +84,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"titleIntroduce != null"
>
title_introduce = #{titleIntroduce},
</if>
<if
test=
"objectType != null"
>
object_type = #{objectType},
</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=
"status != null"
>
status = #{status},
</if>
</trim>
where id = #{id}
</update>
...
...
@@ -86,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<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=
")"
>
#{id}
</foreach>
...
...
ruoyi-system/src/main/resources/templates/star_object/info/add.html
View file @
0d4218e0
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<th:block
th:include=
"include :: header('新增星级扩展信息')"
/>
<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"
>
<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"
>
<label
class=
"col-sm-3 control-label"
>
标题:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"title"
class=
"form-control"
type=
"text"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m"
id=
"form-info-add"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
扩展信息名称:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"titleOfType"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
封面:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"coverUrl"
class=
"form-control"
type=
"text"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片地址链接:
</label>
<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
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
标题介绍:
</label
>
<div
class=
"col-sm-8
"
>
<
input
name=
"titleIntroduce"
class=
"form-control"
type=
"text"
>
<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=
"col-sm-8"
>
<select
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
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
标题介绍:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"titleIntroduce"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
对象id:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"objectId"
class=
"form-control"
type=
"text"
>
<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=
"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>
</form>
</div>
<th:block
th:include=
"include :: footer"
/>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"star_object/info"
$
(
"#form-info-add"
).
validate
({
focusCleanup
:
true
});
</form>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"star_object/info"
;
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>
</html>
\ No newline at end of file
ruoyi-system/src/main/resources/templates/star_object/info/edit.html
View file @
0d4218e0
...
...
@@ -2,27 +2,34 @@
<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=
"${starObjectExtensionInfo}"
>
<input
name=
"id"
th:field=
"*{id}"
type=
"hidden"
>
<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"
>
<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
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
标题
</label>
<label
class=
"col-sm-3 control-label"
>
图片地址链接:
</label>
<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
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
封面
</label>
<label
class=
"col-sm-3 control-label"
>
标题:
</label>
<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
class=
"form-group"
>
...
...
@@ -31,11 +38,20 @@
<input
name=
"titleIntroduce"
th:field=
"*{titleIntroduce}"
class=
"form-control"
type=
"text"
>
</div>
</div>
<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"
>
<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')}"
>
<option
th:each=
"dict : ${type}"
th:text=
"${dict.dictLabel}"
th:value=
"${dict.dictValue}"
th:field=
"*{objectType}"
></option>
...
...
@@ -43,16 +59,43 @@
</div>
</div>
<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"
>
<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 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
+
"star_object/info"
;
var
carousel_prefix
=
ctx
+
"carousel/info"
;
$
(
"#form-info-edit"
).
validate
({
focusCleanup
:
true
});
...
...
@@ -62,6 +105,50 @@
$
.
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>
</body>
</html>
\ No newline at end of file
ruoyi-system/src/main/resources/templates/star_object/info/info.html
View file @
0d4218e0
...
...
@@ -22,14 +22,14 @@
</li>
<li>
<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
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>
...
...
@@ -76,7 +76,7 @@
var
editFlag
=
[[
$
{@
permission
.
hasPermi
(
'star_object:info:edit'
)}]];
var
removeFlag
=
[[
$
{@
permission
.
hasPermi
(
'star_object:info:remove'
)}]];
var
prefix
=
ctx
+
"star_object/info"
;
var
datasType
=
[[
$
{@
dict
.
getType
(
'lyy_business_type'
)}]];
$
(
function
()
{
var
options
=
{
url
:
prefix
+
"/list"
,
...
...
@@ -93,6 +93,10 @@
// title: '',
// visible: false
// },
{
field
:
'titleOfType'
,
title
:
'模块名称'
},
{
field
:
'sortNumber'
,
title
:
'排序'
...
...
@@ -101,26 +105,33 @@
field
:
'title'
,
title
:
'标题'
},
{
field
:
'coverUrl'
,
title
:
'封面'
},
{
field
:
'titleIntroduce'
,
title
:
'标题介绍'
},
{
field
:
'objectType'
,
title
:
'对象类型'
field
:
'coverUrl'
,
title
:
'封面'
,
formatter
:
function
(
value
,
row
,
index
)
{
var
actions
=
[];
actions
.
push
(
'<img style="width:50px;height:50px" src='
+
value
+
'>'
);
return
actions
.
join
(
''
);
}
},
{
field
:
'objectId'
,
title
:
'对象id'
field
:
'objectType'
,
title
:
'类型'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
$
.
table
.
selectDictLabel
(
datasType
,
value
);
}
},
{
field
:
'
titleOfTyp
e'
,
title
:
'
模块
名称'
field
:
'
objectNam
e'
,
title
:
'名称'
},
{
title
:
'操作'
,
align
:
'center'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment