调整样式,增加新闻类型
This commit is contained in:
parent
d836f3f626
commit
d7d27b5e71
8
pom.xml
8
pom.xml
@ -11,7 +11,7 @@
|
||||
<groupId>com.cm</groupId>
|
||||
<artifactId>system-city</artifactId>
|
||||
<version>1.0.0.RELEASE</version>
|
||||
<name>systemcity</name>
|
||||
<name>system-city</name>
|
||||
<description>城市管理系统</description>
|
||||
|
||||
<properties>
|
||||
@ -165,6 +165,12 @@
|
||||
<version>4.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.14.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
19
readme.md
19
readme.md
@ -16,11 +16,10 @@
|
||||
|
||||
### 菜单调整
|
||||
|
||||
社区(村)管理:
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2">名称</th>
|
||||
<th colspan="4">变更前</th>
|
||||
<th colspan="4">变更后</th>
|
||||
</tr>
|
||||
@ -37,14 +36,26 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>list.html</td>
|
||||
<td>数据管理 / 社区(村)管理</td>
|
||||
<td>/list.html</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>list-tree.html</td>
|
||||
<td>/list-tree.html</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>信息发布 / 操作手册</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>/list_manual.html</td>
|
||||
<td>/api/news</td>
|
||||
<td>/resource/news</td>
|
||||
<td>/route/news</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -50,7 +50,8 @@ public class NewsAppController extends AbstractController {
|
||||
public SuccessResultList<List<NewsDTO>> listPageNoticeNews(@RequestHeader("token") String token, @PathVariable("newsType") String newsType, ListPage page) throws SearchException, ParamsException {
|
||||
if (!StringUtils.equals(INewsService.NEWS_TYPE_DAILY, newsType) &&
|
||||
!StringUtils.equals(INewsService.NEWS_TYPE_NOTICE, newsType) &&
|
||||
!StringUtils.equals(INewsService.NEWS_TYPE_PROPAGANDA, newsType)) {
|
||||
!StringUtils.equals(INewsService.NEWS_TYPE_PROPAGANDA, newsType) &&
|
||||
!StringUtils.equals(INewsService.NEWS_TYPE_MANUAL, newsType)) {
|
||||
throw new ParamsException("新闻类型错误");
|
||||
}
|
||||
Map<String, Object> params = requestParams();
|
||||
@ -60,4 +61,18 @@ public class NewsAppController extends AbstractController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "咨询详情", notes = "咨询详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "newsId", value = "咨询ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{newsId}")
|
||||
public NewsDTO getNews(@RequestHeader("token") String token, @PathVariable("newsId") String newsId) throws SearchException {
|
||||
Map<String, Object> params = getParams();
|
||||
params.put("newsId", newsId);
|
||||
return newsService.getNews(token, params);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ public interface INewsService {
|
||||
* 每日通报类型
|
||||
*/
|
||||
String NEWS_TYPE_DAILY = "daily";
|
||||
String NEWS_TYPE_MANUAL = "manual";
|
||||
|
||||
/**
|
||||
* 新增咨询
|
||||
@ -79,6 +80,9 @@ public interface INewsService {
|
||||
*/
|
||||
NewsDTO getNews(Map<String, Object> params) throws SearchException;
|
||||
|
||||
NewsDTO getNews(String token, Map<String, Object> params);
|
||||
|
||||
|
||||
/**
|
||||
* 咨询分页列表
|
||||
*
|
||||
@ -112,4 +116,5 @@ public interface INewsService {
|
||||
* @throws SearchException
|
||||
*/
|
||||
int countOfNews(Map<String, Object> params) throws SearchException;
|
||||
|
||||
}
|
||||
|
@ -13,10 +13,12 @@ import com.cm.common.utils.UUIDUtil;
|
||||
import com.cm.systemcity.dao.news.INewsDao;
|
||||
import com.cm.systemcity.pojo.dtos.news.NewsDTO;
|
||||
import com.cm.systemcity.service.news.INewsService;
|
||||
import com.cm.systemcity.utils.RichTextUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
@ -37,6 +39,8 @@ public class NewsServiceImpl extends AbstractService implements INewsService {
|
||||
private SecurityComponent securityComponent;
|
||||
@Autowired
|
||||
private INewsDao newsDao;
|
||||
@Value("${server.url}")
|
||||
private String serverUrl;
|
||||
|
||||
@Override
|
||||
public SuccessResult saveNews(Map<String, Object> params) throws SaveException {
|
||||
@ -71,7 +75,18 @@ public class NewsServiceImpl extends AbstractService implements INewsService {
|
||||
|
||||
@Override
|
||||
public NewsDTO getNews(Map<String, Object> params) throws SearchException {
|
||||
return newsDao.getNews(params);
|
||||
NewsDTO newsDTO = newsDao.getNews(params);
|
||||
if (newsDTO == null) {
|
||||
throw new SearchException("数据不存在");
|
||||
}
|
||||
return newsDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NewsDTO getNews(String token, Map<String, Object> params) {
|
||||
NewsDTO newsDTO = getNews(params);
|
||||
newsDTO.setNewsContent(RichTextUtil.fillImgSrc(serverUrl, newsDTO.getNewsContent()));
|
||||
return newsDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -95,6 +110,8 @@ public class NewsServiceImpl extends AbstractService implements INewsService {
|
||||
page.getParams().put("newsType", "073fd635-caf0-47dc-a0e8-266430d91b20");
|
||||
} else if (StringUtils.equals(NEWS_TYPE_PROPAGANDA, page.getParams().get("newsType").toString())) {
|
||||
page.getParams().put("newsType", "63ea8f10-7454-47e4-8810-9684143b1acd");
|
||||
} else if (StringUtils.equals(NEWS_TYPE_MANUAL, page.getParams().get("newsType").toString())) {
|
||||
page.getParams().put("newsType", "9ec9989b-1814-4c15-9cbb-4f815ab4459a");
|
||||
}
|
||||
return listPageNews(page);
|
||||
}
|
||||
|
28
src/main/java/com/cm/systemcity/utils/RichTextUtil.java
Normal file
28
src/main/java/com/cm/systemcity/utils/RichTextUtil.java
Normal file
@ -0,0 +1,28 @@
|
||||
package com.cm.systemcity.utils;
|
||||
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
import org.jsoup.select.Elements;
|
||||
|
||||
public class RichTextUtil {
|
||||
|
||||
public static String fillImgSrc(String baseUrl, String content) {
|
||||
// 使用Jsoup解析HTML内容
|
||||
Document doc = Jsoup.parse(content);
|
||||
// 查找所有图片标签
|
||||
Elements imgElements = doc.select("img");
|
||||
// 循环处理每个图片标签
|
||||
for (Element imgElement : imgElements) {
|
||||
String src = imgElement.attr("src");
|
||||
// 检查是否为相对路径
|
||||
if (src != null && !src.startsWith("http") && !src.startsWith("data:")) {
|
||||
// 补齐相对路径
|
||||
imgElement.attr("src", baseUrl + "/" + src);
|
||||
}
|
||||
}
|
||||
// 获取更新后的富文本内容
|
||||
return doc.toString();
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
server:
|
||||
port: 7022
|
||||
url: http://127.0.0.1:7022/servicecity
|
||||
url: http://192.168.0.15:7022/servicecity
|
||||
title: 生态环保网格化监督平台
|
||||
servlet:
|
||||
context-path: /servicecity
|
||||
|
@ -103,7 +103,13 @@
|
||||
<!-- 咨询列表 -->
|
||||
<select id="listNews" parameterType="map" resultMap="newsDTO">
|
||||
SELECT
|
||||
t1.*,
|
||||
t1.news_id,
|
||||
t1.news_type,
|
||||
t1.news_type_name,
|
||||
t1.news_title,
|
||||
t1.news_time,
|
||||
t1.news_author,
|
||||
t1.news_reader,
|
||||
t2.dict_name news_reader_name
|
||||
FROM
|
||||
city_news t1
|
||||
|
@ -15,7 +15,7 @@
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md2">
|
||||
<div class="layui-col-xs2">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body left-tree-wrap">
|
||||
<div id="leftTreeWrap">
|
||||
@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md10">
|
||||
<div class="layui-col-xs10">
|
||||
<div class="layui-card">
|
||||
<div id="listContentWrap" class="layui-card-body">
|
||||
<iframe id="listContent" frameborder="0" class="layadmin-iframe"></iframe>
|
||||
|
@ -19,12 +19,12 @@
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md2">
|
||||
<div class="layui-col-xs2">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" id="streetContainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md10">
|
||||
<div class="layui-col-xs10">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" id="listContainer">
|
||||
<iframe id="listContent" frameborder="0" class="layadmin-iframe"></iframe>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md2">
|
||||
<div class="layui-col-xs2">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body left-tree-wrap">
|
||||
<div id="leftTreeWrap">
|
||||
@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md10">
|
||||
<div class="layui-col-xs10">
|
||||
<div class="layui-card">
|
||||
<div id="listContentWrap" class="layui-card-body">
|
||||
<iframe id="listContent" frameborder="0" class="layadmin-iframe"></iframe>
|
||||
|
@ -120,7 +120,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{width: 100, align:'center', title:'操作', fixed: 'right',
|
||||
{width: 105, align:'center', title:'操作', fixed: 'right',
|
||||
templet: function() {
|
||||
var dom = '<div class="layui-btn-group">'+
|
||||
'<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="editData">编辑</button>'+
|
||||
|
278
src/main/resources/static/route/news/list_manual.html
Normal file
278
src/main/resources/static/route/news/list_manual.html
Normal file
@ -0,0 +1,278 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/servicecity/">
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="keywords" class="layui-input search-item search-item-width-100" placeholder="检索条件" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item search-item-width-100"
|
||||
readonly="readonly" placeholder="起始时间" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item search-item-width-100"
|
||||
readonly="readonly" placeholder="截止时间" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="saveBtn" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" id="deleteTableData" class="layui-btn layui-btn-danger layui-btn-sm">
|
||||
<i class="fa fa-lg fa-trash"></i> 批量删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var table = layui.table;
|
||||
var newsType = '9ec9989b-1814-4c15-9cbb-4f815ab4459a';
|
||||
var tableUrl = top.restAjax.path('api/news/listpagenews?newsType={newsType}', [newsType]);
|
||||
var dataLoading = false;
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
dataLoading = true;
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: tableUrl,
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [[
|
||||
{field:'rowNum', width:60, fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field: 'newsTitle', width: 260, title: '标题', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'newsTypeName', width: 120, title: '类别名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'newsTime', width: 120, title: '发布时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'newsAuthor', width: 120, title: '发布人', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData === '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{width: 105, align:'center', title:'操作', fixed: 'right',
|
||||
templet: function() {
|
||||
var dom = '<div class="layui-btn-group">'+
|
||||
'<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="editData">编辑</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="deleteData">删除</button>'+
|
||||
'</div>';
|
||||
return dom;
|
||||
}
|
||||
},
|
||||
]],
|
||||
page: true,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
},
|
||||
done: function(){
|
||||
dataLoading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
setTimeout(function(){
|
||||
initTable();
|
||||
},500);
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
dataLoading = true;
|
||||
table.reload('dataTable', {
|
||||
url: tableUrl,
|
||||
where:{
|
||||
keywords : $('#keywords').val(),
|
||||
startTime : $('#startTime').val(),
|
||||
endTime : $('#endTime').val()
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
height: $win.height() - 90,
|
||||
done:function(){
|
||||
dataLoading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化时间
|
||||
function initDateTime(){
|
||||
laydate.render({
|
||||
elem: '#startTime'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endTime'
|
||||
});
|
||||
}
|
||||
initDateTime();
|
||||
|
||||
function remove(ids){
|
||||
top.dialog.msg(top.dataMessage.delete, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.delete(top.restAjax.path('api/news/removenews/{ids}', [ids]), {}, null, function (code, data) {
|
||||
// success
|
||||
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000}, function () {
|
||||
reloadTable();
|
||||
});
|
||||
}, function (code, data) {
|
||||
// error
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
// before
|
||||
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
// complete
|
||||
top.dialog.close(layIndex);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('click', '#search', function() {
|
||||
if(dataLoading){
|
||||
layer.msg('数据加载中,请稍等...');
|
||||
return;
|
||||
}
|
||||
reloadTable(1);
|
||||
});
|
||||
|
||||
$(document).on('click', '#saveBtn', function() {
|
||||
var index = layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/news/save_manual.html?newsType={newsType}', [newsType]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
layer.full(index);
|
||||
});
|
||||
|
||||
$(document).on('click', '#deleteTableData', function() {
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
if(checkStatus.data.length == 0){
|
||||
layer.msg('请先勾选要删除的数据')
|
||||
return;
|
||||
}
|
||||
var ids = '';
|
||||
for (var i = 0, item;item = checkStatus.data[i++];){
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item.newsId;
|
||||
}
|
||||
remove(ids);
|
||||
});
|
||||
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
if(obj.event === 'deleteData'){
|
||||
remove(obj.data.newsId);
|
||||
}
|
||||
if(obj.event === 'editData'){
|
||||
var index = layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/news/update_manual.html?newsId={id}', [obj.data.newsId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
layer.full(index);
|
||||
}
|
||||
});
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -135,7 +135,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{width: 100, align:'center', title:'操作', fixed: 'right',
|
||||
{width: 105, align:'center', title:'操作', fixed: 'right',
|
||||
templet: function() {
|
||||
var dom = '<div class="layui-btn-group">'+
|
||||
'<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="editData">编辑</button>'+
|
||||
|
@ -117,7 +117,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{width: 100, align:'center', title:'操作', fixed: 'right',
|
||||
{width: 105, align:'center', title:'操作', fixed: 'right',
|
||||
templet: function() {
|
||||
var dom = '<div class="layui-btn-group">'+
|
||||
'<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="editData">编辑</button>'+
|
||||
|
@ -11,12 +11,12 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-sm12">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md6 layui-col-sm6">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">类别名称</label>
|
||||
<div class="layui-input-block">
|
||||
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-sm6">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">发布时间</label>
|
||||
<div class="layui-input-block">
|
||||
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-sm12" style="width: 100%">
|
||||
<div class="layui-col-md12 layui-col-xs12" style="width: 100%">
|
||||
<script id="newsContent" name="newsContent" type="text/plain"></script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -101,7 +101,7 @@
|
||||
function initContentRichText() {
|
||||
editor = UE.getEditor('newsContent', {autoHeightEnabled: false});
|
||||
editor.ready(function() {
|
||||
editor.setHeight($win.height() - 350);
|
||||
editor.setHeight($win.height() - 370);
|
||||
|
||||
});
|
||||
}
|
||||
|
151
src/main/resources/static/route/news/save_manual.html
Normal file
151
src/main/resources/static/route/news/save_manual.html
Normal file
@ -0,0 +1,151 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/servicecity/">
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="newsTitle" name="newsTitle" autocomplete="off"
|
||||
class="layui-input" value="" placeholder="请填写标题" maxlength="255" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">类别名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="newsTypeName" name="newsTypeName" autocomplete="off"
|
||||
class="layui-input" value="" placeholder="类别名称" maxlength="255" readonly="readonly" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">发布时间</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="newsTime" name="newsTime" autocomplete="off" style="cursor: pointer"
|
||||
class="layui-input" value="" placeholder="点击选择发布时间" readonly="readonly" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-xs12" style="width: 100%">
|
||||
<script id="newsContent" name="newsContent" type="text/plain"></script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">保存</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/vendor/ueditor/ueditor.config.js"></script>
|
||||
<script src="assets/js/vendor/ueditor/ueditor.all.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var laytpl = layui.laytpl;
|
||||
var newsType = top.restAjax.params(window.location.href).newsType;
|
||||
var editor = null;
|
||||
|
||||
// 初始化信息类型
|
||||
function initNewsType() {
|
||||
top.restAjax.get(top.restAjax.path('api/dict/getdict/{newsType}', [newsType]), {}, null, function(code, data) {
|
||||
$('#newsTypeName').val(data.dictName);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
initNewsType();
|
||||
|
||||
function initDate(){
|
||||
laydate.render({
|
||||
elem: '#newsTime'
|
||||
})
|
||||
}
|
||||
initDate();
|
||||
|
||||
// 初始化文富文本
|
||||
function initContentRichText() {
|
||||
editor = UE.getEditor('newsContent', {autoHeightEnabled: false});
|
||||
editor.ready(function() {
|
||||
editor.setHeight($win.height() - 370);
|
||||
|
||||
});
|
||||
}
|
||||
setTimeout(function(){
|
||||
initContentRichText();
|
||||
},200);
|
||||
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
formData.field['newsType'] = newsType;
|
||||
top.restAjax.post(top.restAjax.path('api/news/savenews', []), formData.field, null, function (code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function () {
|
||||
top.dialog.close(layerIndex);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function () {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -11,12 +11,12 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-sm12">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-sm12">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">摘要</label>
|
||||
<div class="layui-input-block">
|
||||
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md4 layui-col-sm4">
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">类别名称</label>
|
||||
<div class="layui-input-block">
|
||||
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4 layui-col-sm4">
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">发布时间</label>
|
||||
<div class="layui-input-block">
|
||||
@ -54,7 +54,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4 layui-col-sm4">
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-form-item layui-form-text" style="position: relative;z-index: 10000;">
|
||||
<label class="layui-form-label">受众人群</label>
|
||||
<div class="layui-input-block" id="newsReaderTemplateBox"></div>
|
||||
@ -67,7 +67,7 @@
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-sm12" style="width: 100%">
|
||||
<div class="layui-col-md12 layui-col-xs12" style="width: 100%">
|
||||
<script id="newsContent" name="newsContent" type="text/plain"></script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -143,7 +143,7 @@
|
||||
function initContentRichText() {
|
||||
editor = UE.getEditor('newsContent', {autoHeightEnabled: false});
|
||||
editor.ready(function() {
|
||||
editor.setHeight($win.height() - 380);
|
||||
editor.setHeight($win.height() - 420);
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -11,12 +11,12 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-sm12">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md6 layui-col-sm6">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">类别名称</label>
|
||||
<div class="layui-input-block">
|
||||
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-sm6">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">发布时间</label>
|
||||
<div class="layui-input-block">
|
||||
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-sm12" style="width: 100%">
|
||||
<div class="layui-col-md12 layui-col-xs12" style="width: 100%">
|
||||
<script id="newsContent" name="newsContent" type="text/plain"></script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -101,7 +101,7 @@
|
||||
function initContentRichText() {
|
||||
editor = UE.getEditor('newsContent', {autoHeightEnabled: false});
|
||||
editor.ready(function() {
|
||||
editor.setHeight($win.height() - 350);
|
||||
editor.setHeight($win.height() - 370);
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -11,12 +11,12 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-sm12">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md6 layui-col-sm6">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">类别名称</label>
|
||||
<div class="layui-input-block">
|
||||
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-sm6">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">发布时间</label>
|
||||
<div class="layui-input-block">
|
||||
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-sm12" style="width: 100%">
|
||||
<div class="layui-col-md12 layui-col-xs12" style="width: 100%">
|
||||
<script id="newsContent" name="newsContent" type="text/plain"></script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -124,7 +124,7 @@
|
||||
function initContentRichText(value) {
|
||||
editor = UE.getEditor('newsContent', {autoHeightEnabled: false});
|
||||
editor.ready(function() {
|
||||
editor.setHeight($win.height() - 350);
|
||||
editor.setHeight($win.height() - 380);
|
||||
editor.setContent(value);
|
||||
});
|
||||
}
|
||||
|
171
src/main/resources/static/route/news/update_manual.html
Normal file
171
src/main/resources/static/route/news/update_manual.html
Normal file
@ -0,0 +1,171 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/servicecity/">
|
||||
<meta charset="UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="newsTitle" name="newsTitle" autocomplete="off"
|
||||
class="layui-input" value="" placeholder="请填写标题" maxlength="255" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">类别名称</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="newsTypeName" name="newsTypeName" autocomplete="off"
|
||||
class="layui-input" value="" placeholder="类别名称" maxlength="255" readonly="readonly" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">发布时间</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="newsTime" name="newsTime" autocomplete="off" style="cursor: pointer"
|
||||
class="layui-input" value="" placeholder="点击选择发布时间" readonly="readonly" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-xs12" style="width: 100%">
|
||||
<script id="newsContent" name="newsContent" type="text/plain"></script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">保存</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/vendor/ueditor/ueditor.config.js"></script>
|
||||
<script src="assets/js/vendor/ueditor/ueditor.all.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script type="text/javascript">
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var form = layui.form;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var laytpl = layui.laytpl;
|
||||
var newsId = top.restAjax.params(window.location.href).newsId;
|
||||
var newsType = '';
|
||||
var editor = null;
|
||||
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/news/getnews/{newsId}', [newsId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i];
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
newsType = dataFormData['newsType'];
|
||||
initContentRichText(dataFormData['newsContent']);
|
||||
initDate(dataFormData['newsTime']);
|
||||
initNewsType();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 初始化信息类型
|
||||
function initNewsType() {
|
||||
top.restAjax.get(top.restAjax.path('api/dict/getdict/{newsType}', [newsType]), {}, null, function(code, data) {
|
||||
$('#newsTypeName').val(data.dictName);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
function initDate(value){
|
||||
laydate.render({
|
||||
elem: '#newsTime'
|
||||
,value: value
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化文富文本
|
||||
function initContentRichText(value) {
|
||||
editor = UE.getEditor('newsContent', {autoHeightEnabled: false});
|
||||
editor.ready(function() {
|
||||
editor.setHeight($win.height() - 380);
|
||||
editor.setContent(value);
|
||||
});
|
||||
}
|
||||
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
formData.field['newsType'] = newsType;
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
top.restAjax.put(top.restAjax.path('api/news/updatenews/{newsId}', [newsId]), formData.field, null, function (code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function () {
|
||||
top.dialog.close(layerIndex);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function () {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -11,12 +11,12 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-sm12">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-sm12">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">摘要</label>
|
||||
<div class="layui-input-block">
|
||||
@ -35,8 +35,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md4 layui-col-sm4">
|
||||
<div class="layui-row layui-col-space10">
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">类别名称</label>
|
||||
<div class="layui-input-block">
|
||||
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4 layui-col-sm4">
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">发布时间</label>
|
||||
<div class="layui-input-block">
|
||||
@ -54,7 +54,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4 layui-col-sm4">
|
||||
<div class="layui-col-md4 layui-col-xs4">
|
||||
<div class="layui-form-item layui-form-text" style="position: relative;z-index: 10000;">
|
||||
<label class="layui-form-label">受众人群</label>
|
||||
<div class="layui-input-block" id="newsReaderTemplateBox"></div>
|
||||
@ -67,7 +67,7 @@
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-sm12" style="width: 100%">
|
||||
<div class="layui-col-md12 layui-col-xs12" style="width: 100%">
|
||||
<script id="newsContent" name="newsContent" type="text/plain"></script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -168,7 +168,7 @@
|
||||
function initContentRichText(value) {
|
||||
editor = UE.getEditor('newsContent', {autoHeightEnabled: false});
|
||||
editor.ready(function() {
|
||||
editor.setHeight($win.height() - 380);
|
||||
editor.setHeight($win.height() - 430);
|
||||
editor.setContent(value);
|
||||
});
|
||||
}
|
||||
|
@ -11,12 +11,12 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-anim layui-anim-fadein">
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-sm12">
|
||||
<div class="layui-col-md12 layui-col-xs12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题</label>
|
||||
<div class="layui-input-block">
|
||||
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md6 layui-col-sm6">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">类别名称</label>
|
||||
<div class="layui-input-block">
|
||||
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6 layui-col-sm6">
|
||||
<div class="layui-col-md6 layui-col-xs6">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">发布时间</label>
|
||||
<div class="layui-input-block">
|
||||
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md12 layui-col-sm12" style="width: 100%">
|
||||
<div class="layui-col-md12 layui-col-xs12" style="width: 100%">
|
||||
<script id="newsContent" name="newsContent" type="text/plain"></script>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -124,7 +124,7 @@
|
||||
function initContentRichText(value) {
|
||||
editor = UE.getEditor('newsContent', {autoHeightEnabled: false});
|
||||
editor.ready(function() {
|
||||
editor.setHeight($win.height() - 350);
|
||||
editor.setHeight($win.height() - 380);
|
||||
editor.setContent(value);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user