优化后台页面
This commit is contained in:
parent
fb4894b1da
commit
29015cdc16
|
|
@ -2,6 +2,8 @@ package com.playlet.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.playlet.system.domain.PlayletItemType;
|
||||||
|
import com.playlet.system.service.IPlayletItemTypeService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
@ -38,6 +40,8 @@ public class PlayletItemController extends BaseController {
|
||||||
|
|
||||||
private final IPlayletItemService playletItemService;
|
private final IPlayletItemService playletItemService;
|
||||||
|
|
||||||
|
private final IPlayletItemTypeService playletItemTypeService;
|
||||||
|
|
||||||
@RequiresPermissions("system:playlet:item:view")
|
@RequiresPermissions("system:playlet:item:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String item()
|
public String item()
|
||||||
|
|
@ -55,6 +59,12 @@ public class PlayletItemController extends BaseController {
|
||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<PlayletItem> list = playletItemService.selectPlayletItemList(playletItem);
|
List<PlayletItem> list = playletItemService.selectPlayletItemList(playletItem);
|
||||||
|
list.forEach(model->{
|
||||||
|
PlayletItemType itemType = playletItemTypeService.getById(model.getItemType());
|
||||||
|
if(itemType != null){
|
||||||
|
model.setItemTypeName(itemType.getName());
|
||||||
|
}
|
||||||
|
});
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">视频是否完结 0 未完结 1 完结 :</label>
|
<label class="col-sm-3 control-label">来源类型:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="completeNot" class="form-control" type="text" required>
|
<select name="sourceType" class="form-control m-b" th:with="type=${@dict.getType('playlet_source_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 is-required">视频是否完结:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="completeNot" class="form-control m-b" th:with="type=${@dict.getType('playlet_complete_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">视频是否完结 0 未完结 1 完结 :</label>
|
<label class="col-sm-3 control-label">来源类型:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="completeNot" th:field="*{completeNot}" class="form-control" type="text" required>
|
<select name="sourceType" class="form-control m-b" th:with="type=${@dict.getType('playlet_source_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sourceType}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">是否完结:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="completeNot" class="form-control m-b" th:with="type=${@dict.getType('playlet_complete_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{completeNot}"></option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@
|
||||||
var editFlag = [[${@permission.hasPermi('playlet:item:edit')}]];
|
var editFlag = [[${@permission.hasPermi('playlet:item:edit')}]];
|
||||||
var removeFlag = [[${@permission.hasPermi('playlet:item:remove')}]];
|
var removeFlag = [[${@permission.hasPermi('playlet:item:remove')}]];
|
||||||
var prefix = ctx + "system/playlet/item";
|
var prefix = ctx + "system/playlet/item";
|
||||||
|
var typeDict = [[${@dict.getType('playlet_source_type')}]];
|
||||||
|
var completeDict = [[${@dict.getType('playlet_complete_type')}]];
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var options = {
|
var options = {
|
||||||
|
|
@ -66,11 +68,20 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'remark',
|
field: 'remark',
|
||||||
title: '备注信息'
|
title: '备注信息',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'itemTypeName',
|
||||||
|
title: '剧场'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'sourceType',
|
field: 'sourceType',
|
||||||
title: '来源类型 1.抖音 2.快手 3.视频号'
|
title: '来源类型',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(typeDict, value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'videoName',
|
field: 'videoName',
|
||||||
|
|
@ -78,7 +89,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'completeNot',
|
field: 'completeNot',
|
||||||
title: '视频是否完结 0 未完结 1 完结 '
|
title: '视频是否完结',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(completeDict, value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'coverPic',
|
field: 'coverPic',
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@
|
||||||
$('.summernote').each(function(i) {
|
$('.summernote').each(function(i) {
|
||||||
$('#' + this.id).summernote({
|
$('#' + this.id).summernote({
|
||||||
lang: 'zh-CN',
|
lang: 'zh-CN',
|
||||||
|
height: 300,
|
||||||
dialogsInBody: true,
|
dialogsInBody: true,
|
||||||
callbacks: {
|
callbacks: {
|
||||||
onChange: function(contents, $edittable) {
|
onChange: function(contents, $edittable) {
|
||||||
|
|
|
||||||
|
|
@ -106,11 +106,19 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'imgUrl',
|
field: 'imgUrl',
|
||||||
title: '封面图片地址'
|
title: '封面图片地址',
|
||||||
|
formatter: function(value) {
|
||||||
|
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">封面图片<a/>';}
|
||||||
|
else {return '<a>无<a/>'}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'detailVideoUrl',
|
field: 'detailVideoUrl',
|
||||||
title: '顶部视频地址'
|
title: '顶部视频地址',
|
||||||
|
formatter: function(value) {
|
||||||
|
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">顶部视频<a/>';}
|
||||||
|
else {return '<a>无<a/>'}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'detailContent',
|
field: 'detailContent',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue