8d59e59c213fbcca94912addc51503b63c0dbd1e.svn-base 76 KB

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