修改功能及样式
This commit is contained in:
parent
3ba4329600
commit
58527fad99
|
@ -47,15 +47,8 @@ public class NdNewController extends BaseController
|
|||
@GetMapping()
|
||||
public String news(ModelMap mmap)
|
||||
{
|
||||
List<CxSelect> cxList = new ArrayList<CxSelect>();
|
||||
List<CxSelect> firstItems = ndNewService.getNewsTypes(0L);
|
||||
for(int i=0;i< firstItems.size();i++){
|
||||
CxSelect child = firstItems.get(i);
|
||||
List<CxSelect> secondItems = ndNewService.getNewsTypes(Long.valueOf(child.getV()));
|
||||
child.setS(secondItems);
|
||||
cxList.add(child);
|
||||
}
|
||||
mmap.put("data", JSON.toJSON(cxList));
|
||||
mmap.put("data", firstItems);
|
||||
return prefix + "/list";
|
||||
}
|
||||
|
||||
|
@ -71,6 +64,13 @@ public class NdNewController extends BaseController
|
|||
List<NdNew> list = ndNewService.selectNdNewList(ndNew);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@PostMapping("/getNewType")
|
||||
@ResponseBody
|
||||
public TableDataInfo getNewType(NdNew ndNew)
|
||||
{
|
||||
List<CxSelect> firstItems = ndNewService.getNewsTypes(ndNew.getId());
|
||||
return getDataTable(firstItems);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出新闻列表
|
||||
|
@ -92,15 +92,18 @@ public class NdNewController extends BaseController
|
|||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
{
|
||||
List<CxSelect> cxList = new ArrayList<CxSelect>();
|
||||
// List<CxSelect> cxList = new ArrayList<CxSelect>();
|
||||
// List<CxSelect> firstItems = ndNewService.getNewsTypes(0L);
|
||||
// for(int i=0;i< firstItems.size();i++){
|
||||
// CxSelect child = firstItems.get(i);
|
||||
// List<CxSelect> secondItems = ndNewService.getNewsTypes(Long.valueOf(child.getV()));
|
||||
// child.setS(secondItems);
|
||||
// cxList.add(child);
|
||||
// }
|
||||
// mmap.put("data", JSON.toJSON(cxList));
|
||||
|
||||
List<CxSelect> firstItems = ndNewService.getNewsTypes(0L);
|
||||
for(int i=0;i< firstItems.size();i++){
|
||||
CxSelect child = firstItems.get(i);
|
||||
List<CxSelect> secondItems = ndNewService.getNewsTypes(Long.valueOf(child.getV()));
|
||||
child.setS(secondItems);
|
||||
cxList.add(child);
|
||||
}
|
||||
mmap.put("data", JSON.toJSON(cxList));
|
||||
mmap.put("data", firstItems);
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
|
@ -134,6 +137,7 @@ public class NdNewController extends BaseController
|
|||
String htmlRegex = "<[^>]*>";
|
||||
// 使用正则表达式去除HTML标签
|
||||
String output = input.replaceAll(htmlRegex, "");
|
||||
output = output.replaceAll(" ", "");
|
||||
return output;
|
||||
}
|
||||
|
||||
|
@ -144,15 +148,21 @@ public class NdNewController extends BaseController
|
|||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
List<CxSelect> cxList = new ArrayList<CxSelect>();
|
||||
// List<CxSelect> cxList = new ArrayList<CxSelect>();
|
||||
// List<CxSelect> firstItems = ndNewService.getNewsTypes(0L);
|
||||
// for(int i=0;i< firstItems.size();i++){
|
||||
// CxSelect child = firstItems.get(i);
|
||||
// List<CxSelect> secondItems = ndNewService.getNewsTypes(Long.valueOf(child.getV()));
|
||||
// child.setS(secondItems);
|
||||
// cxList.add(child);
|
||||
// }
|
||||
// mmap.put("data", JSON.toJSON(cxList));
|
||||
|
||||
|
||||
List<CxSelect> firstItems = ndNewService.getNewsTypes(0L);
|
||||
for(int i=0;i< firstItems.size();i++){
|
||||
CxSelect child = firstItems.get(i);
|
||||
List<CxSelect> secondItems = ndNewService.getNewsTypes(Long.valueOf(child.getV()));
|
||||
child.setS(secondItems);
|
||||
cxList.add(child);
|
||||
}
|
||||
mmap.put("data", JSON.toJSON(cxList));
|
||||
mmap.put("data", firstItems);
|
||||
|
||||
|
||||
NdNew ndNew = ndNewService.selectNdNewById(id);
|
||||
mmap.put("ndNew", ndNew);
|
||||
return prefix + "/edit";
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
|
@ -3,14 +3,14 @@ html {
|
|||
}
|
||||
body.signin {
|
||||
height:auto;
|
||||
background:url(../img/login-background.jpg) no-repeat center fixed;
|
||||
background:url(../img/login-background.png) no-repeat center fixed;
|
||||
-webkit-background-size:cover;
|
||||
-moz-background-size:cover;
|
||||
-o-background-size:cover;
|
||||
background-size:cover
|
||||
}
|
||||
.signinpanel {
|
||||
width:750px;
|
||||
width:900px;
|
||||
margin:10% auto 0;
|
||||
color:rgba(255,255,255,.95)
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover}.signinpanel{width:750px;margin:10% auto 0;color:rgba(255,255,255,.95)}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:380px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}.form-control,.form-control:focus,.has-error .form-control:focus,.has-success .form-control:focus,.has-warning .form-control:focus,.navbar-collapse,.navbar-form,.navbar-form-custom .form-control:focus,.navbar-form-custom .form-control:hover,.open .btn.dropdown-toggle,.panel,.popover,.progress,.progress-bar{box-shadow:none}.form-control{border-radius:1px!important;padding:6px 12px!important;height:34px!important}.form-control:focus{border-color:#1ab394!important}body .layer-ext-moon-msg[type="dialog"]{min-width:100px!important}body .layer-ext-moon-msg{background-color:rgba(0,0,0,0.6);color:#fff;border:0}body .layer-ext-moon-msg .layui-layer-content{padding:12px 25px;text-align:center}
|
||||
html{height:100%}body.signin{height:auto;background:url(../img/login-background.png) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover}.signinpanel{width:900px;margin:10% auto 0;color:rgba(255,255,255,.95)}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:380px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}.form-control,.form-control:focus,.has-error .form-control:focus,.has-success .form-control:focus,.has-warning .form-control:focus,.navbar-collapse,.navbar-form,.navbar-form-custom .form-control:focus,.navbar-form-custom .form-control:hover,.open .btn.dropdown-toggle,.panel,.popover,.progress,.progress-bar{box-shadow:none}.form-control{border-radius:1px!important;padding:6px 12px!important;height:34px!important}.form-control:focus{border-color:#1ab394!important}body .layer-ext-moon-msg[type="dialog"]{min-width:100px!important}body .layer-ext-moon-msg{background-color:rgba(0,0,0,0.6);color:#fff;border:0}body .layer-ext-moon-msg .layui-layer-content{padding:12px 25px;text-align:center}
|
Binary file not shown.
After Width: | Height: | Size: 1.0 MiB |
|
@ -2491,19 +2491,21 @@ html {
|
|||
width: 33%;
|
||||
}
|
||||
|
||||
|
||||
.homeb .aleft .tzgg {
|
||||
background-size: 100% 100%;
|
||||
padding: 1rem 1.875rem;
|
||||
padding: 1rem 1.875rem 0.1rem 1.875rem;
|
||||
background-color: #13439b;
|
||||
}
|
||||
|
||||
.homeb .aleft .tzgg li {
|
||||
margin-bottom: 1rem;
|
||||
margin-bottom: 0.95rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.jtfylist{
|
||||
max-height: 31.25rem;
|
||||
}
|
||||
|
@ -4432,6 +4434,7 @@ li.A_li9:hover p {
|
|||
padding:0.3rem 1rem;
|
||||
position:absolute;
|
||||
bottom:2.4rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
.static-name h3{
|
||||
font-family: "SourceHanSerifCN-Bold" !important;
|
||||
|
|
|
@ -9,7 +9,7 @@ function generPage(total, dom_page_class) {
|
|||
|
||||
|
||||
let domStr = `
|
||||
<div class="pb_sys_common pb_sys_normal pb_sys_style1" style="margin-top: 10px; text-align: center; padding-bottom: 15px">
|
||||
<div class="pb_sys_common pb_sys_normal pb_sys_style1" style="margin-top: 10px; text-align: center; padding-bottom: 15px;font-size: 16px;">
|
||||
<span class="p_t">共${total}条</span>
|
||||
<span class="p_pages"><span class="p_no" ><a href="javascript:void(0);" onclick="pageChange(1,this)">首页</a></span>
|
||||
`
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 386 KiB |
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<title>吉林省新农科长白山创新学院</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<title>吉林省新农科长白山创新学院</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
|
||||
|
|
|
@ -21,15 +21,16 @@
|
|||
</script>
|
||||
</head>
|
||||
<body class="signin">
|
||||
<div class="signinpanel">
|
||||
<div style="padding: 3rem 0 0 3rem;"><img alt="[ 吉林省新农科长白山创新学院 ]" src="../static/Log_img.png" th:src="@{/Log_img.png}" style="max-width:500px;"></div>
|
||||
<div class="signinpanel">
|
||||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
<div class="signin-info" style="text-align: center;">
|
||||
<div class="logopanel m-b">
|
||||
<h1><img alt="[ 吉林省新农科长白山创新学院 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>
|
||||
<h1><img alt="[ 吉林省新农科长白山创新学院 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}" style="max-width:500px;margin-top: -30px;"></h1>
|
||||
</div>
|
||||
<div class="m-b"></div>
|
||||
<h4>欢迎使用 <strong>长白山创新学院</strong> 后台管理系统</h4>
|
||||
<!-- <div class="m-b"></div>-->
|
||||
<!-- <h4>欢迎使用 <strong>长白山创新学院</strong> 后台管理系统</h4>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
|
|
|
@ -12,13 +12,21 @@
|
|||
<div id="element" class="form-group">
|
||||
<label class="col-sm-3 control-label">栏目类型:</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="first form-control" name="firstType" required>
|
||||
<option value="1" selected>首页</option>
|
||||
<!-- <select class="form-control" name="firstType">-->
|
||||
<!-- <option value="1" selected>首页</option>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select class="form-control" name="firstType" id="firstType" th:onchange="handleFirst()">
|
||||
<option value="">请选择</option>
|
||||
<option th:value="${item.v}" th:each="item : ${data}">[[${item.n}]]</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<select class="second form-control" name="newType" required>
|
||||
<option value="10" selected>新闻动态</option>
|
||||
<!-- <select class="form-control" name="newType">-->
|
||||
<!-- <option value="10" selected>新闻动态</option>-->
|
||||
<!-- </select>-->
|
||||
<select class="form-control" name="newType" id="newType">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -101,56 +109,68 @@
|
|||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<th:block th:include="include :: jquery-cxselect-js" />
|
||||
<!-- <th:block th:include="include :: jquery-cxselect-js" />-->
|
||||
<!-- <script th:src="@{/ajax/libs/cxselect/jquery.cxselect.js}"></script>-->
|
||||
<script th:inline="javascript">
|
||||
|
||||
// 直接返回获取
|
||||
var data = [[${data}]];
|
||||
$('#element').cxSelect({
|
||||
selects: ['first', 'second'],
|
||||
jsonValue: 'v',
|
||||
data: data
|
||||
});
|
||||
|
||||
var prefix = ctx + "back/news/news"
|
||||
$("#form-new-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-new-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='publishTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
function handleFirst(){
|
||||
var record = document.getElementById("firstType").value;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/back/news/news/getNewType",
|
||||
data: {
|
||||
"id": record,
|
||||
"fragment":'fragment-tasklist'
|
||||
},
|
||||
success: function(data) {
|
||||
console.log('2222->',data);
|
||||
var rows = data.rows;
|
||||
var optionhtml = `<option value="">请选择</option>`;
|
||||
for(var i = 0; i < rows.length; i++) {
|
||||
optionhtml += `<option value="${rows[i].v}">${rows[i].n}</option>`;
|
||||
}
|
||||
document.getElementById("newType").innerHTML = optionhtml;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(".file-upload").fileinput({
|
||||
uploadUrl: ctx + 'common/upload',
|
||||
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('')
|
||||
})
|
||||
$(function() {
|
||||
|
||||
$(".file-uploadb").fileinput({
|
||||
uploadUrl: ctx + 'common/upload',
|
||||
maxFileCount: 10,
|
||||
autoReplace: true
|
||||
$("input[name='publishTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".file-upload").fileinput({
|
||||
uploadUrl: ctx + 'common/upload',
|
||||
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('')
|
||||
})
|
||||
|
||||
$(".file-uploadb").fileinput({
|
||||
uploadUrl: ctx + 'common/upload',
|
||||
maxFileCount: 10,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
var inputaaa = $("input[name='" + event.currentTarget.id + "']").val();
|
||||
$("input[name='" + event.currentTarget.id + "']").val(inputaaa+"|"+data.response.url)
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
})
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
})
|
||||
|
||||
$(function() {
|
||||
$('.summernote').summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
|
@ -185,10 +205,15 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#form-new-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
$("#contentDiv").show();
|
||||
$("#linkUrlDiv").hide();
|
||||
});
|
||||
|
||||
function handleRadioChange() {
|
||||
var radios = document.getElementsByName("type");
|
||||
|
|
|
@ -22,15 +22,23 @@
|
|||
<div id="element" class="form-group">
|
||||
<label class="col-sm-3 control-label">栏目类型:</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="first form-control" name="firstType" required>
|
||||
<option th:value="*{firstType}" selected>[[*{firstTypeStr}]]</option>
|
||||
<!-- <select class="first form-control" name="firstType" required>-->
|
||||
<!-- <option th:value="*{firstType}" selected>[[*{firstTypeStr}]]</option>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select class="form-control" name="firstType" id="firstType" th:onchange="handleFirst('')">
|
||||
<!-- <option th:value="*{firstType}" selected>[[*{firstTypeStr}]]</option>-->
|
||||
<option th:value="${item.v}" th:each="item : ${data}">[[${item.n}]]</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!-- <div class="form-group">-->
|
||||
<div class="col-sm-4">
|
||||
<select class="second form-control" name="newType" required>
|
||||
<option th:value="*{newType}" selected>[[*{newTypeStr}]]</option>
|
||||
<!-- <select class="second form-control" name="newType" required>-->
|
||||
<!-- <option th:value="*{newType}" selected>[[*{newTypeStr}]]</option>-->
|
||||
<!-- </select>-->
|
||||
<select class="form-control" name="newType" id="newType">
|
||||
<!-- <option th:value="*{newType}" selected>[[*{newTypeStr}]]</option>-->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -116,19 +124,13 @@
|
|||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<!-- <th:block th:include="include :: jquery-min-js" />-->
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<th:block th:include="include :: jquery-cxselect-js" />
|
||||
<!-- <th:block th:include="include :: jquery-cxselect-js" />-->
|
||||
|
||||
<script th:inline="javascript">
|
||||
var ndNew = [[${ndNew}]];
|
||||
// 直接返回获取
|
||||
var data = [[${data}]];
|
||||
$('#element').cxSelect({
|
||||
selects: ['first', 'second'],
|
||||
jsonValue: 'v',
|
||||
data: data
|
||||
});
|
||||
|
||||
var prefix = ctx + "back/news/news";
|
||||
$("#form-new-edit").validate({
|
||||
|
@ -141,6 +143,81 @@
|
|||
}
|
||||
}
|
||||
|
||||
async function handleFirst(newType){
|
||||
var record = document.getElementById("firstType").value;
|
||||
await $.ajax({
|
||||
type: "post",
|
||||
url: "/back/news/news/getNewType",
|
||||
data: {
|
||||
"id": record,
|
||||
"fragment":'fragment-tasklist'
|
||||
},
|
||||
success: function(data) {
|
||||
console.log('2222->',data);
|
||||
var rows = data.rows;
|
||||
var optionhtml = `<option value="">请选择</option>`;
|
||||
for(var i = 0; i < rows.length; i++) {
|
||||
optionhtml += `<option value="${rows[i].v}">${rows[i].n}</option>`;
|
||||
}
|
||||
document.getElementById("newType").innerHTML = optionhtml;
|
||||
if(newType){
|
||||
document.getElementById("newType").value = newType;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var ndNew = [[${ndNew}]];
|
||||
// 直接返回获取
|
||||
// var data = [[${data}]];
|
||||
// $('#element').cxSelect({
|
||||
// selects: ['first', 'second'],
|
||||
// jsonValue: 'v',
|
||||
// data: data
|
||||
// });
|
||||
document.getElementById("firstType").value =ndNew.firstType;
|
||||
handleFirst(ndNew.newType);
|
||||
|
||||
$('.summernote').each(function(i) {
|
||||
$('#' + this.id).summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
height: '300px',
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $("input[name='" + this.id + "']").val();
|
||||
$('#' + this.id).summernote('code', content);
|
||||
})
|
||||
|
||||
$("input[name='publishTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
|
@ -181,66 +258,29 @@
|
|||
$(this).fileinput('_initFileActions');
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$('.summernote').each(function(i) {
|
||||
$('#' + this.id).summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
height: '300px',
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $("input[name='" + this.id + "']").val();
|
||||
$('#' + this.id).summernote('code', content);
|
||||
})
|
||||
});
|
||||
|
||||
function handleRadioChange() {
|
||||
var radios = document.getElementsByName("type");
|
||||
for (var i = 0; i < radios.length; i++) {
|
||||
if (radios[i].checked) {
|
||||
if(radios[i].value == 1){
|
||||
$("#contentDiv").show();
|
||||
$("#linkUrlDiv").hide();
|
||||
}
|
||||
if(radios[i].value == 2){
|
||||
$("#contentDiv").hide();
|
||||
$("#linkUrlDiv").show();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
var radios = document.getElementsByName("type");
|
||||
for (var i = 0; i < radios.length; i++) {
|
||||
if (radios[i].checked) {
|
||||
if(radios[i].value == 1){
|
||||
$("#contentDiv").show();
|
||||
$("#linkUrlDiv").hide();
|
||||
}
|
||||
if(radios[i].value == 2){
|
||||
$("#contentDiv").hide();
|
||||
$("#linkUrlDiv").show();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleRadioChange();
|
||||
|
||||
</script>
|
||||
<!-- <script th:src="@{/ajax/libs/cxselect/jquery.cxselect.js}"></script>-->
|
||||
<script th:src="@{/ajax/libs/cxselect/jquery.cxselect.js}"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -5,213 +5,250 @@
|
|||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
<script th:src="@{/ajax/libs/cxselect/jquery.cxselect.js}"></script>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-new-edit" th:object="${ndNew}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-sm-3 control-label">状态:</label>-->
|
||||
<!-- <div class="col-sm-8">-->
|
||||
<!-- <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">-->
|
||||
<!-- <input type="radio" th:id="${'delFlag_' + dict.dictCode}" name="delFlag" th:value="${dict.dictValue}" th:checked="${dict.default}">-->
|
||||
<!-- <label th:for="${'delFlag_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div id="element" class="form-group">
|
||||
<label class="col-sm-3 control-label">栏目类型:</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="first form-control" name="firstType" required>
|
||||
<option th:value="*{firstType}" selected>[[*{firstTypeStr}]]</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!-- <div class="form-group">-->
|
||||
<div class="col-sm-4">
|
||||
<select class="second form-control" name="newType" required>
|
||||
<option th:value="*{newType}" selected>[[*{newTypeStr}]]</option>
|
||||
</select>
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-new-edit" th:object="${ndNew}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-sm-3 control-label">状态:</label>-->
|
||||
<!-- <div class="col-sm-8">-->
|
||||
<!-- <div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">-->
|
||||
<!-- <input type="radio" th:id="${'delFlag_' + dict.dictCode}" name="delFlag" th:value="${dict.dictValue}" th:checked="${dict.default}">-->
|
||||
<!-- <label th:for="${'delFlag_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div id="element" class="form-group">
|
||||
<label class="col-sm-3 control-label">栏目类型:</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="first form-control" name="firstType" required>
|
||||
<option th:value="*{firstType}" selected>[[*{firstTypeStr}]]</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!-- <div class="form-group">-->
|
||||
<div class="col-sm-4">
|
||||
<select class="second form-control" name="newType" required>
|
||||
<option th:value="*{newType}" selected>[[*{newTypeStr}]]</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">内容类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('news_content_type')}">
|
||||
<input type="radio" th:id="${'type_' + dict.dictCode}" name="type" th:value="${dict.dictValue}" th:field="*{type}" th:onchange="'javascript:handleRadioChange()'">
|
||||
<label th:for="${'type_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">内容类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('news_content_type')}">
|
||||
<input type="radio" th:id="${'type_' + dict.dictCode}" name="type" th:value="${dict.dictValue}" th:field="*{type}" th:onchange="'javascript:handleRadioChange()'">
|
||||
<label th:for="${'type_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">标题:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="title" th:field="*{title}" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">来源或作者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="sourceAuthor" th:field="*{sourceAuthor}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">发布时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="publishTime" th:value="${#dates.format(ndNew.publishTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contentDiv" class="form-group">
|
||||
<label class="col-sm-3 control-label">内容:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" class="form-control" th:field="*{content}">
|
||||
<div class="summernote" id="content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="linkUrlDiv" class="form-group">
|
||||
<label class="col-sm-3 control-label">超链接:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="linkUrl" type="url" class="form-control">[[*{linkUrl}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">缩略图:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="imagePath" th:field="*{imagePath}">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="imagePath" name="file" type="file" accept="image/*">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">标题:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="title" th:field="*{title}" class="form-control" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">附件:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="filePath" th:field="*{filePath}">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-uploadb" id="filePath" name="file" type="file" accept="*" multiple>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">来源或作者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="sourceAuthor" th:field="*{sourceAuthor}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">发布时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="publishTime" th:value="${#dates.format(ndNew.publishTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contentDiv" class="form-group">
|
||||
<label class="col-sm-3 control-label">内容:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" class="form-control" th:field="*{content}">
|
||||
<div class="summernote" id="content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="linkUrlDiv" class="form-group">
|
||||
<label class="col-sm-3 control-label">超链接:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="linkUrl" type="url" class="form-control">[[*{linkUrl}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">缩略图:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="imagePath" th:field="*{imagePath}">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="imagePath" name="file" type="file" accept="image/*">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<th:block th:include="include :: jquery-cxselect-js" />
|
||||
<script th:inline="javascript">
|
||||
</div>
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-sm-3 control-label">摘要:</label>-->
|
||||
<!-- <div class="col-sm-8">-->
|
||||
<!-- <textarea name="abstracts" class="form-control">[[*{abstracts}]]</textarea>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-sm-3 control-label">点击率:</label>-->
|
||||
<!-- <div class="col-sm-8">-->
|
||||
<!-- <input name="clickRate" th:field="*{clickRate}" type="number" class="form-control">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-sm-3 control-label">排序:</label>-->
|
||||
<!-- <div class="col-sm-8">-->
|
||||
<!-- <input name="sort" th:field="*{sort}" class="form-control" type="number">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<!-- <th:block th:include="include :: jquery-min-js" />-->
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<!-- <th:block th:include="include :: jquery-cxselect-js" />-->
|
||||
|
||||
<!--<script th:src="@{/ajax/libs/cxselect/jquery.cxselect.js}"></script>-->
|
||||
<script th:inline="javascript">
|
||||
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-new-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
var ndNew = [[${ndNew}]];
|
||||
// 直接返回获取
|
||||
var data = [[${data}]];
|
||||
$('#element').cxSelect({
|
||||
selects: ['first', 'second'],
|
||||
jsonValue: 'v',
|
||||
data: data
|
||||
});
|
||||
// 直接返回获取
|
||||
var data = [[${data}]];
|
||||
$('#element').cxSelect({
|
||||
selects: ['first', 'second'],
|
||||
jsonValue: 'v',
|
||||
data: data
|
||||
});
|
||||
|
||||
var prefix = ctx + "back/news/news";
|
||||
$("#form-new-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
var prefix = ctx + "back/news/news";
|
||||
$("#form-new-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-new-edit').serialize());
|
||||
}
|
||||
}
|
||||
$('.summernote').each(function(i) {
|
||||
$('#' + this.id).summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
height: '300px',
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $("input[name='" + this.id + "']").val();
|
||||
$('#' + this.id).summernote('code', content);
|
||||
})
|
||||
|
||||
$("input[name='publishTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
$("input[name='publishTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".file-upload").each(function (i) {
|
||||
var val = $("input[name='" + this.id + "']").val()
|
||||
$(this).fileinput({
|
||||
'uploadUrl': ctx + 'common/upload',
|
||||
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');
|
||||
});
|
||||
$(".file-upload").each(function (i) {
|
||||
var val = $("input[name='" + this.id + "']").val()
|
||||
$(this).fileinput({
|
||||
'uploadUrl': ctx + 'common/upload',
|
||||
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');
|
||||
});
|
||||
|
||||
$(".file-uploadb").each(function (i) {
|
||||
var val = $("input[name='" + this.id + "']").val()
|
||||
$(this).fileinput({
|
||||
'uploadUrl': ctx + 'common/upload',
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: [val],
|
||||
maxFileCount: 10,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
var inputaaa = $("input[name='" + event.currentTarget.id + "']").val();
|
||||
$("input[name='" + event.currentTarget.id + "']").val(inputaaa+"|"+data.response.url)
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
})
|
||||
$(this).fileinput('_initFileActions');
|
||||
});
|
||||
$(function() {
|
||||
$('.summernote').each(function(i) {
|
||||
$('#' + this.id).summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
height: '300px',
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $("input[name='" + this.id + "']").val();
|
||||
$('#' + this.id).summernote('code', content);
|
||||
})
|
||||
});
|
||||
|
||||
function handleRadioChange() {
|
||||
var radios = document.getElementsByName("type");
|
||||
for (var i = 0; i < radios.length; i++) {
|
||||
if (radios[i].checked) {
|
||||
if(radios[i].value == 1){
|
||||
$("#contentDiv").show();
|
||||
$("#linkUrlDiv").hide();
|
||||
}
|
||||
if(radios[i].value == 2){
|
||||
$("#contentDiv").hide();
|
||||
$("#linkUrlDiv").show();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$(".file-uploadb").each(function (i) {
|
||||
var val = $("input[name='" + this.id + "']").val()
|
||||
$(this).fileinput({
|
||||
'uploadUrl': ctx + 'common/upload',
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: [val],
|
||||
maxFileCount: 10,
|
||||
autoReplace: true
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
var inputaaa = $("input[name='" + event.currentTarget.id + "']").val();
|
||||
$("input[name='" + event.currentTarget.id + "']").val(inputaaa+"|"+data.response.url)
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
})
|
||||
$(this).fileinput('_initFileActions');
|
||||
});
|
||||
|
||||
handleRadioChange();
|
||||
});
|
||||
|
||||
</script>
|
||||
function handleRadioChange() {
|
||||
var radios = document.getElementsByName("type");
|
||||
for (var i = 0; i < radios.length; i++) {
|
||||
if (radios[i].checked) {
|
||||
if(radios[i].value == 1){
|
||||
$("#contentDiv").show();
|
||||
$("#linkUrlDiv").hide();
|
||||
}
|
||||
if(radios[i].value == 2){
|
||||
$("#contentDiv").hide();
|
||||
$("#linkUrlDiv").show();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleRadioChange();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -12,15 +12,14 @@
|
|||
<ul id="element">
|
||||
<li>
|
||||
<label>栏目类型:</label>
|
||||
<select class="first" name="firstType">
|
||||
<select name="firstType" id="firstType" th:onchange="handleFirst()">
|
||||
<option value="">所有</option>
|
||||
<!-- <option value="1" selected>首页</option>-->
|
||||
<option th:value="${item.v}" th:each="item : ${data}">[[${item.n}]]</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<select class="second" name="newType">
|
||||
<select name="newType" id="newType">
|
||||
<option value="">所有</option>
|
||||
<!-- <option value="10" selected>新闻动态</option>-->
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -81,7 +80,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: jquery-cxselect-js" />
|
||||
<!-- <script th:src="@{/js/jquery.min.js}"></script>-->
|
||||
<!-- <th:block th:include="include :: jquery-cxselect-js" />-->
|
||||
<!-- <script th:src="@{/ajax/libs/cxselect/jquery.cxselect.js}"></script>-->
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('news:news:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('news:news:remove')}]];
|
||||
|
@ -89,14 +90,28 @@
|
|||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
var contentType = [{dictValue:"1",dictLabel:"文本"},{dictValue:"2",dictLabel:"超链接"}];
|
||||
|
||||
function handleFirst(){
|
||||
var record = document.getElementById("firstType").value;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/back/news/news/getNewType",
|
||||
data: {
|
||||
"id": record,
|
||||
"fragment":'fragment-tasklist'
|
||||
},
|
||||
success: function(data) {
|
||||
console.log('2222->',data);
|
||||
var rows = data.rows;
|
||||
var optionhtml = `<option value="">所有</option>`;
|
||||
for(var i = 0; i < rows.length; i++) {
|
||||
optionhtml += `<option value="${rows[i].v}">${rows[i].n}</option>`;
|
||||
}
|
||||
document.getElementById("newType").innerHTML = optionhtml;
|
||||
}
|
||||
});
|
||||
}
|
||||
// 直接返回获取
|
||||
var data = [[${data}]];
|
||||
$('#element').cxSelect({
|
||||
selects: ['first', 'second'],
|
||||
jsonValue: 'v',
|
||||
data: data
|
||||
});
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
|
@ -167,6 +182,14 @@
|
|||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
|
||||
|
||||
// $('#element').cxSelect({
|
||||
// selects: ['first', 'second'],
|
||||
// jsonValue: 'v',
|
||||
// data: data
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
/* 用户管理-重置密码 */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<title>吉林省新农科长白山创新学院</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link href="../../static/portal/css/swiper.min.css" th:href="@{/portal/css/swiper.min.css}" rel="stylesheet" />
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<a href="https://www.jlau.edu.cn/" title="吉林省新农科长白山创新学院">
|
||||
<img class="logo-d" src="../../static/portal/images/logo2.png" th:src="@{/portal/images/logo2.png}"/>
|
||||
</a>
|
||||
<a href="/" class="zhongying" title="吉林省新农科长白山创新学院"><span>吉林省新农科长白山创新学院</span>
|
||||
<a href="/login" class="zhongying" title="吉林省新农科长白山创新学院"><span>吉林省新农科长白山创新学院</span>
|
||||
<!-- <span>Changbai Mountain Innovation College of Emerging Agricultural Education, jilin Province</span> -->
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<title>吉林省新农科长白山创新学院</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link href="../../static/portal/css/swiper.min.css" th:href="@{/portal/css/swiper.min.css}" rel="stylesheet" />
|
||||
|
@ -34,12 +34,12 @@
|
|||
<th:block th:include="portal/headerAndFooter :: header" />
|
||||
|
||||
<div class="oneping">
|
||||
<a href="/login">
|
||||
<a href="javascript:void(0);">
|
||||
<div class="xiaoxun">
|
||||
<!-- <img src="./static/images/xiaoxun.svg" alt=""> -->
|
||||
<span class="xxleft">
|
||||
<span class="hui">行知</span>
|
||||
合一·
|
||||
合一<span style="font-size:16px;">·</span>
|
||||
<span class="hui">自由</span>
|
||||
探求
|
||||
</span>
|
||||
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
<span class="xxright">
|
||||
<span class="hui">扎根</span>
|
||||
大地·
|
||||
大地<span style="font-size:16px;">·</span>
|
||||
<span class="hui">开放</span>
|
||||
交融
|
||||
</span>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<div class="swiper-slide slide bg-mask" th:each="item : ${xwdtList}" >
|
||||
<div class="pic">
|
||||
<a th:href="${item.type=='2'}?${item.linkUrl}:'/portal/details?id='+${item.id}" target="_blank" th:title="${item.title}" class="mark">
|
||||
<img th:src="${item.imagePath}" th:alt="${item.title}" style="max-width:875px;max-height:599px;" />
|
||||
<img th:src="${item.imagePath}" th:alt="${item.title}" />
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
|
@ -107,7 +107,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
<script th:inline="javascript">
|
||||
var slidenews = new Swiper('.slidenews', {
|
||||
resistanceRatio: 0,
|
||||
spaceBetween: 5,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<title>吉林省新农科长白山创新学院</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link href="../../static/portal/css/swiper.min.css" th:href="@{/portal/css/swiper.min.css}" rel="stylesheet" />
|
||||
|
@ -43,8 +43,8 @@
|
|||
<div class="crumbs">
|
||||
<img src="../../static/portal/images/shouye.png" th:src="@{/portal/images/shouye.png}" alt="" />
|
||||
<a href="/">首页 > </a>
|
||||
<a th:href="'/portal/list?newType='+${twoCode}" th:if="${twoCode!='-1'}">[[${twoName}]] > </a>
|
||||
<a th:href="'/portal/list?newType='+${threeCode}">[[${threeName}]]</a>
|
||||
<a>[[${twoName}]] > </a>
|
||||
<a>[[${threeName}]]</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -142,7 +142,7 @@
|
|||
let str = result.rows.reduce(function (prve, item) {
|
||||
prve += `
|
||||
<li class="clearfix">
|
||||
<a href="/portal/details?id=${item.id}" target="_blank" title="2023-2024秋 本科生第二次游泳集中测试通知" class="clearfix">
|
||||
<a href="/portal/details?id=${item.id}" target="_blank" class="clearfix">
|
||||
<div class="left txt">
|
||||
<div class="fnt_22 title">${item.title}</div>
|
||||
<div class="des">${item.abstracts}</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<title>吉林省新农科长白山创新学院</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link href="../../static/portal/css/swiper.min.css" th:href="@{/portal/css/swiper.min.css}" rel="stylesheet" />
|
||||
|
|
|
@ -689,6 +689,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
|||
Pattern p = Pattern.compile(regEx);
|
||||
Matcher m = p.matcher(html);
|
||||
String s = m.replaceAll("");
|
||||
s = s.replaceAll(" ","");
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -281,6 +281,7 @@ public class ShiroConfig
|
|||
// 对静态资源设置匿名访问
|
||||
filterChainDefinitionMap.put("/favicon.ico**", "anon");
|
||||
filterChainDefinitionMap.put("/ruoyi.png**", "anon");
|
||||
filterChainDefinitionMap.put("/Log_img.png**", "anon");
|
||||
filterChainDefinitionMap.put("/html/**", "anon");
|
||||
filterChainDefinitionMap.put("/css/**", "anon");
|
||||
filterChainDefinitionMap.put("/docs/**", "anon");
|
||||
|
|
|
@ -158,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<select id="getNewsTypes" parameterType="Long" resultType="com.ruoyi.common.core.domain.CxSelect">
|
||||
select id as v, name as n
|
||||
select id as v, name as n,id,name
|
||||
from nd_new_type
|
||||
where parent_id = #{parentId}
|
||||
order by sort
|
||||
|
|
Loading…
Reference in New Issue