d17b0c42d7f4d1068565286659b538d3d94e4633.svn-base 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182
  1. <template>
  2. <div class="app-container">
  3. <!-- <h1>集团</h1> -->
  4. <div class="search">
  5. <el-select v-model="table.getdataListParm.parammaps.pastureid" placeholder="牧场" class="filter-item" style="width: 120px;">
  6. <el-option v-for="item in pastureList" :key="item.pastureid" :label="item.pasturename" :value="item.pastureid" />
  7. </el-select>
  8. <el-date-picker v-model="table.getdataListParm.parammaps.inputDatetime" :clearable="false" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;" :picker-options="pickerOptions" />
  9. <!-- <el-button class="el-icon-arrow-left elIconArrowLeft" :disabled="Beforedisabled" @click="handleBefore" />
  10. <el-button class="el-icon-arrow-right elIconArrowRight" :disabled="Nextdisabled" @click="handleNext" /> -->
  11. <el-select v-model="table.getdataListParm.parammaps.lpplantype" placeholder="计划类型" class="filter-item" style="width: 120px;" clearable>
  12. <el-option v-for="item in planTypeList" :key="item.value" :label="item.lable" :value="item.value" />
  13. </el-select>
  14. <el-input v-model="table.getdataListParm.parammaps.tmrtname" placeholder="TMR名称" style="width: 180px;" class="filter-item" clearable />
  15. <el-select v-model="table.getdataListParm.parammaps.iscompleted" placeholder="工作状态" class="filter-item" style="width: 120px;" clearable>
  16. <el-option v-for="item in workingConditionList" :key="item.id" :label="item.name" :value="item.id" />
  17. </el-select>
  18. <el-button class="successBorder" @click="handleSearch">查询</el-button>
  19. <el-button class="successBorder" @click="handleRefresh">重置</el-button>
  20. </div>
  21. <el-row :gutter="20">
  22. <el-col :span="8">
  23. <h4>TMR设备列表</h4>
  24. <div class="table">
  25. <el-table
  26. :key="table.tableKey"
  27. v-loading="table.listLoading"
  28. element-loading-text="给我一点时间"
  29. :data="table.list"
  30. border
  31. fit
  32. highlight-current-row
  33. style="width: 100%;"
  34. :row-style="rowStyle"
  35. :cell-style="cellStyle"
  36. class="elTable table-fixed"
  37. height="970px"
  38. @row-click="rowClick"
  39. >
  40. <el-table-column sortable label="牧场" min-width="80px" align="center" prop="pastureName" />
  41. <el-table-column sortable label="开始时间" min-width="100px" align="center" prop="intime" />
  42. <el-table-column sortable label="计划类型" min-width="80px" align="center" prop="lpplantype" />
  43. <el-table-column sortable label="描述" min-width="90px" align="center" prop="remark" />
  44. <el-table-column sortable label="TMR名称" min-width="80px" align="center" prop="tmrtname" />
  45. </el-table>
  46. </div>
  47. </el-col>
  48. <!-- 预混计划 -->
  49. <el-col v-if="isPremixedPlan" :span="16">
  50. <div class="title">
  51. <b>过程详情</b>
  52. <span>&nbsp;({{ title }})</span>
  53. </div>
  54. <div class="detail">
  55. <div v-if="table2.list.length !== 0">
  56. <b>{{ table2.list[0].proesstime }}</b>
  57. <span>过程时间</span>
  58. </div>
  59. <div v-if="table2.list.length !== 0">
  60. <b>{{ table2.list[0].proesstime }}</b>
  61. <span>混料时间</span>
  62. </div>
  63. <div v-if="table2.list.length !== 0">
  64. <b>{{ table2.list[0].iscompleted }}</b>
  65. <span>工作状态</span>
  66. </div>
  67. <div v-if="table2.list.length !== 0">
  68. <b>{{ table2.list[0].Hdif }}kg</b>
  69. <span>混料误差值</span>
  70. </div>
  71. <div v-if="table2.list.length !== 0">
  72. <b>{{ table2.list[0].HdifRate }}</b>
  73. <span>混料准确率</span>
  74. </div>
  75. </div>
  76. <div class="Mixture">
  77. <h4>混料详情</h4>
  78. <el-table
  79. :key="table3.tableKey"
  80. v-loading="table3.listLoading"
  81. element-loading-text="给我一点时间"
  82. :data="table3.list"
  83. border
  84. fit
  85. highlight-current-row
  86. style="width: 100%;"
  87. :row-style="rowStyle"
  88. :cell-style="cellStyle"
  89. class="elTable table-fixed"
  90. >
  91. <el-table-column label="操作编号" min-width="70px" align="center" prop="sort" />
  92. <el-table-column label="饲料名称" min-width="70px" align="center" prop="fname" />
  93. <el-table-column label="计划重量" min-width="50px" align="center" prop="lweight" />
  94. <el-table-column label="实际重量" min-width="70px" align="center" prop="actualweightminus" />
  95. <el-table-column label="误差值" min-width="70px" align="center" prop="diff" />
  96. <el-table-column label="准确率" min-width="70px" align="center" prop="diffRate" />
  97. <el-table-column label="完成时间" min-width="70px" align="center" prop="intime" />
  98. <el-table-column label="过程时间" min-width="70px" align="center" prop="proesstime" />
  99. <el-table-column label="跳转方式" min-width="70px" align="center" prop="buttontype" />
  100. <el-table-column label="开始重量" min-width="70px" align="center" prop="lastactualweight" />
  101. <el-table-column label="结束重量" min-width="70px" align="center" prop="actualweight" />
  102. </el-table>
  103. </div>
  104. </el-col>
  105. <!-- 撒料计划 -->
  106. <el-col v-if="isSpreadingPlan" :span="16">
  107. <div class="title">
  108. <b>过程详情</b>
  109. <span>&nbsp;({{ title }})</span>
  110. </div>
  111. <div class="detail">
  112. <div v-if="table2.list.length !== 0">
  113. <b>{{ table2.list[0].proesstime }}</b>
  114. <span>过程时间</span>
  115. </div>
  116. <div v-if="table2.list.length !== 0">
  117. <b>{{ table2.list[0].proesstime }}</b>
  118. <span>混料时间</span>
  119. </div>
  120. <div v-if="table2.list.length !== 0">
  121. <b>{{ table2.list[0].iscompleted }}</b>
  122. <span>工作状态</span>
  123. </div>
  124. <div v-if="table2.list.length !== 0">
  125. <b>{{ table2.list[0].Hdif }}kg</b>
  126. <span>混料误差值</span>
  127. </div>
  128. <div v-if="table2.list.length !== 0">
  129. <b>{{ table2.list[0].HdifRate }}</b>
  130. <span>混料准确率</span>
  131. </div>
  132. <div v-if="table2.list.length !== 0">
  133. <b>{{ table2.list[0].Sdif }}kg</b>
  134. <span>撒料误差值</span>
  135. </div>
  136. <div v-if="table2.list.length !== 0">
  137. <b>{{ table2.list[0].SdifRate }}</b>
  138. <span>撒料准确率</span>
  139. </div>
  140. </div>
  141. <div class="Mixture">
  142. <h4>混料详情</h4>
  143. <el-table
  144. :key="table3.tableKey"
  145. v-loading="table3.listLoading"
  146. element-loading-text="给我一点时间"
  147. :data="table3.list"
  148. border
  149. fit
  150. highlight-current-row
  151. style="width: 100%;"
  152. :row-style="rowStyle"
  153. :cell-style="cellStyle"
  154. class="elTable table-fixed"
  155. >
  156. <el-table-column label="操作编号" min-width="110px" align="center" prop="sort" />
  157. <el-table-column label="饲料名称" min-width="110px" align="center" prop="fname" />
  158. <el-table-column label="计划重量" min-width="110px" align="center" prop="lweight" />
  159. <el-table-column label="实际重量" min-width="110px" align="center" prop="actualweightminus" />
  160. <el-table-column label="误差值" min-width="110px" align="center" prop="diff" />
  161. <el-table-column label="准确率" min-width="110px" align="center" prop="diffRate" />
  162. <el-table-column label="完成时间" min-width="110px" align="center" prop="intime" />
  163. <el-table-column label="过程时间" min-width="110px" align="center" prop="proesstime" />
  164. <el-table-column label="跳转方式" min-width="110px" align="center" prop="buttontype" />
  165. <el-table-column label="开始重量" min-width="110px" align="center" prop="lastactualweight" />
  166. <el-table-column label="结束重量" min-width="110px" align="center" prop="actualweight" />
  167. </el-table>
  168. </div>
  169. <div class="SpreadingMaterials">
  170. <h4>撒料详情</h4>
  171. <el-table
  172. :key="table4.tableKey"
  173. v-loading="table4.listLoading"
  174. element-loading-text="给我一点时间"
  175. :data="table4.list"
  176. border
  177. fit
  178. highlight-current-row
  179. style="width: 100%;"
  180. :row-style="rowStyle"
  181. :cell-style="cellStyle"
  182. class="elTable table-fixed"
  183. height="200px"
  184. >
  185. <el-table-column label="操作编号" min-width="70px" align="center" prop="sort" />
  186. <el-table-column label="栏舍名称" min-width="70px" align="center" prop="fname" />
  187. <el-table-column label="计划重量" min-width="70px" align="center" prop="lweight" />
  188. <el-table-column label="实际重量" min-width="70px" align="center" prop="actualweightminus" />
  189. <el-table-column label="误差值" min-width="70px" align="center" prop="diff" />
  190. <el-table-column label="准确率" min-width="70px" align="center" prop="diffRate" />
  191. <el-table-column label="完成时间" min-width="70px" align="center" prop="intime" />
  192. <el-table-column label="过程时间" min-width="70px" align="center" prop="proesstime" />
  193. <el-table-column label="跳转方式" min-width="70px" align="center" prop="buttontype" />
  194. <el-table-column label="开始重量" min-width="70px" align="center" prop="lastactualweight" />
  195. <el-table-column label="结束重量" min-width="70px" align="center" prop="actualweight" />
  196. </el-table>
  197. </div>
  198. <div class="ControlChart">
  199. <h4>监控图</h4>
  200. <div id="chartLine" style="width: 100%;height:300px;" />
  201. </div>
  202. </el-col>
  203. <!-- 剩料计划 -->
  204. <el-col v-if="isResidualMaterialPlan" :span="16">
  205. <div class="title">
  206. <b>过程详情</b>
  207. <span>&nbsp;({{ title }})</span>
  208. </div>
  209. <div class="detail">
  210. <div v-if="table2.list.length !== 0">
  211. <b>{{ table2.list[0].proesstime }}</b>
  212. <span>过程时间</span>
  213. </div>
  214. <div v-if="table2.list.length !== 0">
  215. <b>{{ table2.list[0].iscompleted }}</b>
  216. <span>工作状态</span>
  217. </div>
  218. </div>
  219. <div class="Mixture">
  220. <h4>剩料收集详情</h4>
  221. <el-table
  222. :key="table3.tableKey"
  223. v-loading="table3.listLoading"
  224. element-loading-text="给我一点时间"
  225. :data="table3.list"
  226. border
  227. fit
  228. highlight-current-row
  229. style="width: 100%;"
  230. :row-style="rowStyle"
  231. :cell-style="cellStyle"
  232. class="elTable table-fixed"
  233. height="200px"
  234. >
  235. <el-table-column label="操作编号" min-width="110px" align="center" prop="sort" />
  236. <el-table-column label="栏舍名称" min-width="110px" align="center" prop="fname" />
  237. <el-table-column label="剩料采集重量(kg)" min-width="110px" align="center" prop="sweight" />
  238. </el-table>
  239. </div>
  240. <div class="SpreadingMaterials">
  241. <h4>撒料详情</h4>
  242. <el-table
  243. :key="table4.tableKey"
  244. v-loading="table4.listLoading"
  245. :span-method="objectSpanMethod"
  246. element-loading-text="给我一点时间"
  247. :data="table4.list"
  248. border
  249. fit
  250. highlight-current-row
  251. style="width: 100%;"
  252. :row-style="rowStyle"
  253. :cell-style="cellStyle"
  254. class="elTable table-fixed"
  255. height="200px"
  256. >
  257. <el-table-column label="操作编号" min-width="110px" align="center" prop="sort" />
  258. <el-table-column label="转投栏舍" min-width="110px" align="center" prop="fname" />
  259. <el-table-column label="允许分配剩料量" min-width="110px" align="center" prop="lweight" />
  260. <el-table-column label="实际分配重量(kg)" min-width="110px" align="center" prop="actualweightminus" />
  261. <el-table-column label="废弃剩料重量" min-width="110px" align="center" prop="aweight" />
  262. </el-table>
  263. </div>
  264. </el-col>
  265. <!-- 撒料计划-混料 -->
  266. <el-col v-if="isSpreadingPlanSH" :span="16">
  267. <div class="title">
  268. <b>过程详情</b>
  269. <span>&nbsp;({{ title }})</span>
  270. </div>
  271. <div class="detail">
  272. <div v-if="table2.list.length !== 0">
  273. <b>{{ table2.list[0].proesstime }}</b>
  274. <span>过程时间</span>
  275. </div>
  276. <div v-if="table2.list.length !== 0">
  277. <b>{{ table2.list[0].proesstime }}</b>
  278. <span>混料时间</span>
  279. </div>
  280. <div v-if="table2.list.length !== 0">
  281. <b>{{ table2.list[0].iscompleted }}</b>
  282. <span>工作状态</span>
  283. </div>
  284. <div v-if="table2.list.length !== 0">
  285. <b>{{ table2.list[0].Hdif }}kg</b>
  286. <span>混料误差值</span>
  287. </div>
  288. <div v-if="table2.list.length !== 0">
  289. <b>{{ table2.list[0].HdifRate }}</b>
  290. <span>混料准确率</span>
  291. </div>
  292. <div v-if="table2.list.length !== 0">
  293. <b>{{ table2.list[0].Sdif }}kg</b>
  294. <span>撒料误差值</span>
  295. </div>
  296. <div v-if="table2.list.length !== 0">
  297. <b>{{ table2.list[0].SdifRate }}</b>
  298. <span>撒料准确率</span>
  299. </div>
  300. </div>
  301. <div class="Mixture">
  302. <h4>混料详情</h4>
  303. <el-table
  304. :key="table3.tableKey"
  305. v-loading="table3.listLoading"
  306. element-loading-text="给我一点时间"
  307. :data="table3.list"
  308. border
  309. fit
  310. highlight-current-row
  311. style="width: 98%;"
  312. :row-style="rowStyle"
  313. :cell-style="cellStyle"
  314. class="elTable table-fixed"
  315. >
  316. <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
  317. <el-table-column label="饲料名称" min-width="60px" align="center" prop="fname" />
  318. <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
  319. <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
  320. <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
  321. <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
  322. <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
  323. <el-table-column label="过程时间" min-width="60px" align="center" prop="proesstime" />
  324. <el-table-column label="跳转方式" min-width="60px" align="center" prop="buttontype" />
  325. <el-table-column label="开始重量" min-width="60px" align="center" prop="lastactualweight" />
  326. <el-table-column label="结束重量" min-width="60px" align="center" prop="actualweight" />
  327. </el-table>
  328. </div>
  329. <div class="SpreadingMaterials">
  330. <h4>撒料详情</h4>
  331. <el-table
  332. :key="table4.tableKey"
  333. v-loading="table4.listLoading"
  334. element-loading-text="给我一点时间"
  335. :data="table4.list"
  336. border
  337. fit
  338. highlight-current-row
  339. style="width: 98%;"
  340. :row-style="rowStyle"
  341. :cell-style="cellStyle"
  342. class="elTable table-fixed"
  343. max-height="200px"
  344. >
  345. <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
  346. <el-table-column label="撒料车辆" min-width="60px" align="center" prop="fname" />
  347. <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
  348. <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
  349. <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
  350. <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
  351. <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
  352. <el-table-column label="过程时间" min-width="60px" align="center" prop="proesstime" />
  353. <el-table-column label="跳转方式" min-width="60px" align="center" prop="buttontype" />
  354. <el-table-column label="开始重量" min-width="60px" align="center" prop="lastactualweight" />
  355. <el-table-column label="结束重量" min-width="60px" align="center" prop="actualweight" />
  356. </el-table>
  357. </div>
  358. <div class="ControlChart">
  359. <h4>监控图</h4>
  360. <div id="chartLine" style="width: 100%;height:300px;" />
  361. </div>
  362. </el-col>
  363. <!-- 撒料计划-撒料 -->
  364. <el-col v-if="isSpreadingPlanSS" :span="16">
  365. <div class="title">
  366. <b>过程详情</b>
  367. <span>&nbsp;({{ title }})</span>
  368. </div>
  369. <div class="detail">
  370. <div v-if="table2.list.length !== 0">
  371. <b>{{ table2.list[0].proesstime }}</b>
  372. <span>过程时间</span>
  373. </div>
  374. <div v-if="table2.list.length !== 0">
  375. <b>{{ table2.list[0].proesstime }}</b>
  376. <span>混料时间</span>
  377. </div>
  378. <div v-if="table2.list.length !== 0">
  379. <b>{{ table2.list[0].iscompleted }}</b>
  380. <span>工作状态</span>
  381. </div>
  382. <div v-if="table2.list.length !== 0">
  383. <b>{{ table2.list[0].Hdif }}kg</b>
  384. <span>混料误差值</span>
  385. </div>
  386. <div v-if="table2.list.length !== 0">
  387. <b>{{ table2.list[0].HdifRate }}</b>
  388. <span>混料准确率</span>
  389. </div>
  390. <div v-if="table2.list.length !== 0">
  391. <b>{{ table2.list[0].Sdif }}kg</b>
  392. <span>撒料误差值</span>
  393. </div>
  394. <div v-if="table2.list.length !== 0">
  395. <b>{{ table2.list[0].SdifRate }}</b>
  396. <span>撒料准确率</span>
  397. </div>
  398. </div>
  399. <div class="Mixture">
  400. <h4>混料详情</h4>
  401. <el-table
  402. :key="table3.tableKey"
  403. v-loading="table3.listLoading"
  404. element-loading-text="给我一点时间"
  405. :data="table3.list"
  406. border
  407. fit
  408. highlight-current-row
  409. style="width: 98%;"
  410. :row-style="rowStyle"
  411. :cell-style="cellStyle"
  412. class="elTable table-fixed"
  413. >
  414. <el-table-column label="操作编号" min-width="60px" align="center" prop="sort" />
  415. <el-table-column label="撒料车辆" min-width="60px" align="center" prop="fname" />
  416. <el-table-column label="计划重量" min-width="60px" align="center" prop="lweight" />
  417. <el-table-column label="实际重量" min-width="60px" align="center" prop="actualweightminus" />
  418. <el-table-column label="误差值" min-width="60px" align="center" prop="diff" />
  419. <el-table-column label="准确率" min-width="60px" align="center" prop="diffRate" />
  420. <el-table-column label="完成时间" min-width="60px" align="center" prop="intime" />
  421. <el-table-column label="过程时间" min-width="60px" align="center" prop="proesstime" />
  422. <el-table-column label="跳转方式" min-width="60px" align="center" prop="buttontype" />
  423. <el-table-column label="开始重量" min-width="60px" align="center" prop="lastactualweight" />
  424. <el-table-column label="结束重量" min-width="60px" align="center" prop="actualweight" />
  425. </el-table>
  426. </div>
  427. <div class="SpreadingMaterials">
  428. <h4>撒料详情</h4>
  429. <el-table
  430. :key="table4.tableKey"
  431. v-loading="table4.listLoading"
  432. element-loading-text="给我一点时间"
  433. :data="table4.list"
  434. border
  435. fit
  436. highlight-current-row
  437. style="width: 98%;"
  438. :row-style="rowStyle"
  439. :cell-style="cellStyle"
  440. class="elTable table-fixed"
  441. max-height="200px"
  442. >
  443. <el-table-column label="操作编号" min-width="70px" align="center" prop="sort" />
  444. <el-table-column label="撒料车辆" min-width="70px" align="center" prop="fname" />
  445. <el-table-column label="计划重量" min-width="70px" align="center" prop="lweight" />
  446. <el-table-column label="实际重量" min-width="70px" align="center" prop="actualweightminus" />
  447. <el-table-column label="误差值" min-width="70px" align="center" prop="diff" />
  448. <el-table-column label="准确率" min-width="70px" align="center" prop="diffRate" />
  449. <el-table-column label="完成时间" min-width="70px" align="center" prop="intime" />
  450. <el-table-column label="过程时间" min-width="70px" align="center" prop="proesstime" />
  451. <el-table-column label="跳转方式" min-width="70px" align="center" prop="buttontype" />
  452. <el-table-column label="开始重量" min-width="70px" align="center" prop="lastactualweight" />
  453. <el-table-column label="结束重量" min-width="70px" align="center" prop="actualweight" />
  454. </el-table>
  455. </div>
  456. <div class="ControlChart">
  457. <h4>监控图</h4>
  458. <div id="chartLine" style="width: 100%;height:300px;" />
  459. </div>
  460. </el-col>
  461. </el-row>
  462. </div>
  463. </template>
  464. <script>
  465. import echarts from 'echarts'
  466. require('echarts/theme/macarons')
  467. import { GetDataByName, GetReportform, GetDataByNames } from '@/api/common'
  468. import Cookies from 'js-cookie'
  469. import { parseTime } from '@/utils/index.js'
  470. export default {
  471. name: 'GroupProcessAnalysis',
  472. data() {
  473. return {
  474. title: '',
  475. isPremixedPlan: '', // 预混计划
  476. isSpreadingPlan: '', // 撒料计划
  477. isResidualMaterialPlan: '', // 剩料计划,
  478. isSpreadingPlanSH: '', // 撒料计划-混料
  479. isSpreadingPlanSS: '', // 撒料计划-撒料
  480. pickerMinDate: '',
  481. Beforedisabled: false,
  482. Nextdisabled: false,
  483. pickerOptions: {
  484. onPick: ({ maxDate, minDate }) => {
  485. this.pickerMinDate = minDate.getTime()
  486. if (maxDate) {
  487. this.pickerMinDate = ''
  488. }
  489. },
  490. // 限制不能选择今天之后的日期
  491. disabledDate: (time) => {
  492. if (this.pickerMinDate !== '') {
  493. const one = 31 * 24 * 3600 * 1000
  494. const minTime = this.pickerMinDate - one
  495. let maxTime = this.pickerMinDate + one
  496. if (maxTime > new Date()) {
  497. maxTime = new Date()
  498. }
  499. return time.getTime() < minTime || time.getTime() > maxTime
  500. }
  501. return time.getTime() > Date.now()
  502. }
  503. },
  504. requestParams: [
  505. { name: 'getPastureListJT', offset: 0, pagecount: 0, parammaps: { pastureid: Cookies.get('pastureid'), pasturename: '' }}
  506. ],
  507. pastureList: [], // 牧场
  508. planTypeList: [{ lable: '预混计划', value: '4' }, { lable: '撒料计划', value: '0' }, { lable: '剩料计划', value: '3' }, { lable: '撒料计划-混料', value: '1' }, { lable: '撒料计划-撒料', value: '2' }, { lable: '预称重计划', value: '5' }], // 计划类型
  509. workingConditionList: [{ id: '0', name: '进行中' }, { id: '1', name: '已完成' }], // 工作状态
  510. // TMR设备列表
  511. table: {
  512. getdataListParm: {
  513. name: 'getprocessAnalysis',
  514. page: 1,
  515. offset: 1,
  516. pagecount: '',
  517. returntype: 'Map',
  518. parammaps: {
  519. pastureid: '',
  520. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  521. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  522. inputDatetime: [new Date(), new Date()],
  523. iscompleted: '',
  524. tmrtname: '',
  525. lpplantype: ''
  526. }
  527. },
  528. tableKey: 0,
  529. list: [],
  530. total: 0,
  531. listLoading: false
  532. },
  533. // 过程详情
  534. table2: {
  535. getdataListParm: {
  536. name: 'getprocessAnalysisStr',
  537. page: 1,
  538. offset: 1,
  539. pagecount: 1,
  540. returntype: 'Map',
  541. parammaps: {
  542. pastureid: Cookies.get('pastureid'),
  543. id: ''
  544. }
  545. },
  546. tableKey: 0,
  547. list: [],
  548. total: 0,
  549. listLoading: true
  550. },
  551. // 混料详情
  552. table3: {
  553. getdataListParm: {
  554. name: 'getprocessAnalysisHL',
  555. page: 1,
  556. offset: 1,
  557. pagecount: '',
  558. returntype: 'Map',
  559. parammaps: {
  560. pastureid: Cookies.get('pastureid'),
  561. id: ''
  562. }
  563. },
  564. tableKey: 0,
  565. list: [],
  566. total: 0,
  567. listLoading: true
  568. },
  569. // 撒料详情
  570. table4: {
  571. getdataListParm: {
  572. name: 'getprocessAnalysisSL',
  573. page: 1,
  574. offset: 1,
  575. pagecount: '',
  576. returntype: 'Map',
  577. parammaps: {
  578. pastureid: Cookies.get('pastureid'),
  579. id: ''
  580. }
  581. },
  582. tableKey: 0,
  583. list: [],
  584. total: 0,
  585. listLoading: true
  586. },
  587. chart1: {
  588. getdataListParm: {
  589. name: 'getprocessAnalysisTB',
  590. page: 1,
  591. offset: 1,
  592. pagecount: '',
  593. returntype: 'Map',
  594. parammaps: {
  595. pastureid: Cookies.get('pastureid'),
  596. id: ''
  597. }
  598. },
  599. tableKey: 0,
  600. list: [],
  601. total: 0,
  602. listLoading: false,
  603. chartLine_data: []
  604. },
  605. chartLine: null,
  606. chartLine_data: {},
  607. rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
  608. cellStyle: { padding: 0 + 'px' }
  609. }
  610. },
  611. created() {
  612. this.getDownList()
  613. // this.getTimeFn()
  614. },
  615. methods: {
  616. getDownList() {
  617. GetDataByNames(this.requestParams).then(response => {
  618. this.pastureList = response.data.getPastureListJT.list
  619. this.table.getdataListParm.parammaps.pastureid = response.data.getPastureListJT.list[0].pastureid
  620. this.getList()
  621. })
  622. },
  623. // TMR设备列表
  624. getList() {
  625. this.table.listLoading = true
  626. GetDataByName(this.table.getdataListParm).then(response => {
  627. console.log('TMR设备列表table数据', response.data.list)
  628. if (response.data.list !== null) {
  629. this.table.list = response.data.list
  630. if (response.data.list[0].lpplantype == '预混计划') {
  631. this.isPremixedPlan = true
  632. this.isSpreadingPlan = false
  633. this.isResidualMaterialPlan = false
  634. this.isSpreadingPlanSH = false
  635. this.isSpreadingPlanSS = false
  636. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  637. this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  638. this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
  639. this.table3.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  640. this.getList2()
  641. this.getList3()
  642. } else if (response.data.list[0].lpplantype == '剩料计划') {
  643. this.isResidualMaterialPlan = true
  644. this.isPremixedPlan = false
  645. this.isSpreadingPlan = false
  646. this.isSpreadingPlanSH = false
  647. this.isSpreadingPlanSS = false
  648. this.table2.getdataListParm.name = 'getprocessAnalysisStrSH'
  649. this.table3.getdataListParm.name = 'getprocessAnalysisHLSH'
  650. this.table4.getdataListParm.name = 'getprocessAnalysisSLSH'
  651. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  652. this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  653. this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
  654. this.table3.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  655. this.table4.getdataListParm.parammaps.pid = response.data.list[0].id
  656. this.table4.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  657. this.getList2()
  658. this.getList3()
  659. this.getList4()
  660. } else if (response.data.list[0].lpplantype == '撒料计划-混料') {
  661. // 撒料计划-混料
  662. this.isSpreadingPlan = false
  663. this.isResidualMaterialPlan = false
  664. this.isPremixedPlan = false
  665. this.isSpreadingPlanSH = true
  666. this.isSpreadingPlanSS = false
  667. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  668. this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  669. this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
  670. this.table3.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  671. this.table4.getdataListParm.parammaps.pid = response.data.list[0].id
  672. this.table4.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  673. this.getList2()
  674. this.getList3()
  675. this.getList4()
  676. this.chart1.getdataListParm.parammaps.pid = response.data.list[0].id
  677. this.chart1.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  678. this.getChart1()
  679. } else if (response.data.list[0].lpplantype == '撒料计划-撒料') {
  680. // 撒料计划-撒料
  681. this.isSpreadingPlan = false
  682. this.isResidualMaterialPlan = false
  683. this.isPremixedPlan = false
  684. this.isSpreadingPlanSH = false
  685. this.isSpreadingPlanSS = true
  686. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  687. this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  688. this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
  689. this.table3.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  690. this.table4.getdataListParm.parammaps.pid = response.data.list[0].id
  691. this.table4.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  692. this.getList2()
  693. this.getList3()
  694. this.getList4()
  695. this.chart1.getdataListParm.parammaps.pid = response.data.list[0].id
  696. this.chart1.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  697. this.getChart1()
  698. } else if (response.data.list[0].lpplantype == '预称重计划') {
  699. // 撒料计划-混料
  700. this.isSpreadingPlan = false
  701. this.isResidualMaterialPlan = false
  702. this.isPremixedPlan = false
  703. this.isSpreadingPlanSH = true
  704. this.isSpreadingPlanSS = false
  705. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  706. this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  707. this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
  708. this.table3.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  709. this.table4.getdataListParm.parammaps.pid = response.data.list[0].id
  710. this.table4.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  711. this.getList2()
  712. this.getList3()
  713. this.getList4()
  714. this.chart1.getdataListParm.parammaps.pid = response.data.list[0].id
  715. this.chart1.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  716. this.getChart1()
  717. } else {
  718. // 撒料
  719. this.isSpreadingPlan = true
  720. this.isResidualMaterialPlan = false
  721. this.isPremixedPlan = false
  722. this.isSpreadingPlanSH = false
  723. this.isSpreadingPlanSS = false
  724. this.table2.getdataListParm.parammaps.id = response.data.list[0].id
  725. this.table2.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  726. this.table3.getdataListParm.parammaps.pid = response.data.list[0].id
  727. this.table3.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  728. this.table4.getdataListParm.parammaps.pid = response.data.list[0].id
  729. this.table4.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  730. this.getList2()
  731. this.getList3()
  732. this.getList4()
  733. this.chart1.getdataListParm.parammaps.pid = response.data.list[0].id
  734. this.chart1.getdataListParm.parammaps.pastureid = response.data.list[0].pastureid
  735. this.getChart1()
  736. }
  737. this.title = response.data.list[0].lpplantype
  738. } else {
  739. this.table.list = []
  740. this.table2.list = []
  741. this.table3.list = []
  742. this.table2.listLoading = false
  743. this.table3.listLoading = false
  744. this.table4.listLoading = false
  745. this.chart1.listLoading = false
  746. }
  747. setTimeout(() => {
  748. this.table.listLoading = false
  749. }, 100)
  750. })
  751. },
  752. handleSearch() {
  753. console.log('点击了查询')
  754. if (this.table.getdataListParm.parammaps.inputDatetime !== '' && this.table.getdataListParm.parammaps.inputDatetime !== null) {
  755. this.table.getdataListParm.parammaps.startTime = parseTime(this.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  756. this.table.getdataListParm.parammaps.stopTime = parseTime(this.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  757. } else {
  758. this.table.getdataListParm.parammaps.inputDatetime = ''
  759. this.table.getdataListParm.parammaps.startTime = ''
  760. this.table.getdataListParm.parammaps.stopTime = ''
  761. }
  762. this.table.getdataListParm.offset = 1
  763. this.getList()
  764. },
  765. handleRefresh() {
  766. console.log('点击了重置')
  767. this.table.getdataListParm.parammaps.tmrtname = ''
  768. this.table.getdataListParm.parammaps.iscompleted = ''
  769. this.table.getdataListParm.parammaps.lpplantype = ''
  770. this.table.getdataListParm.parammaps.startTime = ''
  771. this.table.getdataListParm.parammaps.stopTime = ''
  772. this.table.getdataListParm.parammaps.inputDatetime = ''
  773. this.table.getdataListParm.offset = 1
  774. this.getList()
  775. },
  776. handleBefore() {
  777. if (this.table.getdataListParm.parammaps.inputDatetime !== '' && this.table.getdataListParm.parammaps.inputDatetime !== null) {
  778. var start = new Date(this.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
  779. var stop = new Date(this.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
  780. if (stop > Date.now()) {
  781. this.Nextdisabled = true
  782. this.Beforedisabled = false
  783. } else {
  784. this.Nextdisabled = false
  785. this.Beforedisabled = false
  786. }
  787. this.table.getdataListParm.parammaps.inputDatetime.length = 0
  788. this.table.getdataListParm.parammaps.inputDatetime.push(start, stop)
  789. this.$forceUpdate()
  790. }
  791. this.table.getdataListParm.parammaps.startTime = parseTime(this.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  792. this.table.getdataListParm.parammaps.stopTime = parseTime(this.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  793. this.getList()
  794. },
  795. handleNext() {
  796. if (this.table.getdataListParm.parammaps.inputDatetime !== '' && this.table.getdataListParm.parammaps.inputDatetime !== null) {
  797. var start2 = new Date(this.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
  798. var stop2 = new Date(this.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
  799. if (stop2 > Date.now()) {
  800. this.Nextdisabled = true
  801. this.Beforedisabled = false
  802. } else {
  803. this.Nextdisabled = false
  804. this.Beforedisabled = false
  805. }
  806. this.table.getdataListParm.parammaps.inputDatetime.length = 0
  807. this.table.getdataListParm.parammaps.inputDatetime.push(start2, stop2)
  808. this.$forceUpdate()
  809. }
  810. this.table.getdataListParm.parammaps.startTime = parseTime(this.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
  811. this.table.getdataListParm.parammaps.stopTime = parseTime(this.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
  812. this.getList()
  813. },
  814. rowClick(row, column, event) {
  815. this.table2.getdataListParm.parammaps.id = row.id
  816. this.table3.getdataListParm.parammaps.pid = row.id
  817. this.table4.getdataListParm.parammaps.pid = row.id
  818. this.chart1.getdataListParm.parammaps.pid = row.id
  819. this.chartName = row.tmrtname
  820. if (row.lpplantype == '预混计划') {
  821. this.isPremixedPlan = true
  822. this.isResidualMaterialPlan = false
  823. this.isSpreadingPlan = false
  824. this.isSpreadingPlanSH = false
  825. this.isSpreadingPlanSS = false
  826. this.table2.getdataListParm.name = 'getprocessAnalysisStr'
  827. this.table3.getdataListParm.name = 'getprocessAnalysisHL'
  828. this.table2.getdataListParm.parammaps.pastureid = row.pastureid
  829. this.table3.getdataListParm.parammaps.pastureid = row.pastureid
  830. this.getList2()
  831. this.getList3()
  832. } else if (row.lpplantype == '剩料计划') {
  833. this.isResidualMaterialPlan = true
  834. this.isPremixedPlan = false
  835. this.isSpreadingPlan = false
  836. this.isSpreadingPlanSH = false
  837. this.isSpreadingPlanSS = false
  838. this.table2.getdataListParm.name = 'getprocessAnalysisStrSH'
  839. this.table3.getdataListParm.name = 'getprocessAnalysisHLSH'
  840. this.table4.getdataListParm.name = 'getprocessAnalysisSLSH'
  841. this.table2.getdataListParm.parammaps.pastureid = row.pastureid
  842. this.table3.getdataListParm.parammaps.pastureid = row.pastureid
  843. this.table4.getdataListParm.parammaps.pastureid = row.pastureid
  844. this.getList2()
  845. this.getList3()
  846. this.getList4()
  847. } else if (row.lpplantype == '撒料计划-混料') {
  848. this.isSpreadingPlan = false
  849. this.isPremixedPlan = false
  850. this.isResidualMaterialPlan = false
  851. this.isSpreadingPlanSH = true
  852. this.isSpreadingPlanSS = false
  853. this.table2.getdataListParm.name = 'getprocessAnalysisStr'
  854. this.table3.getdataListParm.name = 'getprocessAnalysisHL'
  855. this.table4.getdataListParm.name = 'getprocessAnalysisSL'
  856. this.table2.getdataListParm.parammaps.pastureid = row.pastureid
  857. this.table3.getdataListParm.parammaps.pastureid = row.pastureid
  858. this.table4.getdataListParm.parammaps.pastureid = row.pastureid
  859. this.chart1.getdataListParm.parammaps.pastureid = row.pastureid
  860. this.getList2()
  861. this.getList3()
  862. this.getList4()
  863. this.getChart1()
  864. } else if (row.lpplantype == '撒料计划-撒料') {
  865. this.isSpreadingPlan = false
  866. this.isPremixedPlan = false
  867. this.isResidualMaterialPlan = false
  868. this.isSpreadingPlanSH = false
  869. this.isSpreadingPlanSS = true
  870. this.table2.getdataListParm.name = 'getprocessAnalysisStr'
  871. this.table3.getdataListParm.name = 'getprocessAnalysisHL'
  872. this.table4.getdataListParm.name = 'getprocessAnalysisSL'
  873. this.table2.getdataListParm.parammaps.pastureid = row.pastureid
  874. this.table3.getdataListParm.parammaps.pastureid = row.pastureid
  875. this.table4.getdataListParm.parammaps.pastureid = row.pastureid
  876. this.chart1.getdataListParm.parammaps.pastureid = row.pastureid
  877. this.getList2()
  878. this.getList3()
  879. this.getList4()
  880. this.getChart1()
  881. } else if (row.lpplantype == '预称重计划') {
  882. this.isSpreadingPlan = false
  883. this.isPremixedPlan = false
  884. this.isResidualMaterialPlan = false
  885. this.isSpreadingPlanSH = true
  886. this.isSpreadingPlanSS = false
  887. this.table2.getdataListParm.name = 'getprocessAnalysisStr'
  888. this.table3.getdataListParm.name = 'getprocessAnalysisHL'
  889. this.table4.getdataListParm.name = 'getprocessAnalysisSL'
  890. this.table2.getdataListParm.parammaps.pastureid = row.pastureid
  891. this.table3.getdataListParm.parammaps.pastureid = row.pastureid
  892. this.table4.getdataListParm.parammaps.pastureid = row.pastureid
  893. this.chart1.getdataListParm.parammaps.pastureid = row.pastureid
  894. this.getList2()
  895. this.getList3()
  896. this.getList4()
  897. this.getChart1()
  898. } else {
  899. this.isSpreadingPlan = true
  900. this.isPremixedPlan = false
  901. this.isResidualMaterialPlan = false
  902. this.isSpreadingPlanSH = false
  903. this.isSpreadingPlanSS = false
  904. this.table2.getdataListParm.name = 'getprocessAnalysisStr'
  905. this.table3.getdataListParm.name = 'getprocessAnalysisHL'
  906. this.table4.getdataListParm.name = 'getprocessAnalysisSL'
  907. this.table2.getdataListParm.parammaps.pastureid = row.pastureid
  908. this.table3.getdataListParm.parammaps.pastureid = row.pastureid
  909. this.table4.getdataListParm.parammaps.pastureid = row.pastureid
  910. this.chart1.getdataListParm.parammaps.pastureid = row.pastureid
  911. this.getList2()
  912. this.getList3()
  913. this.getList4()
  914. this.getChart1()
  915. }
  916. this.title = '' + row.lpplantype
  917. },
  918. // 过程详情
  919. getList2() {
  920. this.table2.listLoading = false
  921. GetDataByName(this.table2.getdataListParm).then(response => {
  922. console.log('过程详情table数据', response.data.list)
  923. if (response.data.list !== null) {
  924. this.table2.list = response.data.list
  925. } else {
  926. this.table2.list = []
  927. }
  928. setTimeout(() => {
  929. this.table2.listLoading = false
  930. }, 100)
  931. })
  932. },
  933. // 混料详情
  934. getList3() {
  935. this.table3.listLoading = false
  936. GetDataByName(this.table3.getdataListParm).then(response => {
  937. console.log('混料详情table数据', response.data.list)
  938. if (response.data.list !== null) {
  939. this.table3.list = response.data.list
  940. } else {
  941. this.table3.list = []
  942. }
  943. setTimeout(() => {
  944. this.table3.listLoading = false
  945. }, 100)
  946. })
  947. },
  948. // 撒料详情
  949. getList4() {
  950. this.table4.listLoading = false
  951. GetDataByName(this.table4.getdataListParm).then(response => {
  952. console.log('撒料详情table数据', response.data.list)
  953. if (response.data.list !== null) {
  954. this.table4.list = response.data.list
  955. this.rowspan()
  956. } else {
  957. this.table4.list = []
  958. }
  959. setTimeout(() => {
  960. this.table4.listLoading = false
  961. }, 100)
  962. })
  963. },
  964. rowspan() {
  965. this.spanArr = []
  966. this.table4.list.forEach((item, index) => {
  967. if (index == 0) {
  968. this.spanArr.push(1)
  969. this.position = 0
  970. } else {
  971. console.log(item, index, '======')
  972. if (this.table4.list[index].aweight == this.table4.list[index - 1].aweight) {
  973. this.spanArr[this.position] += 1
  974. this.spanArr.push(0)
  975. } else {
  976. this.spanArr.push(1)
  977. this.position = index
  978. }
  979. }
  980. })
  981. },
  982. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  983. if (columnIndex == 4) {
  984. const _row = this.spanArr[rowIndex]
  985. const _col = _row > 0 ? 1 : 0
  986. return {
  987. rowspan: _row,
  988. colspan: _col
  989. }
  990. }
  991. },
  992. getChart1() {
  993. this.chart1.listLoading = true
  994. GetReportform(this.chart1.getdataListParm).then(response => {
  995. if (response.data.list !== null) {
  996. this.chart1.list = response.data.data
  997. console.log('实时监控', response.data.list)
  998. // console.log('实时监控', response.data.list.data4)
  999. var evenNumbers = []// 偶数
  1000. var oddNumbers = []// 奇数
  1001. for (let i = 0; i < response.data.list.data4.length; i++) {
  1002. console.log(response.data.list.data4[i])
  1003. if (i == 0) {
  1004. oddNumbers.push(response.data.list.data4[i])
  1005. } else {
  1006. if (i % 2 == 0) {
  1007. evenNumbers.push(response.data.list.data4[i])
  1008. } else {
  1009. oddNumbers.push(response.data.list.data4[i])
  1010. }
  1011. }
  1012. }
  1013. response.data.list.data4 = oddNumbers
  1014. response.data.list.data5 = evenNumbers
  1015. // response.data.list.data1 = ['06:34:10', '06:34:11', '06:34:12', '06:34:13', '06:34:14', '06:34:14', '06:34:15', '06:34:16', '06:34:17', '06:34:18', '06:34:19', '06:34:20', '06:34:21', '06:34:22', '06:34:23', '06:34:29', '06:34:44', '06:34:59', '06:35:14', '06:35:29', '06:35:44', '06:35:59', '06:36:14', '06:36:29', '06:36:44', '06:36:59', '06:37:14', '06:37:28', '06:37:29', '06:37:44', '06:37:59', '06:38:14', '06:38:29', '06:38:44', '06:38:59', '06:38:59', '06:39:14', '06:39:29', '06:39:44', '06:39:59', '06:40:08', '06:40:14', '06:40:29', '06:40:44', '06:40:59', '06:41:14', '06:41:29', '06:41:40', '06:41:44', '06:41:59', '06:42:14', '06:42:29', '06:42:44', '06:42:59', '06:43:09', '06:43:14', '06:43:29', '06:43:44', '06:43:59', '06:44:14', '06:44:29', '06:44:44'],
  1016. // response.data.list.data2 = [
  1017. // { 'value': '141.6', 'myname': 'A1' },
  1018. // { 'value': '141.6', 'myname': 'A1' },
  1019. // { 'value': '141.6', 'myname': 'A1' },
  1020. // { 'value': '141.6', 'myname': 'A1' },
  1021. // { 'value': '141.6', 'myname': 'A1' },
  1022. // { 'value': '141.6', 'myname': 'A1' },
  1023. // { 'value': '141.6', 'myname': 'A1' },
  1024. // { 'value': '141.6', 'myname': 'A1' },
  1025. // { 'value': '141.6', 'myname': 'A1' },
  1026. // { 'value': '141.6', 'myname': 'A1' },
  1027. // { 'value': '141.6', 'myname': 'A1' },
  1028. // { 'value': '141.6', 'myname': 'A1' },
  1029. // { 'value': '141.6', 'myname': 'A1' },
  1030. // { 'value': '141.6', 'myname': 'A1' },
  1031. // { 'value': '141.6', 'myname': 'A1' },
  1032. // { 'value': '141.6', 'myname': 'A1' },
  1033. // { 'value': '141.6', 'myname': 'A1' },
  1034. // { 'value': '141.6', 'myname': 'A1' },
  1035. // { 'value': '141.6', 'myname': 'A1' },
  1036. // { 'value': '141.6', 'myname': 'A1' },
  1037. // { 'value': '141.6', 'myname': 'A1' },
  1038. // { 'value': '141.6', 'myname': 'A1' },
  1039. // { 'value': '141.6', 'myname': 'A1' },
  1040. // { 'value': '141.6', 'myname': 'A1' },
  1041. // { 'value': '141.6', 'myname': 'A1' },
  1042. // { 'value': '141.6', 'myname': 'A1' },
  1043. // { 'value': '141.6', 'myname': 'A1' },
  1044. // { 'value': '141.6', 'myname': 'A1' },
  1045. // { 'value': '341.46', 'myname': 'B1' },
  1046. // { 'value': '341.46', 'myname': 'B1' },
  1047. // { 'value': '341.46', 'myname': 'B1' },
  1048. // { 'value': '341.46', 'myname': 'B1' },
  1049. // { 'value': '341.46', 'myname': 'B1' },
  1050. // { 'value': '341.46', 'myname': 'B1' },
  1051. // { 'value': '341.46', 'myname': 'B1' },
  1052. // { 'value': '437.73', 'myname': 'C1' },
  1053. // { 'value': '437.73', 'myname': 'C1' },
  1054. // { 'value': '437.73', 'myname': 'C1' },
  1055. // { 'value': '437.73', 'myname': 'C1' },
  1056. // { 'value': '437.73', 'myname': 'C1' },
  1057. // { 'value': '437.73', 'myname': 'C1' },
  1058. // { 'value': '437.73', 'myname': 'C1' },
  1059. // { 'value': '687.33', 'myname': 'C1' },
  1060. // { 'value': '687.33', 'myname': 'C1' },
  1061. // { 'value': '687.33', 'myname': 'C1' },
  1062. // { 'value': '687.33', 'myname': 'C1' },
  1063. // { 'value': '687.33', 'myname': 'C1' },
  1064. // { 'value': '687.33', 'myname': 'C1' },
  1065. // { 'value': '687.33', 'myname': 'C1' },
  1066. // { 'value': '959.24', 'myname': 'D1' },
  1067. // { 'value': '959.24', 'myname': 'D1' },
  1068. // { 'value': '959.24', 'myname': 'D1' },
  1069. // { 'value': '959.24', 'myname': 'D1' },
  1070. // { 'value': '959.24', 'myname': 'D1' },
  1071. // { 'value': '959.24', 'myname': 'D1' },
  1072. // { 'value': '959.24', 'myname': 'D1' },
  1073. // { 'value': '959.24', 'myname': 'D1' },
  1074. // { 'value': '1107.6', 'myname': 'D1' },
  1075. // { 'value': '1107.6', 'myname': 'D1' },
  1076. // { 'value': '1107.6', 'myname': 'D1' },
  1077. // { 'value': '1107.6', 'myname': 'D1' },
  1078. // { 'value': '1107.6', 'myname': 'D1' },
  1079. // { 'value': '1107.6', 'myname': 'D1' },
  1080. // { 'value': '1107.6', 'myname': 'D1' },
  1081. // { 'value': '1107.6', 'myname': 'D1' }
  1082. // ]
  1083. // response.data.list.data3 = [-8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -11, -9, -4, -8, -10, -8, -8, 0, -1, 32, 88, 142, 143, 141, 154, 215, 250, 256, 338, 337, 329, 325, 409, 420, 438, 434, 432, 447, 439, 496, 655, 680, 678, 670, 669, 741, 752, 924],
  1084. this.chart1.chartLine_data = response.data.list
  1085. this.chart1.total = response.data.total
  1086. this.roadChartLine1(this.chart1.chartLine_data)
  1087. } else {
  1088. this.chart1.list = []
  1089. }
  1090. setTimeout(() => {
  1091. this.chart1.listLoading = false
  1092. }, 100)
  1093. })
  1094. },
  1095. roadChartLine1(chartLine_data) {
  1096. console.log(chartLine_data, 'chartLine_data')
  1097. if (this.chartLine != null) {
  1098. this.chartLine.dispose()
  1099. }
  1100. this.chartLine = echarts.init(document.getElementById('chartLine'))
  1101. var option = {
  1102. title: { text: '', subtext: '' },
  1103. color: ['#38c193', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
  1104. legend: [{
  1105. itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
  1106. data: [{ name: '设计重量' }, { name: '实际重量' }]
  1107. }, {
  1108. itemWidth: 15, itemHeight: 15, right: '0', textStyle: { fontSize: 12 },
  1109. data: [{ name: '开始重量', icon: 'image://https://kptyun.cn:8081/file/pic/3.png' }, { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' }]
  1110. }],
  1111. tooltip: {
  1112. trigger: 'axis',
  1113. formatter: function(params) {
  1114. // console.log(params, 'params')
  1115. var tip = params[0].name
  1116. for (let i = 0; i < params.length; i++) {
  1117. tip += '<br>' + params[i].seriesName + ': '
  1118. if (params[i].value[0] == params[0].name) {
  1119. tip += params[i].value[1]
  1120. } else {
  1121. tip += params[i].value
  1122. }
  1123. }
  1124. tip += '<br>' + params[0].data[2] + params[0].data[3]
  1125. console.log(tip, 'tip')
  1126. return tip
  1127. }
  1128. },
  1129. calculable: true,
  1130. xAxis: [
  1131. { type: 'category', splitLine: { show: false }, name: '时间', data: chartLine_data.data1, axisLabel: { show: true, textStyle: { color: '#666' }}}
  1132. ],
  1133. yAxis: [{ type: 'value' }],
  1134. series: [
  1135. { symbol: 'none', name: '实际重量', type: 'line', data: chartLine_data.data3, smooth: true, barWidth: '37', itemStyle: { normal: { lineStyle: { color: '#38c193' }}}},
  1136. { symbol: 'none', name: '设计重量', type: 'line', step: 'middle', data: chartLine_data.data2 },
  1137. { name: '开始重量', symbol: 'image://https://kptyun.cn:8081/file/pic/3.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data4 },
  1138. { name: '结束重量', symbol: 'image://https://kptyun.cn:8081/file/pic/4.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data5 }
  1139. ]
  1140. }
  1141. this.chartLine.setOption(option)
  1142. window.onresize = function() {
  1143. this.chartLine.resize()
  1144. }
  1145. }
  1146. }
  1147. }
  1148. </script>
  1149. <style lang="scss" scoped>
  1150. .search{padding-top:10px;clear: both;}
  1151. .table{margin-top:10px;}
  1152. .detail{
  1153. height:84px;padding:0 10px;font:16px/32px '';color:#333;background: #F9F9F9;display: flex; align-items: center;text-align: center;
  1154. div{
  1155. height: 15px;width: 20%;border-right: 1px solid #E0E0E0;color: #333;
  1156. b{line-height: 20px;font-size: 16px;display: block;margin-top: -10px;height: 20px;color: #009A69;}
  1157. span{font-size: 14px;}
  1158. }
  1159. div:last-child{border-right:none}
  1160. }
  1161. .title{height: 50px;line-height: 50px;}
  1162. </style>