123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
- <head>
- <th:block th:include="include :: header('用户反馈')"/>
- </head>
- <body class="gray-bg">
- <div class="container-div">
- <div class="row">
- <div class="col-sm-12 search-collapse">
- <form id="role-form" >
- <div class="select-list">
- <ul>
- <li>
- 卿卿:<input type="text" name="erbanNo" placeholder=""/>
- </li>
- <li class="select-time">
- <label>创建时间: </label>
- <input type="text" class="time-input" id="beginDate" placeholder="开始时间" name="beginDate"/>
- <span>-</span>
- <input type="text" class="time-input" id="endDate" placeholder="结束时间" name="endDate"/>
- </li>
- <li>
- <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
- class="fa fa-search"></i> 搜索</a>
- <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
- class="fa fa-refresh"></i> 重置</a>
- </li>
- </ul>
- </div>
- </form>
- </div>
- <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
- <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
- </div>
- </div>
- </div>
- <th:block th:include="include :: footer"/>
- <script th:inline="javascript">
- var prefix = ctx + "system/feedback";
- $(function () {
- var today = new Date();
- today.setDate(today.getDate()-7)
- $("#beginDate").val(today.Format("yyyy-MM-dd"));
- $("#endDate").val(new Date().Format("yyyy-MM-dd"));
- var options = {
- url: prefix + "/list",
- modalName: "用户反馈",
- height: 600,
- columns: [
- {
- field: 'uid',
- title: '用户uid',
- align: 'center',
- },
- {
- field: 'erbanNo',
- title: '卿卿号'
- },
- {
- field: 'feedbackDesc',
- title: '反馈信息',
- align: 'center'
- },
- {
- field: 'imgUrl',
- title: '反馈截图',
- align : 'center',
- formatter:function (value,row,index) {
- if(typeof value == "undefined" || value == null || value == ""){
- return '-';
- }else{
- return "<img onclick='ShowFloatingImage(this, 400, 300);' src='" + value + "' width='70' height='60'>";
- }
- }
- },
- {
- field: 'contact',
- title: '摘要',
- align: 'center'
- },
- {
- field: 'createTime',
- title: '生成时间',
- align: 'center'
- }
- ]
- };
- $.table.init(options);
- });
- //3个参数 分别是图片对象,图片宽度,图片高度
- function ShowFloatingImage(image, width, height) {
- //这一部分是创建一个div,将图片放大成设定的width,height
- var id = "trailimageid";
- var newdiv = document.getElementById(id);
- if(newdiv == null) {
- newdiv = document.createElement('div');
- newdiv.setAttribute('id',id);
- //需要一个移出事件,将图片返回原来大小
- newdiv.setAttribute('onmouseout', "HideElement('"+id+"');");
- document.body.appendChild(newdiv);
- }
- newdiv.innerHTML = '<img src='+image.src+ ' width='+(image.width + width) + ' height=' + (image.height + height) + ' />';
- //获取图片位置,调整图片位置样式
- var absPos = GetAbsPosition(image);
- newdiv.style.position = "absolute";
- newdiv.style.left =absPos[0] - width/2+'px';
- newdiv.style.top = absPos[1] - height/2+'px';
- newdiv.style.display="block";
- }
- //获取图片在表格中位置
- function GetAbsPosition(obj) {
- var curleft = 0, curtop = 0;
- do {
- curleft += obj.offsetLeft;
- curtop += obj.offsetTop;
- } while (obj = obj.offsetParent);
- return [curleft,curtop];
- }
- //隐藏div
- function HideElement(id) {
- var elem = document.getElementById(id);
- elem.style.display="none";
- }
- Date.prototype.Format = function (fmt) { //author: meizz
- var o = {
- "M+": this.getMonth() + 1, //月份
- "d+": this.getDate(), //日
- "H+": this.getHours(), //小时
- "m+": this.getMinutes(), //分
- "s+": this.getSeconds(), //秒
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
- "S": this.getMilliseconds() //毫秒
- };
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
- for (var k in o)
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
- return fmt;
- };
- </script>
- </body>
- </html>
|