first commit

This commit is contained in:
2025-02-20 14:58:55 +08:00
parent 687bda5ead
commit d7be84fac6
1158 changed files with 127232 additions and 0 deletions
@@ -0,0 +1,53 @@
${request.getValidateScript()}
${zhiqim_manager_history ("noticeList.htm")}
${zhiqim_manager_breadcrumb_parent ("noticeAdd.htm", "公告内容", "增加公告")}
${zhiqim_manager_content()}
<form name="theForm" action="noticeAddInfo.htm" method="post" onsubmit="return validateForm(this);" data-role="z-call-frame">
<table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white">
<tr class="zi-h40 z-bg-gray z-bold">
<td colspan="2">增加公告</td>
</tr>
<tr>
<td>是否发布:<span class="z-color-999">(请选择)</span></td>
<td>
<span style="margin-left:30px">保存草稿:</span><input name="status" type="radio" data-class="${zmr_color_class}" value="0" style="margin-right:50px"/>
<span>立即发布:</span><input name="status" type="radio" checked data-class="${zmr_color_class}" value="1"/>
</td>
</tr>
<tr>
<td>公告标题:<span class="z-color-999">32位不定长字符)</span></td>
<td><input name="title" class="z-input z-w300 ${zmr_color_class}" maxlength="32"><span class="z-color-red">&nbsp;*</span></td>
</tr>
<tr>
<td colspan="2">
<div class="z-mg-t20">公告内容:<span class="z-color-999">(不能超过50000个字符)</span><span class="z-color-red">&nbsp;*</span></div>
<div class="z-pd-t20 z-pd-b20" style="margin-top:20px">
<textarea id="content" name="content" class="z-textarea ckeditor z-w100p ${zmr_color_class}" rows="15" size="30" maxlength="50000"></textarea>
</div>
</td>
</tr>
</table>
${zhiqim_manager_submit()}
</form>
${zhiqim_manager_content_end()}
<!--
<script charset="utz-8" src="/inc/ckeditor/ckeditor.js"></script>
-->
<link rel="stylesheet" type="text/css" href="/zres/zteditor/zteditor.css">
<script type="text/javascript" src="/zres/zteditor/zteditor.js"></script>
<script>
//CKEDITOR.replace("articleContent");
Z.onload(function()
{
var editor = new Z.ZhiqimEditor();
editor.setId("content");
editor.execute();
});
function validateForm2(form)
{
Z("#content").val(CKEDITOR.instances.articleContent.getData());
return validateForm(form);
}
</script>
@@ -0,0 +1,41 @@
${zhiqim_manager_breadcrumb("公告列表")}
${zhiqim_manager_content()}
${sweet_alert_reuse_method()}
<#-- 列表 -->
<table class="z-table z-bordered z-mg-t20 z-pd10 z-bg-white z-lh150p z-text-center">
<tr class="z-h40" bgcolor="${zmr_thead_bgcolor}">
<td width="25%">公告标题</td>
<td width="*">公告内容</td>
<td width="15%">发布人</td>
<td width="15%">发布时间</td>
</tr>
<#for item : result.list()>
<tr class="z-h60" bgcolor="${zhiqim_manager_tr_bg(item_index)}">
<td>#{item.getTitle()}</td>
<td><a href="javascript:void(0);" style="color:green"><span onclick="findInfo(${item.getId()})">点击查看</span></a></td>
<td>#{item.getFinshUser()}</td>
<td>#{Sqls.toDateTimeString(item.getFinshTime())}</td>
</tr>
</#for>
${zhiqim_manager_tr_no_record(result, 10, "暂时没有公告")}
</table>
<table class="z-table z-bordered zi-bd-t-none z-bg-white">
<tr class="z-h50">
<td><div class="z-float-right z-mg-r10">${PagingGo.toHtmlLink(result)}</div></td>
</tr>
</table>
${zhiqim_manager_content_end()}
<script>
function findInfo(id){
var dialog = new Z.Dialog();
dialog.title = "公告详情";
dialog.url = "/noticeInfo.htm?id="+id;
dialog.width = 1000;
dialog.height = 746;
dialog.position=4
dialog.execute();
}
</script>
@@ -0,0 +1,58 @@
<div class=" intro_text" style="margin-left: auto;margin-right: auto;">
<div class="header">
<h1 id="title" style="text-align:center"></h1>
<span id="updateTime" style="text-align:center;display:block;"></span>
</div>
<div class="content">
<p id="p1"></p>
</div>
</div>
<style>
.intro_text {
width: 100%;
}
.intro_text .header {
font-size: 18px;
line-height: 18px;
padding: 1px 20px 1px 20px;
}
.intro_text .content {
font-size: 16px;
padding: 40px 50px;
}
.container{ min-height:743px;
background:#fff;
}
</style>
<script>
Z.onload(function(){
var id='${id}';
var ajax = new Z.Ajax();
ajax.setClassName("DesignerNoticePresenter");
ajax.setMethodName("getNoticeInfo");
ajax.addParam(id);
ajax.setFailureAlert();
ajax.setSuccess(function(res){
var data = eval('('+res+')');
Z("#title").html(data.title);
if(data.finshTime){
Z("#updateTime").html(timestampToTime(data.finshTime));
}
Z("#p1").html(data.content);
});
ajax.execute();
})
function timestampToTime(timestamp) {
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
Y = date.getFullYear() + '-';
M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
D = (date.getDate()< 10 ? '0'+(date.getDate()) : date.getDate()) + ' ';
h = (date.getHours()< 10 ? '0'+(date.getHours()) : date.getHours()) + ':';
m = (date.getMinutes() < 10 ? '0'+(date.getMinutes()) : date.getMinutes()) + ':';
s = (date.getSeconds() < 10 ? '0'+(date.getSeconds()) : date.getSeconds());
return Y+M+D+h+m+s;
}
</script>
@@ -0,0 +1,120 @@
${zhiqim_manager_content()}
<#-- 导航 -->
<div data-role="z-tabnav" class="z-tabnav-main z-mg-b20 ${zmr_color_class}">
<nav>
<ul>
<li class="z-active">公告管理</li>
</ul>
<div class="z-float-left z-mg10">
<form name="theForm" method="post">
<input name="title" class="z-float-left z-input z-w300 zi-bd-r-none" value="${title}" maxlength="64" placeholder="公告标题">
<select name="status" class="z-float-left z-select z-mg-r-1 zi-bd-r-none" data-role="z-select" data-class="${zmr_color_class}">
<option value="">全部公告状态</option>
<option value="0" <#if status=="0">selected</#if>>草稿</option>
<option value="1" <#if status=="1">selected</#if>>已发布</option>
<option value="2" <#if status=="2">selected</#if>>已下线</option>
</select>
<button class="z-float-left z-button z-w80 zi-bd-rd0 ${zmr_color_class}"><i class="z-font z-query"></i>查询</button>
</form>
</div>
<div class="z-text-right z-mg-t10 z-mg-r5">
<button class="z-button ${zmr_color_class}" onclick="Z.L.href('noticeAdd.htm');"><i class="z-font z-add"></i>增加公告</button>
</div>
</nav>
</div>
<#-- 列表 -->
<table class="z-table z-bordered z-h40-tr z-pd6 z-bg-white z-text-center">
<tr bgcolor="${zmr_thead_bgcolor}">
<td width="50">选择</td>
<td width="10%">公告状态</td>
<td width="*">文章标题</td>
<td width="10%">创建人</td>
<td width="10%">创建时间</td>
<td width="10%">发布人</td>
<td width="10%">发布时间</td>
<td width="10%">操作</td>
</tr>
${zhiqim_manager_tr_no_record(noticeList, 5, "暂时没有公告信息")}
<#for item :noticeList.list()>
<tr class="z-h40 z-pointer" ${zhiqim_manager_tr_onmouse()} ${zhiqim_manager_tr_click_radio()}>
<td><input name="noticeId" type="radio" data-role="z-radio" data-class="${zmr_color_class}" value="${item.getId()}"></td>
<td>
<#if item.getStatus()==0><span style="color:violet">草稿</span></#if>
<#if item.getStatus()==1><span style="color:green">已发布</span></#if>
<#if item.getStatus()==2><span style="color:red">已下线</span></#if>
</td>
<td><a title="点击查看详情" href="javascript:getInfo('${item.getId()}');">${item.getTitle()}</a></td>
<td>${item.getAddUser()}</td>
<td>
${Sqls.toDateTimeString(item.getAddTime())}
</td>
<td>${item.getFinshUser()}</td>
<td>${Sqls.toDateTimeString(item.getFinshTime())}</td>
<td>
<#if item.getStatus()==0>
<button class="z-button ${zmr_color_class}" onclick="doModify('${item.getId()}')"><i class="z-font z-modify"></i>修改</button>
<button class="z-button z-green" onclick="doEnable('${item.getId()}');"><i class="z-font z-open"></i>发布</button>
</#if>
<#if item.getStatus()==1>
<button class="z-button z-red" onclick="doBlockUp('${item.getId()}')"><i class="z-font z-close"></i>下线</button>
</#if>
<!--
<#if item.getStatus()==2>
<button class="z-button z-green" onclick="doEnable('${item.getId()}');"><i class="z-font z-open"></i>发布</button>
</#if>
//-->
</td>
</tr>
</#for>
</table>
${zhiqim_manager_paging(noticeList, "noticeList.htm")}
<script>
function doEnable(id){
Z.confirm("您确定要启用该公告吗",function(){
var ajax = new Z.Ajax();
ajax.setClassName("DesignerNoticePresenter");
ajax.setMethodName("doEnable");
ajax.addParam(id);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("操作成功",function(){
parent.location.reload();
parent.Z.Dialog.close();
});
});
ajax.execute();
});
}
function doBlockUp(id){
Z.confirm("您确定要下线该公告吗",function(){
var ajax = new Z.Ajax();
ajax.setClassName("DesignerNoticePresenter");
ajax.setMethodName("doBlockUp");
ajax.addParam(id);
ajax.setFailureAlert();
ajax.setSuccess(function(){
Z.success("操作成功",function(){
parent.location.reload();
parent.Z.Dialog.close();
});
});
ajax.execute();
});
}
function doModify(id){
window.location.href="/noticeModify.htm?noticeId="+id;
}
function getInfo(id){
var dialog = new Z.Dialog();
dialog.title = "公告详情";
dialog.url = "/noticeInfo.htm?id="+id;
dialog.width = 1000;
dialog.height = 746;
dialog.execute();
}
</script>
@@ -0,0 +1,48 @@
${request.getValidateScript()}
${zhiqim_manager_history ("noticeList.htm")}
${zhiqim_manager_breadcrumb_parent ("noticeModify.htm", "公告内容", "修改公告")}
${zhiqim_manager_content()}
<form name="theForm" action="noticeUpdate.htm" method="post" onsubmit="return validateForm(this);" data-role="z-call-frame">
<input name="noticeId" type="hidden" value="${notice.getId()}">
<table class="z-table z-bordered z-h50-tr z-pd10 z-bg-white">
<tr class="zi-h40 z-bg-gray z-bold">
<td colspan="2">修改公告</td>
</tr>
<tr>
<td>是否发布:<span class="z-color-999">(请选择)</span></td>
<td>
<span style="margin-left:30px">保存草稿:</span><input name="status" type="radio" data-class="${zmr_color_class}" value="0" style="margin-right:50px"/>
<span>立即发布:</span><input name="status" type="radio" checked data-class="${zmr_color_class}" value="1"/>
</td>
</tr>
<tr>
<td>公告标题:<span class="z-color-999">32位不定长字符)</span></td>
<td><input name="title" class="z-input z-w300 ${zmr_color_class}" maxlength="32" value="${notice.getTitle()}"><span class="z-color-red">&nbsp;*</span></td>
</tr>
<tr>
<td colspan="2">
<div class="z-mg-t20">公告内容:<span class="z-color-999">(不能超过50000个字符)</span><span class="z-color-red">&nbsp;*</span></div>
<div class="z-pd-t20 z-pd-b20" style="margin-top:20px">
<textarea id="content" name="content" class="z-textarea ckeditor z-w100p ${zmr_color_class}" rows="15" size="30" maxlength="50000">${notice.getContent()}</textarea>
</div>
</td>
</tr>
</table>
${zhiqim_manager_submit()}
</form>
${zhiqim_manager_content_end()}
<!--
<script charset="utz-8" src="/inc/ckeditor/ckeditor.js"></script>
-->
<link rel="stylesheet" type="text/css" href="/zres/zteditor/zteditor.css">
<script type="text/javascript" src="/zres/zteditor/zteditor.js"></script>
<script>
//CKEDITOR.replace("articleContent");
Z.onload(function()
{
var editor = new Z.ZhiqimEditor();
editor.setId("content");
editor.execute();
});
</script>