first commit
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
|
||||
<div class="p-page">
|
||||
<form class="layui-form gg-form-bar border-t border-x" lay-filter="barsearchform">
|
||||
<div class="layui-input-inline" style="width:300px">
|
||||
<input type="text" name="keywords" placeholder="关键字" class="layui-input" autocomplete="off" />
|
||||
</div>
|
||||
<div class="layui-input-inline" style="width:150px">
|
||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="table-search"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
|
||||
<button type="reset" class="layui-btn layui-btn-reset" lay-filter="table-reset">清空</button>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="table_news" lay-filter="table_news"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<h3>公司新闻</h3>
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
<!-- /主体 -->
|
||||
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script>
|
||||
const moduleInit = ['tool','tablePlus'];
|
||||
function gouguInit() {
|
||||
var table = layui.tablePlus, tool = layui.tool;
|
||||
|
||||
layui.pageTable = table.render({
|
||||
elem: "#table_news"
|
||||
, toolbar: "#toolbarDemo"
|
||||
,url: "/oa/news/datalist"
|
||||
,page: true
|
||||
,limit: 20
|
||||
,cellMinWidth: 80
|
||||
,height: 'full-114'
|
||||
,cols: [[
|
||||
{field:'id',width:80, title: 'ID号', align:'center'}
|
||||
,{field:'title',title: '名称'}
|
||||
,{field:'admin_name',title: '创建人',width:90,align:'center'}
|
||||
,{field:'create_time', title: '创建时间',width:150,align:'center'}
|
||||
,{width:80,fixed:'right',title: '操作', align:'center',ignoreExport:true,templet: function(d){
|
||||
var btn='<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="view">详细</a>';
|
||||
return btn;
|
||||
}}
|
||||
]]
|
||||
});
|
||||
|
||||
table.on('tool(table_news)',function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||
var data = obj.data;
|
||||
if (obj.event === 'view') {
|
||||
tool.side("/oa/news/view?id="+data.id);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
@@ -0,0 +1,63 @@
|
||||
{extend name="../../base/view/common/base" /}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" href="{__GOUGU__}/third_party/prism/prism.css"/>
|
||||
<style>
|
||||
.text-detial-ops{line-height: 30px; color:#999; font-size: 12px; padding: 12px 0;}
|
||||
.text-detial-ops span{margin-right: 20px;}
|
||||
.text-detial-ops a{margin-right:10px;}
|
||||
.text-detial-content{padding: 8px 0; color:#333; word-break: break-all; border-top:1px solid #e8e8e8;font-size: 16px!important; line-height: 1.72!important;}
|
||||
.text-detial-content p{padding: 8px 0;}
|
||||
.text-detial-content img{max-width:98%!important; margin:0 auto; display:block; border: 1px solid #e6e6e6; -webkit-box-shadow: 0 2px 6px rgba(26,26,26,.08); box-shadow: 0 2px 6px rgba(26,26,26,.08); border-radius: 4px;}
|
||||
.text-detial-content h1,.text-detial-content h2,.text-detial-content h3,.text-detial-content h4,.text-detial-content h5{margin-top:10px;}
|
||||
.text-detial-content a{color:#186AF2; font-style:italic;}
|
||||
.text-detial-content a:hover{text-decoration:underline;}
|
||||
|
||||
.text-detial-content p code,.blog-detial-content pre{margin:0 3px;font-size: 14px; font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; background: #f6f6f6; padding: 10px; border-radius: 2px;}
|
||||
.text-detial-content p code{border: 1px solid #eee;padding: 2px 4px;}
|
||||
.text-detial-content table {border-collapse: collapse; border-spacing: 0; display: block; width: 100%; overflow: auto; word-break: normal;word-break: keep-all; margin-top: 0;margin-bottom: 16px;}
|
||||
.text-detial-content table tr {background-color: #fff;border-top: 1px solid #ccc;}
|
||||
.text-detial-content table tr:nth-child(2n) {background-color: #f8f8f8;}
|
||||
.text-detial-content table td, .blog-detial-content table th { padding: 6px 12px;border: 1px solid #ddd; font-size:14px; }
|
||||
.text-detial-content table th {font-weight: 800;}
|
||||
.text-detial-content li {list-style: initial;margin-left: 20px;}
|
||||
:not(pre)>code[class*=language-], pre[class*=language-]{background:#fff!important;border:1px solid #e8e8e8!important; border-radius:3px;}
|
||||
.upload-file{padding:12px; background-color:#fff; border:1px solid #eee; margin-bottom:12px;}
|
||||
.upload-file h3{margin-bottom:12px;}
|
||||
</style>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<form class="layui-form p-4">
|
||||
<h1>{$detail.title}</h1>
|
||||
<div class="text-detial-ops">
|
||||
<span>{$detail.admin_name}发表于:{$detail.create_time | date='Y-m-d H:i:s'}</span>
|
||||
</div>
|
||||
<div class="text-detial-content">
|
||||
{$detail.content|raw}
|
||||
</div>
|
||||
{notempty name="$detail.src"}
|
||||
<div class="py-3" style="font-size:16px;">
|
||||
关联链接:<a class="blue" href="{$detail.src}" target="_blank">{$detail.src}</a>
|
||||
</div>
|
||||
{/notempty}
|
||||
{notempty name="$detail.file_ids"}
|
||||
<div class="upload-file layui-row">
|
||||
<h3>相关附件</h3>
|
||||
{volist name="$detail.file_array" id="vo"}
|
||||
<div class="layui-col-md4" id="uploadFile{$vo.id}">{:file_card($vo,'view')}</div>
|
||||
{/volist}
|
||||
</div>
|
||||
{/notempty}
|
||||
</div>
|
||||
{/block}
|
||||
<!-- 脚本 -->
|
||||
{block name="script"}
|
||||
<script src="{__GOUGU__}/third_party/prism/prism.js"></script>
|
||||
<script>
|
||||
const moduleInit = ['tool'];
|
||||
function gouguInit() {
|
||||
var form = layui.form,tool=layui.tool;
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
<!-- /脚本 -->
|
||||
Reference in New Issue
Block a user