49870d770752f826a07bde55a48d74e980ce6bcb.svn-base 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658
  1. <template>
  2. <div class="dashboard-editor-container">
  3. <div style="background: #F4F4F4;height: 10px;" />
  4. <div v-if="news==1" style="display:none;" class="news"><b>消息提醒:</b>撒料计划未分配完善,请及时进行计划分配</div>
  5. <div v-if="news==2" style="display:none;" class="news"><b>消息提醒:</b>预混计划未分配完善,请及时进行计划分配</div>
  6. <div v-if="news==3" style="display:none;" class="news"><b>消息提醒:</b>剩料计划未分配完善,请及时进行计划分配</div>
  7. <div class="bottom">
  8. <h4>{{ date }}</h4>
  9. <el-row :gutter="20">
  10. <el-col :span="6">
  11. <div class="grid-content one">
  12. <div class="Left">
  13. <i class="iconfont icon-shuaxin" />
  14. </div>
  15. <div class="Right">
  16. <span>昨日混料准确率:</span>{{ row.list[0].A1 }}<br>
  17. <span>近30天混料准确率:</span>{{ row.list[0].A2 }}
  18. </div>
  19. </div>
  20. </el-col>
  21. <el-col :span="6">
  22. <div class="grid-content two">
  23. <div class="Left">
  24. <i class="iconfont icon-zhunqueshuai2" />
  25. </div>
  26. <div class="Right">
  27. <span>昨日撒料准确率:</span>{{ row.list[1].A1 }}<br>
  28. <span>近30天撒料准确率:</span>{{ row.list[1].A2 }}
  29. </div>
  30. </div>
  31. </el-col>
  32. <el-col :span="6">
  33. <div class="grid-content three">
  34. <div class="Left">
  35. <i class="iconfont icon-zhinengsiwei" style="font-size: 40px;" />
  36. </div>
  37. <div class="Right">
  38. <span>昨日撒料正确率:</span>{{ row.list[2].A1 }}<br>
  39. <span>近30天撒料正确率:</span>{{ row.list[2].A2 }}
  40. </div>
  41. </div>
  42. </el-col>
  43. <el-col :span="6">
  44. <div class="grid-content four">
  45. <div class="Left">
  46. <i class="iconfont icon-siliaotoufangjilu" style="font-size: 50px;" />
  47. </div>
  48. <div class="Right">
  49. <span>昨日撒料偏差:</span>{{ row.list[3].A1 }} min<br>
  50. <span>近30天撒料偏差:</span>{{ row.list[3].A2 }} min
  51. </div>
  52. </div>
  53. </el-col>
  54. </el-row>
  55. <el-row :gutter="20" style="margin-top: 20px;">
  56. <el-col :span="6">
  57. <div class="grid-content" style="height:500px;background: #fff;">
  58. <div style="height: 250px; border-bottom: 1px solid #000;">
  59. <!-- <div class="Title">今日计划统计</div> -->
  60. <b style="padding-left: 10px;line-height: 50px;font-size: 20px;">今日计划统计</b><br>
  61. <div style="text-align: center;">
  62. <b style="padding-right: 10px;font-size: 14px;">完成车次:{{ row2.chart1.chartLine_data.data1 }}</b>
  63. <b style="padding-right: 10px;font-size: 14px;">计划车次:{{ row2.chart1.chartLine_data.data2 }}</b>
  64. </div>
  65. <div id="row2chartLine1" style="height: 150px;" />
  66. </div>
  67. <div style="height: 250px;">
  68. <div style="text-align: center;padding-top:50px;">
  69. <b style="padding-right: 5px;font-size: 14px;">完成重量:{{ row2.chart2.chartLine_data.data1 }}kg</b>
  70. <b style="padding-right: 5px;font-size: 14px;">计划重量:{{ row2.chart2.chartLine_data.data2 }}kg</b>
  71. </div>
  72. <div id="row2chartLine2" style="height: 150px;" />
  73. </div>
  74. </div>
  75. </el-col>
  76. <el-col :span="18" style="margin-top:-20px;">
  77. <div class="grid-content" style="height:500px;">
  78. <div style="height:350px;">
  79. <div style="font-size:14px;color:#666;margin:0 auto;position: relative;">
  80. <span style="line-height:30px;position:absolute;right:190px;top:30px;"><i class="el-icon-caret-top" style="color:#ff3131;line-height:30px;font-size:30px;" /><b style="line-height:32px;">开始重量</b></span>
  81. <span style="line-height:30px;position:absolute;right:100px;top:30px;"><i class="el-icon-caret-top" style="color:#61a5e8;line-height:30px;font-size:30px;" /><b style="line-height:32px;">结束重量</b></span>
  82. </div>
  83. <div class="Title">实时监控</div>
  84. <div id="row2chartLine3" style="height: 90%;" />
  85. </div>
  86. <div class="car" style="position: relative;">
  87. <p style="position: absolute;left:50px;top:-50px;">当前车辆数:5</p>
  88. <i ref="left" class="el-icon-arrow-left" @click="handleLeft" />
  89. <el-row :gutter="20" class="carList">
  90. <el-col v-for="(item,index) in list" :key="index" :span="8">
  91. <div ref="list" class="list" :style="{'background': item.background,'color':item.color}" @click="handleList(index)">
  92. <el-row :gutter="20">
  93. <el-col :span="12" class="list-l">
  94. <!-- 车辆/描述 -->
  95. <p>
  96. <!-- <span>车辆:</span> -->
  97. {{ item.A1 }}/{{ item.A6 }}
  98. </p>
  99. <!-- <el-tooltip placement="top">
  100. <p slot="content"><span>饲料:</span>{{ item.A2 }}</p>
  101. <p><span>饲料:</span>{{ item.A2 }}</p>
  102. </el-tooltip> -->
  103. <p><span>计划重量:</span>{{ item.A3 }}</p>
  104. <p><span>剩余重量:</span>{{ item.A4 }}</p>
  105. <p><span>车辆应载重:</span>{{ item.A5 }}</p>
  106. </el-col>
  107. <el-col :span="12" class="list-r">
  108. <!-- <el-tooltip placement="top">
  109. <p slot="content"><span>描述:</span>{{ item.A6 }}</p>
  110. <p><span>描述:</span>{{ item.A6 }}</p>
  111. </el-tooltip> -->
  112. <!-- 栏舍/饲料 -->
  113. <p>
  114. <!-- <span>栏舍:</span> -->
  115. {{ item.A7 }}/{{ item.A2 }}
  116. </p>
  117. <p><span>完成重量:</span>{{ item.A8 }}</p>
  118. <p><span>完成度:</span>{{ item.A9 }}</p>
  119. <p><span>车辆已载重:</span>{{ item.A10 }}</p>
  120. </el-col>
  121. </el-row>
  122. </div>
  123. </el-col>
  124. </el-row>
  125. <i ref="right" class="el-icon-arrow-right" @click="handleRight" />
  126. </div>
  127. </div>
  128. </el-col>
  129. </el-row>
  130. <el-row :gutter="20">
  131. <!-- 计划统计 -->
  132. <el-col :span="12" style="position: relative;">
  133. <div class="Title">计划统计</div>
  134. <div style="background: #fff;height:50px;">
  135. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('row3chartLine1')">导出</el-button>
  136. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('row3chartLine1')">切换表格</el-button>
  137. </div>
  138. <div id="row3chartLine1" style="background: #fff;height:350px;" />
  139. <div v-if="row3.chart1.isTable" class="table" style="position: absolute;width:97%;top:19px;">
  140. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('row3chartLine1')">导出</el-button>
  141. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('row3chartLine1')">切换图表</el-button>
  142. <el-table
  143. :key="row3.chart1.table.tableKey"
  144. v-loading="row3.chart1.table.listLoading"
  145. element-loading-text="给我一点时间"
  146. :data="row3.chart1.table.list"
  147. border
  148. fit
  149. highlight-current-row
  150. style="width: 100%;"
  151. height="400"
  152. :row-style="rowStyle"
  153. :cell-style="cellStyle"
  154. class="elTable table-fixed"
  155. >
  156. <el-table-column label="日期" min-width="110px" align="center" prop="A1" />
  157. <el-table-column label="执行重量(kg)" min-width="110px" align="center" prop="A2" />
  158. <el-table-column label="配方理论重量(kg)" min-width="110px" align="center" prop="A3" />
  159. <el-table-column label="计划准确率" min-width="110px" align="center" prop="A4" />
  160. <el-table-column label="计划取消重量(kg)" min-width="110px" align="center" prop="A5" />
  161. <el-table-column label="计划准确率(去除取消重量)" min-width="110px" align="center" prop="A6" />
  162. <el-table-column label="计划正确数" min-width="110px" align="center" prop="A7" />
  163. <el-table-column label="计划数" min-width="110px" align="center" prop="A8" />
  164. <el-table-column label="计划正确率" min-width="110px" align="center" prop="A9" />
  165. </el-table>
  166. </div>
  167. </el-col>
  168. <!-- 泌乳牛采食量 -->
  169. <el-col :span="12" style="position: relative;">
  170. <div class="Title">泌乳牛采食量</div>
  171. <div style="background: #fff;height:50px;">
  172. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('row3chartLine2')">导出</el-button>
  173. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleTable('row3chartLine2')">切换表格</el-button>
  174. </div>
  175. <div id="row3chartLine2" style="background: #fff;height:350px;" />
  176. <div v-if="row3.chart2.isTable" class="table" style="position: absolute;width:97%;top:19px;">
  177. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleExport('row3chartLine2')">导出</el-button>
  178. <el-button type="text" style="float: right;margin-right: 5px;" @click="handleChart('row3chartLine2')">切换图表</el-button>
  179. <el-table
  180. :key="row3.chart2.table.tableKey"
  181. v-loading="row3.chart2.table.listLoading"
  182. element-loading-text="给我一点时间"
  183. :data="row3.chart2.table.list"
  184. border
  185. fit
  186. highlight-current-row
  187. style="width: 100%;"
  188. height="400"
  189. :row-style="rowStyle"
  190. :cell-style="cellStyle"
  191. class="elTable table-fixed"
  192. >
  193. <el-table-column label="日期" min-width="110px" align="center" prop="A1" />
  194. <el-table-column label="泌乳牛采食量(kg)" min-width="110px" align="center" prop="A2" />
  195. <el-table-column label="泌乳牛产奶量(kg)" min-width="110px" align="center" prop="A3" />
  196. </el-table>
  197. </div>
  198. </el-col>
  199. </el-row>
  200. <el-row :gutter="20">
  201. <!-- 成本统计 -->
  202. <el-col :span="8">
  203. <div class="Title">成本统计</div>
  204. <div id="row4chartLine1" style="background: #fff;height:400px;" />
  205. </el-col>
  206. <!-- 出库统计 -->
  207. <el-col :span="8">
  208. <div class="Title">出库统计</div>
  209. <div id="row4chartLine2" style="background: #fff;height:400px;" />
  210. </el-col>
  211. <el-col :span="8">
  212. <div class="Title">库存预警</div>
  213. <div id="table" style="height: 400px;background: #fff;">
  214. <el-table
  215. :key="row4.table.tableKey"
  216. v-loading="row4.table.listLoading"
  217. element-loading-text="给我一点时间"
  218. :data="row4.table.list"
  219. border
  220. fit
  221. highlight-current-row
  222. style="width: 100%;background: #fff;"
  223. height="400"
  224. :row-style="rowStyle"
  225. :cell-style="cellStyle"
  226. class="elTable table-fixed"
  227. >
  228. <el-table-column label="序号" min-width="80px" align="center" prop="A1" />
  229. <el-table-column label="饲料名称" min-width="80px" align="center" prop="A2" />
  230. <el-table-column label="库存量(kg)" min-width="70px" align="center" prop="A3" />
  231. <el-table-column label="剩余使用天数" min-width="80px" align="center" prop="A4" />
  232. </el-table>
  233. <!-- <span style="line-height: 50px;color:#82CBB3;text-align: center;width: 100%;display: inline-block;cursor:pointer;" @click="handleMore">查看更多</span> -->
  234. </div>
  235. </el-col>
  236. </el-row>
  237. </div>
  238. </div>
  239. </template>
  240. <script>
  241. import { GetDataByName } from '@/api/common'
  242. import Cookies from 'js-cookie'
  243. import { parseTime } from '@/utils/index.js'
  244. import echarts from 'echarts'
  245. require('echarts/theme/macarons')
  246. var myKey = 0
  247. export default {
  248. name: 'DashboardEditor',
  249. data() {
  250. return {
  251. date: parseTime(new Date(), '{y}-{m}-{d}'),
  252. 'list': [],
  253. news: 1,
  254. row: {
  255. list: [
  256. { 'A1': '95.2%', 'A2': '91.5%' },
  257. { 'A1': '90.4%', 'A2': '90.2%' },
  258. { 'A1': '95.6%', 'A2': '93.2%' },
  259. { 'A1': '15', 'A2': '21' }
  260. ]
  261. },
  262. row2: {
  263. chart1: {
  264. chartLine: null,
  265. chartLine_data: {},
  266. getdataListParm: {
  267. name: 'getBarmilkList',
  268. page: 1,
  269. offset: 1,
  270. pagecount: 10,
  271. returntype: 'Map',
  272. parammaps: {
  273. pastureid: Cookies.get('pastureid'),
  274. enable: ''
  275. }
  276. },
  277. list: [],
  278. total: 0,
  279. listLoading: true
  280. },
  281. chart2: {
  282. chartLine: null,
  283. chartLine_data: {},
  284. getdataListParm: {
  285. name: 'getBarmilkList',
  286. page: 1,
  287. offset: 1,
  288. pagecount: 10,
  289. returntype: 'Map',
  290. parammaps: {
  291. pastureid: Cookies.get('pastureid'),
  292. enable: ''
  293. }
  294. },
  295. list: [],
  296. total: 0,
  297. listLoading: true
  298. },
  299. chart3: {
  300. chartLine: null,
  301. chartLine_data: {},
  302. getdataListParm: {
  303. name: 'getBarmilkList',
  304. page: 1,
  305. offset: 1,
  306. pagecount: 3,
  307. returntype: 'Map',
  308. parammaps: {
  309. pastureid: Cookies.get('pastureid'),
  310. enable: ''
  311. }
  312. },
  313. list: [],
  314. total: 0,
  315. listLoading: true,
  316. pageNum: '',
  317. pages: '',
  318. getdataListParmList: {
  319. name: 'getBarmilkList',
  320. page: 1,
  321. offset: 1,
  322. pagecount: 3,
  323. returntype: 'Map',
  324. parammaps: {
  325. pastureid: Cookies.get('pastureid'),
  326. enable: ''
  327. }
  328. },
  329. list2: [],
  330. total2: 0,
  331. listLoading2: true,
  332. pageNum2: '',
  333. pages2: ''
  334. }
  335. },
  336. row3: {
  337. chart1: {
  338. chartLine: null,
  339. chartLine_data: {},
  340. getdataListParm: {
  341. name: 'getBarmilkList',
  342. page: 1,
  343. offset: 1,
  344. pagecount: 10,
  345. returntype: 'Map',
  346. parammaps: {
  347. pastureid: Cookies.get('pastureid'),
  348. enable: ''
  349. }
  350. },
  351. list: [],
  352. total: 0,
  353. listLoading: true,
  354. isChart: true,
  355. isTable: false,
  356. table: {
  357. getdataListParm: {
  358. name: 'getBarmilkList',
  359. page: 1,
  360. offset: 1,
  361. pagecount: 10,
  362. returntype: 'Map',
  363. parammaps: {
  364. pastureid: Cookies.get('pastureid'),
  365. enable: ''
  366. }
  367. },
  368. tableKey: 1,
  369. list: [],
  370. total: 0,
  371. listLoading: true
  372. }
  373. },
  374. chart2: {
  375. chartLine: null,
  376. chartLine_data: {},
  377. getdataListParm: {
  378. name: 'getBarmilkList',
  379. page: 1,
  380. offset: 1,
  381. pagecount: 10,
  382. returntype: 'Map',
  383. parammaps: {
  384. pastureid: Cookies.get('pastureid'),
  385. enable: ''
  386. }
  387. },
  388. list: [],
  389. total: 0,
  390. listLoading: true,
  391. isChart: true,
  392. isTable: false,
  393. table: {
  394. getdataListParm: {
  395. name: 'getBarmilkList',
  396. page: 1,
  397. offset: 1,
  398. pagecount: 10,
  399. returntype: 'Map',
  400. parammaps: {
  401. pastureid: Cookies.get('pastureid'),
  402. enable: ''
  403. }
  404. },
  405. tableKey: 1,
  406. list: [],
  407. total: 0,
  408. listLoading: true
  409. }
  410. }
  411. },
  412. row4: {
  413. chart1: {
  414. chartLine: null,
  415. chartLine_data: {},
  416. getdataListParm: {
  417. name: 'getBarmilkList',
  418. page: 1,
  419. offset: 1,
  420. pagecount: 10,
  421. returntype: 'Map',
  422. parammaps: {
  423. pastureid: Cookies.get('pastureid'),
  424. enable: ''
  425. }
  426. },
  427. list: [],
  428. total: 0,
  429. listLoading: true
  430. },
  431. chart2: {
  432. chartLine: null,
  433. chartLine_data: {},
  434. getdataListParm: {
  435. name: 'getBarmilkList',
  436. page: 1,
  437. offset: 1,
  438. pagecount: 10,
  439. returntype: 'Map',
  440. parammaps: {
  441. pastureid: Cookies.get('pastureid'),
  442. enable: ''
  443. }
  444. },
  445. list: [],
  446. total: 0,
  447. listLoading: true
  448. },
  449. table: {
  450. getdataListParm: {
  451. name: 'getBarmilkList',
  452. page: 1,
  453. offset: 1,
  454. pagecount: 5,
  455. returntype: 'Map',
  456. parammaps: {
  457. pastureid: Cookies.get('pastureid')
  458. }
  459. },
  460. tableKey: 1,
  461. list: [],
  462. total: 0,
  463. listLoading: true,
  464. temp: {}
  465. }
  466. },
  467. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  468. cellStyle: { padding: 0 + 'px' }
  469. }
  470. },
  471. created() {
  472. this.getChart1()
  473. this.getChart2()
  474. this.getChart3List()
  475. console.log(this.$route)
  476. if (this.$route.path == '/dashboard') {
  477. window.setInterval(() => {
  478. setTimeout(() => {
  479. console.log(this.$refs.list[myKey], '==============')
  480. this.$refs.list[myKey].style.background = '#7ac3ec'
  481. this.$refs.list[myKey].style.color = '#fff'
  482. this.$refs.list[myKey + 1].style.background = '#7ac3ec'
  483. this.$refs.list[myKey + 1].style.color = '#f7f941'
  484. this.getChart3()
  485. myKey = myKey + 1
  486. if (myKey == 2) {
  487. setTimeout(() => {
  488. if (this.row2.chart3.pageNum2 == this.row2.chart3.pages2) {
  489. this.$refs.left.style.color = '#000'
  490. this.$refs.right.style.color = '#ccc'
  491. this.row2.chart3.getdataListParmList.offset = 1
  492. this.row2.chart3.chartLine_data = {
  493. data1: ['06:34:26', '06:34:27', '06:34:28', '06:34:29', '06:34:30', '06:34:34', '06:34:35', '06:34:45', '06:35:00', '06:35:04', '06:35:15', '06:35:30', '06:35:45', '06:36:00', '06:36:04', '06:36:15', '06:36:30', '06:36:45', '06:37:00', '06:37:00', '06:37:15', '06:37:30', '06:37:45', '06:38:00', '06:38:15', '06:38:24', '06:38:30', '06:38:45', '06:39:00', '06:39:15', '06:39:30', '06:39:31', '06:39:45', '06:40:00', '06:40:15', '06:40:30', '06:40:45', '06:41:00', '06:41:04', '06:41:15', '06:41:30', '06:41:45', '06:42:00', '06:42:15', '06:42:30', '06:42:45', '06:43:00', '06:43:13', '06:43:15', '06:43:31', '06:43:46', '06:44:01', '06:44:16', '06:44:31', '06:44:45', '06:44:46', '06:45:01', '06:45:16', '06:45:31', '06:45:46', '06:46:01', '06:46:16', '06:46:31', '06:46:46', '06:46:57', '06:47:01', '06:47:16', '06:47:31', '06:47:46', '06:48:01', '06:48:16', '06:48:31', '06:48:46', '06:49:01', '06:49:16', '06:49:31', '06:49:46', '06:50:01', '06:50:16', '06:50:31', '06:50:46', '06:51:01', '06:51:16', '06:51:31'],
  494. data2: [55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 182.66, 182.66, 182.66, 182.66, 182.66, 289.06, 289.06, 289.06, 289.06, 620.25, 620.25, 620.25, 620.25, 620.25, 620.25, 620.25, 839.99, 839.99, 839.99, 839.99, 839.99, 839.99, 1060.65, 1060.65, 1060.65, 1060.65, 1060.65, 1060.65, 1060.65, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 3037.57, 3037.57, 3037.57, 3037.57, 3037.57, 3037.57, 3037.57, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03],
  495. data3: [3, 2, 1, 2, 3, 8, 13, 1, 47, 52, 56, 49, 124, 167, 178, 176, 178, 192, 294, 293, 286, 292, 290, 301, 574, 644, 649, 641, 648, 795, 831, 832, 827, 841, 845, 889, 1029, 1082, 1062, 1070, 1077, 1183, 1393, 1732, 1959, 2222, 2332, 2430, 2429, 2423, 2442, 2446, 2598, 2814, 3025, 3040, 3031, 3062, 3097, 3142, 3189, 3230, 3277, 3324, 3356, 3353, 3358, 3334, 3363, 3364, 3353, 3343, 3351, 3364, 3351, 3370, 3355, 2971, 2273, 1425, 1380, 857, 251, 21]
  496. }
  497. this.roadChartLine3(this.row2.chart3.chartLine_data)
  498. // this.getChart3()
  499. this.getChart3List()
  500. } else {
  501. // this.getChart3()
  502. this.row2.chart3.chartLine_data = {
  503. data1: ['06:34:10', '06:34:11', '06:34:12', '06:34:13', '06:34:14', '06:34:14', '06:34:15', '06:34:16', '06:34:17', '06:34:18', '06:34:19', '06:34:20', '06:34:21', '06:34:22', '06:34:23', '06:34:29', '06:34:44', '06:34:59', '06:35:14', '06:35:29', '06:35:44', '06:35:59', '06:36:14', '06:36:29', '06:36:44', '06:36:59', '06:37:14', '06:37:28', '06:37:29', '06:37:44', '06:37:59', '06:38:14', '06:38:29', '06:38:44', '06:38:59', '06:38:59', '06:39:14', '06:39:29', '06:39:44', '06:39:59', '06:40:08', '06:40:14', '06:40:29', '06:40:44', '06:40:59', '06:41:14', '06:41:29', '06:41:40', '06:41:44', '06:41:59', '06:42:14', '06:42:29', '06:42:44', '06:42:59', '06:43:09', '06:43:14', '06:43:29', '06:43:44', '06:43:59', '06:44:14', '06:44:29', '06:44:44', '06:44:44', '06:44:59', '06:45:14', '06:45:30', '06:45:45', '06:46:00', '06:46:15', '06:46:30', '06:46:45', '06:47:00', '06:47:15', '06:47:30', '06:47:40', '06:47:45', '06:48:00', '06:48:15', '06:48:30', '06:48:45', '06:49:00', '06:49:15', '06:49:20', '06:49:30', '06:49:45', '06:50:00', '06:50:15', '06:50:30', '06:50:45', '06:51:00', '06:51:15', '06:51:30', '06:51:45', '06:52:00', '06:52:15', '06:52:30', '06:52:45', '06:53:00', '06:53:14', '06:53:15', '06:53:30', '06:53:45', '06:54:00', '06:54:15', '06:54:30', '06:54:45', '06:55:00', '06:55:15', '06:55:30', '06:55:45', '06:56:00', '06:56:15', '06:56:30', '06:56:45', '06:57:00', '06:57:15', '06:57:30', '06:57:45', '06:58:00', '06:58:16', '06:58:31', '06:58:46', '06:59:01', '06:59:03', '06:59:16', '06:59:31', '06:59:46', '07:00:01', '07:00:16', '07:00:31', '07:00:46', '07:01:01', '07:01:16', '07:01:31', '07:01:46', '07:02:01', '07:02:01', '07:02:16', '07:02:31', '07:02:46', '07:03:01', '07:03:16', '07:03:31', '07:03:46', '07:04:01', '07:04:16', '07:04:31', '07:04:46', '07:05:01', '07:05:16', '07:05:20', '07:05:31', '07:05:46', '07:06:01', '07:06:16', '07:06:31', '07:06:46', '07:07:01', '07:07:10', '07:07:16', '07:07:31', '07:07:46', '07:08:01', '07:08:16', '07:08:31', '07:08:46', '07:09:01', '07:09:16', '07:09:31', '07:09:46'],
  504. data2: [141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 341.46, 341.46, 341.46, 341.46, 341.46, 341.46, 341.46, 437.73, 437.73, 437.73, 437.73, 437.73, 437.73, 687.33, 687.33, 687.33, 687.33, 687.33, 687.33, 687.33, 959.24, 959.24, 959.24, 959.24, 959.24, 959.24, 959.24, 1107.6, 1107.6, 1107.6, 1107.6, 1107.6, 1107.6, 1107.6, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 351.82, 351.82, 351.82, 351.82, 351.82, 351.82, 351.82, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48],
  505. data3: [-8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -11, -9, -4, -8, -10, -8, -8, 0, -1, 32, 88, 142, 143, 141, 154, 215, 250, 256, 338, 337, 329, 325, 409, 420, 438, 434, 432, 447, 439, 496, 655, 680, 678, 670, 669, 741, 752, 924, 958, 962, 955, 961, 956, 956, 968, 1100, 1099, 1102, 1115, 1103, 1217, 1266, 1681, 1919, 1968, 2139, 2426, 2479, 2486, 2489, 2480, 2502, 2498, 2769, 3097, 3224, 3236, 3242, 3238, 3282, 3320, 3369, 3411, 3458, 3499, 3540, 3580, 3632, 3668, 3708, 3753, 3798, 3830, 3830, 3837, 3840, 3832, 3829, 3842, 3817, 3825, 3822, 3850, 3820, 3830, 3837, 3833, 3830, 3832, 3829, 3814, 3681, 3575, 3423, 3268, 3138, 3036, 3032, 3039, 3032, 3017, 3025, 3036, 2926, 2895, 2696, 2315, 1831, 1379, 1232, 1232, 1227, 1228, 1224, 1225, 1213, 1230, 1209, 1221, 1225, 1231, 1138, 928, 736, 708, 707, 674, 540, 530, 527, 437, 390, 356, 325, 307, 309, 310, 308, 294, 308, 306, 293, 278, 226]
  506. }
  507. this.roadChartLine3(this.row2.chart3.chartLine_data)
  508. this.row2.chart3.getdataListParmList.offset = this.row2.chart3.getdataListParmList.offset + 1
  509. this.$refs.left.style.color = '#ccc'
  510. this.$refs.right.style.color = '#000'
  511. this.getChart3List()
  512. }
  513. myKey = 0
  514. this.getChart3()
  515. this.$refs.list[myKey].style.background = '#7ac3ec'
  516. // this.$refs.list[myKey].style.color = '#fff'
  517. }, 10000)
  518. }
  519. console.log(myKey)
  520. }, 0)
  521. }, 10000)
  522. }
  523. this.getChart4()
  524. this.getChart5()
  525. this.getChart6()
  526. this.getChart7()
  527. this.getTable8()
  528. },
  529. methods: {
  530. // 今日计划统计-完成车次
  531. getChart1() {
  532. this.row2.chart1.listLoading = true
  533. GetDataByName(this.row2.chart1.getdataListParm).then(response => {
  534. console.log('完成车次数据', response.data.list)
  535. if (response.data.list !== null) {
  536. this.row2.chart1.chartLine_data = {
  537. data1: 7,
  538. data2: 7
  539. }
  540. this.row2.chart1.total = response.data.total
  541. this.roadChartLine1(this.row2.chart1.chartLine_data)
  542. } else {
  543. this.row2.chart1.list = []
  544. }
  545. setTimeout(() => {
  546. this.row2.chart1.listLoading = false
  547. }, 100)
  548. })
  549. },
  550. roadChartLine1(chartLine_data) {
  551. if (this.row2.chart1.chartLine != null) {
  552. this.row2.chart1.chartLine.dispose()
  553. }
  554. this.row2.chart1.chartLine = echarts.init(document.getElementById('row2chartLine1'))
  555. var option = {
  556. // 标题组件,包含主标题和副标题
  557. title: {
  558. show: true,
  559. x: 'center',
  560. textStyle: {
  561. fontSize: '15',
  562. color: 'green',
  563. fontWeight: 'bold'
  564. }
  565. },
  566. // 提示框组件
  567. tooltip: {
  568. // 是否显示提示框组件,包括提示框浮层和 axisPointe
  569. show: false,
  570. // 触发类型: item:数据项触发,axis:坐标轴触发
  571. trigger: 'item',
  572. formatter: '{a} <br/>{b}: {c} ({d}%)'
  573. },
  574. // 系列列表。每个系列通过 type 决定自己的图表类型
  575. series: [{
  576. // 系列名称,用于tooltip的显示,legend 的图例筛选,在 setOption 更新数据和配置项时用于指定对应的系列。
  577. name: '任务进度',
  578. type: 'pie',
  579. // 饼图的半径,数组的第一项是内半径,第二项是外半径
  580. radius: ['80%', '70%'],
  581. // 是否启用防止标签重叠策略,默认开启
  582. avoidLabelOverlap: false,
  583. hoverAnimation: false,
  584. // 标签的视觉引导线样式,在 label 位置 设置为'outside'的时候会显示视觉引导线
  585. labelLine: {
  586. normal: {
  587. show: false
  588. }
  589. },
  590. data: [{
  591. value: chartLine_data.data1, // 数据值
  592. name: '完成率', // 数据项名称
  593. selected: false, // 该数据项是否被选中
  594. // 单个扇区的标签配置
  595. label: {
  596. normal: {
  597. show: true, // 是显示标签
  598. position: 'center',
  599. fontSize: 20,
  600. // 标签内容格式器,支持字符串模板和回调函数两种形式,字符串模板与回调函数返回的字符串均支持用 \n 换行
  601. formatter: '{b}\n{d}%'
  602. }
  603. }
  604. }, {
  605. value: chartLine_data.data2 - chartLine_data.data1,
  606. label: {
  607. normal: {
  608. show: false
  609. }
  610. }
  611. }]
  612. }],
  613. color: ['#409EFF', '#B7DBFF']
  614. }
  615. this.row2.chart1.chartLine.setOption(option)
  616. window.onresize = function() {
  617. this.row2.chart1.chartLine.resize()
  618. }
  619. },
  620. // 今日计划统计-完成重量
  621. getChart2() {
  622. this.row2.chart2.listLoading = true
  623. GetDataByName(this.row2.chart2.getdataListParm).then(response => {
  624. console.log('完成重量数据', response.data.list)
  625. if (response.data.list !== null) {
  626. this.row2.chart2.chartLine_data = {
  627. data1: 3023,
  628. data2: 3050
  629. }
  630. this.row2.chart2.total = response.data.total
  631. this.roadChartLine2(this.row2.chart2.chartLine_data)
  632. } else {
  633. this.row2.chart2.list = []
  634. }
  635. setTimeout(() => {
  636. this.row2.chart2.listLoading = false
  637. }, 100)
  638. })
  639. },
  640. roadChartLine2(chartLine_data) {
  641. if (this.row2.chart2.chartLine != null) {
  642. this.row2.chart2.chartLine.dispose()
  643. }
  644. this.row2.chart2.chartLine = echarts.init(document.getElementById('row2chartLine2'))
  645. var option = {
  646. // 标题组件,包含主标题和副标题
  647. title: {
  648. show: true,
  649. x: 'center',
  650. textStyle: {
  651. fontSize: '15',
  652. color: 'green',
  653. fontWeight: 'bold'
  654. }
  655. },
  656. // 提示框组件
  657. tooltip: {
  658. // 是否显示提示框组件,包括提示框浮层和 axisPointe
  659. show: false,
  660. // 触发类型: item:数据项触发,axis:坐标轴触发
  661. trigger: 'item',
  662. formatter: '{a} <br/>{b}: {c} ({d}%)'
  663. },
  664. // 系列列表。每个系列通过 type 决定自己的图表类型
  665. series: [{
  666. // 系列名称,用于tooltip的显示,legend 的图例筛选,在 setOption 更新数据和配置项时用于指定对应的系列。
  667. name: '任务进度',
  668. type: 'pie',
  669. // 饼图的半径,数组的第一项是内半径,第二项是外半径
  670. radius: ['80%', '70%'],
  671. // 是否启用防止标签重叠策略,默认开启
  672. avoidLabelOverlap: false,
  673. hoverAnimation: false,
  674. // 标签的视觉引导线样式,在 label 位置 设置为'outside'的时候会显示视觉引导线
  675. labelLine: {
  676. normal: {
  677. show: false
  678. }
  679. },
  680. data: [{
  681. value: chartLine_data.data1, // 数据值
  682. name: '完成率', // 数据项名称
  683. selected: false, // 该数据项是否被选中
  684. // 单个扇区的标签配置
  685. label: {
  686. normal: {
  687. show: true, // 是显示标签
  688. position: 'center',
  689. fontSize: 20,
  690. // 标签内容格式器,支持字符串模板和回调函数两种形式,字符串模板与回调函数返回的字符串均支持用 \n 换行
  691. formatter: '{b}\n{d}%'
  692. }
  693. }
  694. }, {
  695. value: chartLine_data.data2 - chartLine_data.data1,
  696. label: {
  697. normal: {
  698. show: false
  699. }
  700. }
  701. }]
  702. }],
  703. color: ['#409EFF', '#B7DBFF']
  704. }
  705. this.row2.chart2.chartLine.setOption(option)
  706. window.onresize = function() {
  707. this.row2.chart2.chartLine.resize()
  708. }
  709. },
  710. // 实时监控
  711. getChart3() {
  712. this.row2.chart3.listLoading = true
  713. GetDataByName(this.row2.chart3.getdataListParm).then(response => {
  714. console.log('实时监控数据', response.data.list)
  715. if (response.data.list !== null) {
  716. console.log(this.$refs.list)
  717. this.$refs.list[myKey].style.background = '#7ac3ec'
  718. console.log(this.$refs)
  719. this.row2.chart3.chartLine_data = {
  720. data1: ['06:34:10', '06:34:11', '06:34:12', '06:34:13', '06:34:14', '06:34:14', '06:34:15', '06:34:16', '06:34:17', '06:34:18', '06:34:19', '06:34:20', '06:34:21', '06:34:22', '06:34:23', '06:34:29', '06:34:44', '06:34:59', '06:35:14', '06:35:29', '06:35:44', '06:35:59', '06:36:14', '06:36:29', '06:36:44', '06:36:59', '06:37:14', '06:37:28', '06:37:29', '06:37:44', '06:37:59', '06:38:14', '06:38:29', '06:38:44', '06:38:59', '06:38:59', '06:39:14', '06:39:29', '06:39:44', '06:39:59', '06:40:08', '06:40:14', '06:40:29', '06:40:44', '06:40:59', '06:41:14', '06:41:29', '06:41:40', '06:41:44', '06:41:59', '06:42:14', '06:42:29', '06:42:44', '06:42:59', '06:43:09', '06:43:14', '06:43:29', '06:43:44', '06:43:59', '06:44:14', '06:44:29', '06:44:44', '06:44:44', '06:44:59', '06:45:14', '06:45:30', '06:45:45', '06:46:00', '06:46:15', '06:46:30', '06:46:45', '06:47:00', '06:47:15', '06:47:30', '06:47:40', '06:47:45', '06:48:00', '06:48:15', '06:48:30', '06:48:45', '06:49:00', '06:49:15', '06:49:20', '06:49:30', '06:49:45', '06:50:00', '06:50:15', '06:50:30', '06:50:45', '06:51:00', '06:51:15', '06:51:30', '06:51:45', '06:52:00', '06:52:15', '06:52:30', '06:52:45', '06:53:00', '06:53:14', '06:53:15', '06:53:30', '06:53:45', '06:54:00', '06:54:15', '06:54:30', '06:54:45', '06:55:00', '06:55:15', '06:55:30', '06:55:45', '06:56:00', '06:56:15', '06:56:30', '06:56:45', '06:57:00', '06:57:15', '06:57:30', '06:57:45', '06:58:00', '06:58:16', '06:58:31', '06:58:46', '06:59:01', '06:59:03', '06:59:16', '06:59:31', '06:59:46', '07:00:01', '07:00:16', '07:00:31', '07:00:46', '07:01:01', '07:01:16', '07:01:31', '07:01:46', '07:02:01', '07:02:01', '07:02:16', '07:02:31', '07:02:46', '07:03:01', '07:03:16', '07:03:31', '07:03:46', '07:04:01', '07:04:16', '07:04:31', '07:04:46', '07:05:01', '07:05:16', '07:05:20', '07:05:31', '07:05:46', '07:06:01', '07:06:16', '07:06:31', '07:06:46', '07:07:01', '07:07:10', '07:07:16', '07:07:31', '07:07:46', '07:08:01', '07:08:16', '07:08:31', '07:08:46', '07:09:01', '07:09:16', '07:09:31', '07:09:46'],
  721. data2: [141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 341.46, 341.46, 341.46, 341.46, 341.46, 341.46, 341.46, 437.73, 437.73, 437.73, 437.73, 437.73, 437.73, 687.33, 687.33, 687.33, 687.33, 687.33, 687.33, 687.33, 959.24, 959.24, 959.24, 959.24, 959.24, 959.24, 959.24, 1107.6, 1107.6, 1107.6, 1107.6, 1107.6, 1107.6, 1107.6, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 351.82, 351.82, 351.82, 351.82, 351.82, 351.82, 351.82, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48],
  722. data3: [-8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -11, -9, -4, -8, -10, -8, -8, 0, -1, 32, 88, 142, 143, 141, 154, 215, 250, 256, 338, 337, 329, 325, 409, 420, 438, 434, 432, 447, 439, 496, 655, 680, 678, 670, 669, 741, 752, 924, 958, 962, 955, 961, 956, 956, 968, 1100, 1099, 1102, 1115, 1103, 1217, 1266, 1681, 1919, 1968, 2139, 2426, 2479, 2486, 2489, 2480, 2502, 2498, 2769, 3097, 3224, 3236, 3242, 3238, 3282, 3320, 3369, 3411, 3458, 3499, 3540, 3580, 3632, 3668, 3708, 3753, 3798, 3830, 3830, 3837, 3840, 3832, 3829, 3842, 3817, 3825, 3822, 3850, 3820, 3830, 3837, 3833, 3830, 3832, 3829, 3814, 3681, 3575, 3423, 3268, 3138, 3036, 3032, 3039, 3032, 3017, 3025, 3036, 2926, 2895, 2696, 2315, 1831, 1379, 1232, 1232, 1227, 1228, 1224, 1225, 1213, 1230, 1209, 1221, 1225, 1231, 1138, 928, 736, 708, 707, 674, 540, 530, 527, 437, 390, 356, 325, 307, 309, 310, 308, 294, 308, 306, 293, 278, 226],
  723. data4: [
  724. ['06:34:10', -8],
  725. ['06:37:28', 142],
  726. ['06:37:29', 143],
  727. ['06:38:59', 338],
  728. ['06:38:59', 337],
  729. ['06:40:08', 438],
  730. ['06:40:08', 438],
  731. ['06:41:40', 680],
  732. ['06:41:44', 678],
  733. ['06:43:09', 958],
  734. ['06:43:09', 958],
  735. ['06:44:44', 1100],
  736. ['06:44:44', 1099],
  737. ['06:47:40', 2486],
  738. ['06:47:45', 2489],
  739. ['06:49:20', 3236],
  740. ['06:49:20', 3236],
  741. ['06:53:14', 3830],
  742. ['06:53:15', 3830],
  743. ['06:59:01', 3036],
  744. ['06:59:03', 3032],
  745. ['07:02:01', 1232],
  746. ['07:02:01', 1232],
  747. ['07:05:16', 736],
  748. ['07:05:20', 708],
  749. ['07:07:10', 356],
  750. ['07:07:10', 356]
  751. ]
  752. }
  753. this.row2.chart3.total = response.data.total
  754. this.row2.chart3.pageNum = response.data.pageNum
  755. this.row2.chart3.pages = response.data.pages
  756. this.roadChartLine3(this.row2.chart3.chartLine_data)
  757. } else {
  758. this.row2.chart3.list = []
  759. }
  760. setTimeout(() => {
  761. this.row2.chart3.listLoading = false
  762. }, 100)
  763. })
  764. },
  765. roadChartLine3(chartLine_data) {
  766. if (this.row2.chart3.chartLine != null) {
  767. this.row2.chart3.chartLine.dispose()
  768. }
  769. this.row2.chart3.chartLine = echarts.init(document.getElementById('row2chartLine3'))
  770. var option = {
  771. title: {
  772. text: '',
  773. subtext: ''
  774. },
  775. color: ['#61a5e8', '#ff3131'], // 关键加上这句话,legend的颜色和折线的自定义颜色就一致了
  776. legend: {
  777. icon: 'rectangle',
  778. data: ['设计重量', '实际重量'],
  779. // right: '20%',
  780. textStyle: {
  781. fontSize: 12,
  782. color: '#666'
  783. }
  784. },
  785. /* grid:{y:15},*/
  786. tooltip: {
  787. trigger: 'axis'
  788. },
  789. calculable: true,
  790. yAxis: [
  791. {
  792. type: 'value',
  793. name: '重量(kg)',
  794. splitLine: { show: false }, // 去除网格线
  795. axisLabel: {
  796. show: true,
  797. textStyle: {
  798. color: '#666' // 这里用参数代替了
  799. }
  800. }
  801. }
  802. ],
  803. xAxis: [
  804. {
  805. type: 'category',
  806. splitLine: { show: false }, // 去除网格线
  807. name: '时间',
  808. data: chartLine_data.data1,
  809. axisLabel: {
  810. show: true,
  811. textStyle: {
  812. color: '#666' // 这里用参数代替了
  813. }
  814. }
  815. }
  816. ],
  817. series: [{
  818. symbol: 'none',
  819. name: '实际重量',
  820. type: 'line',
  821. // step: 'end',
  822. data: chartLine_data.data3,
  823. smooth: true,
  824. barWidth: '37',
  825. itemStyle: {
  826. normal: {
  827. lineStyle: { color: '#61a5e8' }
  828. }
  829. }
  830. }, {
  831. name: '设计重量',
  832. type: 'line',
  833. barWidth: '37',
  834. data: chartLine_data.data2
  835. }, {
  836. symbol: 'triangle',
  837. symbolSize: 10,
  838. itemStyle: {
  839. normal: {
  840. lineStyle: { color: '#ff3131' },
  841. color: function(param) {
  842. const colorList = ['#61a5e8', '#ff3131']
  843. let x = ''
  844. param.dataIndex % 2 == 0 ? x = 1 : x = 2
  845. if (x == '1') {
  846. return colorList[0]
  847. } else {
  848. return colorList[1]
  849. }
  850. }
  851. }
  852. },
  853. data: chartLine_data.data4,
  854. type: 'scatter'
  855. }]
  856. }
  857. this.row2.chart3.chartLine.setOption(option)
  858. window.onresize = function() {
  859. this.row2.chart3.chartLine.resize()
  860. }
  861. },
  862. // 图三轮询列表
  863. getChart3List() {
  864. this.row2.chart3.listLoading2 = true
  865. GetDataByName(this.row2.chart3.getdataListParmList).then(response => {
  866. console.log('实时监控数据', response.data.list)
  867. this.list = [
  868. { 'color': '#fff', 'background': '#7ac3ec', 'id': 1, 'A1': '1', 'A2': '国产燕麦草,麦秸秆,青贮玉米,湿储玉米,水', 'A3': '3840', 'A4': '15', 'A5': '3840', 'A6': '新配方', 'A7': '7号', 'A8': '3825', 'A9': '93%', 'A10': '3825' },
  869. { 'color': '#fff', 'background': '#7ac3ec', 'id': 2, 'A1': '1', 'A2': '进口燕麦草,1号苜蓿,棉籽,青贮苜蓿,湿储玉米,啤酒糟,青贮玉米', 'A3': '3500', 'A4': '300', 'A5': '3500', 'A6': '新配方', 'A7': '2号南', 'A8': '3500', 'A9': '97%', 'A10': '3500' },
  870. { 'color': '#fff', 'background': '#7ac3ec', 'id': 3, 'A1': '1', 'A2': '国产燕麦草,棉籽,青贮苜蓿,湿储玉米,水', 'A3': '2980', 'A4': '240', 'A5': '2980', 'A6': '新配方', 'A7': '2号北', 'A8': '2880', 'A9': '89%', 'A10': '2880' }
  871. ]
  872. this.carLength = this.list.length
  873. if (response.data.list !== null) {
  874. // this.list = response.data.list
  875. this.row2.chart3.total2 = response.data.total
  876. this.row2.chart3.pageNum2 = response.data.pageNum
  877. this.row2.chart3.pages2 = response.data.pages
  878. this.getChart3()
  879. if (this.row2.chart3.getdataListParmList.offset == 1) {
  880. this.$refs.left.style.color = '#ccc'
  881. } else {
  882. this.$refs.left.style.color = '#000'
  883. }
  884. if (response.data.pageNum == response.data.pages) {
  885. this.$refs.right.style.color = '#ccc'
  886. } else {
  887. this.$refs.right.style.color = '#000'
  888. }
  889. } else {
  890. this.row2.chart3.list2 = []
  891. }
  892. setTimeout(() => {
  893. this.row2.chart3.listLoading2 = false
  894. }, 100)
  895. })
  896. },
  897. // 向左切换
  898. handleLeft() {
  899. console.log('左')
  900. if (this.row2.chart3.getdataListParmList.offset > 1) {
  901. this.row2.chart3.getdataListParmList.offset = this.row2.chart3.getdataListParmList.offset - 1
  902. // this.getChart3List()
  903. this.$refs.left.style.color = '#ccc'
  904. this.$refs.right.style.color = '#000'
  905. this.list = [
  906. { 'color': '#f7f941', 'background': '#7ac3ec', 'id': 1, ' A1': '1', 'A2': '国产燕麦草,麦秸秆,青贮玉米,湿储玉米,水', 'A3': '3840', 'A4': '15', 'A5': '3840', 'A6': '新配方', 'A7': '7号', 'A8': '3825', 'A9': '93%', 'A10': '3825' },
  907. { 'color': '#fff', 'background': '#7ac3ec', 'id': 2, ' A1': '1', 'A2': '进口燕麦草,1号苜蓿,棉籽,青贮苜蓿,湿储玉米,啤酒糟,青贮玉米', 'A3': '3500', 'A4': '300', 'A5': '3500', 'A6': '新配方', 'A7': '2号南', 'A8': '3500', 'A9': '97%', 'A10': '3500' },
  908. { 'color': '#fff', 'background': '#7ac3ec', 'id': 3, ' A1': '1', 'A2': '国产燕麦草,棉籽,青贮苜蓿,湿储玉米,水', 'A3': '2980', 'A4': '240', 'A5': '2980', 'A6': '新配方', 'A7': '2号北', 'A8': '2880', 'A9': '89%', 'A10': '2880' }
  909. ]
  910. }
  911. },
  912. // 向右切换
  913. handleRight() {
  914. if (this.row2.chart3.pageNum2 !== this.row2.chart3.pages2) {
  915. this.row2.chart3.getdataListParmList.offset = this.row2.chart3.getdataListParmList.offset + 1
  916. // this.getChart3List()
  917. this.$refs.left.style.color = '#000'
  918. this.$refs.right.style.color = '#ccc'
  919. this.list = [
  920. { 'color': '#fff', 'background': '#7ac3ec', 'id': 4, ' A1': '1', 'A2': '1号苜蓿,棉籽,青贮苜蓿,湿储玉米,啤酒糟,,水', 'A3': '3004', 'A4': '330', 'A5': '3004', 'A6': '新配方', 'A7': '4号南', 'A8': '3000', 'A9': '95%', 'A10': '3000' },
  921. { 'color': '#fff', 'background': '#7ac3ec', 'id': 5, ' A1': '1', 'A2': '剩料,花生秧,湿储玉米,青贮玉米,水', 'A3': '3205', 'A4': '80', 'A5': '3205', 'A6': '新配方', 'A7': '4号北', 'A8': '3100', 'A9': '91%', 'A10': '3100' }
  922. ]
  923. }
  924. },
  925. // 点击
  926. handleList(key) {
  927. console.log(key)
  928. for (var i in this.$refs.list) {
  929. if (i == key) {
  930. this.$refs.list[i].style.background = '#7ac3ec'
  931. this.$refs.list[i].style.color = '#f7f941'
  932. // this.getChart3()
  933. } else {
  934. this.$refs.list[i].style.background = '#7ac3ec'
  935. this.$refs.list[i].style.color = '#fff'
  936. }
  937. }
  938. if (key % 2 == 0) {
  939. this.row2.chart3.chartLine_data = {
  940. data1: ['06:34:26', '06:34:27', '06:34:28', '06:34:29', '06:34:30', '06:34:34', '06:34:35', '06:34:45', '06:35:00', '06:35:04', '06:35:15', '06:35:30', '06:35:45', '06:36:00', '06:36:04', '06:36:15', '06:36:30', '06:36:45', '06:37:00', '06:37:00', '06:37:15', '06:37:30', '06:37:45', '06:38:00', '06:38:15', '06:38:24', '06:38:30', '06:38:45', '06:39:00', '06:39:15', '06:39:30', '06:39:31', '06:39:45', '06:40:00', '06:40:15', '06:40:30', '06:40:45', '06:41:00', '06:41:04', '06:41:15', '06:41:30', '06:41:45', '06:42:00', '06:42:15', '06:42:30', '06:42:45', '06:43:00', '06:43:13', '06:43:15', '06:43:31', '06:43:46', '06:44:01', '06:44:16', '06:44:31', '06:44:45', '06:44:46', '06:45:01', '06:45:16', '06:45:31', '06:45:46', '06:46:01', '06:46:16', '06:46:31', '06:46:46', '06:46:57', '06:47:01', '06:47:16', '06:47:31', '06:47:46', '06:48:01', '06:48:16', '06:48:31', '06:48:46', '06:49:01', '06:49:16', '06:49:31', '06:49:46', '06:50:01', '06:50:16', '06:50:31', '06:50:46', '06:51:01', '06:51:16', '06:51:31'],
  941. data2: [55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 55.26, 182.66, 182.66, 182.66, 182.66, 182.66, 289.06, 289.06, 289.06, 289.06, 620.25, 620.25, 620.25, 620.25, 620.25, 620.25, 620.25, 839.99, 839.99, 839.99, 839.99, 839.99, 839.99, 1060.65, 1060.65, 1060.65, 1060.65, 1060.65, 1060.65, 1060.65, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 2433.93, 3037.57, 3037.57, 3037.57, 3037.57, 3037.57, 3037.57, 3037.57, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, 3351.65, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03, -15.03],
  942. data3: [3, 2, 1, 2, 3, 8, 13, 1, 47, 52, 56, 49, 124, 167, 178, 176, 178, 192, 294, 293, 286, 292, 290, 301, 574, 644, 649, 641, 648, 795, 831, 832, 827, 841, 845, 889, 1029, 1082, 1062, 1070, 1077, 1183, 1393, 1732, 1959, 2222, 2332, 2430, 2429, 2423, 2442, 2446, 2598, 2814, 3025, 3040, 3031, 3062, 3097, 3142, 3189, 3230, 3277, 3324, 3356, 3353, 3358, 3334, 3363, 3364, 3353, 3343, 3351, 3364, 3351, 3370, 3355, 2971, 2273, 1425, 1380, 857, 251, 21],
  943. data4: [
  944. ['06:34:10', -8],
  945. ['06:37:28', 142],
  946. ['06:37:29', 143],
  947. ['06:38:59', 338],
  948. ['06:38:59', 337],
  949. ['06:40:08', 438],
  950. ['06:40:08', 438],
  951. ['06:41:40', 680],
  952. ['06:41:44', 678],
  953. ['06:43:09', 958],
  954. ['06:43:09', 958],
  955. ['06:44:44', 1100],
  956. ['06:44:44', 1099],
  957. ['06:47:40', 2486],
  958. ['06:47:45', 2489],
  959. ['06:49:20', 3236],
  960. ['06:49:20', 3236],
  961. ['06:53:14', 3830],
  962. ['06:53:15', 3830],
  963. ['06:59:01', 3036],
  964. ['06:59:03', 3032],
  965. ['07:02:01', 1232],
  966. ['07:02:01', 1232],
  967. ['07:05:16', 736],
  968. ['07:05:20', 708],
  969. ['07:07:10', 356],
  970. ['07:07:10', 356]
  971. ]
  972. }
  973. this.roadChartLine3(this.row2.chart3.chartLine_data)
  974. } else {
  975. this.row2.chart3.chartLine_data = {
  976. data1: ['06:34:10', '06:34:11', '06:34:12', '06:34:13', '06:34:14', '06:34:14', '06:34:15', '06:34:16', '06:34:17', '06:34:18', '06:34:19', '06:34:20', '06:34:21', '06:34:22', '06:34:23', '06:34:29', '06:34:44', '06:34:59', '06:35:14', '06:35:29', '06:35:44', '06:35:59', '06:36:14', '06:36:29', '06:36:44', '06:36:59', '06:37:14', '06:37:28', '06:37:29', '06:37:44', '06:37:59', '06:38:14', '06:38:29', '06:38:44', '06:38:59', '06:38:59', '06:39:14', '06:39:29', '06:39:44', '06:39:59', '06:40:08', '06:40:14', '06:40:29', '06:40:44', '06:40:59', '06:41:14', '06:41:29', '06:41:40', '06:41:44', '06:41:59', '06:42:14', '06:42:29', '06:42:44', '06:42:59', '06:43:09', '06:43:14', '06:43:29', '06:43:44', '06:43:59', '06:44:14', '06:44:29', '06:44:44', '06:44:44', '06:44:59', '06:45:14', '06:45:30', '06:45:45', '06:46:00', '06:46:15', '06:46:30', '06:46:45', '06:47:00', '06:47:15', '06:47:30', '06:47:40', '06:47:45', '06:48:00', '06:48:15', '06:48:30', '06:48:45', '06:49:00', '06:49:15', '06:49:20', '06:49:30', '06:49:45', '06:50:00', '06:50:15', '06:50:30', '06:50:45', '06:51:00', '06:51:15', '06:51:30', '06:51:45', '06:52:00', '06:52:15', '06:52:30', '06:52:45', '06:53:00', '06:53:14', '06:53:15', '06:53:30', '06:53:45', '06:54:00', '06:54:15', '06:54:30', '06:54:45', '06:55:00', '06:55:15', '06:55:30', '06:55:45', '06:56:00', '06:56:15', '06:56:30', '06:56:45', '06:57:00', '06:57:15', '06:57:30', '06:57:45', '06:58:00', '06:58:16', '06:58:31', '06:58:46', '06:59:01', '06:59:03', '06:59:16', '06:59:31', '06:59:46', '07:00:01', '07:00:16', '07:00:31', '07:00:46', '07:01:01', '07:01:16', '07:01:31', '07:01:46', '07:02:01', '07:02:01', '07:02:16', '07:02:31', '07:02:46', '07:03:01', '07:03:16', '07:03:31', '07:03:46', '07:04:01', '07:04:16', '07:04:31', '07:04:46', '07:05:01', '07:05:16', '07:05:20', '07:05:31', '07:05:46', '07:06:01', '07:06:16', '07:06:31', '07:06:46', '07:07:01', '07:07:10', '07:07:16', '07:07:31', '07:07:46', '07:08:01', '07:08:16', '07:08:31', '07:08:46', '07:09:01', '07:09:16', '07:09:31', '07:09:46'],
  977. data2: [141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 141.6, 341.46, 341.46, 341.46, 341.46, 341.46, 341.46, 341.46, 437.73, 437.73, 437.73, 437.73, 437.73, 437.73, 687.33, 687.33, 687.33, 687.33, 687.33, 687.33, 687.33, 959.24, 959.24, 959.24, 959.24, 959.24, 959.24, 959.24, 1107.6, 1107.6, 1107.6, 1107.6, 1107.6, 1107.6, 1107.6, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 2496.22, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3233.97, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3834.38, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 3027.62, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 1223.14, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 702.38, 351.82, 351.82, 351.82, 351.82, 351.82, 351.82, 351.82, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48, -16.48],
  978. data3: [-8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -8, -11, -9, -4, -8, -10, -8, -8, 0, -1, 32, 88, 142, 143, 141, 154, 215, 250, 256, 338, 337, 329, 325, 409, 420, 438, 434, 432, 447, 439, 496, 655, 680, 678, 670, 669, 741, 752, 924, 958, 962, 955, 961, 956, 956, 968, 1100, 1099, 1102, 1115, 1103, 1217, 1266, 1681, 1919, 1968, 2139, 2426, 2479, 2486, 2489, 2480, 2502, 2498, 2769, 3097, 3224, 3236, 3242, 3238, 3282, 3320, 3369, 3411, 3458, 3499, 3540, 3580, 3632, 3668, 3708, 3753, 3798, 3830, 3830, 3837, 3840, 3832, 3829, 3842, 3817, 3825, 3822, 3850, 3820, 3830, 3837, 3833, 3830, 3832, 3829, 3814, 3681, 3575, 3423, 3268, 3138, 3036, 3032, 3039, 3032, 3017, 3025, 3036, 2926, 2895, 2696, 2315, 1831, 1379, 1232, 1232, 1227, 1228, 1224, 1225, 1213, 1230, 1209, 1221, 1225, 1231, 1138, 928, 736, 708, 707, 674, 540, 530, 527, 437, 390, 356, 325, 307, 309, 310, 308, 294, 308, 306, 293, 278, 226],
  979. data4: [
  980. ['06:34:10', -8],
  981. ['06:37:28', 142],
  982. ['06:37:29', 143],
  983. ['06:38:59', 338],
  984. ['06:38:59', 337],
  985. ['06:40:08', 438],
  986. ['06:40:08', 438],
  987. ['06:41:40', 680],
  988. ['06:41:44', 678],
  989. ['06:43:09', 958],
  990. ['06:43:09', 958],
  991. ['06:44:44', 1100],
  992. ['06:44:44', 1099],
  993. ['06:47:40', 2486],
  994. ['06:47:45', 2489],
  995. ['06:49:20', 3236],
  996. ['06:49:20', 3236],
  997. ['06:53:14', 3830],
  998. ['06:53:15', 3830],
  999. ['06:59:01', 3036],
  1000. ['06:59:03', 3032],
  1001. ['07:02:01', 1232],
  1002. ['07:02:01', 1232],
  1003. ['07:05:16', 736],
  1004. ['07:05:20', 708],
  1005. ['07:07:10', 356],
  1006. ['07:07:10', 356]
  1007. ]
  1008. }
  1009. this.roadChartLine3(this.row2.chart3.chartLine_data)
  1010. }
  1011. },
  1012. // 计划统计
  1013. getChart4() {
  1014. this.row3.chart1.listLoading = true
  1015. GetDataByName(this.row3.chart1.getdataListParm).then(response => {
  1016. console.log('计划统计数据', response.data.list)
  1017. if (response.data.list !== null) {
  1018. this.row3.chart1.chartLine_data = {
  1019. data1: ['计划准确率1', '计划正确率', '计划准确率(去除取消重量)'],
  1020. data2: ['09/16', '09/17', '09/18', '09/19', '09/20', '09/21', '09/22', '09/23', '09/24', '09/25', '09/26', '09/27', '09/28', '09/29', '09/30'],
  1021. data3: [
  1022. { data: [95.6, 94.1, 89.8, 95.5, 93.6, 95.7, 90.2, 94.53, 96.88, 91, 89.5, 87, 93.2, 95, 97.23] },
  1023. { data: [97, 96, 88, 91, 93, 97.7, 90, 92, 91, 91, 95, 94.5, 91.6, 92, 92] },
  1024. { data: [91.2, 95, 89, 97, 95.9, 92.7, 89, 96, 98, 91, 85, 82, 95, 96, 90, 94] }
  1025. ]
  1026. }
  1027. this.row3.chart1.total = response.data.total
  1028. this.roadChartLine4(this.row3.chart1.chartLine_data)
  1029. } else {
  1030. this.row3.chart1.list = []
  1031. }
  1032. setTimeout(() => {
  1033. this.row3.chart1.listLoading = false
  1034. }, 100)
  1035. })
  1036. },
  1037. roadChartLine4(chartLine_data) {
  1038. if (this.row3.chart1.chartLine != null) {
  1039. this.row3.chart1.chartLine.dispose()
  1040. }
  1041. this.row3.chart1.chartLine = echarts.init(document.getElementById('row3chartLine1'))
  1042. var option = {
  1043. title: {
  1044. text: ''
  1045. },
  1046. tooltip: {
  1047. trigger: 'axis'
  1048. },
  1049. legend: {
  1050. data: chartLine_data.data1,
  1051. top: 10
  1052. },
  1053. grid: {
  1054. left: '3%',
  1055. right: '8%',
  1056. bottom: '3%',
  1057. containLabel: true
  1058. },
  1059. toolbox: {
  1060. show: true,
  1061. right: '2%',
  1062. feature: {}
  1063. },
  1064. xAxis: { type: 'category', boundaryGap: false, data: chartLine_data.data2, name: '日期' },
  1065. yAxis: {
  1066. type: 'value', name: '百分比'
  1067. },
  1068. series: (function() {
  1069. var serie = []
  1070. for (var i = 0; i < chartLine_data.data3.length; i++) {
  1071. var item = {
  1072. name: chartLine_data.data1[i],
  1073. type: 'line',
  1074. data: chartLine_data.data3[i].data
  1075. }
  1076. serie.push(item)
  1077. }
  1078. return serie
  1079. }())
  1080. }
  1081. this.row3.chart1.chartLine.setOption(option)
  1082. window.onresize = function() {
  1083. this.row3.chart1.chartLine.resize()
  1084. }
  1085. },
  1086. getChart4Table() {
  1087. this.row3.chart1.table.listLoading = true
  1088. GetDataByName(this.row3.chart1.table.getdataListParm).then(response => {
  1089. console.log('计划统计table/导出数据', response.data.list)
  1090. if (response.data.list !== null) {
  1091. // this.row3.chart1.table.list = response.data.list
  1092. this.row3.chart1.table.list = [
  1093. { 'id': 1, 'A1': '2020-09-16', 'A2': '3850', 'A3': '3862', 'A4': '95.6%', 'A5': '20', 'A6': '92.2%', 'A7': '10', 'A8': '11', 'A9': '97%' },
  1094. { 'id': 2, 'A1': '2020-09-17', 'A2': '3500', 'A3': '3428', 'A4': '94.1%', 'A5': '50', 'A6': '92.3%', 'A7': '9', 'A8': '11', 'A9': '95%' },
  1095. { 'id': 3, 'A1': '2020-09-18', 'A2': '3429', 'A3': '3401', 'A4': '89.8%', 'A5': '151', 'A6': '93.1%', 'A7': '8', 'A8': '11', 'A9': '94%' },
  1096. { 'id': 4, 'A1': '2020-09-19', 'A2': '3105', 'A3': '3015', 'A4': '95.5%', 'A5': '170', 'A6': '95%', 'A7': '11', 'A8': '11', 'A9': '96%' },
  1097. { 'id': 5, 'A1': '2020-09-20', 'A2': '3122', 'A3': '3100', 'A4': '93.6%', 'A5': '180', 'A6': '94%', 'A7': '10', 'A8': '11', 'A9': '90%' },
  1098. { 'id': 6, 'A1': '2020-09-21', 'A2': '3526', 'A3': '3497', 'A4': '95.7%', 'A5': '165', 'A6': '93%', 'A7': '13', 'A8': '11', 'A9': '90%' },
  1099. { 'id': 7, 'A1': '2020-09-22', 'A2': '3120', 'A3': '3015', 'A4': '90.2%', 'A5': '150', 'A6': '96.4%', 'A7': '7', 'A8': '11', 'A9': '91.5%' },
  1100. { 'id': 8, 'A1': '2020-09-23', 'A2': '3005', 'A3': '2995', 'A4': '94.53%', 'A5': '80', 'A6': '95.2%', 'A7': '9', 'A8': '11', 'A9': '95%' },
  1101. { 'id': 9, 'A1': '2020-09-24', 'A2': '2864', 'A3': '2761', 'A4': '96.88%', 'A5': '75', 'A6': '94.1%', 'A7': '10', 'A8': '11', 'A9': '92%' },
  1102. { 'id': 10, 'A1': '2020-09-25', 'A2': '2795', 'A3': '2755', 'A4': '91%', 'A5': '120', 'A6': '90.5%', 'A7': '8', 'A8': '11', 'A9': '91%' },
  1103. { 'id': 11, 'A1': '2020-09-26', 'A2': '3168', 'A3': '3100', 'A4': '89%', 'A5': '130', 'A6': '97.5%', 'A7': '9', 'A8': '11', 'A9': '95%' },
  1104. { 'id': 12, 'A1': '2020-09-27', 'A2': '3195', 'A3': '3100', 'A4': '89.5%', 'A5': '115', 'A6': '91.4%', 'A7': '11', 'A8': '11', 'A9': '92.4%' },
  1105. { 'id': 13, 'A1': '2020-09-28', 'A2': '3270', 'A3': '3190', 'A4': '93.2%', 'A5': '170', 'A6': '89.4%', 'A7': '12', 'A8': '11', 'A9': '96%' },
  1106. { 'id': 14, 'A1': '2020-09-29', 'A2': '3410', 'A3': '3395', 'A4': '95%', 'A5': '110', 'A6': '86.4%', 'A7': '10', 'A8': '11', 'A9': '94%' },
  1107. { 'id': 15, 'A1': '2020-09-30', 'A2': '3210', 'A3': '3125', 'A4': '97.23%', 'A5': '95', 'A6': '88%', 'A7': '19', 'A8': '11', 'A9': '92%' }
  1108. ]
  1109. this.row3.chart1.table.total = response.data.total
  1110. } else {
  1111. this.row3.chart1.table.list = []
  1112. }
  1113. setTimeout(() => {
  1114. this.row3.chart1.table.listLoading = false
  1115. }, 100)
  1116. })
  1117. },
  1118. getChart5() {
  1119. this.row3.chart2.listLoading = true
  1120. GetDataByName(this.row3.chart2.getdataListParm).then(response => {
  1121. console.log('泌乳牛采食量数据', response.data.list)
  1122. if (response.data.list !== null) {
  1123. this.row3.chart2.chartLine_data = {
  1124. data1: ['09/16', '09/17', '09/18', '09/19', '09/20', '09/21', '09/22', '09/23', '09/24', '09/25', '09/26', '09/27', '09/28', '09/29', '09/30'],
  1125. data2: [25, 27.2, 26.5, 29, 26.4, 23.6, 27.7, 28, 31, 33.5, 30, 35, 29.8, 26, 29.5],
  1126. data3: [22.5, 25, 26.5, 24.3, 27.1, 25.5, 29, 22.4, 29, 19.8, 23.5, 22.8, 27.6, 21.2, 26]
  1127. }
  1128. this.row3.chart2.total = response.data.total
  1129. this.roadChartLine5(this.row3.chart2.chartLine_data)
  1130. } else {
  1131. this.row3.chart2.list = []
  1132. }
  1133. setTimeout(() => {
  1134. this.row3.chart2.listLoading = false
  1135. }, 100)
  1136. })
  1137. },
  1138. roadChartLine5(chartLine_data) {
  1139. if (this.row3.chart2.chartLine != null) {
  1140. this.row3.chart2.chartLine.dispose()
  1141. }
  1142. this.row3.chart2.chartLine = echarts.init(document.getElementById('row3chartLine2'))
  1143. var option = {
  1144. title: {
  1145. text: ''
  1146. },
  1147. tooltip: {
  1148. trigger: 'axis'
  1149. },
  1150. legend: {
  1151. data: ['泌乳牛产奶量', '泌乳牛采食量']
  1152. },
  1153. xAxis: [
  1154. {
  1155. type: 'category',
  1156. data: chartLine_data.data1,
  1157. name: '日期'
  1158. }
  1159. ],
  1160. yAxis: [
  1161. {
  1162. type: 'value',
  1163. name: '泌乳牛采食量(kg)',
  1164. axisLabel: {
  1165. formatter: '{value} '
  1166. }
  1167. }, {
  1168. type: 'value',
  1169. name: '产奶量(kg)',
  1170. axisLabel: {
  1171. formatter: '{value} '
  1172. }
  1173. }
  1174. ],
  1175. series: [{
  1176. name: '泌乳牛采食量',
  1177. type: 'bar',
  1178. itemStyle: { /* 设置柱状颜色*/
  1179. normal: {
  1180. color: '#61a5e8'
  1181. }
  1182. },
  1183. data: chartLine_data.data2
  1184. }, {
  1185. name: '泌乳牛产奶量',
  1186. type: 'line',
  1187. itemStyle: { /* 设置折线颜色*/
  1188. normal: {
  1189. color: '#ff2d2d'
  1190. }
  1191. },
  1192. data: chartLine_data.data3
  1193. }]
  1194. }
  1195. this.row3.chart2.chartLine.setOption(option)
  1196. window.onresize = function() {
  1197. this.row3.chart2.chartLine.resize()
  1198. }
  1199. },
  1200. getChart5Table() {
  1201. this.row3.chart2.table.listLoading = true
  1202. GetDataByName(this.row3.chart2.table.getdataListParm).then(response => {
  1203. console.log('泌乳牛采食量table/导出数据', response.data.list)
  1204. if (response.data.list !== null) {
  1205. // this.row3.chart2.table.list = response.data.list
  1206. this.row3.chart2.table.list = [
  1207. { 'id': 1, 'A1': '2020-09-16', 'A2': '25', 'A3': '22.5' },
  1208. { 'id': 2, 'A1': '2020-09-17', 'A2': '27.2', 'A3': '25' },
  1209. { 'id': 3, 'A1': '2020-09-18', 'A2': '26.5', 'A3': '26.5' },
  1210. { 'id': 4, 'A1': '2020-09-19', 'A2': '29', 'A3': ' 24.3' },
  1211. { 'id': 5, 'A1': '2020-09-20', 'A2': '26.4', 'A3': '27.1' },
  1212. { 'id': 6, 'A1': '2020-09-21', 'A2': '23.6', 'A3': '25.5' },
  1213. { 'id': 7, 'A1': '2020-09-22', 'A2': '27.7', 'A3': '29' },
  1214. { 'id': 8, 'A1': '2020-09-23', 'A2': '28', 'A3': '22.4' },
  1215. { 'id': 9, 'A1': '2020-09-24', 'A2': '31', 'A3': '29' },
  1216. { 'id': 10, 'A1': '2020-09-25', 'A2': '33.5', 'A3': '19.8' },
  1217. { 'id': 11, 'A1': '2020-09-26', 'A2': '30', 'A3': '23.5' },
  1218. { 'id': 12, 'A1': '2020-09-27', 'A2': '35', 'A3': '22.8' },
  1219. { 'id': 13, 'A1': '2020-09-28', 'A2': '29.8', 'A3': '27.6' },
  1220. { 'id': 14, 'A1': '2020-09-29', 'A2': '26', 'A3': '21.2' },
  1221. { 'id': 15, 'A1': '2020-09-30', 'A2': '29.5', 'A3': '26' }
  1222. ]
  1223. this.row3.chart2.table.total = response.data.total
  1224. } else {
  1225. this.row3.chart2.table.list = []
  1226. }
  1227. setTimeout(() => {
  1228. this.row3.chart2.table.listLoading = false
  1229. }, 100)
  1230. })
  1231. },
  1232. getChart6() {
  1233. this.row4.chart1.listLoading = true
  1234. GetDataByName(this.row4.chart1.getdataListParm).then(response => {
  1235. console.log('成本统计数据', response.data.list)
  1236. if (response.data.list !== null) {
  1237. this.row4.chart1.chartLine_data = {
  1238. data1: ['09/16', '09/17', '09/18', '09/19', '09/20', '09/21', '09/22', '09/23', '09/24', '09/25', '09/26', '09/27', '09/28', '09/29', '09/30'],
  1239. data2: [1.5, 1.8, 2.2, 1.9, 1.8, 1.7, 2.0, 2.7, 2.4, 1.7, 1.8, 1.7, 2.7, 2.4, 2.1],
  1240. data3: [50, 65, 70, 45, 42, 45, 29, 39, 47, 56, 67, 72, 75, 68, 66]
  1241. }
  1242. this.row4.chart1.total = response.data.total
  1243. this.roadChartLine6(this.row4.chart1.chartLine_data)
  1244. } else {
  1245. this.row4.chart1.list = []
  1246. }
  1247. setTimeout(() => {
  1248. this.row4.chart1.listLoading = false
  1249. }, 100)
  1250. })
  1251. },
  1252. roadChartLine6(chartLine_data) {
  1253. if (this.row4.chart1.chartLine != null) {
  1254. this.row4.chart1.chartLine.dispose()
  1255. }
  1256. this.row4.chart1.chartLine = echarts.init(document.getElementById('row4chartLine1'))
  1257. var option = {
  1258. title: {
  1259. text: ''
  1260. },
  1261. grid: {
  1262. left: '8%',
  1263. right: '8%',
  1264. bottom: '3%',
  1265. containLabel: true
  1266. },
  1267. tooltip: {
  1268. trigger: 'axis'
  1269. },
  1270. legend: {
  1271. data: ['泌乳牛采食量', '泌乳牛产奶量']
  1272. },
  1273. xAxis: [
  1274. {
  1275. type: 'category',
  1276. data: chartLine_data.data1,
  1277. axisPointer: {
  1278. type: 'shadow'
  1279. },
  1280. name: '日期'
  1281. }
  1282. ],
  1283. yAxis: [
  1284. {
  1285. type: 'value',
  1286. name: '公斤奶\n饲料成本(元)',
  1287. axisLabel: {
  1288. formatter: '{value}'
  1289. }
  1290. }, {
  1291. type: 'value',
  1292. name: '单头牛\n饲料成本(元)',
  1293. axisLabel: {
  1294. formatter: '{value}'
  1295. }
  1296. }
  1297. ],
  1298. series: [
  1299. {
  1300. name: '泌乳牛采食量',
  1301. type: 'bar',
  1302. itemStyle: { /* 设置柱状颜色*/
  1303. normal: {
  1304. color: '#61a5e8'
  1305. }
  1306. },
  1307. data: chartLine_data.data2
  1308. }, {
  1309. name: '泌乳牛产奶量',
  1310. type: 'line',
  1311. yAxisIndex: 1,
  1312. itemStyle: { /* 设置柱状颜色*/
  1313. normal: {
  1314. color: '#ff3131'
  1315. }
  1316. },
  1317. data: chartLine_data.data3
  1318. }
  1319. ]
  1320. }
  1321. this.row4.chart1.chartLine.setOption(option)
  1322. window.onresize = function() {
  1323. this.row4.chart1.chartLine.resize()
  1324. }
  1325. },
  1326. getChart7() {
  1327. this.row4.chart2.listLoading = true
  1328. GetDataByName(this.row4.chart2.getdataListParm).then(response => {
  1329. console.log('出库统计数据', response.data.list)
  1330. if (response.data.list !== null) {
  1331. this.row4.chart2.chartLine_data = {
  1332. data1: ['09/16', '09/17', '09/18', '09/19', '09/20', '09/21', '09/22', '09/23', '09/24', '09/25', '09/26', '09/27', '09/28', '09/29', '09/30'],
  1333. data2: [3860, 3200, 3560, 3428, 3108, 2986, 2670, 3120, 3204, 3150, 2850, 3220, 3321, 3125, 3410],
  1334. data3: [120, 225, 0, 0, 124, 0, 159, 122, 0, 85, 62, 55, 0, 0, 75],
  1335. data4: [4800, 5572, 6820, 3880, 4830, 8800, 4575, 3850, 3896, 4285, 3800, 6562, 6720, 3580, 4120]
  1336. }
  1337. this.row4.chart2.total = response.data.total
  1338. this.roadChartLine7(this.row4.chart2.chartLine_data)
  1339. } else {
  1340. this.row4.chart2.list = []
  1341. }
  1342. setTimeout(() => {
  1343. this.row4.chart2.listLoading = false
  1344. }, 100)
  1345. })
  1346. },
  1347. roadChartLine7(chartLine_data) {
  1348. if (this.row4.chart2.chartLine != null) {
  1349. this.row4.chart2.chartLine.dispose()
  1350. }
  1351. this.row4.chart2.chartLine = echarts.init(document.getElementById('row4chartLine2'))
  1352. var option = {
  1353. title: {
  1354. text: ''
  1355. },
  1356. grid: {
  1357. left: '3%',
  1358. right: '8%',
  1359. bottom: '3%',
  1360. containLabel: true
  1361. },
  1362. tooltip: {
  1363. trigger: 'axis'
  1364. },
  1365. legend: {
  1366. data: ['系统用量', '人工用量', '金额']
  1367. },
  1368. xAxis: [
  1369. {
  1370. type: 'category',
  1371. data: chartLine_data.data1,
  1372. name: '日期'
  1373. }
  1374. ],
  1375. yAxis: [
  1376. {
  1377. type: 'value',
  1378. name: '重量(kg)',
  1379. axisLabel: {
  1380. formatter: '{value}'
  1381. }
  1382. }, {
  1383. type: 'value',
  1384. name: '金额(元)',
  1385. axisLabel: {
  1386. formatter: '{value}'
  1387. }
  1388. }
  1389. ],
  1390. series: [
  1391. {
  1392. name: '系统用量',
  1393. type: 'bar',
  1394. stack: '广告',
  1395. itemStyle: { /* 设置柱状颜色*/
  1396. normal: {
  1397. color: '#61a5e8'
  1398. }
  1399. },
  1400. data: chartLine_data.data2
  1401. }, {
  1402. name: '人工用量',
  1403. type: 'bar',
  1404. stack: '广告',
  1405. itemStyle: { /* 设置柱状颜色*/
  1406. normal: {
  1407. color: 'orange'
  1408. }
  1409. },
  1410. data: chartLine_data.data3
  1411. }, {
  1412. name: '金额',
  1413. type: 'line',
  1414. yAxisIndex: 1,
  1415. data: chartLine_data.data4,
  1416. itemStyle: { /* 设置折线颜色*/
  1417. normal: {
  1418. color: '#ff3131'
  1419. }
  1420. }
  1421. }
  1422. ]
  1423. }
  1424. this.row4.chart2.chartLine.setOption(option)
  1425. window.onresize = function() {
  1426. this.row4.chart2.chartLine.resize()
  1427. }
  1428. },
  1429. getTable8() {
  1430. this.row4.table.listLoading = true
  1431. GetDataByName(this.row4.table.getdataListParm).then(response => {
  1432. console.log('库存预警table数据', response.data.list)
  1433. if (response.data.list !== null) {
  1434. // this.row4.table.list = response.data.list
  1435. this.row4.table.list = [
  1436. { 'id': 1, 'A1': '1', 'A2': '国产燕麦草', 'A3': '150', 'A4': '2' },
  1437. { 'id': 2, 'A1': '2', 'A2': '棉籽', 'A3': '120', 'A4': '3' },
  1438. { 'id': 3, 'A1': '3', 'A2': '麦秸秆', 'A3': '260', 'A4': '6' },
  1439. { 'id': 4, 'A1': '4', 'A2': '花生秧', 'A3': '210', 'A4': '4' },
  1440. { 'id': 5, 'A1': '5', 'A2': '青贮苜蓿', 'A3': '68', 'A4': '2' }
  1441. ]
  1442. this.row4.table.total = response.data.total
  1443. } else {
  1444. this.row4.table.list = []
  1445. }
  1446. setTimeout(() => {
  1447. this.row4.table.listLoading = false
  1448. }, 100)
  1449. })
  1450. },
  1451. handleMore() {
  1452. this.$router.push({ path: '/inventoryManagement/Warning' })
  1453. },
  1454. handleExport() {},
  1455. handleTable(item) {
  1456. if (item == 'row3chartLine1') {
  1457. console.log('计划统计表格')
  1458. this.row3.chart1.isTable = true
  1459. this.row3.chart1.isChart = false
  1460. this.getChart4Table()
  1461. } else if (item == 'row3chartLine2') {
  1462. console.log('泌乳牛采食量表格')
  1463. this.row3.chart2.isTable = true
  1464. this.row3.chart2.isChart = false
  1465. this.getChart5Table()
  1466. }
  1467. },
  1468. handleChart(item) {
  1469. // 显示切换图表
  1470. if (item == 'row3chartLine1') {
  1471. console.log('计划统计图表')
  1472. this.row3.chart1.isTable = false
  1473. this.row3.chart1.isChart = true
  1474. } else if (item == 'row3chartLine2') {
  1475. console.log('泌乳牛采食量图表')
  1476. this.row3.chart2.isTable = false
  1477. this.row3.chart2.isChart = true
  1478. }
  1479. }
  1480. }
  1481. }
  1482. </script>
  1483. <style lang="scss" scoped>
  1484. .Title{
  1485. 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;
  1486. }
  1487. .dashboard-editor-container {
  1488. background-color: #F4F4F4;
  1489. min-height: 100vh;
  1490. .news{
  1491. width: 70%;
  1492. height: 30px;
  1493. background: #fff;
  1494. margin: 0 auto;
  1495. border-radius: 10px;
  1496. text-align: center;
  1497. line-height: 30px;
  1498. color: red;
  1499. b{color: #000;}
  1500. }
  1501. .bottom{
  1502. padding:0 30px;
  1503. h4{text-align: right;}
  1504. .grid-content{
  1505. background: #fff;height: 90px;
  1506. border-radius: 10px;
  1507. }
  1508. .one{
  1509. border: 1px solid #82CBB3;height: 90px;
  1510. .Left{
  1511. float: left;
  1512. width: 65px;
  1513. text-align: center;
  1514. i{font-size: 36px;color:#82CBB3;line-height: 90px;}
  1515. }
  1516. .Right{
  1517. float: left;
  1518. margin-top:15px;
  1519. height: 60px;
  1520. font-weight: 600;
  1521. font-size: 14px;
  1522. line-height: 30px;
  1523. span{
  1524. display: inline-block;
  1525. width: 130px;
  1526. text-align: right;
  1527. }
  1528. }
  1529. }
  1530. .two{
  1531. border: 1px solid #FF9900;
  1532. .Left{
  1533. float: left;
  1534. width: 65px;
  1535. text-align: center;
  1536. i{font-size: 36px;color:#FF9900;line-height: 90px;}
  1537. }
  1538. .Right{
  1539. float: left;
  1540. margin-top:15px;
  1541. height: 60px;
  1542. font-weight: 600;
  1543. font-size: 14px;
  1544. line-height: 30px;
  1545. span{
  1546. display: inline-block;
  1547. width: 130px;
  1548. text-align: right;
  1549. }
  1550. }
  1551. }
  1552. .three{
  1553. border: 1px solid #0099FF;
  1554. .Left{
  1555. float: left;
  1556. width: 65px;
  1557. text-align: center;
  1558. i{font-size: 36px;color:#0099FF;line-height: 90px;}
  1559. }
  1560. .Right{
  1561. float: left;
  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: 130px;
  1570. text-align: right;
  1571. }
  1572. }
  1573. }
  1574. .four{
  1575. border: 1px solid #FF5C5C;
  1576. .Left{
  1577. float: left;
  1578. width: 55px;
  1579. text-align: center;
  1580. i{font-size: 36px;color:#FF5C5C;line-height: 90px;}
  1581. }
  1582. .Right{
  1583. float: left;
  1584. flex: 1;
  1585. height: 60px;
  1586. font-weight: 600;
  1587. font-size: 14px;
  1588. line-height: 30px;
  1589. margin-top:15px;
  1590. span{
  1591. display: inline-block;
  1592. width: 150px;
  1593. text-align: right;
  1594. }
  1595. }
  1596. }
  1597. .car{
  1598. width:100%;height:150px;
  1599. display:flex;
  1600. display: -webkit-flex;
  1601. -webkit-flex-direction:row;
  1602. i{font-size: 50px;width:50px;display: block;line-height: 150px;}
  1603. .carList{
  1604. flex:1;height: 130px;
  1605. .list{
  1606. height: 130px;color: #fff;
  1607. // box-shadow: #000 0px 0px 10px;
  1608. // border-radius: 10px;
  1609. .list-l{
  1610. p{
  1611. padding-left:10px;font-size:14px;line-height: 14px; text-overflow: ellipsis;white-space:nowrap; overflow:hidden;
  1612. }
  1613. }
  1614. .list-r{
  1615. p{
  1616. font-size:14px;line-height: 14px;text-overflow: ellipsis;white-space:nowrap; overflow:hidden;
  1617. }
  1618. }
  1619. }
  1620. }
  1621. }
  1622. }
  1623. }
  1624. </style>