You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

354 lines
11 KiB

  1. @{
  2. ViewBag.Title = "Form";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script src="~/Content/js/echarts/echarts5.3.3.min.js"></script>
  6. <script src="~/Content/js/echarts/echarts-gl.min.js"></script>
  7. <style>
  8. .ui-jqgrid tr.jqgrow td {
  9. overflow: hidden;
  10. }
  11. .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td {
  12. overflow: hidden !important;
  13. }
  14. .btn-primary {
  15. margin-right: 2px;
  16. }
  17. html {
  18. height: 100%;
  19. }
  20. .topRow {
  21. height: 54px;
  22. background-color: #031c7bc2;
  23. padding-bottom: 5px;
  24. }
  25. body {
  26. height: 100%;
  27. FONT-SIZE: 15px;
  28. /*FONT-SIZE: 18px;*/
  29. background-color: black;
  30. --CustTitlecolor: #0bd4d4; /*表标题颜色*/ /*#4D5457 #000000bf*/
  31. --Custbackgroundcolor: #031c7bc2; /*#031c7b;*/ /*表整体颜色*/
  32. --CustSelect: #103764; /*选中颜色*/ /*悬浮颜色*/
  33. --Custcolor: white; /*字体颜色*/
  34. --CustBorderColor: #031c7bc2; /*边框颜色*/
  35. --CustRow1: #0e59a5d4; /*偶行颜色*/
  36. --CustRow2: #031c7bc2; /*奇行颜色*/
  37. }
  38. /*大标题*/
  39. .TopName {
  40. vertical-align: middle;
  41. text-align: center;
  42. font-size: 24px;
  43. font-weight: 700;
  44. /*color:var(--CustTitlecolor);*/
  45. color: white;
  46. }
  47. /*logo标题*/
  48. .TopNamelogo {
  49. vertical-align: middle;
  50. text-align: left;
  51. font-size: 24px;
  52. font-weight: 700;
  53. color: white;
  54. }
  55. .logoclass {
  56. height: 24px;
  57. }
  58. #logolabel {
  59. /*width:80%;*/
  60. }
  61. .time {
  62. vertical-align: middle;
  63. text-align: center;
  64. font-size: 20px;
  65. color: white;
  66. }
  67. .formdiv {
  68. height: 100% !important;
  69. margin-bottom: 2px;
  70. margin-top: 5px;
  71. margin-left: 10px;
  72. margin-right: 10px;
  73. }
  74. .thclass {
  75. width: 100px;
  76. font-weight: 500;
  77. text-align: right;
  78. }
  79. table {
  80. height: 100%;
  81. }
  82. html, body {
  83. height: 100% !important;
  84. }
  85. form {
  86. height: 98% !important;
  87. background-color: black;
  88. }
  89. .bootstrap-select .dropdown-toggle .filter-option-inner-inner {
  90. height: 24px !important;
  91. }
  92. /*表列表头颜色*/
  93. .table > thead:first-child > tr:first-child > th {
  94. background-color: var(--Custbackgroundcolor);
  95. color: var(--CustTitlecolor);
  96. }
  97. /*表整体颜色*/
  98. .ui-jqgrid {
  99. background-color: var(--Custbackgroundcolor);
  100. color: var(--Custcolor);
  101. /*border: 1px solid var(--CustBorderColor);*/
  102. border: none;
  103. }
  104. .ui-jqgrid .table-bordered td {
  105. /*border: 0.5px solid var(--CustBorderColor);*/
  106. border: none;
  107. border-left: none;
  108. border-right: none;
  109. }
  110. </style>
  111. <link href="~/Content/css/CommonReport/CommonReport.css" rel="stylesheet" />
  112. <script src="~/Content/js/CommonReport/CommonReport.js"></script>
  113. <script src="~/Content/js/datepicker/WdatePicker.js"></script>
  114. <link href="~/Content/css/bootstrap/bootstrap-select.css" rel="stylesheet" />
  115. <script src="~/Content/js/bootstrap/bootstrap-select.min.js"></script>
  116. <form id="form1">
  117. <div class="formdiv">
  118. <table class="form">
  119. <tr class="topRow">
  120. <td style="text-align:right;width:18%">
  121. <label class="radio-inline" id="logolabel">
  122. <img src="~/Content/img/ninghong.jpg" border="0" class="logoclass" />
  123. </label>
  124. </td>
  125. <td style="width:22%">
  126. <div class="TopNamelogo" id="TopNamelogo">宁虹科技</div>
  127. </td>
  128. <td style="width:20%">
  129. <div class="TopName" id="TopName">线体周产能看板</div>
  130. </td>
  131. <td style="width:16%">
  132. <div class="time" id="timeStr"></div>
  133. </td>
  134. </tr>
  135. </table>
  136. </div>
  137. <div class="table_height"
  138. style="width: 100%;"
  139. id="chartmain_zhe"></div>
  140. <script type="text/javascript">
  141. window.onload = function (){
  142. //指定图表的配置项和数据
  143. var WeekMES = GetWeekMES();
  144. var windowheight = window.innerHeight-50;
  145. $(".table_height").height(windowheight);
  146. option = {
  147. tooltip: {
  148. trigger: 'axis'
  149. },
  150. legend: {
  151. textStyle: {
  152. color: "#000000",
  153. fontSize: 12
  154. },
  155. left: '5%',
  156. data: ['产量']
  157. },
  158. grid: {
  159. x: 40,
  160. y: 40,
  161. x2: 30,
  162. y2: 20
  163. },
  164. toolbox: {
  165. feature: {
  166. //saveAsImage: {}
  167. }
  168. },
  169. xAxis: {
  170. type: 'category',
  171. boundaryGap: false,
  172. axisLabel: {
  173. /*inside: true,*/
  174. interval: 0,
  175. textStyle: {
  176. color: "#000000",
  177. fontSize: 12
  178. }
  179. },
  180. axisTick: {
  181. show: false
  182. },
  183. axisLine: {
  184. show: true,
  185. symbol: ['none', 'arrow'],
  186. symbolOffset: 12,
  187. lineStyle: {
  188. color: "#000000"
  189. }
  190. },
  191. data: [
  192. WeekMES[0].day,
  193. WeekMES[1].day,
  194. WeekMES[2].day,
  195. WeekMES[3].day,
  196. WeekMES[4].day,
  197. WeekMES[5].day,
  198. WeekMES[6].day
  199. ]
  200. },
  201. yAxis: {
  202. type: 'value',
  203. axisLine: {
  204. show: true,
  205. symbol: ['none', 'arrow'],
  206. symbolOffset: 12,
  207. lineStyle: {
  208. color: "#000000"
  209. }
  210. },
  211. axisTick: {
  212. show: false
  213. },
  214. axisLabel: {
  215. textStyle: {
  216. color: "#000000",
  217. fontSize: 12
  218. }
  219. }
  220. },
  221. series: [
  222. {
  223. name: '产量',
  224. type: 'line',
  225. stack: '总量',
  226. data: [1,2,3,4,5]
  227. // itemStyle: {
  228. // normal: {
  229. // color: '#0efdff', //折线点的颜色
  230. // lineStyle: {
  231. // color: '#0efdff', //折线的颜色
  232. // width: 2
  233. // }
  234. // }
  235. // }
  236. //},
  237. //{
  238. // name: '折线二',
  239. // type: 'line',
  240. // stack: '总量',
  241. // data: [100, 132, 131, 234, 290, 330, 110]
  242. }
  243. ]
  244. }
  245. //获取dom容器
  246. var myChart = echarts.init(
  247. document.getElementById('chartmain_zhe')
  248. )
  249. // 使用刚指定的配置项和数据显示图表。
  250. myChart.setOption(option)
  251. };
  252. function GetWeekMES() {
  253. var date = new Date();
  254. var year = date.getYear();
  255. var month = date.getMonth();
  256. var week = date.getDay();
  257. var month = month + 1;
  258. var day = date.getDate();
  259. // week:周几,day:几号
  260. var weekArr = [{ week: '', day: '' }, { week: '', day: '' }, { week: '', day: '' }, { week: '', day: '' }, { week: '', day: '' }, { week: '', day: '' }, { week: '', day: '' }];
  261. // 本周内今天的前几天的数量
  262. var leftNum = week - 1;
  263. // 本周内今天的后几天的数量
  264. var rightNum = 7 - week;
  265. // 本周内今天的前几天
  266. for (var i = 0; i < leftNum; i++) {
  267. weekArr[i].week = week - (week - i) + 1;
  268. if (i == 0) {
  269. weekArr[i].day =(1900+year)+'-'+month+'-'+(day - week);
  270. } else {
  271. weekArr[i].day = (1900+year)+ '-' + month+ '-' + (day - (week - i) + 1);
  272. }
  273. }
  274. // 本周内今天的后几天
  275. for (var i = 0; i < rightNum; i++) {
  276. var weeks = week + i + 1;
  277. if (weeks == 2) {
  278. weekArr[i + week].week = '二';
  279. } else if (weeks == 3) {
  280. weekArr[i + week].week = '三';
  281. } else if (weeks == 4) {
  282. weekArr[i + week].week = '四';
  283. } else if (weeks == 5) {
  284. weekArr[i + week].week = '五';
  285. } else if (weeks == 6) {
  286. weekArr[i + week].week = '六';
  287. } else if (weeks == 7) {
  288. weekArr[i + week].week = '日';
  289. }
  290. weekArr[i + week].day = (1900 + year) + '-' + month + '-' + (day + i + 1);
  291. }
  292. // 今天
  293. if (week == 1) {
  294. weekArr[week - 1].week = '一';
  295. }
  296. weekArr[week - 1].day = (1900 + year) + '-' + month + '-' + day;
  297. return weekArr;
  298. }
  299. </script>
  300. </form>