优化后台页面

This commit is contained in:
kuang.yife 2024-04-28 11:30:44 +08:00
parent fb4894b1da
commit 29015cdc16
6 changed files with 63 additions and 9 deletions

View File

@ -2,6 +2,8 @@ package com.playlet.web.controller.system;
import java.util.List;
import com.playlet.system.domain.PlayletItemType;
import com.playlet.system.service.IPlayletItemTypeService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -38,6 +40,8 @@ public class PlayletItemController extends BaseController {
private final IPlayletItemService playletItemService;
private final IPlayletItemTypeService playletItemTypeService;
@RequiresPermissions("system:playlet:item:view")
@GetMapping()
public String item()
@ -55,6 +59,12 @@ public class PlayletItemController extends BaseController {
{
startPage();
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);
}

View File

@ -14,9 +14,19 @@
</div>
</div>
<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">
<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 class="form-group">

View File

@ -21,9 +21,19 @@
</div>
</div>
<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">
<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 class="form-group">

View File

@ -47,6 +47,8 @@
var editFlag = [[${@permission.hasPermi('playlet:item:edit')}]];
var removeFlag = [[${@permission.hasPermi('playlet:item:remove')}]];
var prefix = ctx + "system/playlet/item";
var typeDict = [[${@dict.getType('playlet_source_type')}]];
var completeDict = [[${@dict.getType('playlet_complete_type')}]];
$(function() {
var options = {
@ -66,11 +68,20 @@
},
{
field: 'remark',
title: '备注信息'
title: '备注信息',
visible: false
},
{
field: 'itemTypeName',
title: '剧场'
},
{
field: 'sourceType',
title: '来源类型 1.抖音 2.快手 3.视频号'
title: '来源类型',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(typeDict, value);
}
},
{
field: 'videoName',
@ -78,7 +89,11 @@
},
{
field: 'completeNot',
title: '视频是否完结 0 未完结 1 完结 '
title: '视频是否完结',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(completeDict, value);
}
},
{
field: 'coverPic',

View File

@ -61,6 +61,7 @@
$('.summernote').each(function(i) {
$('#' + this.id).summernote({
lang: 'zh-CN',
height: 300,
dialogsInBody: true,
callbacks: {
onChange: function(contents, $edittable) {

View File

@ -106,11 +106,19 @@
},
{
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',
title: '顶部视频地址'
title: '顶部视频地址',
formatter: function(value) {
if (value != null && value !== ''){return '<a target="_blank" href="' + value+ '" download="false">顶部视频<a/>';}
else {return '<a><a/>'}
}
},
{
field: 'detailContent',