Index.cshtml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. @{
  2. ViewData["TitleController"] = "产线一览";
  3. ViewData["TitleAction"] = "";
  4. ViewData["TitleActionDescription"] = "产线一览";
  5. ViewData["Title"] = "产线一览";
  6. }
  7. @section header{
  8. <link rel="stylesheet" href="~/lib/adminlte/bower/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
  9. <style>
  10. .radio_type {
  11. width: 20px;
  12. height: 20px;
  13. appearance: none;
  14. position: relative;
  15. }
  16. .radio_type:before {
  17. content: '';
  18. width: 20px;
  19. height: 20px;
  20. border: 2px solid #777;
  21. display: inline-block;
  22. border-radius: 50%;
  23. vertical-align: middle;
  24. }
  25. .radio_type:checked:before {
  26. content: '';
  27. width: 20px;
  28. height: 20px;
  29. border: 2px solid green;
  30. display: inline-block;
  31. border-radius: 50%;
  32. vertical-align: middle;
  33. top: 3px;
  34. left: 3px;
  35. }
  36. .radio_type:checked:after {
  37. content: '';
  38. width: 14px;
  39. height: 14px;
  40. text-align: center;
  41. border: 2px solid green;
  42. background: green;
  43. border-radius: 50%;
  44. position: absolute;
  45. top: 4px;
  46. left: 3px;
  47. }
  48. </style>
  49. }
  50. <div id="app">
  51. <div class="col-md-12">
  52. <div class="box box-primary">
  53. <div class="box-body">
  54. <div style="top: 50px; position: fixed; z-index: 8000; padding-top: 10px; height: 110px; background-color: #001529">
  55. <div class="col-sm-1" v-if="isLine">
  56. <button type="button" class="btn btn-default form-control" v-on:click="returnOverview()"
  57. style="background-color:#0b9afa; color: white; border: 0px">
  58. <span class="glyphicon glyphicon-arrow-left">
  59. </span>
  60. 返回
  61. </button>
  62. </div>
  63. <div class="col-sm-3">
  64. <select style="font-size: 16px"
  65. id="Line" name="Line" data-msg-required="必须选择线别" v-on:change="select($event)"
  66. data-rule-required="true" class="form-control">
  67. <option v-for="line in lines" :value="line.id">{{ line.name }}</option>
  68. </select>
  69. </div>
  70. <div class="col-sm-3">
  71. <div class="input-group date">
  72. <div class="input-group-addon">日期</div>
  73. <input
  74. id="date" type="text" class="form-control"
  75. v-on:change="selectDatepicker($event)"
  76. value="@DateTime.Now.ToString("yyyy-MM-dd")">
  77. </div>
  78. </div>
  79. <div class="col-sm-2">
  80. <button type="button" class="btn btn-default" v-on:click="lastDay()">
  81. <span class="glyphicon glyphicon-chevron-left"></span>
  82. </button>
  83. <button type="button" class="btn btn-default" v-on:click="nextDay()">
  84. <span class="glyphicon glyphicon-chevron-right"></span>
  85. </button>
  86. </div>
  87. <div class="col-sm-3">
  88. <a class="btn btn-default" v-on:click="jumpEyz()">
  89. 导航首页
  90. </a>
  91. </div>
  92. <div class="col-sm-12">
  93. <div class="col-sm-10">
  94. <h3>
  95. <span class="glyphicon glyphicon-file"></span>
  96. &nbsp;
  97. {{ lineName }}
  98. &nbsp;
  99. {{ date }}
  100. <span v-if="isLine">
  101. &nbsp; {{ moduleType }}
  102. </span>
  103. </h3>
  104. </div>
  105. <div class="col-sm-2">
  106. <div style="padding-top: 20px" v-if="isLine">
  107. <button class="btn btn-default" v-on:click="jumpTheSameDay()">当月排程</button>
  108. <button class="btn btn-default" v-on:click="jumpNextMonth()">次月排程</button>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="tab-content" style="padding-top: 85px;">
  114. <div class="tab-pane active" id="overview">
  115. <div id="homeTable1" style="padding-top: 10px; position: fixed; z-index: 8000; width: 1300px; height:60px; background-color: #001529">
  116. <table class="table table-hover">
  117. <thead>
  118. <tr>
  119. <th style="width: 6%">楼层</th>
  120. <th style="width: 10%">线别</th>
  121. <th style="width: 15%">机种</th>
  122. <th style="width: 15%">Capa</th>
  123. <th style="width: 6%">白班</th>
  124. <th style="width: 10%">白班排程</th>
  125. <th style="width: 6%">夜班</th>
  126. <th style="width: 10%">夜班排程</th>
  127. <th style="width: 10%">实际</th>
  128. <th style="width: 12%">
  129. 达成率
  130. <button class="btn btn-default btn-sm" v-on:click="sort()">
  131. <span id="sortSpan" class="glyphicon glyphicon-sort-by-alphabet"></span>
  132. </button>
  133. </th>
  134. </tr>
  135. </thead>
  136. </table>
  137. </div>
  138. <div id="homeTable2" style="padding-top: 10px; width: 1300px">
  139. <table id="2f" class="table table-hover">
  140. <thead>
  141. <tr>
  142. <th style="width: 6%">楼层</th>
  143. <th style="width: 10%">线别</th>
  144. <th style="width: 15%">机种</th>
  145. <th style="width: 15%">Capa</th>
  146. <th style="width: 6%">白班</th>
  147. <th style="width: 10%">白班排程</th>
  148. <th style="width: 6%">夜班</th>
  149. <th style="width: 10%">夜班排程</th>
  150. <th style="width: 10%">实际</th>
  151. <th style="width: 12%">
  152. 达成率
  153. <button class="btn btn-default btn-sm">
  154. <span id="sortSpan" class="glyphicon glyphicon-sort-by-alphabet"></span>
  155. </button>
  156. </th>
  157. </tr>
  158. </thead>
  159. <tbody>
  160. <tr v-for="(lineOverview, index) in lineOverViews" v-on:click="onClickCell(lineOverview.lineId, lineOverview.moduleType)">
  161. <td>{{ lineOverview.floor }}F</td>
  162. <td>
  163. @* <span v-if="lineOverview.floor === 1 && lineOverview.line === 7">实验线</span>
  164. <span v-else-if="lineOverview.floor === 1 && lineOverview.line === 6">Signage</span>
  165. <span v-else-if="lineOverview.floor === 1 && lineOverview.line === 8">Print 1</span>
  166. <span v-else-if="lineOverview.floor === 1 && lineOverview.line === 9">Print 3</span>
  167. <span v-else-if="lineOverview.floor === 1 && lineOverview.line === 10">Print 4</span>
  168. <span v-else-if="lineOverview.floor === 1 && lineOverview.line === 11">Print 6</span>
  169. <span v-else-if="lineOverview.floor === 1 && lineOverview.line === 12">Print 7</span>
  170. <span v-else-if="lineOverview.floor === 1 && lineOverview.line === 13">Print 8</span>
  171. <span v-else>{{ lineOverview.line }}</span> *@
  172. {{ lineOverview.lineName }}
  173. </td>
  174. <td>{{ lineOverview.moduleType }}</td>
  175. <td>{{ lineOverview.capa }}</td>
  176. <td>
  177. <div :class="[lineOverview.morningShiftState===true?'state-true':'state']"></div>
  178. </td>
  179. <td>{{ lineOverview.planMorningShiftCapacity }}</td>
  180. <td>
  181. <div :class="[lineOverview.nightShiftState===true?'state-true':'state']"></div>
  182. </td>
  183. <td>{{ lineOverview.planNightShiftCapacity }}</td>
  184. <td>{{ lineOverview.capacity }}</td>
  185. <td v-if="lineOverview.planMorningShiftCapacity+lineOverview.planNightShiftCapacity===0">
  186. -
  187. </td>
  188. <td v-else>
  189. {{ lineOverview.achievementRate }} %
  190. </td>
  191. </tr>
  192. </tbody>
  193. </table>
  194. </div>
  195. </div>
  196. <div class="tab-pane" id="line">
  197. <div class="col-lg-12" style="padding-top: 10px;">
  198. <div class="col-lg-12">
  199. <div class="echart-dev">
  200. <div class="title">
  201. <h3>月产能趋势 ( {{ monthTitle }} ) </h3>
  202. </div>
  203. <div class="echart-statistic">
  204. <div style="text-align:left; padding-left: 15px; height: 100px">
  205. <div class="col-sm-9">
  206. <div class="col-sm-3">
  207. <div>
  208. <label>
  209. <input class="radio_type" type="radio" name="optionsRadios" value="ALL" v-on:click="onClickOptionsRadios()">
  210. 全部机种
  211. </label>
  212. </div>
  213. </div>
  214. <div class="col-sm-3" v-for="moduleType1 in moduleTypes">
  215. <div>
  216. <label>
  217. <input class="radio_type" type="radio" name="optionsRadios" :value=moduleType1 v-on:click="onClickOptionsRadios()">
  218. {{ moduleType1 }}
  219. </label>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. </div>
  225. <div :style="{'color': (accumulatedDifference >= 0 ? '#fff' : '#ff6e76'), 'text-align':'right','padding': '15px', 'font-size': '1.2em' }">
  226. 累计差异:{{ accumulatedDifference }} pcs
  227. </div>
  228. <div id="container2" style="height: 350px; width: 100%;">
  229. </div>
  230. <div id="container3" style="height: 150px; width: 100%;">
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. <div class="col-lg-12" style="padding-top: 10px;">
  236. <div class="col-lg-12">
  237. <div class="echart-dev">
  238. <div class="title">
  239. <h3>日产能详情 ( {{ date }} ) </h3>
  240. </div>
  241. <div class="echart-statistic">
  242. <span style="font-size: 1.2em">早班产能:{{ MorningCapacity }} pcs</span>
  243. <span style="font-size: 1.2em">夜班产能:{{ NightCapacity }} pcs</span>
  244. <span style="font-size: 1.2em">合计:{{ TotalCapacity }} pcs</span>
  245. </div>
  246. <div id="container1" style="height: 350px; width: 100%;">
  247. </div>
  248. <div style="padding-left: 10%">
  249. <ul v-for="(keyinfo, index) in lineData.keyInInfos" v-if="keyinfo.keyInType != 8" class="echarts-keyinfo">
  250. <li>
  251. {{ keyinfo.keyInTypeName }} &nbsp;&nbsp; {{ keyinfo.description }} &nbsp;&nbsp;
  252. {{ keyinfo.startTime | dataTimeFormatV2 }} ~ {{ keyinfo.endTime | dataTimeFormatV2 }} &nbsp;&nbsp;
  253. Total: {{ keyinfo.affectTime.toFixed(0) }} min
  254. </li>
  255. </ul>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="col-lg-12" style="padding-top: 10px;">
  261. <div class="col-lg-12">
  262. <div>
  263. <table id="table1" class="table table-hover">
  264. <thead>
  265. <tr>
  266. <th>机种</th>
  267. <th>计划<br /><small>(pcs)</small></th>
  268. <th>Capa<br /><small>(pcs)</small></th>
  269. <th>TT</th>
  270. <th>产能<br /><small>(pcs)</small></th>
  271. <th>差异<br /><small>(pcs)</small></th>
  272. <th>运行<br /><small>(min)</small></th>
  273. <th>换料<br /><small>(min)</small></th>
  274. <th>宕机<br /><small>(min)</small></th>
  275. <th>负荷<br /><small>(min)</small></th>
  276. <th>时间<br /><small>稼动(%)</small></th>
  277. <th>性能<br /><small>稼动(%)</small></th>
  278. <th>OEE<br /><small>(%)</small></th>
  279. </tr>
  280. </thead>
  281. <tbody>
  282. <tr v-for="(statistic, index) in lineData.statistics">
  283. <td><b>{{ statistic.moduleType }}</b></td>
  284. <td><b>{{ statistic.planCapacity }}</b></td>
  285. <td><b>{{ statistic.capa }}</b></td>
  286. <td><b>{{ statistic.tt }}</b></td>
  287. <td><b>{{ statistic.capacity }}</b></td>
  288. <td><b>{{ statistic.capacity - statistic.planCapacity }}</b></td>
  289. <td>{{ statistic.runTime }}</td>
  290. <td>{{ statistic.reload }}</td>
  291. <td>{{ statistic.downTime }}</td>
  292. <td>{{ statistic.loadTime }}</td>
  293. <td>{{ (statistic.availability * 100).toFixed(0) }}</td>
  294. <td>{{ (statistic.performance * 100).toFixed(0) }}</td>
  295. <td><b>{{ (statistic.oee * 100).toFixed(0) }}</b></td>
  296. </tr>
  297. </tbody>
  298. </table>
  299. </div>
  300. </div>
  301. </div>
  302. <div class="col-lg-12" style="padding-top: 10px;">
  303. <div class="col-lg-6">
  304. <div style="padding-top: 30px">
  305. <div class="title">
  306. <h3>早班换耗材统计</h3>
  307. <span><b>标准:{{ (lineData.theoryRefueledTime / 2).toFixed(0) }} min</b></span>
  308. <span> / </span>
  309. <span><b>换耗材合计:{{ getKeyInInfoAffectTime_8_morning }} min</b></span>
  310. </div>
  311. <table id="table2" class="table table-hover">
  312. <thead>
  313. <tr>
  314. <th width="10%">No</th>
  315. <th>类别</th>
  316. <th width="15%">次数</th>
  317. <th width="20%">耗时<small>(min)</small></th>
  318. </tr>
  319. </thead>
  320. <tbody>
  321. <tr v-for="(replace, index) in lineData.morningReplaceConsumables">
  322. <td>{{ index + 1 }}</td>
  323. <td>{{ replace.name }}</td>
  324. <td>{{ replace.count }}</td>
  325. <td>{{ replace.accumulativeTime }}</td>
  326. </tr>
  327. </tbody>
  328. </table>
  329. </div>
  330. </div>
  331. <div class="col-lg-6">
  332. <div style="padding-top: 30px">
  333. <div class="title">
  334. <h3>夜班换耗材统计</h3>
  335. <span><b>标准:{{ (lineData.theoryRefueledTime / 2).toFixed(0) }} min</b></span>
  336. <span> / </span>
  337. <span><b>换耗材合计:{{ getKeyInInfoAffectTime_8_night }} min</b></span>
  338. </div>
  339. <table id="table2" class="table table-hover">
  340. <thead>
  341. <tr>
  342. <th width="10%">No</th>
  343. <th>类别</th>
  344. <th width="15%">次数</th>
  345. <th width="20%">耗时<small>(min)</small></th>
  346. </tr>
  347. </thead>
  348. <tbody>
  349. <tr v-for="(replace, index) in lineData.nightReplaceConsumables">
  350. <td>{{ index + 1 }}</td>
  351. <td>{{ replace.name }}</td>
  352. <td>{{ replace.count }}</td>
  353. <td>{{ replace.accumulativeTime }}</td>
  354. </tr>
  355. </tbody>
  356. </table>
  357. </div>
  358. </div>
  359. </div>
  360. <div class="col-lg-12" style="padding-top: 10px;">
  361. <div class="col-lg-6">
  362. <div class="title">
  363. <h3>
  364. 早班故障 TOP 10
  365. &nbsp;&nbsp;<button class="btn btn-default" v-on:click="ExportineAccumulatedFaultByMorning()">查看详情</button>
  366. </h3>
  367. </div>
  368. <table class="table table-hover">
  369. <thead>
  370. <tr>
  371. <th width="5%">No</th>
  372. <th width="20%">设备</th>
  373. <th width="13%">数据<br />来源</th>
  374. <th>故障详情</th>
  375. <th width="13%">累计次数</th>
  376. <th width="15%">累计时间<small>(min)</small></th>
  377. </tr>
  378. </thead>
  379. <tbody>
  380. <tr v-for="(fault, index) in lineMorningAccumulatedFault">
  381. <td>{{ index + 1 }}</td>
  382. <td>{{ fault.machineType }}</td>
  383. <td>{{ fault.dataSource == 0 ? "自动上抛" : "人工录入" }}</td>
  384. <td>{{ fault.faultInfo }}</td>
  385. <td>{{ fault.accumulativeTotal }}</td>
  386. <td>{{ fault.accumulativeTime.toFixed(0) }}</td>
  387. </tr>
  388. </tbody>
  389. </table>
  390. </div>
  391. <div class="col-lg-6">
  392. <div class="title">
  393. <h3>
  394. 夜班故障 TOP 10
  395. &nbsp;&nbsp;<button class="btn btn-default" v-on:click="ExportineAccumulatedFaultByNight()">查看详情</button>
  396. </h3>
  397. </div>
  398. <table class="table table-hover">
  399. <thead>
  400. <tr>
  401. <th width="5%">No</th>
  402. <th width="20%">设备</th>
  403. <th width="13%">数据<br />来源</th>
  404. <th>故障详情</th>
  405. <th width="13%">累计次数</th>
  406. <th width="15%">累计时间<small>(min)</small></th>
  407. </tr>
  408. </thead>
  409. <tbody>
  410. <tr v-for="(fault, index) in lineNightAccumulatedFault">
  411. <td>{{ index + 1 }}</td>
  412. <td>{{ fault.machineType }}</td>
  413. <td>{{ fault.dataSource == 0 ? "自动上抛" : "人工录入" }}</td>
  414. <td>{{ fault.faultInfo }}</td>
  415. <td>{{ fault.accumulativeTotal }}</td>
  416. <td>{{ fault.accumulativeTime.toFixed(0) }}</td>
  417. </tr>
  418. </tbody>
  419. </table>
  420. </div>
  421. </div>
  422. </div>
  423. </div>
  424. </div>
  425. </div>
  426. </div>
  427. </div>
  428. @section footer{
  429. <script src="~/lib/adminlte/bower/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
  430. <script src="~/lib/adminlte/bower/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-cn.js"></script>
  431. <script src="~/lib/echarts/echarts.min.js"></script>
  432. <script src="~/js/Line/line.js" asp-append-version="true"></script>
  433. }