郑许地铁

IndexCenter.cshtml 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>管理首页</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <link href="/Content/layui/css/layui.css" rel="stylesheet" />
  7. <link href="/Content/css/public.css" rel="stylesheet" />
  8. <link href="/Content/css/callscreen/callscreen.css" rel="stylesheet" />
  9. <link href="/Content/layui/css/modules/layui-icon-extend/iconfont.css" type="text/css" rel=" stylesheet" />
  10. <link href="/Content/css/font-awesome/css/font-awesome.min.css" type="text/css" rel=" stylesheet" />
  11. <script src="/Content/js/jquery-1.8.3.min.js"></script>
  12. <script src="/Content/js/ZXDT.http.js"></script>
  13. <style type="text/css">
  14. #tip1 {
  15. background-color: #fff;
  16. position: absolute;
  17. font-size: 12px;
  18. left: 25px;
  19. top: -100px;
  20. border-radius: 3px;
  21. border: 1px solid #ccc;
  22. line-height: 80px;
  23. height: 80px;
  24. width: 200px;
  25. vertical-align: top;
  26. display: none;
  27. }
  28. #tipPlus {
  29. position: absolute;
  30. font-size: 12px;
  31. left: 10px;
  32. top: 10px;
  33. line-height: 36px;
  34. height: 36px;
  35. width: 36px;
  36. vertical-align: middle;
  37. }
  38. #tipMinus {
  39. position: absolute;
  40. font-size: 12px;
  41. right: 0px;
  42. top: 10px;
  43. line-height: 36px;
  44. height: 36px;
  45. width: 26px;
  46. vertical-align: middle;
  47. }
  48. </style>
  49. <script type="text/javascript">
  50. function ClosePlus() {
  51. document.getElementById("tip1").style.display = "none";
  52. }
  53. function ShowPlus() {
  54. document.getElementById("tip1").style.display = "block";
  55. }
  56. /**
  57. * 获取本周、本季度、本月、上月的开始日期、结束日期
  58. */
  59. var now = new Date(); //当前日期
  60. var nowDayOfWeek = now.getDay(); //今天本周的第几天
  61. var nowDay = now.getDate(); //当前日
  62. var nowMonth = now.getMonth(); //当前月
  63. var nowYear = now.getYear(); //当前年
  64. nowYear += (nowYear < 2000) ? 1900 : 0; //
  65. var lastMonthDate = new Date(); //上月日期
  66. lastMonthDate.setDate(1);
  67. lastMonthDate.setMonth(lastMonthDate.getMonth() - 1);
  68. var lastYear = lastMonthDate.getYear();
  69. var lastMonth = lastMonthDate.getMonth();
  70. //格式化日期:yyyy-MM-dd
  71. function formatDate(date) {
  72. var myyear = date.getFullYear();
  73. var mymonth = date.getMonth() + 1;
  74. var myweekday = date.getDate();
  75. if (mymonth < 10) {
  76. mymonth = "0" + mymonth;
  77. }
  78. if (myweekday < 10) {
  79. myweekday = "0" + myweekday;
  80. }
  81. return (myyear + "-" + mymonth + "-" + myweekday);
  82. }
  83. //获得某月的天数
  84. function getMonthDays(myMonth) {
  85. var monthStartDate = new Date(nowYear, myMonth, 1);
  86. var monthEndDate = new Date(nowYear, myMonth + 1, 1);
  87. var days = (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24);
  88. return days;
  89. }
  90. //获得本季度的开始月份
  91. function getQuarterStartMonth() {
  92. var quarterStartMonth = 0;
  93. if (nowMonth < 3) {
  94. quarterStartMonth = 0;
  95. }
  96. if (2 < nowMonth && nowMonth < 6) {
  97. quarterStartMonth = 3;
  98. }
  99. if (5 < nowMonth && nowMonth < 9) {
  100. quarterStartMonth = 6;
  101. }
  102. if (nowMonth > 8) {
  103. quarterStartMonth = 9;
  104. }
  105. return quarterStartMonth;
  106. }
  107. //获得本周的开始日期
  108. function getWeekStartDate() {
  109. var weekStartDate = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek-2);
  110. return formatDate(weekStartDate);
  111. }
  112. //获得本周的结束日期
  113. function getWeekEndDate() {
  114. var weekEndDate = new Date(nowYear, nowMonth, nowDay + (4 - nowDayOfWeek));
  115. return formatDate(weekEndDate);
  116. }
  117. //获得本月的开始日期
  118. function getMonthStartDate() {
  119. var monthStartDate = new Date(nowYear, nowMonth, 1);
  120. return formatDate(monthStartDate);
  121. }
  122. //获得本月的结束日期
  123. function getMonthEndDate() {
  124. var monthEndDate = new Date(nowYear, nowMonth, getMonthDays(nowMonth));
  125. return formatDate(monthEndDate);
  126. }
  127. //获得上月开始时间
  128. function getLastMonthStartDate() {
  129. var lastMonthStartDate = new Date(nowYear, lastMonth, 1);
  130. return formatDate(lastMonthStartDate);
  131. }
  132. //获得上月结束时间
  133. function getLastMonthEndDate() {
  134. var lastMonthEndDate = new Date(nowYear, lastMonth, getMonthDays(lastMonth));
  135. return formatDate(lastMonthEndDate);
  136. }
  137. //获得本季度的开始日期
  138. function getQuarterStartDate() {
  139. var quarterStartDate = new Date(nowYear, getQuarterStartMonth(), 1);
  140. return formatDate(quarterStartDate);
  141. }
  142. //或的本季度的结束日期
  143. function getQuarterEndDate() {
  144. var quarterEndMonth = getQuarterStartMonth() + 2;
  145. var quarterStartDate = new Date(nowYear, quarterEndMonth, getMonthDays(quarterEndMonth));
  146. return formatDate(quarterStartDate);
  147. }
  148. function BindChart(type) {
  149. $('#btnday').attr('class', 'layui-btn layui-btn-primary');
  150. $('#btnweek').attr('class', 'layui-btn layui-btn-primary');
  151. $('#btnmonth').attr('class', 'layui-btn layui-btn-primary');
  152. $('#btnyear').attr('class', 'layui-btn layui-btn-primary');
  153. var strdate = "~";
  154. switch (type) {
  155. case 1:
  156. $('#btnday').attr('class', 'layui-btn layui-btn-normal');
  157. strdate = formatDate(now) + ' 00:00:00' + ' ~ ' + formatDate(now) + ' 23:59:59';
  158. $('#txtdate').val(strdate);
  159. break;
  160. case 2:
  161. $('#btnweek').attr('class', 'layui-btn layui-btn-normal');
  162. strdate = getWeekStartDate() + ' 00:00:00' + ' ~ ' + getWeekEndDate() + ' 23:59:59';
  163. $('#txtdate').val(strdate);
  164. break;
  165. case 3:
  166. $('#btnmonth').attr('class', 'layui-btn layui-btn-normal');
  167. strdate = getMonthStartDate() + ' 00:00:00' + ' ~ ' + getMonthEndDate() + ' 23:59:59';
  168. $('#txtdate').val(strdate);
  169. break;
  170. case 4:
  171. $('#btnyear').attr('class', 'layui-btn layui-btn-normal');
  172. strdate = nowYear + '-01-01' + ' 00:00:00' + ' ~ ' + formatDate(now) + ' 23:59:59';
  173. $('#txtdate').val(strdate);
  174. break;
  175. }
  176. SearchData(type);
  177. }
  178. function SearchData(type) {
  179. var timeno = new Date().getTime();
  180. var strdate = $('#txtdate').val();
  181. var startdate = strdate.split('~')[0];
  182. var enddate = strdate.split('~')[1];
  183. strdate = startdate.trim() + '~' + enddate.trim();
  184. //document.getElementById("framereport1").src = "/Report/IndexCenterCallPre/?timeno=" + timeno + "&type=" + type + "&strdate=" + strdate;
  185. //document.getElementById("framereport2").src = "/Report/IndexCenterWorkOrderPre/?timeno=" + timeno + "&type=" + type + "&strdate=" + strdate;
  186. document.getElementById("framereport3").src = "/Report/IndexCenterWorkOrderTimeBar/?timeno=" + timeno + "&type=" + type + "&strdate=" + strdate;
  187. }
  188. </script>
  189. </head>
  190. <body class="childrenBody">
  191. <blockquote class="layui-elem-quote layui-text" style="font-size: larger; display: none;">
  192. 管理首页
  193. </blockquote>
  194. <input type="hidden" id="DeptId" value="@Model.UserAccountModel.F_DeptId">
  195. <div class="layui-fluid">
  196. <div class="layui-row layui-col-space15">
  197. <div class="layui-col-md4">
  198. <form class="layui-form layui-card">
  199. <div class="layui-card-header">
  200. <i class="fa fa-user-circle-o" style="color:#395E67;"></i>&nbsp;&nbsp;用户信息
  201. </div>
  202. <div class="layui-card-body">
  203. <div class="layui-row layui-col-space15">
  204. <div class="layui-col-md12">
  205. <label class="layui-form-label">
  206. 姓名:
  207. </label><label class="layui-form-label" style=" text-align:left;">
  208. @Model.UserAccountModel.F_UserName
  209. </label>
  210. </div>
  211. <div class="layui-col-md12">
  212. <label class="layui-form-label">
  213. 工号:
  214. </label>
  215. <label class="layui-form-label" id="UserCode" data-index="@Model.UserAccountModel.F_UserCode" style=" text-align:left;">
  216. @Model.UserAccountModel.F_UserCode
  217. </label>
  218. </div>
  219. <div class="layui-col-md12">
  220. <label class="layui-form-label">
  221. 角色:
  222. </label>
  223. <label class="layui-form-label" style=" text-align:left;">
  224. @Model.RoleName
  225. </label>
  226. </div>
  227. <div class="layui-col-md12">
  228. <label class="layui-form-label">
  229. 分机:
  230. </label>
  231. @if (Model.UserAccountModel.F_ExtensionNumber!="0")
  232. {
  233. <label class="layui-form-label" style=" text-align:left;">@Model.UserAccountModel.F_ExtensionNumber</label>
  234. } else {
  235. <label class="layui-form-label" style=" text-align:left;"></label>
  236. }
  237. </div>
  238. </div>
  239. </div>
  240. </form>
  241. <div class="layui-card layui-form" lay-filter="component-form-element">
  242. <div class="layui-card-header">
  243. <i class="fa fa-bell" style="color:red;"></i>&nbsp;&nbsp;提醒事项
  244. </div>
  245. <div class="layui-card-body layui-row layui-col-space10">
  246. <div class="layui-col-md12" id="notices" style="overflow:scroll;height:260px;">
  247. <ul class="layui-timeline" id="notice" style="display:none;">
  248. <li class="layui-timeline-item">
  249. <i class="layui-icon layui-timeline-axis" style="color:red;">&#xe617;</i>
  250. <div class="layui-timeline-content layui-text">
  251. <div class="layui-timeline-title">回访客户[张三] 电话13984983983</div>
  252. </div>
  253. </li>
  254. <li class="layui-timeline-item">
  255. <i class="layui-icon layui-timeline-axis" style="color:green;">&#xe617;</i>
  256. <div class="layui-timeline-content layui-text">
  257. <div class="layui-timeline-title">处理工单 工单编号[TS1849381023]</div>
  258. </div>
  259. </li>
  260. <li class="layui-timeline-item">
  261. <i class="layui-icon layui-timeline-axis" style="color:yellow;">&#xe617;</i>
  262. <div class="layui-timeline-content layui-text">
  263. <div class="layui-timeline-title">下午12:30通知开会</div>
  264. </div>
  265. </li>
  266. </ul>
  267. </div>
  268. <div class="layui-col-md12" style="height:38px;display:none;" >
  269. <div id="tipPlus">
  270. <i class="fa fa-plus-circle fa-lg" onmouseover="ShowPlus();" style="color:green; cursor:pointer;"></i>
  271. </div>
  272. <div id="tipMinus">
  273. <i class="fa fa-minus-circle fa-lg" onmouseover="ClosePlus();" style="color:red; cursor:pointer;"></i>
  274. </div>
  275. <div id="tip1">
  276. <ul class="layui-nav layui-nav-tree" lay-filter="test">
  277. <li class="layui-nav-item">
  278. <a href="javascript:;"><i class="layui-icon" style="color:red;">&#xe617;</i>&nbsp;&nbsp;特别关注客户</a>
  279. </li>
  280. <li class="layui-nav-item">
  281. <a href="javascript:;"><i class="layui-icon" style="color:green;">&#xe617;</i>&nbsp;&nbsp;重点关注工单</a>
  282. </li>
  283. <li class="layui-nav-item"><a href="javascript:;"><i class="layui-icon" style="color:yellow;">&#xe617;</i>&nbsp;&nbsp;重要事项</a></li>
  284. </ul>
  285. </div>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. <div class="layui-col-md8">
  291. <div class="layui-card">
  292. <div class="layui-card-header">
  293. <div style="float:left;">
  294. <div class="layui-btn-group">
  295. <button id="btnday" onclick="BindChart(1);" class="layui-btn layui-btn-normal"><i class="fa fa-calendar-minus-o"></i>&nbsp;&nbsp;当天</button>
  296. <button id="btnweek" onclick="BindChart(2);" class="layui-btn layui-btn-primary"><i class="fa fa-calendar-o"></i>&nbsp;&nbsp;本周</button>
  297. <button id="btnmonth" onclick="BindChart(3);" class="layui-btn layui-btn-primary"><i class="fa fa-calendar"></i>&nbsp;&nbsp;本月</button>
  298. <button id="btnyear" onclick="BindChart(4);" class="layui-btn layui-btn-primary"><i class="fa fa-bars"></i>&nbsp;&nbsp;本年</button>
  299. </div>
  300. </div>
  301. <div style="float:left; padding-left:20px; padding-top:4px;"><input type="text" class="layui-input" id="txtdate" style="width:200px;" placeholder=""></div><div style="float:left;"><button id="btnsearch" onclick="SearchData(0);" class="layui-btn layui-btn-danger"><i class="fa fa-search"></i></button></div>
  302. </div>
  303. <div class="layui-card-body layui-row layui-col-space10">
  304. @*<div class="layui-col-md12">
  305. <div class="layui-col-md6">
  306. <blockquote class="layui-elem-quote title" style="border-left: 5px solid #555299;">
  307. <div class="panel-icon fa fa-pie-chart">
  308. </div>
  309. &nbsp;&nbsp;来电类型比例分析
  310. </blockquote>
  311. <table class="layui-table" lay-skin="line" style="width:100%;">
  312. <tbody class="hot_news">
  313. <tr>
  314. <td align="center" style="height: 176px;">
  315. <iframe id="framereport1" src="" scrolling="no" frameborder="0" style="border:0px;" width="100%" height="176px"></iframe>
  316. </td>
  317. </tr>
  318. </tbody>
  319. </table>
  320. </div>
  321. <div class="layui-col-md6">
  322. <blockquote class="layui-elem-quote title" style="border-left: 5px solid #555299;">
  323. <div class="panel-icon fa fa-pie-chart">
  324. </div>
  325. &nbsp;&nbsp;工单类型比例分析
  326. </blockquote>
  327. <table class="layui-table" lay-skin="line" style="width:100%;">
  328. <tbody class="hot_news">
  329. <tr>
  330. <td align="center" style="height: 176px;">
  331. <iframe id="framereport2" src="" scrolling="no" frameborder="0" style="border:0px;" width="100%" height="176px"></iframe>
  332. </td>
  333. </tr>
  334. </tbody>
  335. </table>
  336. </div>
  337. </div>*@
  338. <div class="layui-col-md12" >
  339. <blockquote class="layui-elem-quote title" style="border-left: 5px solid #555299;">
  340. <div class="panel-icon fa fa-bar-chart">
  341. </div>
  342. &nbsp;&nbsp;各时间段比例分析
  343. </blockquote>
  344. <table class="layui-table" lay-skin="line" style="width:100%;">
  345. <tbody class="hot_news">
  346. <tr>
  347. <td align="center" style="height: 310px;">
  348. <iframe id="framereport3" src="" scrolling="no" frameborder="0" style="border:0px;" width="100%" height="300px"></iframe>
  349. </td>
  350. </tr>
  351. </tbody>
  352. </table>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. <script type="text/javascript">
  360. $(function () {
  361. helper.cookies.set('UserCode',$("#UserCode").attr("data-index"))
  362. helper.cookies.set('DeptId',$("#DeptId").val())
  363. var timeno = new Date().getTime();
  364. $.ajax({
  365. url: "/Main/NoticeData?timeno="+timeno,
  366. type: "get",
  367. dataType: "html",
  368. cache: true,
  369. success: function (res, result) {
  370. console.log(res);
  371. if (result == "success") {
  372. document.getElementById("notices").innerHTML = res;
  373. }
  374. },
  375. error: function (error) {
  376. return false;
  377. }
  378. });
  379. });
  380. function view(noticeid) {
  381. var iWidth = 750; //弹出窗口的宽度;
  382. var iHeight = 450; //弹出窗口的高度;
  383. var t = (window.screen.availHeight - 30 - iHeight) / 2; //获得窗口的垂直位置;
  384. var l = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
  385. //var l = (screen.availWidth - 500) / 2;
  386. //var t = (screen.availHeight - 300) / 2;
  387. layui.use(['layer', 'form', 'element'], function () {
  388. var layer = layui.layer
  389. , form = layui.form
  390. , element = layui.element
  391. layer.open({
  392. type: 2,
  393. anim: 4,
  394. scrollbar: false,
  395. content: '/SystemManage/NoticeView/?noticeId=' + noticeid,
  396. area: ['90%', '90%'],
  397. id: 'ViewNOtice',
  398. title: '查看公告'
  399. });
  400. });
  401. //window.open('/SystemManage/NoticeView/?noticeId=' + noticeid, '_blank', 'location=yes,height=450,width=750,top=' + t + ',left=' + l + ',toolbar=no,menubar=no,location=no,status=yes');
  402. }
  403. </script>
  404. </body>
  405. <!--下拉输入选择框工具栏-->
  406. <script src="/Content/layui/layui.js"></script>
  407. <script type="text/javascript">
  408. layui.use('laydate', function () {
  409. var laydate = layui.laydate;
  410. //自定义背景色主题 - 非常实用
  411. //日期时间范围
  412. laydate.render({
  413. elem: '#txtdate'
  414. , range: '~'
  415. , value: '@DateTime.Now.ToString("yyyy-MM-dd")' + ' 00:00:00' + ' ~ @DateTime.Now.ToString("yyyy-MM-dd")' + ' 23:59:59'
  416. , theme: '#395E67'
  417. , type: 'datetime'
  418. });
  419. });
  420. BindChart(1);
  421. </script>
  422. </html>