index.vue 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829
  1. <template>
  2. <div ref="dashboardEditor" class="dashboard-editor-container">
  3. <div class="dashboard" style="margin-bottom: 10px;">
  4. <div class="dashboard-l">
  5. <div class="row1">
  6. <div class="row1-t">
  7. <div class="row1-t-l">
  8. <div class="img-l" />
  9. <span class="content">暂无消息通知</span>
  10. <!-- <div class="img-r" /> -->
  11. </div>
  12. <div class="row1-t-r">{{ date }}</div>
  13. </div>
  14. <div class="row1-c">
  15. <div class="row1-c-l">
  16. <div class="title1">
  17. <div class="img-title">
  18. <img src="../../../assets/images/index/l1.png">
  19. </div>
  20. <span class="content">混料准确率</span>
  21. </div>
  22. <div class="row1-c-l-c">
  23. <span>
  24. <b>{{ row1.list.yesRateHL }}</b>
  25. <br>昨日
  26. </span>
  27. </div>
  28. <div class="row1-c-l-b">
  29. <div><span>近30天混料准确率:</span><b>{{ row1.list.monRateHL }}</b></div>
  30. </div>
  31. </div>
  32. <div class="row1-c-r">
  33. <div class="title1">
  34. <div class="img-title">
  35. <img src="../../../assets/images/index/l4.png">
  36. </div>
  37. <span class="content">撒料准确率</span>
  38. </div>
  39. <div class="row1-c-l-c">
  40. <span>
  41. <b>{{ row1.list.yesRateSL }}</b>
  42. <br>昨日
  43. </span>
  44. </div>
  45. <div class="row1-c-l-b">
  46. <div><span>近30天撒料准确率:</span><b>{{ row1.list.monRateSL }}</b></div>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="row1-b">
  51. <div class="row1-b-l">
  52. <div class="title1">
  53. <div class="img-title">
  54. <img src="../../../assets/images/index/l3.png">
  55. </div>
  56. <span class="content">撒料正确率</span>
  57. </div>
  58. <div class="row1-c-l-c">
  59. <span>
  60. <b>{{ row1.list.yesRateSLR }}</b>
  61. <br>昨日
  62. </span>
  63. </div>
  64. <div class="row1-c-l-b">
  65. <div><span>近30天撒料正确率:</span><b>{{ row1.list.monRateSLR }}</b></div>
  66. </div>
  67. </div>
  68. <div class="row1-b-r">
  69. <div class="title1">
  70. <div class="img-title">
  71. <img src="../../../assets/images/index/l2.png">
  72. </div>
  73. <span class="content">撒料偏差</span>
  74. </div>
  75. <div class="row1-c-l-c">
  76. <span>
  77. <b>{{ row1.list.temtime }}</b>
  78. <br>昨日
  79. </span>
  80. </div>
  81. <div class="row1-c-l-b">
  82. <div><span>近30天撒料偏差:</span><b>{{ row1.list.montime }}</b>分钟</div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="row2">
  88. <div class="title">
  89. <div class="img-title" />
  90. <span class="content">今日计划统计</span>
  91. </div>
  92. <div class="todayPlan">
  93. <div>
  94. <div id="row2chartLine1" style="height: 185px;" />
  95. <div class="bottom">
  96. <div class="bottom-l">
  97. <div class="bottom-l-t">
  98. <b>{{ row2.chart1.chartLine_data.data1 }}</b>次
  99. </div>
  100. <div class="bottom-l-b">
  101. 完成车次
  102. </div>
  103. </div>
  104. <div class="bottom-r">
  105. <div class="bottom-r-t">
  106. <b>{{ row2.chart1.chartLine_data.data2 }}</b>次
  107. </div>
  108. <div class="bottom-r-b">
  109. 计划车次
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. <div>
  115. <div id="row2chartLine2" style="height: 185px;" />
  116. <div class="bottom">
  117. <div class="bottom-l">
  118. <div class="bottom-l-t">
  119. <b>{{ row2.chart2.chartLine_data.data1 }}</b>kg
  120. </div>
  121. <div class="bottom-l-b">
  122. 完成重量
  123. </div>
  124. </div>
  125. <div class="bottom-r">
  126. <div class="bottom-r-t">
  127. <b>{{ row2.chart2.chartLine_data.data2 }}</b>kg
  128. </div>
  129. <div class="bottom-r-b">
  130. 计划重量
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <div class="row3" style="position: relative;">
  138. <div class="title">
  139. <div class="img-title" />
  140. <span class="content">成本统计</span>
  141. </div>
  142. <div v-if="row4.chart1.isChart" class="button">
  143. <div class="exportTable" @click="handleExport('row4chartLine1')">导出</div>
  144. <div class="exportTable" @click="handleTable('row4chartLine1')">切换表格</div>
  145. </div>
  146. <div v-if="row4.chart1.isChart" id="row4chartLine1" v-loading="row4.chart1.listLoading" style="background: #fff;height:310px;" />
  147. <div v-if="row4.chart1.isTable" class="table" style="position: absolute;width: 100%;">
  148. <div class="button">
  149. <div class="exportTable" @click="handleExport('row4chartLine1')">导出</div>
  150. <div class="exportTable" @click="handleChart('row4chartLine1')">切换图表</div>
  151. </div>
  152. <el-table
  153. :key="row4.chart1.table.tableKey"
  154. v-loading="row4.chart1.table.listLoading"
  155. element-loading-text="给我一点时间"
  156. :data="row4.chart1.table.list"
  157. border
  158. fit
  159. highlight-current-row
  160. style="width: 100%;margin-top: 10px;"
  161. height="300"
  162. :row-style="rowStyle"
  163. :cell-style="cellStyle"
  164. class="elTable table-fixed"
  165. >
  166. <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
  167. <el-table-column label="单头牛饲料成本" sortable min-width="110px" align="center" prop="field2" />
  168. <el-table-column label="公斤奶饲料成本(元)" sortable min-width="120px" align="center" prop="field1" />
  169. </el-table>
  170. </div>
  171. </div>
  172. </div>
  173. <div class="dashboard-r">
  174. <div class="row1">
  175. <div class="title">
  176. <div class="img-title" />
  177. <span class="content">实时监控</span>
  178. </div>
  179. <div v-if="carLength>0" id="row2chartLine3" ref="row2chartLine3" style="height: 260px;" />
  180. <div v-else style="height: 260px;text-align: center;line-height: 260px;">当前无正在进行中车次 </div>
  181. <div class="carsLength">当前车辆:<span>{{ carLength }}</span></div>
  182. <div id="car" ref="car" v-loading="row2.chart3.listLoading2" class="car">
  183. <div ref="iconLeft" class="iconLeft" @click="handleLeft">
  184. <img v-if="row2.chart3.isLeft" src="../../../assets/images/index/row-r3.png" class="img-title">
  185. <img v-if="row2.chart3.isLeftA" src="../../../assets/images/index/row-r2.png" class="img-title">
  186. </div>
  187. <div id="carList" ref="carList" class="carList">
  188. <div v-for="(item,index) in list" ref="listW" :key="index" class="listW">
  189. <div ref="list" class="list" :style="{'background': item.background,'color':item.color,'borderColor':item.borderColor}" @click="handleList(index,item)">
  190. <div class="list-t">
  191. <div class="list-t-t">
  192. <el-tooltip :content="item.tname" placement="top">
  193. <span>车辆:{{ item.tname }}</span>
  194. </el-tooltip>
  195. </div>
  196. <div class="list-t-t">
  197. <el-tooltip :content="item.fname" placement="top">
  198. <span v-if="item.inorout == 0">饲料:{{ item.fname }}</span>
  199. <span v-if="item.inorout == 1">栏舍:{{ item.fname }}</span>
  200. </el-tooltip>
  201. </div>
  202. <div class="list-t-t">
  203. <el-tooltip :content="item.remark" placement="top">
  204. <span>描述:{{ item.remark }}</span>
  205. </el-tooltip>
  206. </div>
  207. </div>
  208. <div class="list-b">
  209. <div class="list-b-l">
  210. <div class="left">
  211. <div class="num"><b>{{ item.doneweight }}</b>Kg</div>
  212. <div class="weight">完成重量</div>
  213. </div>
  214. <div class="right" />
  215. </div>
  216. <div class="list-b-l">
  217. <div class="left">
  218. <div class="num"><b>{{ item.leftweight }}</b>Kg</div>
  219. <div class="weight">剩余重量</div>
  220. </div>
  221. <div class="right" />
  222. </div>
  223. <div class="list-b-l">
  224. <div class="left">
  225. <div class="num"><b>{{ item.nowweight }}</b>Kg</div>
  226. <div class="weight">车辆当前载重</div>
  227. </div>
  228. <div class="right" />
  229. </div>
  230. <div class="list-b-l">
  231. <div class="left">
  232. <div class="num"><b>{{ item.lweight }}</b>Kg</div>
  233. <div class="weight">计划重量</div>
  234. </div>
  235. <div class="right" />
  236. </div>
  237. <div class="list-b-l">
  238. <div class="left">
  239. <div class="num"><b>{{ item.donerate }}</b></div>
  240. <div class="weight">完成度</div>
  241. </div>
  242. </div>
  243. </div>
  244. </div>
  245. <div v-if="item.isChecked" ref="checked" class="img-checked" />
  246. </div>
  247. </div>
  248. <div ref="iconRight" class="iconRight" @click="handleRight">
  249. <img v-if="row2.chart3.isRightA" src="../../../assets/images/index/row-r5.png" class="img-title">
  250. <img v-if="row2.chart3.isRight" src="../../../assets/images/index/row-r4.png" class="img-title">
  251. </div>
  252. </div>
  253. </div>
  254. <div class="row2">
  255. <div class="row2-l" style="position: relative;">
  256. <div class="title">
  257. <div class="img-title" />
  258. <span class="content">计划统计</span>
  259. </div>
  260. <div v-if="row3.chart1.isChart" class="button">
  261. <div class="exportTable" @click="handleExport('row3chartLine1')">导出</div>
  262. <div class="exportTable" @click="handleTable('row3chartLine1')">切换表格</div>
  263. </div>
  264. <div v-if="row3.chart1.isChart" id="row3chartLine1" v-loading="row3.chart1.listLoading" style="background: #fff;height:310px;" />
  265. <div v-if="row3.chart1.isTable" class="table" style="position: absolute;width: 100%;">
  266. <div class="button">
  267. <div class="exportTable" @click="handleExport('row3chartLine1')">导出</div>
  268. <div class="exportTable" @click="handleChart('row3chartLine1')">切换图表</div>
  269. </div>
  270. <el-table
  271. :key="row3.chart1.table.tableKey"
  272. v-loading="row3.chart1.table.listLoading"
  273. element-loading-text="给我一点时间"
  274. :data="row3.chart1.table.list"
  275. border
  276. fit
  277. highlight-current-row
  278. style="width: 100%;margin-top: 10px;"
  279. height="300"
  280. :row-style="rowStyle"
  281. :cell-style="cellStyle"
  282. class="elTable table-fixed"
  283. >
  284. <el-table-column label="日期" sortable min-width="85px" align="center" prop="日期" />
  285. <el-table-column label="计划执行重量(kg)" sortable min-width="90px" align="center" prop="实际量" />
  286. <el-table-column label="配方理论重量(kg)" sortable min-width="90px" align="center" prop="理论量" />
  287. <el-table-column label="计划准确率" sortable min-width="85px" align="center" prop="field1" />
  288. <el-table-column label="计划取消重量(kg)" sortable min-width="90px" align="center" prop="计划取消重量" />
  289. <el-table-column label="计划准确率(去除取消重量)" sortable min-width="100px" align="center" prop="field3" />
  290. <el-table-column label="计划正确数" sortable min-width="85px" align="center" prop="正确数" />
  291. <el-table-column label="计划数" sortable min-width="85px" align="center" prop="计划数" />
  292. <el-table-column label="计划正确率" sortable min-width="75px" align="center" prop="field2" />
  293. </el-table>
  294. </div>
  295. </div>
  296. <div class="row2-r" style="position: relative;">
  297. <div class="title">
  298. <div class="img-title" />
  299. <span class="content">混料实际重量统计</span>
  300. </div>
  301. <div v-if="row4.chart2.isChart" class="button">
  302. <div class="exportTable" @click="handleExport('row4chartLine2')">导出</div>
  303. <div class="exportTable" @click="handleTable('row4chartLine2')">切换表格</div>
  304. </div>
  305. <div v-if="row4.chart2.isChart" id="row4chartLine2" v-loading="row4.chart2.listLoading" style="background: #fff;height:310px;" />
  306. <div v-if="row4.chart2.isTable" class="table" style="position: absolute;width:100%;">
  307. <div class="button">
  308. <div class="exportTable" @click="handleExport('row4chartLine2')">导出</div>
  309. <div class="exportTable" @click="handleChart('row4chartLine2')">切换图表</div>
  310. </div>
  311. <el-table
  312. :key="row4.chart2.table.tableKey"
  313. v-loading="row4.chart2.table.listLoading"
  314. element-loading-text="给我一点时间"
  315. :data="row4.chart2.table.list"
  316. border
  317. fit
  318. highlight-current-row
  319. style="width: 100%;margin-top: 10px;"
  320. height="300"
  321. :row-style="rowStyle"
  322. :cell-style="cellStyle"
  323. class="elTable table-fixed"
  324. >
  325. <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
  326. <el-table-column label="重量" sortable min-width="110px" align="center" prop="field1" />
  327. </el-table>
  328. </div>
  329. </div>
  330. </div>
  331. <div class="row3">
  332. <div class="row3-l" style="position: relative;">
  333. <div class="title">
  334. <div class="img-title" />
  335. <span class="content">泌乳牛干物质采食量</span>
  336. </div>
  337. <div v-if="row3.chart2.isChart" class="button">
  338. <div class="exportTable" @click="handleExport('row3chartLine2')">导出</div>
  339. <div class="exportTable" @click="handleTable('row3chartLine2')">切换表格</div>
  340. </div>
  341. <div v-if="row3.chart2.isChart" id="row3chartLine2" v-loading="row3.chart2.listLoading" style="background: #fff;height:310px;" />
  342. <div v-if="row3.chart2.isTable" class="table" style="position: absolute;width: 100%;">
  343. <div class="button">
  344. <div class="exportTable" @click="handleExport('row3chartLine2')">导出</div>
  345. <div class="exportTable" @click="handleChart('row3chartLine2')">切换图表</div>
  346. </div>
  347. <el-table
  348. :key="row3.chart2.table.tableKey"
  349. v-loading="row3.chart2.table.listLoading"
  350. element-loading-text="给我一点时间"
  351. :data="row3.chart2.table.list"
  352. border
  353. fit
  354. highlight-current-row
  355. style="width: 100%;margin-top: 10px;"
  356. height="300"
  357. :row-style="rowStyle"
  358. :cell-style="cellStyle"
  359. class="elTable table-fixed"
  360. >
  361. <el-table-column label="日期" sortable min-width="110px" align="center" prop="日期" />
  362. <el-table-column label="泌乳牛采食量(kg)" sortable min-width="110px" align="center" prop="field1" />
  363. <el-table-column label="泌乳牛产奶量(kg)" sortable min-width="110px" align="center" prop="field2" />
  364. </el-table>
  365. </div>
  366. </div>
  367. <div class="row3-r">
  368. <div class="title">
  369. <div class="img-title" />
  370. <span class="content">库存预警</span>
  371. <a style="float: right;color: #009C69;font-size: 12px;margin-right: 10px;" @click="handleMore">查看更多 &nbsp;>></a>
  372. </div>
  373. <div id="table" style="height: 330px;background: #fff;">
  374. <el-table
  375. :key="row4.table.tableKey"
  376. v-loading="row4.table.listLoading"
  377. element-loading-text="给我一点时间"
  378. :data="row4.table.list"
  379. border
  380. fit
  381. highlight-current-row
  382. style="width: 98%;background: #fff;margin-top: 10px;"
  383. height="320"
  384. :row-style="rowStyle"
  385. :cell-style="cellStyle"
  386. class="elTable table-fixed"
  387. >
  388. <el-table-column label="序号" type="index" min-width="80px" align="center" />
  389. <el-table-column label="饲料名称" min-width="80px" align="center" prop="feedname" />
  390. <el-table-column label="库存量(kg)" min-width="70px" align="center" prop="stockweight" />
  391. <el-table-column label="剩余使用天数" min-width="80px" align="center" prop="ldays" />
  392. </el-table>
  393. </div>
  394. </div>
  395. </div>
  396. </div>
  397. </div>
  398. </div>
  399. </template>
  400. <script>
  401. import { GetDataByName, GetReportform } from '@/api/common'
  402. import Cookies from 'js-cookie'
  403. import { parseTime } from '@/utils/index.js'
  404. import echarts from 'echarts'
  405. import { json2excel } from '@/utils/index.js'
  406. require('echarts/theme/macarons')
  407. // var myKey = 0
  408. var that = this
  409. var carIndex = 0 // 判断是否大于当前车辆数
  410. var index = 0 // 判断当前跳到第几个车辆
  411. var timer = null
  412. export default {
  413. name: 'PastureDashboard',
  414. inject: ['reload'],
  415. data() {
  416. return {
  417. val: '这是值1',
  418. date: parseTime(new Date(), '{y}-{m}-{d}'),
  419. list: [],
  420. news: 1,
  421. carLength: 0, // 车辆
  422. myKey: 0, // 轮播Key值
  423. row1: {
  424. getdataListParm: {
  425. name: 'getHomepageStr',
  426. page: 1,
  427. offset: 1,
  428. pagecount: 10,
  429. returntype: 'Map',
  430. parammaps: {
  431. pastureid: Cookies.get('pastureid')
  432. }
  433. },
  434. listLoading: true,
  435. list: ''
  436. },
  437. row2: {
  438. chart1: {
  439. chartLine: null,
  440. chartLine_data: {}
  441. },
  442. chart2: {
  443. chartLine: null,
  444. chartLine_data: {}
  445. },
  446. chart3: {
  447. isLeft: true,
  448. isRight: true,
  449. chartLine: null,
  450. chartLine_data: {},
  451. getdataListParm: {
  452. name: 'getHomeprocessAnalysis',
  453. page: 1,
  454. offset: 1,
  455. pagecount: 2,
  456. returntype: 'Map',
  457. parammaps: {
  458. pastureid: Cookies.get('pastureid'),
  459. id: '',
  460. pid: ''
  461. }
  462. },
  463. list: [],
  464. total: 0,
  465. listLoading: true,
  466. pageNum: '',
  467. pages: '',
  468. getdataListParmList: {
  469. name: 'getHomepageLBList',
  470. page: 1,
  471. offset: 1,
  472. pagecount: 2,
  473. returntype: 'Map',
  474. parammaps: {
  475. pastureid: Cookies.get('pastureid')
  476. }
  477. },
  478. list2: [],
  479. total2: 0,
  480. listLoading2: true,
  481. pageNum2: '',
  482. pages2: ''
  483. }
  484. },
  485. row3: {
  486. chartDate: [],
  487. chart1: {
  488. chartLine: null,
  489. chartLine_data: {},
  490. getdataListParm: {
  491. name: 'getAccuracyAllJH',
  492. page: 1,
  493. offset: 1,
  494. pagecount: 10,
  495. returntype: 'Map',
  496. parammaps: {
  497. pastureid: Cookies.get('pastureid'),
  498. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  499. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  500. inputDatetime: [new Date(), new Date()]
  501. }
  502. },
  503. list: [],
  504. total: 0,
  505. listLoading: true,
  506. isChart: true,
  507. isTable: false,
  508. table: {
  509. tableKey: 1,
  510. list: [],
  511. total: 0,
  512. listLoading: false
  513. }
  514. },
  515. chart2: {
  516. chartLine: null,
  517. chartLine_data: {},
  518. getdataListParm: {
  519. name: 'getFeedEffMR',
  520. page: 1,
  521. offset: 1,
  522. pagecount: 10,
  523. returntype: 'Map',
  524. parammaps: {
  525. pastureid: Cookies.get('pastureid'),
  526. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  527. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  528. inputDatetime: [new Date(), new Date()]
  529. }
  530. },
  531. list: [],
  532. total: 0,
  533. listLoading: true,
  534. isChart: true,
  535. isTable: false,
  536. table: {
  537. tableKey: 1,
  538. list: [],
  539. total: 0,
  540. listLoading: false
  541. }
  542. }
  543. },
  544. row4: {
  545. chartDate: [],
  546. chart1: {
  547. chartLine: null,
  548. chartLine_data: {},
  549. getdataListParm: {
  550. name: 'getHomepageCB',
  551. page: 1,
  552. offset: 1,
  553. pagecount: 10,
  554. returntype: 'Map',
  555. parammaps: {
  556. pastureid: Cookies.get('pastureid'),
  557. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  558. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  559. inputDatetime: [new Date(), new Date()]
  560. }
  561. },
  562. list: [],
  563. total: 0,
  564. listLoading: true,
  565. isChart: true,
  566. isTable: false,
  567. table: {
  568. tableKey: 1,
  569. list: [],
  570. total: 0,
  571. listLoading: false
  572. }
  573. },
  574. chart2: {
  575. chartLine: null,
  576. chartLine_data: {},
  577. getdataListParm: {
  578. name: 'getAccuraaActHL',
  579. page: 1,
  580. offset: 1,
  581. pagecount: 10,
  582. returntype: 'Map',
  583. parammaps: {
  584. pastureid: Cookies.get('pastureid'),
  585. startTime: parseTime(new Date(), '{y}-{m}-{d}'),
  586. stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
  587. inputDatetime: [new Date(), new Date()]
  588. }
  589. },
  590. list: [],
  591. total: 0,
  592. listLoading: true,
  593. isChart: true,
  594. isTable: false,
  595. table: {
  596. tableKey: 1,
  597. list: [],
  598. total: 0,
  599. listLoading: false
  600. }
  601. },
  602. table: {
  603. getdataListParm: {
  604. name: 'getFsWarnList',
  605. page: 1,
  606. offset: 1,
  607. pagecount: 5,
  608. returntype: 'Map',
  609. parammaps: {
  610. pastureid: Cookies.get('pastureid')
  611. }
  612. },
  613. tableKey: 1,
  614. list: [],
  615. total: 0,
  616. listLoading: true,
  617. temp: {}
  618. }
  619. },
  620. rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
  621. cellStyle: { padding: 0 + 'px' },
  622. timer: null,
  623. clickKey: 0,
  624. isClick: false
  625. }
  626. },
  627. watch: {
  628. isClick: {
  629. handler(newName, oldName) {
  630. if (newName == true) {
  631. setTimeout(() => {
  632. this.timer = setInterval(this.autoPlay, 15000)
  633. }, 20000)
  634. }
  635. },
  636. immediate: true
  637. }
  638. },
  639. created() {
  640. // this.reload()
  641. this.getCarLength()
  642. this.getChart3List()
  643. this.getTimeFn()
  644. this.getList()
  645. this.getChart4()
  646. this.getChart5()
  647. this.getChart6()
  648. this.getChart7()
  649. this.getTable8()
  650. },
  651. mounted() {
  652. this.timer = null
  653. this.timer = setInterval(this.autoPlay, 15000)
  654. },
  655. destroyed() {
  656. clearInterval(this.timer)
  657. },
  658. methods: {
  659. getTimeFn() {
  660. // this.reload()
  661. const that = this
  662. const end = new Date()
  663. const start = new Date()
  664. start.setTime(start.getTime() - 3600 * 1000 * 24 * 20)
  665. that.row3.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
  666. that.row3.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
  667. that.row3.chart1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  668. that.row3.chart1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  669. that.row3.chart1.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  670. that.row3.chart1.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  671. that.row3.chart2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  672. that.row3.chart2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  673. that.row3.chart2.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  674. that.row3.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  675. that.row4.chartDate[0] = parseTime(start, '{y}-{m}-{d}')
  676. that.row4.chartDate[1] = parseTime(end, '{y}-{m}-{d}')
  677. that.row4.chart1.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  678. that.row4.chart1.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  679. that.row4.chart1.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  680. that.row4.chart1.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  681. that.row4.chart2.getdataListParm.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
  682. that.row4.chart2.getdataListParm.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
  683. that.row4.chart2.getdataListParm.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
  684. that.row4.chart2.getdataListParm.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
  685. },
  686. getList() {
  687. this.row1.listLoading = true
  688. GetDataByName(this.row1.getdataListParm).then(response => {
  689. if (response.data !== null && response.data.list !== null) {
  690. console.log('row1数据', response.data.list)
  691. if (response.data.list[0].monRateHL == undefined) { response.data.list[0].monRateHL = '' }
  692. if (response.data.list[0].monRateSL == undefined) { response.data.list[0].monRateSL = '' }
  693. if (response.data.list[0].monRateSLR == undefined) { response.data.list[0].monRateSLR = '' }
  694. if (response.data.list[0].yesRateHL == undefined) { response.data.list[0].yesRateHL = '' }
  695. if (response.data.list[0].yesRateHL == undefined) { response.data.list[0].yesRateHL = '' }
  696. if (response.data.list[0].yesRateSL == undefined) { response.data.list[0].yesRateSL = '' }
  697. if (response.data.list[0].yesRateSLR == undefined) { response.data.list[0].yesRateSLR = '' }
  698. if (response.data.list[0].temtime == undefined) { response.data.list[0].temtime = '' }
  699. if (response.data.list[0].montime == undefined) { response.data.list[0].montime = '' }
  700. this.row1.list = response.data.list[0]
  701. this.row2.chart1.chartLine_data.data1 = parseFloat(response.data.list[0].doneTimes)
  702. this.row2.chart1.chartLine_data.data2 = parseFloat(response.data.list[0].planTimes)
  703. this.row2.chart2.chartLine_data.data1 = parseFloat(response.data.list[0].doneWeight)
  704. this.row2.chart2.chartLine_data.data2 = parseFloat(response.data.list[0].planWeight)
  705. this.roadChartLine1(this.row2.chart1.chartLine_data)
  706. this.roadChartLine2(this.row2.chart2.chartLine_data)
  707. } else {
  708. this.row1.list.data1.monRateHL = ''
  709. this.row1.list.data1.monRateSL = ''
  710. this.row1.list.data1.monRateSLR = ''
  711. this.row1.list.data1.yesRateHL = ''
  712. this.row1.list.data1.yesRateSL = ''
  713. this.row1.list.data1.yesRateSLR = ''
  714. this.row1.list.data1.temtime = ''
  715. this.row1.list.data1.montime = ''
  716. this.row2.chart1.chartLine_data.data1 = ''
  717. this.row2.chart1.chartLine_data.data2 = ''
  718. this.row2.chart2.chartLine_data.data1 = ''
  719. this.row2.chart2.chartLine_data.data2 = ''
  720. }
  721. setTimeout(() => {
  722. this.row1.listLoading = false
  723. }, 100)
  724. })
  725. },
  726. // 今日计划统计-完成车次
  727. roadChartLine1(chartLine_data) {
  728. console.log('chartLine_data', chartLine_data)
  729. if (this.row2.chart1.chartLine != null) {
  730. this.row2.chart1.chartLine.dispose()
  731. }
  732. this.row2.chart1.chartLine = echarts.init(document.getElementById('row2chartLine1'))
  733. if (chartLine_data.data2 == 0 || chartLine_data.data1 == 0) {
  734. chartLine_data.data1 = 0
  735. chartLine_data.data2 = 100
  736. }
  737. var option = {
  738. title: { show: true, x: 'center', textStyle: { fontSize: '15', color: 'green', fontWeight: 'bold' }},
  739. tooltip: { show: false, trigger: 'item', formatter: '{a} <br/>{b}: {c} ({d}%)' },
  740. color: ['#1bbe89', '#e4e7ec'],
  741. series: [{
  742. name: '任务进度', type: 'pie', radius: ['80%', '70%'], avoidLabelOverlap: false, hoverAnimation: false, labelLine: { normal: { show: false }},
  743. data: [{
  744. value: chartLine_data.data1, name: '车次完成率', selected: false, // 单个扇区的标签配置
  745. label: { normal: { show: true, position: 'center', fontSize: 20, formatter: '{b}\n{d}%' }}
  746. }, {
  747. value: chartLine_data.data2 - chartLine_data.data1,
  748. label: { normal: { show: false }
  749. }
  750. }]
  751. }]
  752. }
  753. this.row2.chart1.chartLine.setOption(option)
  754. if (this.row2.chart1.chartLine != null) {
  755. window.onresize = function() {
  756. this.row2.chart1.chartLine.resize()
  757. }
  758. }
  759. var that = this
  760. that.row2.chart1.chartLine.on('mouseover', e => {
  761. const op = that.row2.chart1.chartLine.getOption()
  762. that.row2.chart1.chartLine.dispatchAction({
  763. type: 'downplay',
  764. seriesIndex: 0,
  765. dataIndex: e.dataIndex,
  766. color: e.color
  767. })
  768. that.row2.chart1.chartLine.setOption(op, true)
  769. })
  770. },
  771. // 今日计划统计-完成重量
  772. roadChartLine2(chartLine_data) {
  773. if (this.row2.chart2.chartLine != null) {
  774. this.row2.chart2.chartLine.dispose()
  775. }
  776. this.row2.chart2.chartLine = echarts.init(document.getElementById('row2chartLine2'))
  777. if (chartLine_data.data2 == 0 || chartLine_data.data1 == 0) {
  778. chartLine_data.data1 = 0
  779. chartLine_data.data2 = 100
  780. }
  781. var option = {
  782. title: { show: true, x: 'center', textStyle: { fontSize: '15', color: 'green', fontWeight: 'bold' }},
  783. tooltip: { show: false, trigger: 'item', formatter: '{a} <br/>{b}: {c} ({d}%)' },
  784. series: [{
  785. name: '任务进度', type: 'pie', radius: ['80%', '70%'], avoidLabelOverlap: false, hoverAnimation: false,
  786. labelLine: { normal: { show: false }},
  787. data: [{
  788. value: chartLine_data.data1, name: '重量完成率', selected: false, label: { normal: { show: true, position: 'center', fontSize: 20, formatter: '{b}\n{d}%' }}
  789. }, {
  790. value: chartLine_data.data2 - chartLine_data.data1, label: { normal: { show: false }}
  791. }]
  792. }],
  793. color: ['#529ae4', '#e4e7ec']
  794. }
  795. this.row2.chart2.chartLine.setOption(option)
  796. if (this.row2.chart2.chartLine != null) {
  797. window.onresize = function() {
  798. this.row2.chart2.chartLine.resize()
  799. }
  800. }
  801. var that = this
  802. that.row2.chart2.chartLine.on('mouseover', e => {
  803. const op = that.row2.chart2.chartLine.getOption()
  804. that.row2.chart2.chartLine.dispatchAction({
  805. type: 'downplay',
  806. seriesIndex: 0,
  807. dataIndex: e.dataIndex,
  808. color: e.color
  809. })
  810. that.row2.chart2.chartLine.setOption(op, true)
  811. })
  812. },
  813. // 实时监控
  814. getChart3() {
  815. this.row2.chart3.listLoading = true
  816. GetReportform(this.row2.chart3.getdataListParm).then(response => {
  817. console.log('实时监控数据', response.data.list)
  818. if (response.data !== null && response.data.list !== null) {
  819. var evenNumbers = []// 偶数
  820. var oddNumbers = []// 奇数
  821. for (let i = 0; i < response.data.list.data4.length; i++) {
  822. if (i == 0) {
  823. oddNumbers.push(response.data.list.data4[i])
  824. } else {
  825. if (i % 2 == 0) {
  826. evenNumbers.push(response.data.list.data4[i])
  827. } else {
  828. oddNumbers.push(response.data.list.data4[i])
  829. }
  830. }
  831. }
  832. response.data.list.data4 = oddNumbers
  833. response.data.list.data5 = evenNumbers
  834. this.row2.chart3.chartLine_data = response.data.list
  835. this.row2.chart3.total = response.data.total
  836. this.row2.chart3.pageNum = response.data.pageNum
  837. this.row2.chart3.pages = response.data.pages
  838. this.roadChartLine3(this.row2.chart3.chartLine_data)
  839. } else {
  840. this.row2.chart3.list = []
  841. this.row2.chart3.chartLine_data = []
  842. this.roadChartLine3(this.row2.chart3.chartLine_data)
  843. }
  844. setTimeout(() => {
  845. this.row2.chart3.listLoading = false
  846. }, 100)
  847. })
  848. },
  849. roadChartLine3(chartLine_data) {
  850. console.log(chartLine_data, 'chartLine_data666')
  851. if (this.row2.chart3.chartLine != null) {
  852. this.row2.chart3.chartLine.dispose()
  853. }
  854. this.row2.chart3.chartLine = echarts.init(document.getElementById('row2chartLine3'))
  855. var option = {
  856. title: {
  857. text: '',
  858. subtext: ''
  859. },
  860. color: ['#38c193', '#5199e5', '#fdb06a', '#fb8b73'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
  861. grid: {
  862. bottom: '10%'
  863. },
  864. legend: [{
  865. itemWidth: 15, itemHeight: 7, right: '25%', textStyle: { fontSize: 12 },
  866. data: [{ name: '设计重量' }, { name: '实际重量' }]
  867. }, {
  868. itemWidth: 15, itemHeight: 15, right: '0', textStyle: { fontSize: 12 },
  869. data: [{ name: '开始重量', icon: 'image://https://kptyun.cn:8081/file/pic/3.png' }, { name: '结束重量', icon: 'image://https://kptyun.cn:8081/file/pic/4.png' }]
  870. }],
  871. tooltip: {
  872. trigger: 'axis'
  873. },
  874. calculable: true,
  875. yAxis: [
  876. { type: 'value', name: '重量(kg)', splitLine: { show: false }, axisLabel: { show: true, textStyle: { color: '#666' }}}
  877. ],
  878. xAxis: [
  879. { type: 'category', splitLine: { show: false }, name: '时间', data: chartLine_data.data1, axisLabel: { show: true, textStyle: { color: '#666' }}}
  880. ],
  881. toolbox: {
  882. show: false,
  883. feature: {
  884. dataZoom: { realtime: false, yAxisIndex: 'none', },
  885. restore: {},
  886. }
  887. },
  888. dataZoom: [
  889. {type: 'inside'}, //用于添加滚轮缩放
  890. {type:'slider' }, //用于添加滑动条缩放,
  891. ],
  892. series: [
  893. { symbol: 'none', name: '实际重量', type: 'line', symbolSize: 4, data: chartLine_data.data3, smooth: true, barWidth: '37', itemStyle: { normal: { lineStyle: { color: '#38c193' }}}},
  894. { symbol: 'none', name: '设计重量', type: 'line', symbolSize: 4, barWidth: '37', data: chartLine_data.data2, itemStyle: { normal: { lineStyle: { color: '#5199e5' }}}},
  895. { name: '开始重量', symbol: 'image://https://kptyun.cn:8081/file/pic/3.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data4 },
  896. { name: '结束重量', symbol: 'image://https://kptyun.cn:8081/file/pic/4.png', symbolSize: 10, type: 'scatter', data: chartLine_data.data5 }
  897. ]
  898. }
  899. this.row2.chart3.chartLine.setOption(option)
  900. if (this.row2.chart3.chartLine != null) {
  901. window.onresize = function() {
  902. this.row2.chart3.chartLine.resize()
  903. }
  904. }
  905. },
  906. getCarLength() {
  907. this.row2.chart3.listLoading2 = true
  908. this.row2.chart3.getdataListParmList.pagecount = 0
  909. GetDataByName(this.row2.chart3.getdataListParmList).then(response => {
  910. if (response.data.list !== null) {
  911. this.carLength = response.data.total
  912. } else {
  913. this.carLength = 0
  914. }
  915. setTimeout(() => {
  916. this.row2.chart3.listLoading2 = false
  917. }, 100)
  918. })
  919. },
  920. // 图三轮询列表
  921. getChart3List() {
  922. this.row2.chart3.listLoading2 = true
  923. this.row2.chart3.getdataListParmList.pagecount = 2
  924. GetDataByName(this.row2.chart3.getdataListParmList).then(response => {
  925. if (response.data.list !== null) {
  926. this.$set(response.data.list[0], 'background', '#f3f9f7')
  927. this.$set(response.data.list[0], 'borderColor', '#009d6a')
  928. this.$set(response.data.list[0], 'isChecked', true)
  929. if (response.data.list.length > 1) {
  930. this.$set(response.data.list[1], 'background', '#f9f9f9')
  931. this.$set(response.data.list[1], 'borderColor', '#f9f9f9')
  932. this.$set(response.data.list[1], 'isChecked', false)
  933. }
  934. this.list = response.data.list
  935. this.row2.chart3.getdataListParm.parammaps.pid = this.list[this.myKey].pid
  936. this.row2.chart3.getdataListParm.parammaps.id = this.list[this.myKey].id
  937. this.getChart3()
  938. this.row2.chart3.pageNum2 = response.data.pageNum
  939. this.row2.chart3.pages2 = response.data.pages
  940. } else {
  941. this.row2.chart3.list2 = []
  942. }
  943. if (response.data.pageNum == 1) {
  944. if (response.data.total > 2) {
  945. this.row2.chart3.isLeftA = false
  946. this.row2.chart3.isLeft = true
  947. this.row2.chart3.isRightA = true
  948. this.row2.chart3.isRight = false
  949. } else {
  950. this.row2.chart3.isLeftA = false
  951. this.row2.chart3.isLeft = true
  952. this.row2.chart3.isRightA = true
  953. this.row2.chart3.isRight = false
  954. }
  955. } else {
  956. if (response.data.pageNum * response.data.pageSize > response.data.total || response.data.pageNum * response.data.pageSize == response.data.total) {
  957. this.row2.chart3.isLeftA = true
  958. this.row2.chart3.isLeft = false
  959. this.row2.chart3.isRightA = false
  960. this.row2.chart3.isRight = true
  961. } else {
  962. this.row2.chart3.isLeftA = true
  963. this.row2.chart3.isLeft = false
  964. this.row2.chart3.isRightA = true
  965. this.row2.chart3.isRight = false
  966. }
  967. }
  968. setTimeout(() => {
  969. this.row2.chart3.listLoading2 = false
  970. }, 100)
  971. })
  972. },
  973. // 向左切换
  974. handleLeft() {
  975. console.log('左')
  976. if (this.row2.chart3.isLeftA == false) {
  977. console.log('前边没有啦')
  978. } else {
  979. console.log(this.row2.chart3.getdataListParmList.offset)
  980. this.row2.chart3.getdataListParmList.offset = this.row2.chart3.getdataListParmList.offset - 1
  981. this.getChart3List()
  982. }
  983. },
  984. // 向右切换
  985. handleRight() {
  986. if (this.row2.chart3.isRightA == false) {
  987. console.log('后边没有啦')
  988. } else {
  989. this.row2.chart3.getdataListParmList.offset = this.row2.chart3.getdataListParmList.offset + 1
  990. console.log(this.row2.chart3.getdataListParmList.offset)
  991. this.getChart3List()
  992. }
  993. },
  994. handleList(key, item) {
  995. console.log(item, key)
  996. this.isClick = true
  997. this.clickKey = key
  998. clearInterval(this.timer)
  999. for (let i = 0; i < this.list.length; i++) {
  1000. if (key == i) {
  1001. this.$set(this.list[i], 'background', '#f3f9f7')
  1002. this.$set(this.list[i], 'borderColor', '#009d6a')
  1003. this.$set(this.list[i], 'isChecked', true)
  1004. } else {
  1005. this.$set(this.list[i], 'background', '#f9f9f9')
  1006. this.$set(this.list[i], 'borderColor', '#f9f9f9')
  1007. this.$set(this.list[i], 'isChecked', false)
  1008. }
  1009. }
  1010. this.row2.chart3.getdataListParm.parammaps.pid = this.list[key].pid
  1011. this.row2.chart3.getdataListParm.parammaps.id = this.list[key].id
  1012. this.getChart3()
  1013. // this.timer = null
  1014. // clearInterval(this.timer)
  1015. // setTimeout(() => {
  1016. // this.timer = null
  1017. // this.timer = setInterval(this.autoPlay, 15000)
  1018. // }, 20000)
  1019. },
  1020. autoPlay() {
  1021. if (this.list[0].isChecked == true) {
  1022. if (this.list.length > 1) {
  1023. this.$set(this.list[1], 'background', '#f3f9f7')
  1024. this.$set(this.list[1], 'borderColor', '#009d6a')
  1025. this.$set(this.list[1], 'isChecked', true)
  1026. this.$set(this.list[0], 'background', '#f9f9f9')
  1027. this.$set(this.list[0], 'borderColor', '#f9f9f9')
  1028. this.$set(this.list[0], 'isChecked', false)
  1029. this.row2.chart3.getdataListParm.parammaps.pid = this.list[1].pid
  1030. this.row2.chart3.getdataListParm.parammaps.id = this.list[1].id
  1031. this.getChart3()
  1032. } else {
  1033. if (this.row2.chart3.isRightA == false && this.row2.chart3.isLeftA == true) {
  1034. this.row2.chart3.getdataListParmList.offset = this.row2.chart3.getdataListParmList.offset - 1
  1035. this.getChart3List()
  1036. }
  1037. }
  1038. } else {
  1039. if (this.row2.chart3.isRightA == true) {
  1040. this.row2.chart3.getdataListParmList.offset = this.row2.chart3.getdataListParmList.offset + 1
  1041. console.log(this.row2.chart3.getdataListParmList.offset)
  1042. this.getChart3List()
  1043. } else {
  1044. if (this.row2.chart3.isLeftA == true) {
  1045. this.row2.chart3.getdataListParmList.offset = this.row2.chart3.getdataListParmList.offset - 1
  1046. console.log(this.row2.chart3.getdataListParmList.offset)
  1047. this.getChart3List()
  1048. } else {
  1049. this.$set(this.list[0], 'background', '#f3f9f7')
  1050. this.$set(this.list[0], 'borderColor', '#009d6a')
  1051. this.$set(this.list[0], 'isChecked', true)
  1052. this.$set(this.list[1], 'background', '#f9f9f9')
  1053. this.$set(this.list[1], 'borderColor', '#f9f9f9')
  1054. this.$set(this.list[1], 'isChecked', false)
  1055. this.row2.chart3.getdataListParm.parammaps.pid = this.list[0].pid
  1056. this.row2.chart3.getdataListParm.parammaps.id = this.list[0].id
  1057. this.getChart3()
  1058. }
  1059. }
  1060. }
  1061. },
  1062. // 计划统计
  1063. getChart4() {
  1064. this.row3.chart1.listLoading = true
  1065. GetReportform(this.row3.chart1.getdataListParm).then(response => {
  1066. if (response.data !== null && response.data.list !== null) {
  1067. console.log('计划统计数据', response.data.list)
  1068. for (let i = 0; i < response.data.data.length; i++) {
  1069. if (response.data.data[i].实际量 !== '' && response.data.data[i].实际量 !== undefined) {
  1070. response.data.data[i].实际量 = parseFloat(response.data.data[i].实际量)
  1071. }
  1072. if (response.data.data[i].理论量 !== '' && response.data.data[i].理论量 !== undefined) {
  1073. response.data.data[i].理论量 = parseFloat(response.data.data[i].理论量)
  1074. }
  1075. if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
  1076. response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
  1077. }
  1078. if (response.data.data[i].计划取消重量 !== '' && response.data.data[i].计划取消重量 !== undefined) {
  1079. response.data.data[i].计划取消重量 = parseFloat(response.data.data[i].计划取消重量)
  1080. }
  1081. if (response.data.data[i].field3 !== '' && response.data.data[i].field3 !== undefined) {
  1082. response.data.data[i].field3 = parseFloat(response.data.data[i].field3)
  1083. }
  1084. if (response.data.data[i].正确数 !== '' && response.data.data[i].正确数 !== undefined) {
  1085. response.data.data[i].正确数 = parseFloat(response.data.data[i].正确数)
  1086. }
  1087. if (response.data.data[i].计划数 !== '' && response.data.data[i].计划数 !== undefined) {
  1088. response.data.data[i].计划数 = parseFloat(response.data.data[i].计划数)
  1089. }
  1090. if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
  1091. response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
  1092. }
  1093. }
  1094. this.row3.chart1.table.list = response.data.data
  1095. console.log(this.row3.chart1.table.list, '123')
  1096. this.row3.chart1.chartLine_data = response.data.list
  1097. this.row3.chart1.total = response.data.total
  1098. } else {
  1099. this.row3.chart1.list = []
  1100. this.row3.chart1.chartLine_data = []
  1101. this.row3.chart1.chartLine_data.data1 = []
  1102. }
  1103. if (this.row3.chart1.chartLine_data.data1.length == 0) {
  1104. this.row3.chart1.chartLine_data.title = '暂无数据'
  1105. } else {
  1106. this.row3.chart1.chartLine_data.title = ''
  1107. }
  1108. this.roadChartLine4(this.row3.chart1.chartLine_data)
  1109. setTimeout(() => {
  1110. this.row3.chart1.listLoading = false
  1111. }, 100)
  1112. })
  1113. },
  1114. roadChartLine4(chartLine_data) {
  1115. if (this.row3.chart1.chartLine != null) {
  1116. this.row3.chart1.chartLine.dispose()
  1117. }
  1118. this.row3.chart1.chartLine = echarts.init(document.getElementById('row3chartLine1'))
  1119. var option = {
  1120. title: { text: chartLine_data.title, x: 'center', y: 'center', textStyle: { color: '#909399', fontWeight: 'normal', fontSize: 12 }},
  1121. tooltip: { trigger: 'axis' },
  1122. color: ['#1abd88', '#549be9', '#fd8d75'],
  1123. legend: {
  1124. data: ['计划准确率', '计划正确率', '计划准确率(去除取消重量)'],
  1125. top: 10, itemHeight: 7, itemWidth: 15, textStyle: { fontSize: 12 }
  1126. },
  1127. grid: {
  1128. top: '20%',
  1129. left: '10%',
  1130. right: '10%',
  1131. bottom: '10%',
  1132. containLabel: true
  1133. },
  1134. toolbox: {
  1135. show: true,
  1136. right: '2%',
  1137. feature: {}
  1138. },
  1139. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data1, name: '日期' },
  1140. yAxis: {
  1141. type: 'value', name: '百分比', axisLabel: { formatter: '{value} %' }
  1142. },
  1143. series: [
  1144. { name: '计划准确率', type: 'line', symbol: 'none', smooth: true, itemStyle: { normal: { lineStyle: { color: '#1abd88' }}}, data: chartLine_data.data2 },
  1145. { name: '计划正确率', type: 'line', symbol: 'none', smooth: true, itemStyle: { normal: { lineStyle: { color: '#549be9' }}}, data: chartLine_data.data3 },
  1146. { name: '计划准确率(去除取消重量)', type: 'line', symbol: 'none', smooth: true, itemStyle: { normal: { lineStyle: { color: '#fd8d75' }}}, data: chartLine_data.data4 }
  1147. ]
  1148. }
  1149. this.row3.chart1.chartLine.setOption(option)
  1150. if (this.row3.chart1.chartLine != null) {
  1151. window.onresize = function() {
  1152. this.row3.chart1.chartLine.resize()
  1153. }
  1154. }
  1155. },
  1156. // 泌乳牛干物质采食量
  1157. getChart5() {
  1158. this.row3.chart2.listLoading = true
  1159. GetReportform(this.row3.chart2.getdataListParm).then(response => {
  1160. console.log('泌乳牛干物质采食量数据', response)
  1161. if (response.data !== null && response.data.list !== null && response.data.data !== null) {
  1162. for (let i = 0; i < response.data.data.length; i++) {
  1163. if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
  1164. response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
  1165. }
  1166. if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
  1167. response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
  1168. }
  1169. }
  1170. this.row3.chart2.table.list = response.data.data
  1171. this.row3.chart2.chartLine_data = response.data.list
  1172. this.row3.chart2.total = response.data.total
  1173. } else {
  1174. this.row3.chart2.list = []
  1175. this.row3.chart2.chartLine_data = []
  1176. this.row3.chart2.chartLine_data.data1 = []
  1177. }
  1178. if (this.row3.chart2.chartLine_data.data1.length == 0) {
  1179. this.row3.chart2.chartLine_data.title = '暂无数据'
  1180. } else {
  1181. this.row3.chart2.chartLine_data.title = ''
  1182. }
  1183. this.roadChartLine5(this.row3.chart2.chartLine_data)
  1184. setTimeout(() => {
  1185. this.row3.chart2.listLoading = false
  1186. }, 100)
  1187. })
  1188. },
  1189. roadChartLine5(chartLine_data) {
  1190. if (this.row3.chart2.chartLine != null) {
  1191. this.row3.chart2.chartLine.dispose()
  1192. }
  1193. this.row3.chart2.chartLine = echarts.init(document.getElementById('row3chartLine2'))
  1194. var option = {
  1195. title: { text: chartLine_data.title, x: 'center', y: 'center', textStyle: { color: '#909399', fontWeight: 'normal', fontSize: 12 }},
  1196. tooltip: { trigger: 'axis', axisPointer: { type: 'cross', crossStyle: { color: '#999' }}},
  1197. grid: { top: '20%', left: '8%', right: '10%', bottom: '10%', containLabel: true },
  1198. legend: { data: ['泌乳牛干物质采食量', '泌乳牛产奶量'], right: 10, itemHeight: 7, itemWidth: 15 },
  1199. xAxis: [{ type: 'category', data: chartLine_data.data1 }],
  1200. yAxis: [{
  1201. splitLine: { show: false }, type: 'value', name: '泌乳牛干\n物质采食量', axisLabel: { formatter: '{value} ' }
  1202. }, {
  1203. splitLine: { show: false }, type: 'value', name: '泌乳牛产奶量', axisLabel: { formatter: '{value} ' }
  1204. }],
  1205. series: [{
  1206. name: '泌乳牛干物质采食量', type: 'bar', barWidth: 5, itemStyle: { barBorderRadius: [18, 18, 0, 0], normal: { color: '#5199e5' }}, data: chartLine_data.data2
  1207. }, {
  1208. name: '泌乳牛产奶量', type: 'line', barWidth: 5,
  1209. itemStyle: { barBorderRadius: [18, 18, 0, 0], normal: { color: '#36c293' }}, yAxisIndex: 1, data: chartLine_data.data3
  1210. }]
  1211. }
  1212. this.row3.chart2.chartLine.setOption(option)
  1213. if (this.row3.chart2.chartLine != null) {
  1214. window.onresize = function() {
  1215. this.row3.chart2.chartLine.resize()
  1216. }
  1217. }
  1218. },
  1219. // 成本统计
  1220. getChart6() {
  1221. this.row4.chart1.table.listLoading = true
  1222. this.row4.chart1.listLoading = true
  1223. GetReportform(this.row4.chart1.getdataListParm).then(response => {
  1224. if (response.data !== null && response.data.list !== null && response.data.data !== null && response.data.data !== '') {
  1225. console.log('成本统计数据', response.data.data)
  1226. console.log('成本统计数据', response.data.list)
  1227. for (let i = 0; i < response.data.data.length; i++) {
  1228. if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
  1229. response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
  1230. }
  1231. if (response.data.data[i].field2 !== '' && response.data.data[i].field2 !== undefined) {
  1232. response.data.data[i].field2 = parseFloat(response.data.data[i].field2)
  1233. }
  1234. }
  1235. this.row4.chart1.table.list = response.data.data
  1236. this.row4.chart1.chartLine_data = response.data.list
  1237. this.row4.chart1.total = response.data.total
  1238. } else {
  1239. this.row4.chart1.list = []
  1240. this.row4.chart1.chartLine_data = []
  1241. this.row4.chart1.chartLine_data.data1 = []
  1242. }
  1243. if (this.row4.chart1.chartLine_data.data1.length == 0) {
  1244. this.row4.chart1.chartLine_data.title = '暂无数据'
  1245. } else {
  1246. this.row4.chart1.chartLine_data.title = ''
  1247. }
  1248. this.roadChartLine6(this.row4.chart1.chartLine_data)
  1249. setTimeout(() => {
  1250. this.row4.chart1.listLoading = false
  1251. this.row4.chart1.table.listLoading = false
  1252. }, 100)
  1253. })
  1254. },
  1255. roadChartLine6(chartLine_data) {
  1256. if (this.row4.chart1.chartLine != null) {
  1257. this.row4.chart1.chartLine.dispose()
  1258. }
  1259. console.log(chartLine_data, '===666')
  1260. this.row4.chart1.chartLine = echarts.init(document.getElementById('row4chartLine1'))
  1261. var option = {
  1262. title: { text: chartLine_data.title, x: 'center', y: 'center', textStyle: { color: '#909399', fontWeight: 'normal', fontSize: 12 }},
  1263. grid: { left: '10%', right: '12%', bottom: '3%', containLabel: true },
  1264. tooltip: { trigger: 'axis', axisPointer: { type: 'cross', crossStyle: { color: '#999' }}},
  1265. legend: { data: ['公斤奶饲料成本', '单头牛饲料成本'], itemHeight: 7, itemWidth: 15 },
  1266. xAxis: [{ type: 'category', data: chartLine_data.data1, axisPointer: { type: 'shadow' }, name: '日期' }],
  1267. yAxis: [{
  1268. splitLine: { show: false }, type: 'value', name: '公斤奶\n饲料成本(元)', axisLabel: { formatter: '{value}' }
  1269. }, {
  1270. splitLine: { show: false }, type: 'value', name: '单头牛\n饲料成本(元)', axisLabel: { formatter: '{value}' }
  1271. }
  1272. ],
  1273. series: [{
  1274. name: '公斤奶饲料成本', type: 'bar', itemStyle: { normal: { color: '#1abd88' }}, data: chartLine_data.data2
  1275. }, {
  1276. name: '单头牛饲料成本', type: 'line', yAxisIndex: 1, itemStyle: { normal: { color: '#ff8d78' }}, data: chartLine_data.data3
  1277. }]
  1278. }
  1279. this.row4.chart1.chartLine.setOption(option)
  1280. if (this.row4.chart1.chartLine != null) {
  1281. window.onresize = function() {
  1282. this.row4.chart1.chartLine.resize()
  1283. }
  1284. }
  1285. },
  1286. // 混料实际重量统计
  1287. getChart7() {
  1288. this.row4.chart2.listLoading = true
  1289. GetReportform(this.row4.chart2.getdataListParm).then(response => {
  1290. if (response.data !== null && response.data.list !== null) {
  1291. console.log('混料实际重量统计数据', response.data.list)
  1292. for (let i = 0; i < response.data.data.length; i++) {
  1293. if (response.data.data[i].field1 !== '' && response.data.data[i].field1 !== undefined) {
  1294. response.data.data[i].field1 = parseFloat(response.data.data[i].field1)
  1295. }
  1296. }
  1297. this.row4.chart2.table.list = response.data.data
  1298. this.row4.chart2.chartLine_data = response.data.list
  1299. this.row4.chart2.total = response.data.total
  1300. } else {
  1301. this.row4.chart2.list = []
  1302. this.row4.chart2.chartLine_data = []
  1303. this.row4.chart2.chartLine_data.data1 = []
  1304. }
  1305. if (this.row4.chart2.chartLine_data.data1.length == 0) {
  1306. this.row4.chart2.chartLine_data.title = '暂无数据'
  1307. } else {
  1308. this.row4.chart2.chartLine_data.title = ''
  1309. }
  1310. this.roadChartLine7(this.row4.chart2.chartLine_data)
  1311. setTimeout(() => {
  1312. this.row4.chart2.listLoading = false
  1313. }, 100)
  1314. })
  1315. },
  1316. roadChartLine7(chartLine_data) {
  1317. if (this.row4.chart2.chartLine != null) {
  1318. this.row4.chart2.chartLine.dispose()
  1319. }
  1320. this.row4.chart2.chartLine = echarts.init(document.getElementById('row4chartLine2'))
  1321. var option = {
  1322. title: { text: chartLine_data.title, x: 'center', y: 'center', textStyle: { color: '#909399', fontWeight: 'normal', fontSize: 12 }},
  1323. grid: { left: '10%', right: '10%', bottom: '3%', containLabel: true },
  1324. tooltip: { trigger: 'axis' },
  1325. legend: { data: [''] },
  1326. xAxis: [{ type: 'category', data: chartLine_data.data1, name: '日期' }],
  1327. yAxis: [
  1328. { type: 'value', name: '重量(kg)', axisLabel: { formatter: '{value}' }}
  1329. ],
  1330. series: [{
  1331. name: '重量', type: 'bar', stack: '广告', itemStyle: { normal: { color: '#36C293' }}, data: chartLine_data.data2
  1332. }]
  1333. }
  1334. this.row4.chart2.chartLine.setOption(option)
  1335. if (this.row4.chart2.chartLine != null) {
  1336. window.onresize = function() {
  1337. this.row4.chart2.chartLine.resize()
  1338. }
  1339. }
  1340. },
  1341. getTable8() {
  1342. this.row4.table.listLoading = true
  1343. GetDataByName(this.row4.table.getdataListParm).then(response => {
  1344. console.log('库存预警table数据', response.data.list)
  1345. if (response.data.list !== null) {
  1346. this.row4.table.list = response.data.list
  1347. this.row4.table.total = response.data.total
  1348. } else {
  1349. this.row4.table.list = []
  1350. }
  1351. setTimeout(() => {
  1352. this.row4.table.listLoading = false
  1353. }, 100)
  1354. })
  1355. },
  1356. // 更多
  1357. handleMore() {
  1358. // this.$router.push({ path: '/inventoryManagement/Warning' })
  1359. this.$router.push({ name: 'Warning', params: { jmp: 'jmp' }})
  1360. },
  1361. // 导出
  1362. handleExport(item) {
  1363. console.log(item)
  1364. // 计划统计
  1365. if (item == 'row3chartLine1') {
  1366. console.log(this.row3.chart1.table.list)
  1367. var excelDatasTabChart1 = [
  1368. {
  1369. tHeader: ['日期', '计划执行重量(kg)', '配方理论重量(kg)', '计划准确率', '计划取消重量(kg)', '计划准确率(去除取消重量)', '计划正确数', '计划数', '计划正确率'],
  1370. filterVal: ['日期', '实际量', '理论量', 'field1', '计划取消重量', 'field3', '正确数', '计划数', 'field2'],
  1371. tableDatas: this.row3.chart1.table.list,
  1372. sheetName: '计划统计'
  1373. }
  1374. ]
  1375. json2excel(excelDatasTabChart1, '计划统计', true, 'xlsx')
  1376. } else if (item == 'row3chartLine2') {
  1377. // 泌乳牛采食量
  1378. var excelDatasTabChart2 = [
  1379. {
  1380. tHeader: ['日期', '泌乳牛采食量(kg)', '泌乳牛产奶量(kg)'],
  1381. filterVal: ['日期', 'field1', 'field2'],
  1382. tableDatas: this.row3.chart2.table.list,
  1383. sheetName: '泌乳牛采食量'
  1384. }
  1385. ]
  1386. json2excel(excelDatasTabChart2, '泌乳牛采食量', true, 'xlsx')
  1387. } else if (item == 'row4chartLine1') {
  1388. // 成本统计
  1389. console.log('成本统计')
  1390. var excelDatasTabChart2 = [
  1391. {
  1392. tHeader: ['日期', '单头牛饲料成本', '公斤奶饲料成本(元)'],
  1393. filterVal: ['日期', 'field1', 'field2'],
  1394. tableDatas: this.row4.chart1.table.list,
  1395. sheetName: '成本统计'
  1396. }
  1397. ]
  1398. json2excel(excelDatasTabChart2, '泌乳牛采食量', true, 'xlsx')
  1399. } else if (item == 'row4chartLine2') {
  1400. console.log('混料实际重量统计')
  1401. var excelDatasTabChart4 = [
  1402. {
  1403. tHeader: ['日期', '重量'],
  1404. filterVal: ['日期', 'field1'],
  1405. tableDatas: this.row4.chart2.table.list,
  1406. sheetName: '混料实际重量统计'
  1407. }
  1408. ]
  1409. json2excel(excelDatasTabChart4, '混料实际重量统计', true, 'xlsx')
  1410. }
  1411. },
  1412. handleTable(item) {
  1413. console.log(item)
  1414. if (item == 'row3chartLine1') {
  1415. console.log('计划统计表格')
  1416. this.row3.chart1.isTable = true
  1417. this.row3.chart1.isChart = false
  1418. } else if (item == 'row3chartLine2') {
  1419. console.log('泌乳牛采食量表格')
  1420. this.row3.chart2.isTable = true
  1421. this.row3.chart2.isChart = false
  1422. } else if (item == 'row4chartLine1') {
  1423. console.log('成本统计表格')
  1424. this.row4.chart1.isTable = true
  1425. this.row4.chart1.isChart = false
  1426. } else if (item == 'row4chartLine2') {
  1427. console.log('混料实际重量统计表格')
  1428. this.row4.chart2.isTable = true
  1429. this.row4.chart2.isChart = false
  1430. }
  1431. },
  1432. handleChart(item) {
  1433. console.log(item)
  1434. // 显示切换图表
  1435. if (item == 'row3chartLine1') {
  1436. console.log('计划统计图表')
  1437. this.row3.chart1.isTable = false
  1438. this.row3.chart1.isChart = true
  1439. this.getChart4()
  1440. } else if (item == 'row3chartLine2') {
  1441. console.log('泌乳牛采食量图表')
  1442. this.row3.chart2.isTable = false
  1443. this.row3.chart2.isChart = true
  1444. this.getChart5()
  1445. } else if (item == 'row4chartLine1') {
  1446. console.log('成本统计图表')
  1447. this.row4.chart1.isTable = false
  1448. this.row4.chart1.isChart = true
  1449. this.getChart6()
  1450. } else if (item == 'row4chartLine2') {
  1451. console.log('混料实际重量统计图表')
  1452. this.row4.chart2.isTable = false
  1453. this.row4.chart2.isChart = true
  1454. this.getChart7()
  1455. }
  1456. }
  1457. }
  1458. }
  1459. </script>
  1460. <style lang="scss" scoped>
  1461. .Title{
  1462. padding-left: 10px;border-radius: 10px;margin-top: 20px;background: #fff;height:40px;font-size:20px;line-height:40px;text-align: left;font-weight: 600;color:#333333;
  1463. }
  1464. .dashboard-editor-container {
  1465. background-color: #F4F4F4;
  1466. min-height: 100vh;
  1467. .news{
  1468. width: 70%;
  1469. height: 30px;
  1470. background: #fff;
  1471. margin: 0 auto;
  1472. border-radius: 10px;
  1473. text-align: center;
  1474. line-height: 30px;
  1475. color: red;
  1476. b{color: #000;}
  1477. }
  1478. .bottom{
  1479. padding:0 30px;
  1480. h4{text-align: right;}
  1481. .grid-content{
  1482. background: #fff;height: 90px;
  1483. border-radius: 10px;
  1484. }
  1485. .one{
  1486. border: 1px solid #82CBB3;height: 90px;
  1487. .Left{
  1488. float: left;
  1489. width: 65px;
  1490. text-align: center;
  1491. i{font-size: 36px;color:#82CBB3;line-height: 90px;}
  1492. }
  1493. .Right{
  1494. float: left;
  1495. margin-top:15px;
  1496. height: 60px;
  1497. font-weight: 600;
  1498. font-size: 14px;
  1499. line-height: 30px;
  1500. span{
  1501. display: inline-block;
  1502. width: 130px;
  1503. text-align: right;
  1504. }
  1505. }
  1506. }
  1507. .two{
  1508. border: 1px solid #FF9900;
  1509. .Left{
  1510. float: left;
  1511. width: 65px;
  1512. text-align: center;
  1513. i{font-size: 36px;color:#FF9900;line-height: 90px;}
  1514. }
  1515. .Right{
  1516. float: left;
  1517. margin-top:15px;
  1518. height: 60px;
  1519. font-weight: 600;
  1520. font-size: 14px;
  1521. line-height: 30px;
  1522. span{
  1523. display: inline-block;
  1524. width: 130px;
  1525. text-align: right;
  1526. }
  1527. }
  1528. }
  1529. .three{
  1530. border: 1px solid #0099FF;
  1531. .Left{
  1532. float: left;
  1533. width: 65px;
  1534. text-align: center;
  1535. i{font-size: 36px;color:#0099FF;line-height: 90px;}
  1536. }
  1537. .Right{
  1538. float: left;
  1539. height: 60px;
  1540. font-weight: 600;
  1541. font-size: 14px;
  1542. line-height: 30px;
  1543. margin-top:15px;
  1544. span{
  1545. display: inline-block;
  1546. width: 130px;
  1547. text-align: right;
  1548. }
  1549. }
  1550. }
  1551. .four{
  1552. border: 1px solid #FF5C5C;
  1553. .Left{
  1554. float: left;
  1555. width: 55px;
  1556. text-align: center;
  1557. i{font-size: 36px;color:#FF5C5C;line-height: 90px;}
  1558. }
  1559. .Right{
  1560. float: left;
  1561. flex: 1;
  1562. height: 60px;
  1563. font-weight: 600;
  1564. font-size: 14px;
  1565. line-height: 30px;
  1566. margin-top:15px;
  1567. span{
  1568. display: inline-block;
  1569. width: 150px;
  1570. text-align: right;
  1571. }
  1572. }
  1573. }
  1574. .car{
  1575. width:100%;height:150px;
  1576. display:flex;
  1577. display: -webkit-flex;
  1578. -webkit-flex-direction:row;
  1579. i{font-size: 50px;width:50px;display: block;line-height: 150px;}
  1580. .carList{
  1581. flex:1;height: 130px;
  1582. .list{
  1583. height: 130px;color: #fff;
  1584. // box-shadow: #000 0px 0px 10px;
  1585. // border-radius: 10px;
  1586. .list-l{
  1587. p{
  1588. padding-left:10px;font-size:13px;line-height: 16px; text-overflow: ellipsis;white-space:nowrap; overflow:hidden;
  1589. }
  1590. }
  1591. .list-r{
  1592. p{
  1593. font-size:13px;line-height: 16px;text-overflow: ellipsis;white-space:nowrap; overflow:hidden;
  1594. }
  1595. }
  1596. }
  1597. }
  1598. }
  1599. }
  1600. }
  1601. </style>
  1602. <style>
  1603. .app-main{background:#f5f5f5;}
  1604. </style>
  1605. <style lang="scss" scoped>
  1606. .dashboard-editor-container{padding-left: 10px;background: #f5f5f5;padding-bottom: 10px;}
  1607. // 公共
  1608. .img-t{position: absolute;left: 0;right: 0;margin: 30px auto;width: 31%;height: 31%;background-size: 100% 100%;}
  1609. .row1-c-l-c{
  1610. margin: 30px auto;border: 1px solid #eee;height: 40%;width: 50%;border-radius: 50%;text-align: center;display:table;
  1611. span{
  1612. height:100%;display:table-cell;vertical-align: middle;font-size:14px;color: #009C69;
  1613. b{padding-bottom: 10px;font-size: 16px;}
  1614. }
  1615. }
  1616. .row1-c-l-b{
  1617. width: 100%;text-align: center;display:table;font-size: 12px;
  1618. // div{
  1619. // font-size: 12px;height:100%;display:table-cell;vertical-align: middle;color: #323232;padding: 0 10px;width: 100%;
  1620. // span{text-align: right;width: 75%;display: block;float: left;}
  1621. // b{float: left;display: block;width: 25%;}
  1622. // }
  1623. }
  1624. .title{
  1625. height: 36px;padding-top: 7px;line-height: 36px;position: relative;
  1626. .img-title{
  1627. position: absolute;top: 10px; right:10px;bottom:0;left:20px;width: 30px;height: 30px;background: url(../../../assets/images/index/row-bg3.png) no-repeat;
  1628. }
  1629. .content{font-size: 18px;position: absolute;top: 7px;left: 55px;}
  1630. }
  1631. .title1{
  1632. height: 36px;padding-top: 7px;line-height: 36px;position: relative;
  1633. .img-title{
  1634. position: absolute;top: 10px; right:10px;bottom:0;left:10px;
  1635. width: 25px;height: 25px;
  1636. img{width: 25px;height: 25px;}
  1637. }
  1638. .content{font-size: 16px;position: absolute;top: 7px;left: 40px;}
  1639. }
  1640. .button{
  1641. height: 30px;
  1642. .exportTable{float: right;margin-right: 5px;}
  1643. }
  1644. .dashboard{
  1645. display: flex;margin-top: 10px;
  1646. .dashboard-l{
  1647. // width: 540px;
  1648. width: 30%;
  1649. .row1{
  1650. height: 520px;
  1651. .row1-t{
  1652. background: #fff; height: 50px; color: #f28b46;
  1653. .row1-t-l{
  1654. .img-l{float:left;padding: 16px 10px 16px 20px;width: 18px;height: 18px;background: url(../../../assets/images/index/row-bg2.png) no-repeat;background-position: 0 8px;}
  1655. .content{float:left;width: 54%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;font-size: 14px;line-height: 50px;padding-left: 3px;}
  1656. .img-r{float:left;padding: 16px 0 16px 17px;width: 30px;height: 15px;background: url(../../../assets/images/index/row-bg2.png) no-repeat;background-position: 0 -24px;}
  1657. }
  1658. .row1-t-r{padding-right: 20px;text-align: right;line-height: 50px;}
  1659. }
  1660. .row1-c{
  1661. display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between;margin-top: 10px;
  1662. .row1-c-l{
  1663. background: #fff;width:49%;height:225px;border-radius:3px;margin-right: 1%;position: relative;
  1664. .img-t{width:49%;height:38%;background: url(../../../assets/images/index/t1.png) no-repeat; background-size: 100% 100%;}
  1665. }
  1666. .row1-c-r{
  1667. background: #fff;width:49%;height:225px;border-radius:3px;position: relative;
  1668. .img-t{width:49%;height:38%;background: url(../../../assets/images/index/t2.png) no-repeat; background-size: 100% 100%;}
  1669. }
  1670. }
  1671. .row1-b{
  1672. display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between;margin-top: 10px;
  1673. .row1-b-l{
  1674. background: #fff;width:49%;height:225px;border-radius:3px;margin-right:1%;position: relative;
  1675. .img-t{width:49%;height:38%;background: url(../../../assets/images/index/t4.png) no-repeat; background-size: 100% 100%;}
  1676. }
  1677. .row1-b-r{
  1678. background: #fff;width:49%;height:225px;border-radius:3px;position: relative;
  1679. .img-t{width:49%;height:38%;background: url(../../../assets/images/index/t3.png) no-repeat; background-size: 100% 100%;}
  1680. }
  1681. }
  1682. }
  1683. .row2{
  1684. margin-top:10px;height: 375px;background: #fff;
  1685. .img-title{background-position: 0 0;}
  1686. .todayPlan{
  1687. display: flex; flex-direction: row;margin-top: 10px;
  1688. div{
  1689. flex: 1;position: relative;
  1690. .bottom{
  1691. width: 99%;height: 70px;background: #f9f9f9;margin: 30px auto 5px;display: flex; flex-direction: row;text-align: center;
  1692. div{
  1693. flex: 1;height: 42px;color: #333333;
  1694. }
  1695. .bottom-l{
  1696. border-right: 1px solid #e0e0e0;margin-top: 15px;width: 100%;
  1697. .bottom-l-t{
  1698. height: 30px;
  1699. b{font-size: 18px;}
  1700. }
  1701. .bottom-l-b{font-size: 12px;}
  1702. }
  1703. .bottom-r{
  1704. margin-top: 15px;width: 100%;
  1705. .bottom-r-t{height: 30px;padding-left: 10px;}
  1706. .bottom-r-b{padding-left: 10px;font-size: 12px;}
  1707. }
  1708. }
  1709. }
  1710. }
  1711. }
  1712. .row3{
  1713. margin-top:10px;height: 375px;background: #fff;
  1714. .img-title{background-position: 0 -90px;}
  1715. }
  1716. }
  1717. .dashboard-r{
  1718. margin-left: 10px;flex:1;
  1719. .row1{
  1720. height: 520px;background: #fff;
  1721. .img-title{background-position: 0 -240px;}
  1722. #row2chartLine3{height: 270px;margin-top: 10px;}
  1723. .carsLength{
  1724. padding: 13px 0 0 22px;line-height: 38px;font-size: 18px;font-weight: 700;
  1725. }
  1726. .car{
  1727. height: 140px;position: relative;
  1728. .iconLeft{width:32px;height:32px;position:absolute;top:46px;left:15px; z-index:1;}
  1729. .iconRight{width:32px;height:32px;position:absolute;top:46px;right: 20px ;z-index:1;}
  1730. .carList{
  1731. padding:0 30px;height: 120px;overflow: hidden;display: flex;
  1732. .listW{
  1733. background: #f3f9f7;
  1734. float: left;
  1735. // flex: 1 1;
  1736. margin: 0 5px;position: relative;width: 50%;
  1737. .list{
  1738. width: 100%;height: 100%;border-radius: 5px;border:1px solid #000;
  1739. .list-t{
  1740. display: flex;border-bottom: 1px solid #f1f1f1;
  1741. .list-t-t{
  1742. flex: 1 1;width: 0;font-size: 12px;line-height: 22px;padding: 25px 5px 15px;text-align: center;
  1743. span{ display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  1744. }
  1745. }
  1746. .list-b{
  1747. display: flex; text-align: center;margin-top: 14px;color: #323232;
  1748. .list-b-l{
  1749. flex: 1;width: 0; height: 40px; position: relative;
  1750. .left{
  1751. .num{
  1752. font-size: 12px;
  1753. b{font-size: 12px;}
  1754. }
  1755. .weight{font-size: 12px;}
  1756. }
  1757. .right{
  1758. height: 30px;width: 1px;background: #e0e0e0;position: absolute;right: 0;top: 0;bottom: 0;margin-top:auto;margin-bottom:auto
  1759. }
  1760. }
  1761. }
  1762. }
  1763. .img-checked{width: 30px;height: 28px;position: absolute;top: 0;right: 0;background: url(../../../assets/images/index/row-r6.png);}
  1764. }
  1765. }
  1766. }
  1767. }
  1768. .row2{
  1769. margin-top:10px;height: 375px;
  1770. display: flex; flex-direction: row;
  1771. .row2-l{
  1772. margin-right: 10px; background: #fff;height:375px;border-radius:3px;flex: 1;
  1773. .img-title{background-position: 0 -30px;}
  1774. }
  1775. .row2-r{
  1776. background: #fff;height:375px;border-radius:3px;flex: 1;
  1777. .img-title{background-position: 0 -60px;}
  1778. }
  1779. }
  1780. .row3{
  1781. margin-top:10px;height: 375px;
  1782. display: flex; flex-direction: row;
  1783. .row3-l{
  1784. margin-right: 10px; background: #fff;height:375px;border-radius:3px;flex: 1;
  1785. .img-title{background-position: 0 -120px;}
  1786. }
  1787. .row3-r{
  1788. background: #fff;height:375px;border-radius:3px;flex: 1;
  1789. .img-title{background-position: 0 -150px;}
  1790. }
  1791. }
  1792. }
  1793. }
  1794. </style>