123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <title>预案详情</title>
- <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
- <link rel="stylesheet" href="../../../assets/module/inputTags.css"/>
- <link rel="stylesheet" href="../../../assets/module/admin.css?v=312"/>
- <link rel="stylesheet" href="../../../assets/module/formSelects/formSelects-v4.css"/>
- <style>
- .time-box {
- overflow: hidden;
- padding: 0px 30px;
- padding-top: 20px;
- }
- .time1 {
- float: left;
- margin-right: 50px;
- }
- .fu {
- display: inline-block;
- font-size: 16px;
- color: #fff;
- margin-bottom: 10px;
- margin-top: 10px;
- padding: 10px 20px;
- background: #3a98ff;
- }
- .line {
- margin-top: -10px;
- border-bottom: 2px solid #3a98ff;
- margin-bottom: 25px;
- }
- </style>
- </head>
- <body>
- <!-- 页面加载loading -->
- <div class="page-loading">
- <div class="ball-loader">
- <span></span><span></span><span></span><span></span>
- </div>
- </div>
- <!-- 正文开始 -->
- <div class="layui-row" style="margin-top: 10px;background: white">
- <div style="width:93%;margin:0 auto;padding-bottom: 5px;word-wrap:break-word; overflow:hidden;">
- <div style="padding-top: 20px;text-align: right;">
- <button class="layui-btn icon-btn" onclick="history.back()">返 回</button>
- </div>
- <fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
- <legend id="postTitle"></legend>
- <div class="layui-field-box">
- <div class="time-box">
- <h4><span class="time1" id="postAuthor">发布人:</span></h4>
- <h4><span class="time1" id="createdTime">时间:</span></h4>
- </div>
- <hr class="layui-bg-gray">
- <blockquote class="layui-elem-quote layui-quote-nm" id="postContent">
- </blockquote>
- </div>
- </fieldset>
- <!--<hr class="layui-bg-gray">-->
- </blockquote>
- <div style="margin-bottom: 30px;">
- <!-- 缩略图Div -->
- <div id="postPicUrlDiv" style="display: none">
- <span class="fu">缩略图:</span>
- <div class="line"></div>
- <p>
- <a target="_blank" id="postPicUrlA">
- <img style="width: 230px;height: 200px;" id="postPicUrlImg" src="">
- </a>
- </p>
- </div>
- <span class="fu">附件</span>
- <div class="line"></div>
- <p style="color: indianred;">
- 温馨提示:图片可直接点击查看大图,文件可点击下载
- </p>
- <div id="attachmentDiv" style="display: none">
- </div>
- </div>
- </div>
- </div>
- <!-- js部分 -->
- <script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
- <script type="text/javascript" src="../../../assets/js/common.js?v=312"></script>
- <script type="text/javascript" src="../../../assets/libs/jquery/jquery-3.2.1.min.js"></script>
- <script type="text/javascript" src="../../../assets/module/inputTags.js"></script>
- <script src="../../../assets/libs/wangEditor/wangEditor.js"></script>
- <script>
- var typePage = '';
- layui.use(['layer', 'form', 'table', 'admin', 'zTree', 'uParas', 'upload', 'inputTags', 'formSelects'], function () {
- var $ = layui.jquery;
- var layer = layui.layer;
- var admin = layui.admin;
- var uParas = layui.uParas;
- var postId = uParas.getUrlParam("postId");
- typePage = uParas.getUrlParam("type");
- admin.req(uParas.baseUrl + '/ent/post/get/' + postId, {}, function (resp) {
- if (resp.code == 1) {
- var post = resp.data.post;
- // 填充数据
- $("#postTitle").text(post.postTitle);
- $("#postAuthor").text("发布人:" + post.postAuthor);
- $("#createdTime").text("时间:" + post.createdTime);
- $("#postContent").html(post.postContent);
- if (post.postPicUrl && post.postPicUrl != '') {
- $("#postPicUrlImg").attr("src", post.postPicUrl);
- $("#postPicUrlA").attr("href", post.postPicUrl);
- $("#postPicUrlDiv").show();
- }
- //附件初始化
- var attachList = resp.data.attachList;
- if (attachList && attachList.length > 0) {
- for (var i = 0; i < attachList.length; i++) {
- fileHtml(attachList[i].extName, attachList[i].savePath, attachList[i].attName)
- }
- $("#attachmentDiv").show();
- }
- } else {
- layer.msg(resp.msg)
- }
- }, 'GET');
- function fileHtml(ext, path, oriFileName) {
- //文件信息置入隐藏域
- var html = '<p style="padding-top: 5px;">';
- html += ' <a target="_blank" href="' + path + '" style="color: #5b9bd1" download="' + oriFileName + '">';
- html += oriFileName;
- html += '</a></p>';
- $("#attachmentDiv").append(html);
- }
- });
- //删除附件
- function deleteFile(obj) {
- var pDiv = $(obj).parent();
- pDiv.remove();
- }
- </script>
- </body>
- </html>
|