56f6423d6fc1c228549bd12d40c2d87f74a01da4.svn-base 47 KB

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